]> git.ipfire.org Git - thirdparty/public-inbox.git/commitdiff
TestCommon: older strace does not have --version
authorKonstantin Ryabitsev <konstantin@linuxfoundation.org>
Tue, 14 Nov 2023 20:16:37 +0000 (15:16 -0500)
committerEric Wong <e@80x24.org>
Tue, 14 Nov 2023 20:19:38 +0000 (20:19 +0000)
The tests will check for strace >= 4.16, but version 4.24 that I have
does not accept --version, only -V. This works for both older and newer
strace, so switch to using "strace -V" for the check.

Signed-off-by: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
lib/PublicInbox/TestCommon.pm

index caf709c28b12a90c86ba5e70750b23274d7cb216..a5546905f5113b55670fab6201676937342a4d6d 100644 (file)
@@ -956,9 +956,9 @@ sub strace_inject (;$) {
        my $cmd = strace(@_);
        state $ver = do {
                require PublicInbox::Spawn;
-               my $v = PublicInbox::Spawn::run_qx([$cmd, '--version']);
+               my $v = PublicInbox::Spawn::run_qx([$cmd, '-V']);
                $v =~ m!version\s+([1-9]+\.[0-9]+)! or
-                               xbail "no strace --version: $v";
+                               xbail "no strace -V: $v";
                eval("v$1");
        };
        $ver ge v4.16 or skip "$cmd too old for syscall injection (".