user/dev discussion of public-inbox itself
 help / color / mirror / code / Atom feed
From: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
To: meta@public-inbox.org
Cc: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
Subject: [PATCH] TestCommon: older strace does not have --version
Date: Tue, 14 Nov 2023 15:16:37 -0500	[thread overview]
Message-ID: <20231114-strace-no-version-v1-1-4d97f031f1fa@linuxfoundation.org> (raw)

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 | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/PublicInbox/TestCommon.pm b/lib/PublicInbox/TestCommon.pm
index caf709c2..a5546905 100644
--- a/lib/PublicInbox/TestCommon.pm
+++ b/lib/PublicInbox/TestCommon.pm
@@ -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 (".

---
base-commit: 1f3fdeee8919d06b9293d34a2446a61cba730a0c
change-id: 20231114-strace-no-version-7073fd02aa16

Best regards,
-- 
Konstantin Ryabitsev <konstantin@linuxfoundation.org>


             reply	other threads:[~2023-11-14 20:16 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-14 20:16 Konstantin Ryabitsev [this message]
2023-11-14 20:22 ` [PATCH] TestCommon: older strace does not have --version Eric Wong

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://public-inbox.org/README

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20231114-strace-no-version-v1-1-4d97f031f1fa@linuxfoundation.org \
    --to=konstantin@linuxfoundation.org \
    --cc=meta@public-inbox.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/public-inbox.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).