mirror of
https://git.savannah.gnu.org/git/coreutils.git
synced 2026-11-19 03:33:43 +03:00
tests: make it harder to lose a race in spinlock-abuse
* tests/misc/sort-spinlock-abuse: On a busy system, with only 12 pauses of length 0.1 seconds, the buggy (busy-spinlock blocked) sort would fail to accumulate 1 second of CPU time, and hence would mistakenly pass. Increase from 12 to 50.
This commit is contained in:
1 parent
cd00fa6ee1
commit
231d8719f1
1 file changed
+2
-2
@@ -25,9 +25,9 @@ test "$(nproc)" = 1 && skip_ "requires a multi-core system"
|
||||
seq 100000 > in || framework_failure_
|
||||
mkfifo fifo || framework_failure_
|
||||
|
||||
# Arrange for sort to require 1.2+ seconds of wall-clock time,
|
||||
# Arrange for sort to require 5.0+ seconds of wall-clock time,
|
||||
# while actually using far less than 1 second of CPU time.
|
||||
(for i in $(seq 12); do read line; echo $i; sleep .1; done
|
||||
(for i in $(seq 50); do read line; echo $i; sleep .1; done
|
||||
cat > /dev/null) < fifo &
|
||||
|
||||
# Limit CPU time to 1 second
|
||||
|
||||
Reference in new issue
Block a user