Commit 7241bc1
fsmonitor: add tests for Linux
Add a smoke test that verifies the filesystem actually delivers
inotify events to the daemon. On some configurations (e.g.,
overlayfs with older kernels), inotify watches succeed but events
are never delivered. The daemon cookie wait will time out, but
every subsequent test would fail. Skip the entire test file early
when this is detected.
Add a test that exercises rapid nested directory creation to verify
the daemon correctly handles the EEXIST race between recursive scan
and queued inotify events. When IN_MASK_CREATE is available and a
directory watch is added during recursive registration, the kernel
may also deliver a queued IN_CREATE event for the same directory.
The second inotify_add_watch() returns EEXIST, which must be treated
as harmless. An earlier version of the listener crashed in this
scenario.
Reduce --start-timeout from the default 60 seconds to 10 seconds so
that tests fail promptly when the daemon cannot start.
Harden the test helpers to work in environments without procps
(e.g., Fedora CI): fall back to reading /proc/$pid/stat for the
process group ID when ps is unavailable, guard stop_git() against
an empty pgid, and redirect stderr from kill to /dev/null to avoid
noise when processes have already exited.
Use set -m to enable job control in the submodule-pull test so that
the background git pull gets its own process group, preventing the
shell wait from blocking on the daemon. setsid() in the previous
commit detaches the daemon itself, but the intermediate git pull
process still needs its own process group for the test shell to
manage it correctly.
Signed-off-by: Paul Tarjan <github@paulisageek.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>1 parent 485d621 commit 7241bc1
1 file changed
+82
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
13 | 61 | | |
14 | 62 | | |
15 | | - | |
| 63 | + | |
| 64 | + | |
16 | 65 | | |
17 | 66 | | |
18 | 67 | | |
| |||
67 | 116 | | |
68 | 117 | | |
69 | 118 | | |
70 | | - | |
| 119 | + | |
71 | 120 | | |
72 | 121 | | |
73 | 122 | | |
| |||
520 | 569 | | |
521 | 570 | | |
522 | 571 | | |
| 572 | + | |
| 573 | + | |
| 574 | + | |
| 575 | + | |
| 576 | + | |
| 577 | + | |
| 578 | + | |
| 579 | + | |
| 580 | + | |
| 581 | + | |
| 582 | + | |
| 583 | + | |
| 584 | + | |
| 585 | + | |
| 586 | + | |
| 587 | + | |
| 588 | + | |
| 589 | + | |
| 590 | + | |
| 591 | + | |
| 592 | + | |
| 593 | + | |
523 | 594 | | |
524 | 595 | | |
525 | 596 | | |
| |||
910 | 981 | | |
911 | 982 | | |
912 | 983 | | |
913 | | - | |
| 984 | + | |
| 985 | + | |
| 986 | + | |
| 987 | + | |
914 | 988 | | |
915 | 989 | | |
916 | 990 | | |
| |||
921 | 995 | | |
922 | 996 | | |
923 | 997 | | |
924 | | - | |
| 998 | + | |
925 | 999 | | |
926 | 1000 | | |
927 | 1001 | | |
928 | 1002 | | |
929 | 1003 | | |
930 | | - | |
| 1004 | + | |
| 1005 | + | |
931 | 1006 | | |
932 | | - | |
| 1007 | + | |
933 | 1008 | | |
934 | 1009 | | |
935 | 1010 | | |
| |||
944 | 1019 | | |
945 | 1020 | | |
946 | 1021 | | |
947 | | - | |
| 1022 | + | |
948 | 1023 | | |
949 | 1024 | | |
950 | 1025 | | |
| |||
0 commit comments