Files
scoutfs/tests/golden/mmap
T
Chris Kirby f6e476d926 Fix race in the mmap test
The mmap test kicks off a background xfs_io job, then does a
scoutfs stage operation in the foreground and sleeps for one
second. Usually that's enough time for the background job to
complete, but very rarely it's not.

This manifests as data corruption when we try to read too soon.
But we can also see from the jobs command output that there's
still a job running.

Use an explicit wait instead of the "sleep 1".

Signed-off-by: Chris Kirby <ckirby@versity.com>
2026-07-27 15:03:51 -05:00

26 lines
732 B
Plaintext

== mmap_stress
thread 0 complete
thread 1 complete
thread 2 complete
thread 3 complete
thread 4 complete
== basic mmap/read/write consistency checks
== mmap read from offline extent
0: offset: 0 length: 2 flags: O.L
extents: 1
1
00000200: ea ea ea ea ea ea ea ea ea ea ea ea ea ea ea ea ................
0: offset: 0 length: 2 flags: ..L
extents: 1
== mmap write to an offline extent
0: offset: 0 length: 2 flags: O.L
extents: 1
1
0: offset: 0 length: 2 flags: ..L
extents: 1
00000000 ea ea ea ea ea ea ea ea ea ea ea ea ea ea ea ea |................|
00000010 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 |................|
00000020 ea ea ea ea ea ea ea ea ea ea ea ea ea ea ea ea |................|
00000030
== done