From: "Jason A. Donenfeld" <Jason@zx2c4.com>
To: linux-kselftest@vger.kernel.org, greg@kroah.com,
skhan@linuxfoundation.org
Cc: "Jason A. Donenfeld" <Jason@zx2c4.com>
Subject: [PATCH kselftest v2 2/4] selftests: vDSO: unconditionally build getrandom test
Date: Sun, 6 Oct 2024 06:40:15 +0200 [thread overview]
Message-ID: <20241006044017.2417623-2-Jason@zx2c4.com> (raw)
In-Reply-To: <20241006044017.2417623-1-Jason@zx2c4.com>
Rather than building on supported archs, build on all archs, and then
use the presence of the symbol in the vDSO to either skip the test or
move forward with it.
Note that this means that this test no longer checks whether the symbol
was correctly added to the kernel. But hopefully this will be clear
enough to developers and we'll cross our fingers that symbols aren't
removed by accident and not caught after this change.
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
---
tools/testing/selftests/vDSO/Makefile | 2 --
tools/testing/selftests/vDSO/vdso_test_getrandom.c | 2 +-
2 files changed, 1 insertion(+), 3 deletions(-)
diff --git a/tools/testing/selftests/vDSO/Makefile b/tools/testing/selftests/vDSO/Makefile
index 2c38c9c6d056..96b4f2a766e2 100644
--- a/tools/testing/selftests/vDSO/Makefile
+++ b/tools/testing/selftests/vDSO/Makefile
@@ -10,9 +10,7 @@ ifeq ($(ARCH),$(filter $(ARCH),x86 x86_64))
TEST_GEN_PROGS += vdso_standalone_test_x86
endif
TEST_GEN_PROGS += vdso_test_correctness
-ifeq ($(ARCH)$(CONFIG_X86_32),$(filter $(ARCH)$(CONFIG_X86_32),x86 x86_64 loongarch arm64 powerpc s390))
TEST_GEN_PROGS += vdso_test_getrandom
-endif
ifneq ($(wildcard $(top_srcdir)/tools/arch/$(SRCARCH)/vdso/vgetrandom-chacha.S),)
TEST_GEN_PROGS += vdso_test_chacha
endif
diff --git a/tools/testing/selftests/vDSO/vdso_test_getrandom.c b/tools/testing/selftests/vDSO/vdso_test_getrandom.c
index 72a1d9b43a84..5489a2f07434 100644
--- a/tools/testing/selftests/vDSO/vdso_test_getrandom.c
+++ b/tools/testing/selftests/vDSO/vdso_test_getrandom.c
@@ -119,7 +119,7 @@ static void vgetrandom_init(void)
vgrnd.fn = (__typeof__(vgrnd.fn))vdso_sym(version, name);
if (!vgrnd.fn) {
printf("%s is missing!\n", name);
- exit(KSFT_FAIL);
+ exit(KSFT_SKIP);
}
ret = VDSO_CALL(vgrnd.fn, 5, NULL, 0, 0, &vgrnd.params, ~0UL);
if (ret == -ENOSYS) {
--
2.46.0
next prev parent reply other threads:[~2024-10-06 4:41 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <Zv20olVBlnxL9UnS@zx2c4.com>
2024-10-03 3:13 ` [PATCH kselftest 0/3] getrandom & chacha cleanups Jason A. Donenfeld
2024-10-03 3:13 ` [PATCH kselftest 1/3] selftests: vDSO: condition chacha build on chacha implementation Jason A. Donenfeld
2024-10-03 3:13 ` [PATCH kselftest 2/3] selftests: vDSO: unconditionally build getrandom test Jason A. Donenfeld
2024-10-03 3:13 ` [PATCH kselftest 3/3] selftests: vDSO: improve getrandom and chacha error messages Jason A. Donenfeld
2024-10-06 3:35 ` kernel test robot
2024-10-06 4:35 ` Jason A. Donenfeld
2024-10-06 4:40 ` [PATCH kselftest v2 1/4] selftests: vDSO: condition chacha build on chacha implementation Jason A. Donenfeld
2024-10-06 4:40 ` Jason A. Donenfeld [this message]
2024-10-06 4:40 ` [PATCH kselftest v2 3/4] selftests: vDSO: improve getrandom and chacha error messages Jason A. Donenfeld
2024-10-06 4:40 ` [PATCH kselftest v2 4/4] selftests: vDSO: unconditionally build chacha test Jason A. Donenfeld
2024-10-07 20:53 ` Shuah Khan
2024-10-07 21:45 ` [PATCH kselftest v3 1/3] " Jason A. Donenfeld
2024-10-07 21:45 ` [PATCH kselftest v3 2/3] selftests: vDSO: unconditionally build getrandom test Jason A. Donenfeld
2024-10-07 21:45 ` [PATCH kselftest v3 3/3] selftests: vDSO: improve getrandom and chacha error messages Jason A. Donenfeld
2024-10-08 21:36 ` [PATCH kselftest v3 1/3] selftests: vDSO: unconditionally build chacha test Shuah Khan
2024-10-03 17:18 ` [PATCH kselftest 4/3] " Jason A. Donenfeld
2024-10-03 22:42 ` [PATCH kselftest 0/3] getrandom & chacha cleanups Shuah Khan
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=20241006044017.2417623-2-Jason@zx2c4.com \
--to=jason@zx2c4.com \
--cc=greg@kroah.com \
--cc=linux-kselftest@vger.kernel.org \
--cc=skhan@linuxfoundation.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox