From: Li Wang <liwang@redhat.com>
To: ltp@lists.linux.it, chrubis@suse.cz
Subject: [LTP] [PATCH v2] msgstress01: remove TWARN from runtime remaining
Date: Thu, 27 Jun 2024 11:14:40 +0800 [thread overview]
Message-ID: <20240627031440.799114-1-liwang@redhat.com> (raw)
In-Reply-To: <CAEemH2fsBssjDyyozHnFt4T5y7LCWFEDqfN3nE7t3kyd19FjLg@mail.gmail.com>
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...
Signed-off-by: Li Wang <liwang@redhat.com>
---
testcases/kernel/syscalls/ipc/msgstress/msgstress01.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/testcases/kernel/syscalls/ipc/msgstress/msgstress01.c b/testcases/kernel/syscalls/ipc/msgstress/msgstress01.c
index 8b1e9a8c0..9231a0b5f 100644
--- a/testcases/kernel/syscalls/ipc/msgstress/msgstress01.c
+++ b/testcases/kernel/syscalls/ipc/msgstress/msgstress01.c
@@ -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");
}
--
2.45.2
--
Mailing list info: https://lists.linux.it/listinfo/ltp
next prev parent reply other threads:[~2024-06-27 3:15 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-25 10:01 [LTP] [PATCH] msgstress01: remove TWARN type from runtime remaining Li Wang
2024-06-26 13:39 ` Cyril Hrubis
2024-06-27 2:41 ` Li Wang
2024-06-27 3:14 ` Li Wang [this message]
2024-06-27 11:40 ` [LTP] [PATCH v2] msgstress01: remove TWARN " Cyril Hrubis
2024-06-27 11:46 ` Li Wang
2024-06-27 11:47 ` Cyril Hrubis
2024-06-27 11:59 ` Li Wang
2024-06-27 12:04 ` Cyril Hrubis
2024-06-27 12:15 ` Li Wang
2024-06-27 12:53 ` Cyril Hrubis
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240627031440.799114-1-liwang@redhat.com \
--to=liwang@redhat.com \
--cc=chrubis@suse.cz \
--cc=ltp@lists.linux.it \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox