Skip to content

Commit

Permalink
Revert "selftests: futex: Add FUTEX_WAIT_MULTIPLE wouldblock test"
Browse files Browse the repository at this point in the history
This reverts commit d45f432.
  • Loading branch information
xanmod committed Dec 17, 2021
1 parent 91e76e2 commit d297df5
Showing 1 changed file with 2 additions and 26 deletions.
28 changes: 2 additions & 26 deletions tools/testing/selftests/futex/functional/futex_wait_wouldblock.c
Expand Up @@ -12,7 +12,6 @@
*
* HISTORY
* 2009-Nov-14: Initial version by Gowrishankar <gowrishankar.m@in.ibm.com>
* 2019-Dec-13: Add WAIT_MULTIPLE test by Krisman <krisman@collabora.com>
*
*****************************************************************************/

Expand Down Expand Up @@ -41,7 +40,6 @@ int main(int argc, char *argv[])
{
struct timespec to = {.tv_sec = 0, .tv_nsec = timeout_ns};
futex_t f1 = FUTEX_INITIALIZER;
struct futex_wait_block fwb = {&f1, f1+1, 0};
int res, ret = RET_PASS;
int c;

Expand All @@ -63,7 +61,7 @@ int main(int argc, char *argv[])
}

ksft_print_header();
ksft_set_plan(2);
ksft_set_plan(1);
ksft_print_msg("%s: Test the unexpected futex value in FUTEX_WAIT\n",
basename(argv[0]));

Expand All @@ -73,30 +71,8 @@ int main(int argc, char *argv[])
fail("futex_wait returned: %d %s\n",
res ? errno : res, res ? strerror(errno) : "");
ret = RET_FAIL;
} else
ksft_test_result_pass("futex_wait wouldblock succeeds\n");

info("Calling futex_wait_multiple on f1: %u @ %p with val=%u\n",
f1, &f1, f1+1);
res = futex_wait_multiple(&fwb, 1, NULL, FUTEX_PRIVATE_FLAG);

#ifdef __ILP32__
if (res != -1 || errno != ENOSYS) {
ksft_test_result_fail("futex_wait_multiple returned %d\n",
res < 0 ? errno : res);
ret = RET_FAIL;
} else {
ksft_test_result_skip("futex_wait_multiple not supported at x32\n");
}
#else
if (!res || errno != EWOULDBLOCK) {
ksft_test_result_fail("futex_wait_multiple returned %d\n",
res < 0 ? errno : res);
ret = RET_FAIL;
}
ksft_test_result_pass("futex_wait_multiple wouldblock succeeds\n");
#endif /* __ILP32__ */

ksft_print_cnts();
print_result(TEST_NAME, ret);
return ret;
}

0 comments on commit d297df5

Please sign in to comment.