* [LTP] [PATCH] io_control01: Initialise the io_stats start structure
@ 2023-03-30 5:23 Ashwin Dayanand Kamat via ltp
2023-03-30 9:34 ` Cyril Hrubis
0 siblings, 1 reply; 2+ messages in thread
From: Ashwin Dayanand Kamat via ltp @ 2023-03-30 5:23 UTC (permalink / raw)
To: ltp, kashwindayan, akaher
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 <kashwindayan@vmware.com>
---
testcases/kernel/controllers/io/io_control01.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/testcases/kernel/controllers/io/io_control01.c b/testcases/kernel/controllers/io/io_control01.c
index c4e171af5..691196886 100644
--- a/testcases/kernel/controllers/io/io_control01.c
+++ b/testcases/kernel/controllers/io/io_control01.c
@@ -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) {
--
2.39.0
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [LTP] [PATCH] io_control01: Initialise the io_stats start structure
2023-03-30 5:23 [LTP] [PATCH] io_control01: Initialise the io_stats start structure Ashwin Dayanand Kamat via ltp
@ 2023-03-30 9:34 ` Cyril Hrubis
0 siblings, 0 replies; 2+ messages in thread
From: Cyril Hrubis @ 2023-03-30 9:34 UTC (permalink / raw)
To: Ashwin Dayanand Kamat; +Cc: akaher, ltp
Hi!
Applied, thanks.
--
Cyril Hrubis
chrubis@suse.cz
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-03-30 9:33 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-03-30 5:23 [LTP] [PATCH] io_control01: Initialise the io_stats start structure Ashwin Dayanand Kamat via ltp
2023-03-30 9:34 ` Cyril Hrubis
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.