From: Sasha Levin <sashal@kernel.org>
To: linux-kernel@vger.kernel.org, stable@vger.kernel.org
Cc: Cristian Marussi <cristian.marussi@arm.com>,
Aleksa Sarai <cyphar@cyphar.com>,
Shuah Khan <skhan@linuxfoundation.org>,
Sasha Levin <sashal@kernel.org>,
shuah@kernel.org, brauner@kernel.org,
baolin.wang@linux.alibaba.com, linux-kselftest@vger.kernel.org
Subject: [PATCH AUTOSEL 5.15 13/36] selftests: openat2: Skip testcases that fail with EOPNOTSUPP
Date: Wed, 9 Feb 2022 13:37:36 -0500 [thread overview]
Message-ID: <20220209183759.47134-13-sashal@kernel.org> (raw)
In-Reply-To: <20220209183759.47134-1-sashal@kernel.org>
From: Cristian Marussi <cristian.marussi@arm.com>
[ Upstream commit ac9e0a250bb155078601a5b999aab05f2a04d1ab ]
Skip testcases that fail since the requested valid flags combination is not
supported by the underlying filesystem.
Cc: Aleksa Sarai <cyphar@cyphar.com>
Signed-off-by: Cristian Marussi <cristian.marussi@arm.com>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
tools/testing/selftests/openat2/openat2_test.c | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
diff --git a/tools/testing/selftests/openat2/openat2_test.c b/tools/testing/selftests/openat2/openat2_test.c
index 1bddbe934204c..7fb902099de45 100644
--- a/tools/testing/selftests/openat2/openat2_test.c
+++ b/tools/testing/selftests/openat2/openat2_test.c
@@ -259,6 +259,16 @@ void test_openat2_flags(void)
unlink(path);
fd = sys_openat2(AT_FDCWD, path, &test->how);
+ if (fd < 0 && fd == -EOPNOTSUPP) {
+ /*
+ * Skip the testcase if it failed because not supported
+ * by FS. (e.g. a valid O_TMPFILE combination on NFS)
+ */
+ ksft_test_result_skip("openat2 with %s fails with %d (%s)\n",
+ test->name, fd, strerror(-fd));
+ goto next;
+ }
+
if (test->err >= 0)
failed = (fd < 0);
else
@@ -303,7 +313,7 @@ void test_openat2_flags(void)
else
resultfn("openat2 with %s fails with %d (%s)\n",
test->name, test->err, strerror(-test->err));
-
+next:
free(fdpath);
fflush(stdout);
}
--
2.34.1
next prev parent reply other threads:[~2022-02-09 18:39 UTC|newest]
Thread overview: 46+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-09 18:37 [PATCH AUTOSEL 5.15 01/36] platform/x86: touchscreen_dmi: Add info for the RWC NANOTE P8 AY07J 2-in-1 Sasha Levin
2022-02-09 18:37 ` [PATCH AUTOSEL 5.15 02/36] platform/x86: ISST: Fix possible circular locking dependency detected Sasha Levin
2022-02-09 18:37 ` [PATCH AUTOSEL 5.15 03/36] kunit: tool: Import missing importlib.abc Sasha Levin
2022-02-09 18:37 ` [PATCH AUTOSEL 5.15 04/36] selftests: rtc: Increase test timeout so that all tests run Sasha Levin
2022-02-09 18:37 ` [PATCH AUTOSEL 5.15 05/36] kselftest: signal all child processes Sasha Levin
2022-02-09 18:37 ` [PATCH AUTOSEL 5.15 06/36] selftests: netfilter: check stateless nat udp checksum fixup Sasha Levin
2022-02-09 18:37 ` [PATCH AUTOSEL 5.15 07/36] net: ieee802154: at86rf230: Stop leaking skb's Sasha Levin
2022-02-09 18:37 ` [PATCH AUTOSEL 5.15 08/36] selftests/zram: Skip max_comp_streams interface on newer kernel Sasha Levin
2022-02-09 18:37 ` [PATCH AUTOSEL 5.15 09/36] selftests/zram01.sh: Fix compression ratio calculation Sasha Levin
2022-02-09 18:37 ` [PATCH AUTOSEL 5.15 10/36] selftests/zram: Adapt the situation that /dev/zram0 is being used Sasha Levin
2022-02-09 18:37 ` [PATCH AUTOSEL 5.15 11/36] selftests: openat2: Print also errno in failure messages Sasha Levin
2022-02-09 18:37 ` [PATCH AUTOSEL 5.15 12/36] selftests: openat2: Add missing dependency in Makefile Sasha Levin
2022-02-09 18:37 ` Sasha Levin [this message]
2022-02-09 18:37 ` [PATCH AUTOSEL 5.15 14/36] selftests: skip mincore.check_file_mmap when fs lacks needed support Sasha Levin
2022-02-09 18:37 ` [PATCH AUTOSEL 5.15 15/36] ax25: improve the incomplete fix to avoid UAF and NPD bugs Sasha Levin
2022-02-09 18:37 ` [PATCH AUTOSEL 5.15 16/36] pinctrl: bcm63xx: fix unmet dependency on REGMAP for GPIO_REGMAP Sasha Levin
2022-02-09 18:37 ` [PATCH AUTOSEL 5.15 17/36] vfs: make freeze_super abort when sync_filesystem returns error Sasha Levin
2022-02-09 18:37 ` [PATCH AUTOSEL 5.15 18/36] quota: make dquot_quota_sync return errors from ->sync_fs Sasha Levin
2022-02-09 18:37 ` [PATCH AUTOSEL 5.15 19/36] iommu: Fix potential use-after-free during probe Sasha Levin
2022-02-09 18:37 ` Sasha Levin
2022-02-09 18:37 ` [PATCH AUTOSEL 5.15 20/36] scsi: pm80xx: Fix double completion for SATA devices Sasha Levin
2022-02-09 18:37 ` [PATCH AUTOSEL 5.15 21/36] kselftest: Fix vdso_test_abi return status Sasha Levin
2022-02-09 18:37 ` [PATCH AUTOSEL 5.15 22/36] scsi: core: Reallocate device's budget map on queue depth change Sasha Levin
2022-02-09 18:37 ` [PATCH AUTOSEL 5.15 23/36] scsi: pm8001: Fix use-after-free for aborted TMF sas_task Sasha Levin
2022-02-09 18:37 ` [PATCH AUTOSEL 5.15 24/36] scsi: pm8001: Fix use-after-free for aborted SSP/STP sas_task Sasha Levin
2022-02-09 18:37 ` [PATCH AUTOSEL 5.15 25/36] drm/amd: Warn users about potential s0ix problems Sasha Levin
2022-02-09 18:37 ` Sasha Levin
2022-02-09 18:37 ` Sasha Levin
2022-02-09 18:37 ` [PATCH AUTOSEL 5.15 26/36] nvme: fix a possible use-after-free in controller reset during load Sasha Levin
2022-02-09 18:37 ` [PATCH AUTOSEL 5.15 27/36] nvme-tcp: fix possible use-after-free in transport error_recovery work Sasha Levin
2022-02-09 18:37 ` [PATCH AUTOSEL 5.15 28/36] nvme-rdma: " Sasha Levin
2022-02-09 18:37 ` [PATCH AUTOSEL 5.15 29/36] net: sparx5: do not refer to skb after passing it on Sasha Levin
2022-02-09 18:37 ` Sasha Levin
2022-02-09 18:37 ` [PATCH AUTOSEL 5.15 30/36] drm/amd: add support to check whether the system is set to s3 Sasha Levin
2022-02-09 18:37 ` Sasha Levin
2022-02-09 18:37 ` Sasha Levin
2022-02-09 18:37 ` [PATCH AUTOSEL 5.15 31/36] drm/amd: Only run s3 or s0ix if system is configured properly Sasha Levin
2022-02-09 18:37 ` Sasha Levin
2022-02-09 18:37 ` Sasha Levin
2022-02-09 18:37 ` [PATCH AUTOSEL 5.15 32/36] drm/amdgpu: fix logic inversion in check Sasha Levin
2022-02-09 18:37 ` Sasha Levin
2022-02-09 18:37 ` Sasha Levin
2022-02-09 18:37 ` [PATCH AUTOSEL 5.15 33/36] x86/Xen: streamline (and fix) PV CPU enumeration Sasha Levin
2022-02-09 18:37 ` [PATCH AUTOSEL 5.15 34/36] Revert "module, async: async_synchronize_full() on module init iff async is used" Sasha Levin
2022-02-09 18:37 ` [PATCH AUTOSEL 5.15 35/36] gcc-plugins/stackleak: Use noinstr in favor of notrace Sasha Levin
2022-02-09 18:37 ` [PATCH AUTOSEL 5.15 36/36] random: wake up /dev/random writers after zap Sasha Levin
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=20220209183759.47134-13-sashal@kernel.org \
--to=sashal@kernel.org \
--cc=baolin.wang@linux.alibaba.com \
--cc=brauner@kernel.org \
--cc=cristian.marussi@arm.com \
--cc=cyphar@cyphar.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=shuah@kernel.org \
--cc=skhan@linuxfoundation.org \
--cc=stable@vger.kernel.org \
/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 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.