96 lines
3.2 KiB
Diff
96 lines
3.2 KiB
Diff
|
|
From 0e812469e09e2a9a26f47ffbf23a62b41d5db53f Mon Sep 17 00:00:00 2001
|
||
|
|
From: Edward Liaw <edliaw@google.com>
|
||
|
|
Date: Wed, 22 Jun 2022 00:37:08 +0000
|
||
|
|
Subject: [PATCH] futex: disable futex_wait and futex_waitv
|
||
|
|
|
||
|
|
Both tests depend on System V shared memory functions which is
|
||
|
|
disallowed on Android. futex_waitv is implemented in 5.16 so it is
|
||
|
|
currently not available on Android as well.
|
||
|
|
|
||
|
|
Bug: 234151152
|
||
|
|
Test: atest vts_linux_kselftest_x86_64:futex_functional_run.sh_x86_64#futex_functional_run.sh_x86_64
|
||
|
|
Test: atest vts_linux_kselftest_x86_32:futex_functional_run.sh_x86_32#futex_functional_run.sh_x86_32
|
||
|
|
Change-Id: Ia6a170bb1b69fdd5da5014d4727a0485ecbf82bb
|
||
|
|
Signed-off-by: Edward Liaw <edliaw@google.com>
|
||
|
|
---
|
||
|
|
.../selftests/futex/functional/futex_wait.c | 2 --
|
||
|
|
.../selftests/futex/functional/futex_waitv.c | 5 -----
|
||
|
|
.../testing/selftests/futex/functional/run.sh | 20 +++++++++++--------
|
||
|
|
3 files changed, 12 insertions(+), 15 deletions(-)
|
||
|
|
|
||
|
|
diff --git a/tools/testing/selftests/futex/functional/futex_wait.c b/tools/testing/selftests/futex/functional/futex_wait.c
|
||
|
|
index 9bf695431e7aa..685140d9b93d2 100644
|
||
|
|
--- a/tools/testing/selftests/futex/functional/futex_wait.c
|
||
|
|
+++ b/tools/testing/selftests/futex/functional/futex_wait.c
|
||
|
|
@@ -96,8 +96,6 @@ int main(int argc, char *argv[])
|
||
|
|
/* Testing an anon page shared memory */
|
||
|
|
shm_id = shmget(IPC_PRIVATE, 4096, IPC_CREAT | 0666);
|
||
|
|
if (shm_id < 0) {
|
||
|
|
- if (errno == ENOSYS)
|
||
|
|
- exit(KSFT_SKIP);
|
||
|
|
perror("shmget");
|
||
|
|
exit(1);
|
||
|
|
}
|
||
|
|
diff --git a/tools/testing/selftests/futex/functional/futex_waitv.c b/tools/testing/selftests/futex/functional/futex_waitv.c
|
||
|
|
index aafc6a4f25b5d..a94337f677e18 100644
|
||
|
|
--- a/tools/testing/selftests/futex/functional/futex_waitv.c
|
||
|
|
+++ b/tools/testing/selftests/futex/functional/futex_waitv.c
|
||
|
|
@@ -47,11 +47,6 @@ void *waiterfn(void *arg)
|
||
|
|
|
||
|
|
res = futex_waitv(waitv, NR_FUTEXES, 0, &to, CLOCK_MONOTONIC);
|
||
|
|
if (res < 0) {
|
||
|
|
- if (errno == ENOSYS) {
|
||
|
|
- ksft_test_result_skip("futex_waitv syscall not available in this kernel\n");
|
||
|
|
- ksft_print_cnts();
|
||
|
|
- exit(KSFT_SKIP);
|
||
|
|
- }
|
||
|
|
ksft_test_result_fail("futex_waitv returned: %d %s\n",
|
||
|
|
errno, strerror(errno));
|
||
|
|
} else if (res != NR_FUTEXES - 1) {
|
||
|
|
diff --git a/tools/testing/selftests/futex/functional/run.sh b/tools/testing/selftests/futex/functional/run.sh
|
||
|
|
index 9b2dbb88c5f1e..8b9142ae4ba30 100755
|
||
|
|
--- a/tools/testing/selftests/futex/functional/run.sh
|
||
|
|
+++ b/tools/testing/selftests/futex/functional/run.sh
|
||
|
|
@@ -20,12 +20,12 @@
|
||
|
|
|
||
|
|
run_test()
|
||
|
|
{
|
||
|
|
- $@
|
||
|
|
+ $@
|
||
|
|
ret=$?
|
||
|
|
- if [ $ret -ne 0 ] && [ $ret -ne 4 ]; then # KSFT_SKIP=4
|
||
|
|
+ if [ $ret -ne 0 ] && [ $ret -ne 4 ]; then # KSFT_SKIP=4
|
||
|
|
echo "Failed with $ret"
|
||
|
|
- rc=1
|
||
|
|
- fi
|
||
|
|
+ rc=1
|
||
|
|
+ fi
|
||
|
|
}
|
||
|
|
|
||
|
|
# Test for a color capable console
|
||
|
|
@@ -85,13 +85,17 @@ echo
|
||
|
|
run_test ./futex_wait_uninitialized_heap $COLOR
|
||
|
|
run_test ./futex_wait_private_mapped_file $COLOR
|
||
|
|
|
||
|
|
-echo
|
||
|
|
-run_test ./futex_wait $COLOR
|
||
|
|
+# b/234151152
|
||
|
|
+# Disable because system v shared memory not available
|
||
|
|
+#echo
|
||
|
|
+#run_test ./futex_wait $COLOR
|
||
|
|
|
||
|
|
echo
|
||
|
|
run_test ./futex_requeue $COLOR
|
||
|
|
|
||
|
|
-echo
|
||
|
|
-run_test ./futex_waitv $COLOR
|
||
|
|
+# b/234151152
|
||
|
|
+# Disable because system v shared memory not available
|
||
|
|
+#echo
|
||
|
|
+#run_test ./futex_waitv $COLOR
|
||
|
|
|
||
|
|
exit $rc
|
||
|
|
--
|
||
|
|
2.37.0.rc0.104.g0611611a94-goog
|
||
|
|
|