io_control01: Initialise the io_stats start structure
PATCH 1/1 io_control01: Initialise the io_stats start structure
struct io_stats start structure is a locally declared structure which when not initialised can be filled with junk values in some platforms like arm. These values are later compared and hence it leads to failure on photon arm platform. Fix is to memset the structure.
Signed-off by: Ashwin Dayanand Kamat <[email protected]>
--- testcases/kernel/controllers/io/io_control01.c | 1 + 1 file changed, 1 insertion(+)
testcases/kernel/controllers/io/io_control01.c +1 -0
@@ -55,6 +55,7 @@ static void run(void)char *buf =SAFE_MALLOC (MAX ((size_t )BUFSIZ , pgsz));struct io_stats start; +memset (&start,0 ,sizeof (struct io_stats ));SAFE_CG_READ (tst_cg,"io.stat" , buf,BUFSIZ -1 ); line =strtok_r (buf,"\n" , &buf_ptr);while (line) {
Signature · 5 lines
2.39.0 -- Mailing list info: https://lists.linux.it/listinfo/ltp
Hi!
Applied, thanks.
Signature · 5 lines
Cyril Hrubis [email protected] -- Mailing list info: https://lists.linux.it/listinfo/ltp