msgstress01: remove TWARN type from runtime remaining
PATCH 1/1 msgstress01: remove TWARN type from runtime remaining
To mask the issue where a warning is being treated as a failure in CI logs, we modify the code to change the message type from TWARN to TINFO.
This warning easily happens especaill on debug/slower kernel:
msgstress01.c:217: TWARN: Out of runtime during forking...
--- testcases/kernel/syscalls/ipc/msgstress/msgstress01.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
testcases/kernel/syscalls/ipc/msgstress/msgstress01.c +1 -1
@@ -214,7 +214,7 @@ static void run(void)break ;if (!tst_remaining_runtime ()) { -tst_res (TWARN ,"Out of runtime during forking..." ); +tst_res (TINFO ,"Warning: Out of runtime during forking..." ); *stop =1 ;break ; }
Signature · 5 lines
2.45.2 -- Mailing list info: https://lists.linux.it/listinfo/ltp
Hi!
Quoted 10 lines
Signed-off-by Li Wang <[email protected]>--- testcases/kernel/syscalls/ipc/msgstress/msgstress01.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)testcases/kernel/syscalls/ipc/msgstress/msgstress01.c +0
-0
testcases/kernel/syscalls/ipc/msgstress/msgstress01.c static void run(void) · line 217
Quoted 5 lines
testcases/kernel/syscalls/ipc/msgstress/msgstress01.c +1
-1@@ -214,7 +214,7 @@ static void run(void)break ;if (!tst_remaining_runtime ()) { -tst_res (TWARN ,"Out of runtime during forking..." ); +tst_res (TINFO ,"Warning: Out of runtime during forking..." );
Maybe this should be a TCONF instead, since we were not able to run the test because the kernel is too slow...
Quoted 6 lines
testcases/kernel/syscalls/ipc/msgstress/msgstress01.c +0
-0*stop =1 ;break ; }Signature · 1 line
2.45.2
Signature · 5 lines
Cyril Hrubis [email protected] -- Mailing list info: https://lists.linux.it/listinfo/ltp
Quoted 5 lines · Cyril Hrubis
Quoted 5 lines
testcases/kernel/syscalls/ipc/msgstress/msgstress01.c +0
-0@@ -214,7 +214,7 @@ static void run(void)break ;
Quoted 8 lines
testcases/kernel/syscalls/ipc/msgstress/msgstress01.c static void run(void)
Quoted 3 lines
testcases/kernel/syscalls/ipc/msgstress/msgstress01.c +1
-1if (!tst_remaining_runtime ()) { -tst_res (TWARN ,"Out of runtime during forking..." ); + tst_res(TINFO, "Warning: Out of runtime duringforking...");
Maybe this should be a TCONF instead, since we were not able to run the test because the kernel is too slow...
Yeah, good point, once the '*stop' set to 1 the rest process doesn't get perform as well, so TCONF should be better.
Signature · 5 lines
Regards, Li Wang -- Mailing list info: https://lists.linux.it/listinfo/ltp
PATCH v2 1/1 msgstress01: remove TWARN from runtime remaining
To mask the issue where a warning is being treated as a failure in CI logs, we modify the code to change the message type from TWARN to TCONF.
Additionally, we refine the condition under which the test reports as PASS to ensure that it also accounts for the stop flag. This prevents the test from incorrectly reporting success when it had to stop due to runtime constraints.
This warning easily happens especaill on debug/slower kernel:
msgstress01.c:217: TWARN: Out of runtime during forking...
--- testcases/kernel/syscalls/ipc/msgstress/msgstress01.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
testcases/kernel/syscalls/ipc/msgstress/msgstress01.c +2 -2
@@ -214,7 +214,7 @@ static void run(void)break ;if (!tst_remaining_runtime ()) { -tst_res (TWARN ,"Out of runtime during forking..." ); +tst_res (TCONF ,"Out of runtime during forking..." ); *stop =1 ;break ; }
@@ -242,7 +242,7 @@ static void run(void)tst_reap_children ();remove_queues (); -if (!(*fail)) +if (!(*fail) && !(*stop))tst_res (TPASS ,"Test passed. All messages have been received" ); }
Signature · 5 lines
2.45.2 -- Mailing list info: https://lists.linux.it/listinfo/ltp
Re: [LTP] [PATCH v2] msgstress01: remove TWARN from runtime remaining
Hi!
Quoted 22 lines
To mask the issue where a warning is being treated as a failure in CI logs, we modify the code to change the message type from TWARN to TCONF.
Additionally, we refine the condition under which the test reports as PASS to ensure that it also accounts for the
stopflag. This prevents the test from incorrectly reporting success when it had to stop due to runtime constraints.This warning easily happens especaill on debug/slower kernel:
msgstress01.c:217: TWARN: Out of runtime during forking...
Signed-off-by Li Wang <[email protected]>--- testcases/kernel/syscalls/ipc/msgstress/msgstress01.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)testcases/kernel/syscalls/ipc/msgstress/msgstress01.c +0
-0
testcases/kernel/syscalls/ipc/msgstress/msgstress01.c static void run(void) · line 217
Quoted 5 lines
testcases/kernel/syscalls/ipc/msgstress/msgstress01.c +1
-1@@ -214,7 +214,7 @@ static void run(void)break ;if (!tst_remaining_runtime ()) { -tst_res (TWARN ,"Out of runtime during forking..." ); +tst_res (TCONF ,"Out of runtime during forking..." );
This part looks good.
testcases/kernel/syscalls/ipc/msgstress/msgstress01.c static void run(void) · line 246
Quoted 10 lines
testcases/kernel/syscalls/ipc/msgstress/msgstress01.c +1
-1*stop =1 ;break ; }@@ -242,7 +242,7 @@ static void run(void)tst_reap_children ();remove_queues (); -if (!(*fail)) +if (!(*fail) && !(*stop))tst_res (TPASS ,"Test passed. All messages have been received" );
However this would cause the test to report TBROK in the case that we ended up out of runtime in the second for loop because in that case no results will be reported by the test.
Signature · 5 lines
Cyril Hrubis [email protected] -- Mailing list info: https://lists.linux.it/listinfo/ltp
Re: [LTP] [PATCH v2] msgstress01: remove TWARN from runtime remaining
Quoted 39 lines · Cyril Hrubis
Hi!
Quoted 10 lines
To mask the issue where a warning is being treated as a failure in CI logs, we modify the code to change the message type from TWARN to TCONF.
Additionally, we refine the condition under which the test reports as PASS to ensure that it also accounts for the
stopflag. This prevents the test from incorrectly reporting success when it had to stop due to runtime constraints.This warning easily happens especaill on debug/slower kernel:
Review
Quoted 8 lines
msgstress01.c:217: TWARN: Out of runtime during forking...
Signed-off-by Li Wang <[email protected]>--- testcases/kernel/syscalls/ipc/msgstress/msgstress01.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)(quoted diff) +0
-0
b/testcases/kernel/syscalls/ipc/msgstress/msgstress01.ctestcases/kernel/syscalls/ipc/msgstress/msgstress01.c static void run(void) · line 217
Quoted 9 lines
index
8b1e9a8c0..9231a0b5f100644testcases/kernel/syscalls/ipc/msgstress/msgstress01.c +1
-1@@ -214,7 +214,7 @@ static void run(void)break ;if (!tst_remaining_runtime ()) { -tst_res (TWARN ,"Out of runtime during forking..." ); +tst_res (TCONF ,"Out of runtime during forking..." );This part looks good.
Quoted 7 lines
testcases/kernel/syscalls/ipc/msgstress/msgstress01.c +0
-0*stop =1 ;break ; }@@ -242,7 +242,7 @@ static void run(void)tst_reap_children ();remove_queues ();
Quoted 9 lines
testcases/kernel/syscalls/ipc/msgstress/msgstress01.c static void run(void)
Quoted 3 lines
testcases/kernel/syscalls/ipc/msgstress/msgstress01.c +1
-1-if (!(*fail)) +if (!(*fail) && !(*stop)) tst_res(TPASS, "Test passed. All messages have beenreceived");
However this would cause the test to report TBROK in the case that we ended up out of runtime in the second for loop because in that case no results will be reported by the test.
Ah yes, but if the second runtime out happens, it still not get an expected result on the test, so maybe we shouldn't print "TPASS + All messages received"?
Signature · 5 lines
Regards, Li Wang -- Mailing list info: https://lists.linux.it/listinfo/ltp
Re: [LTP] [PATCH v2] msgstress01: remove TWARN from runtime remaining
Hi!
Quoted 3 lines
Ah yes, but if the second runtime out happens, it still not get an expected result on the test, so maybe we shouldn't print "TPASS + All messages received"?
I suppose that we can print "Some messages received" instead in the case that stop was in the second loop.
Signature · 5 lines
Cyril Hrubis [email protected] -- Mailing list info: https://lists.linux.it/listinfo/ltp
Re: [LTP] [PATCH v2] msgstress01: remove TWARN from runtime remaining
Quoted 8 lines · Cyril Hrubis
Hi!
Quoted 3 lines
Ah yes, but if the second runtime out happens, it still not get an expected result on the test, so maybe we shouldn't print "TPASS + All messages received"?
I suppose that we can print "Some messages received" instead in the case that stop was in the second loop.
How about giving the actual finished numbers?
if (!(*fail))
- tst_res(TPASS, "Test passed. All messages have been
received");
+ tst_res(TPASS, "Test passed. %d messages have been
received", *finished);
Signature · 5 lines
Regards, Li Wang -- Mailing list info: https://lists.linux.it/listinfo/ltp
Re: [LTP] [PATCH v2] msgstress01: remove TWARN from runtime remaining
Hi!
Quoted 7 lines
How about giving the actual finished numbers?
if (!(*fail))- tst_res(TPASS, "Test passed. All messages have been
received");
+ tst_res(TPASS, "Test passed. %d messages have been
received", *finished);
This is not the number of messages though, it's incremented by writer threads once they send num_iteration messages. So most of the time it will either be 0 if we had to stop the execution because of runtime, or 2 * num_messages, if we managed finish in time.
Signature · 5 lines
Cyril Hrubis [email protected] -- Mailing list info: https://lists.linux.it/listinfo/ltp
Re: [LTP] [PATCH v2] msgstress01: remove TWARN from runtime remaining
Cyril Hrubis <[email protected]> wrote:
This is not the number of messages though, it's incremented by writer
Quoted 4 lines
threads once they send
num_iterationmessages. So most of the time it will either be 0 if we had to stop the execution because of runtime, or 2 *num_messages, if we managed finish in time.
Make sense!
I modified the patch and pushed it like this:
testcases/kernel/syscalls/ipc/msgstress/msgstress01.c +1 -2
@@ -214,7 +214,7 @@ static void run(void)break ;if (!tst_remaining_runtime ()) { -tst_res (TWARN ,"Out of runtime during forking..." ); +tst_res (TCONF ,"Out of runtime during forking..." ); *stop =1 ;break ; }
@@ -243,7 +243,7 @@ static void run(void)remove_queues ();if (!(*fail)) - tst_res(TPASS, "Test passed. All messages have been
received");
+ tst_res(TPASS, "Some messages received");
}
Signature · 5 lines
Regards, Li Wang -- Mailing list info: https://lists.linux.it/listinfo/ltp
Re: [LTP] [PATCH v2] msgstress01: remove TWARN from runtime remaining
Hi!
Quoted 4 lines
if (!(*fail))- tst_res(TPASS, "Test passed. All messages have been
received");
+tst_res(TPASS, "Some messages received");
We could have done:
if (*stop) tst_res(TPASS, "Some messages received"); else tst_res(TPASS, "All messages received");
But I guess that in the end nobody will read the logs as long as the test succeeds...
Signature · 5 lines
Cyril Hrubis [email protected] -- Mailing list info: https://lists.linux.it/listinfo/ltp