]> git.ipfire.org Git - thirdparty/public-inbox.git/commitdiff
test_common: fix excessive wait for GNU tail inotify
authorEric Wong <e@80x24.org>
Mon, 20 Nov 2023 07:39:09 +0000 (07:39 +0000)
committerEric Wong <e@80x24.org>
Mon, 20 Nov 2023 15:33:07 +0000 (15:33 +0000)
We want to use the filenames tail will watch, not the number of
args passed to the `tail_f' subroutine.

Fixes: 9231d2e7b93f (tests: map CLOFORK->FD_CLOEXEC temporarily for `tail -f')
lib/PublicInbox/TestCommon.pm

index 8bfa30f2669752bfd3cf594ee3e7a52cf06aa499..0d17e6e7e766b3a475e93d6616fa10a316fbaf98 100644 (file)
@@ -512,7 +512,7 @@ sub tail_f (@) {
        while (my ($io, $fl) = splice(@cfmap, 0, 2)) {
                fcntl($io, F_SETFD, $fl);
        }
-       wait_for_tail($pid, scalar @_);
+       wait_for_tail($pid, scalar @f);
        require PublicInbox::AutoReap;
        PublicInbox::AutoReap->new($pid, \&wait_for_tail);
 }