[PATCH RESEND] selftests/futex: Order calls in futex_requeue

2024-09-03 Thread Edward Liaw
0 not ok 3 futex_requeue many returned: 0 not ok 4 futex_requeue many returned: 0 Instead, replace the sleep with barriers to make the sequencing explicit. Fixes: 7cb5dd8e2c8c ("selftests: futex: Add futex compare requeue test") Reviewed-by: Muhammad Usama Anjum Signed-off-by: Edward Liaw

[PATCH 1/3] Revert "selftests/mm: fix deadlock for fork after pthread_create on ARM"

2024-10-18 Thread Edward Liaw
fork after pthread_create on ARM") CC: Ryan Roberts Signed-off-by: Edward Liaw --- tools/testing/selftests/mm/uffd-unit-tests.c | 7 --- 1 file changed, 7 deletions(-) diff --git a/tools/testing/selftests/mm/uffd-unit-tests.c b/tools/testing/selftests/mm/uffd-unit-tests.c index c8

Re: [PATCH 1/2] selftests/mm: replace atomic_bool with pthread_barrier_t

2024-10-18 Thread Edward Liaw
On Fri, Oct 18, 2024 at 7:37 AM Ryan Roberts wrote: > > On 03/10/2024 22:17, Edward Liaw wrote: > > Swaps synchronization primitive with pthread_barrier, so that > > stdatomic.h does not need to be included. > > > > The synchronization is needed on Android

[PATCH 3/3] selftests/mm: fix deadlock for fork after pthread_create with atomic_bool

2024-10-18 Thread Edward Liaw
ned-off-by: Edward Liaw --- tools/testing/selftests/mm/uffd-unit-tests.c | 5 + 1 file changed, 5 insertions(+) diff --git a/tools/testing/selftests/mm/uffd-unit-tests.c b/tools/testing/selftests/mm/uffd-unit-tests.c index b3d21eed203d..a2e71b1636e7 100644 --- a/tools/testing/selftests/mm/uffd-un

[PATCH 2/3] Revert "selftests/mm: replace atomic_bool with pthread_barrier_t"

2024-10-18 Thread Edward Liaw
with pthread_barrier_t") CC: Ryan Roberts Signed-off-by: Edward Liaw --- tools/testing/selftests/mm/uffd-common.c | 5 ++--- tools/testing/selftests/mm/uffd-common.h | 3 ++- tools/testing/selftests/mm/uffd-unit-tests.c | 14 ++ 3 files changed, 10 insertions(+), 12

[PATCH 0/3] selftests/mm: revert pthread_barrier change and

2024-10-18 Thread Edward Liaw
and replaces the fix for wp-fork-with-event with the original use of atomic_bool. Edward Liaw (3): Revert "selftests/mm: fix deadlock for fork after pthread_create on ARM" Revert "selftests/mm: replace atomic_bool with pthread_barrier_t" selftests/mm: fix dea

[PATCH 0/2] selftests/mm: fix deadlock after pthread_create

2024-10-03 Thread Edward Liaw
On Android arm, pthread_create followed by a fork caused a deadlock in the case where the fork required work to be completed by the created thread. Updated the synchronization primitive to use pthread_barrier instead of atomic_bool. Applied the same fix to the wp-fork-with-event test. Edward

[PATCH 2/2] selftests/mm: fix deadlock for fork after pthread_create on ARM

2024-10-03 Thread Edward Liaw
On Android with arm, there is some synchronization needed to avoid a deadlock when forking after pthread_create. Fixes: cff294582798 ("selftests/mm: extend and rename uffd pagemap test") Signed-off-by: Edward Liaw --- tools/testing/selftests/mm/uffd-unit-tests.c | 7 +++ 1 file

[PATCH 1/2] selftests/mm: replace atomic_bool with pthread_barrier_t

2024-10-03 Thread Edward Liaw
: 8c864371b2a1 ("selftests/mm: fix ARM related issue with fork after pthread_create") Signed-off-by: Edward Liaw --- tools/testing/selftests/mm/uffd-common.c | 5 +++-- tools/testing/selftests/mm/uffd-common.h | 3 +-- tools/testing/selftests/mm/uffd-unit-tests.c | 14 -- 3 fil

[PATCH RESEND v2] selftests/futex: Order calls in futex_requeue

2024-09-18 Thread Edward Liaw
quot;) Signed-off-by: Edward Liaw Reviewed-by: Muhammad Usama Anjum Reviewed-by: André Almeida --- .../selftests/futex/functional/futex_requeue.c | 12 +--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/tools/testing/selftests/futex/functional/futex_requeue.c b/too

[PATCH] selftests/futex: futex_waitv wouldblock test should fail

2025-04-04 Thread Edward Liaw
Testcase should fail if -EWOULDBLOCK is not returned when expected value differs from actual value from the waiter. Fixes: 9d57f7c79748920636f8293d2f01192d702fe390 ("selftests: futex: Test sys_futex_waitv() wouldblock") Signed-off-by: Edward Liaw --- .../testing/selftests/futex/