Commit 5020fb7
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.
Signed-off-by: Paul Tarjan <github@paulisageek.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>1 parent 149c19b commit 5020fb7
2 files changed
Lines changed: 89 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1208 | 1208 | | |
1209 | 1209 | | |
1210 | 1210 | | |
| 1211 | + | |
| 1212 | + | |
| 1213 | + | |
| 1214 | + | |
| 1215 | + | |
| 1216 | + | |
1211 | 1217 | | |
1212 | 1218 | | |
1213 | 1219 | | |
1214 | 1220 | | |
1215 | 1221 | | |
1216 | | - | |
| 1222 | + | |
1217 | 1223 | | |
1218 | 1224 | | |
1219 | 1225 | | |
| |||
| 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