diff options
Diffstat (limited to 't')
-rw-r--r-- | t/dir_idle.t | 7 | ||||
-rw-r--r-- | t/kqnotify.t | 2 |
2 files changed, 6 insertions, 3 deletions
diff --git a/t/dir_idle.t b/t/dir_idle.t index 14aad7a1..8d085d6e 100644 --- a/t/dir_idle.t +++ b/t/dir_idle.t @@ -16,10 +16,12 @@ my $end = 3 + now; local @PublicInbox::DS::post_loop_do = (sub { scalar(@x) == 0 && now < $end }); rmdir("$tmpdir/a/b") or xbail "rmdir $!"; PublicInbox::DS::event_loop(); -is(scalar(@x), 1, 'got an rmdir event') or xbail explain(\@x); -if (@x) { +if (is(scalar(@x), 1, 'got an rmdir event')) { is($x[0]->[0]->fullname, "$tmpdir/a/b", 'got expected fullname') and ok($x[0]->[0]->IN_DELETE, 'IN_DELETE set'); +} else { + check_broken_tmpfs; + xbail explain(\@x); } rmdir("$tmpdir/a") or xbail "rmdir $!"; @@ -30,6 +32,7 @@ if (is(scalar(@x), 1, 'got an event after rmdir')) { is($x[0]->[0]->fullname, "$tmpdir/a", 'got expected fullname') and ok($x[0]->[0]->IN_DELETE_SELF, 'IN_DELETE_SELF set'); } else { + check_broken_tmpfs; diag explain(\@x); } rename("$tmpdir/c", "$tmpdir/j") or xbail "rmdir $!"; diff --git a/t/kqnotify.t b/t/kqnotify.t index cf32b633..add477a4 100644 --- a/t/kqnotify.t +++ b/t/kqnotify.t @@ -62,6 +62,6 @@ is_xdeeply($hit, \@unlink, 'unlinked files match'); # this is unreliable on Dragonfly tmpfs (fixed post-6.4) rmdir "$tmpdir/new"; $hit = [ sort(map { $_->fullname } $kqn->read) ]; -is(scalar(@$hit), 1, 'detected self removal'); +is(scalar(@$hit), 1, 'detected self removal') or check_broken_tmpfs; done_testing; |