From: eugene.loh@oracle.com
To: dtrace@lists.linux.dev, dtrace-devel@oss.oracle.com
Subject: [PATCH 3/4] test: Do not return 1 for err.*.x checks
Date: Fri, 4 Oct 2024 00:43:54 -0400 [thread overview]
Message-ID: <20241004044355.25870-3-eugene.loh@oracle.com> (raw)
In-Reply-To: <20241004044355.25870-1-eugene.loh@oracle.com>
From: Eugene Loh <eugene.loh@oracle.com>
We can mark tests as expected to fail. In fact, with .x files,
we can mark XFAIL based on a runtime check.
For err.* tests, however, we are expected to fail anyhow. So,
having an err.*.x return 1 is at least confusing... certainly
for the runtest.sh script.
In practice, err.*.x files usually return only 0 or 2 -- that is,
we might elect to skip the test.
The sole exception is err.unloaded_var.x, which checks for
/lib/modules/$(uname -r)/kernel/fs/gfs2/gfs2.ko*. If this module
is missing, the test is supposed to fail, but as it is err.* it is
expected to fail anyhow. So the counterintuitive result is that
if the module is missing, the test produces XPASS.
Change this err.*.x file to skip the test if the module is missing.
Signed-off-by: Eugene Loh <eugene.loh@oracle.com>
---
test/unittest/types/err.unloaded_var.x | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/test/unittest/types/err.unloaded_var.x b/test/unittest/types/err.unloaded_var.x
index 54c61d57d..cc63265a4 100755
--- a/test/unittest/types/err.unloaded_var.x
+++ b/test/unittest/types/err.unloaded_var.x
@@ -2,7 +2,7 @@
# Licensed under the Universal Permissive License v 1.0 as shown at
# http://oss.oracle.com/licenses/upl.
#
-# XFAIL if gfs2.ko not found (exit 1)
+# SKIP if gfs2.ko not found (exit 2)
[[ ! -e /lib/modules/$(uname -r)/kernel/fs/gfs2/gfs2.ko ]] &&
-[[ ! -e /lib/modules/$(uname -r)/kernel/fs/gfs2/gfs2.ko.xz ]] && exit 1;
+[[ ! -e /lib/modules/$(uname -r)/kernel/fs/gfs2/gfs2.ko.xz ]] && exit 2;
exit 0
--
2.43.5
next prev parent reply other threads:[~2024-10-04 4:44 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-04 4:43 [PATCH 1/4] Tweak self-armouring eugene.loh
2024-10-04 4:43 ` [PATCH 2/4] test: Increase timeout due to long shutdown eugene.loh
2024-10-25 21:05 ` Kris Van Hees
2024-10-04 4:43 ` eugene.loh [this message]
2024-10-25 21:09 ` [PATCH 3/4] test: Do not return 1 for err.*.x checks Kris Van Hees
2024-10-04 4:43 ` [PATCH 4/4] test: Do not depend on ext4 eugene.loh
2024-10-25 21:16 ` Kris Van Hees
2024-10-30 20:14 ` Eugene Loh
2024-11-27 16:51 ` Kris Van Hees
2025-09-14 11:18 ` Nick Alcock
2025-09-15 17:39 ` [DTrace-devel] " Kris Van Hees
2024-10-25 21:02 ` [PATCH 1/4] Tweak self-armouring Kris Van Hees
2024-11-29 13:57 ` [DTrace-devel] " Nick Alcock
2024-12-03 11:46 ` Nick Alcock
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=20241004044355.25870-3-eugene.loh@oracle.com \
--to=eugene.loh@oracle.com \
--cc=dtrace-devel@oss.oracle.com \
--cc=dtrace@lists.linux.dev \
/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