Skip to content

Commit

Permalink
tests/lib/libc/sys/t_futex_ops: Fix another FUTEX_CMP_REQUEUE case.
Browse files Browse the repository at this point in the history
PR kern/56828: futex calls in Linux emulation sometimes hang
  • Loading branch information
riastradh committed Jan 18, 2025
1 parent 9c8bb6b commit bb8b192
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions tests/lib/libc/sys/t_futex_ops.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* $NetBSD: t_futex_ops.c,v 1.7 2025/01/18 06:22:56 riastradh Exp $ */
/* $NetBSD: t_futex_ops.c,v 1.8 2025/01/18 07:05:15 riastradh Exp $ */

/*-
* Copyright (c) 2019, 2020 The NetBSD Foundation, Inc.
Expand Down Expand Up @@ -29,7 +29,7 @@
#include <sys/cdefs.h>
__COPYRIGHT("@(#) Copyright (c) 2019, 2020\
The NetBSD Foundation, inc. All rights reserved.");
__RCSID("$NetBSD: t_futex_ops.c,v 1.7 2025/01/18 06:22:56 riastradh Exp $");
__RCSID("$NetBSD: t_futex_ops.c,v 1.8 2025/01/18 07:05:15 riastradh Exp $");

#include <sys/fcntl.h>
#include <sys/mman.h>
Expand Down Expand Up @@ -825,8 +825,11 @@ do_futex_requeue_test(int flags, int op)
*/

/* Move all waiters from 0 to 1. */
ATF_REQUIRE(__futex(&futex_word, op | flags,
0, NULL, &futex_word1, INT_MAX, good_val3) == 0);
atf_tc_expect_fail("PR kern/56828:"
" futex calls in Linux emulation sometimes hang");
ATF_CHECK(__futex(&futex_word, op | flags,
0, NULL, &futex_word1, INT_MAX, good_val3) == 4);
atf_tc_expect_pass();

/*
* FUTEX 0: 0 LWPs
Expand Down

0 comments on commit bb8b192

Please sign in to comment.