user/dev discussion of public-inbox itself
 help / color / mirror / code / Atom feed
From: Eric Wong <>
To: Alyssa Ross <>
Subject: [PATCH] t/search: bail out on `git init --shared' failures
Date: Thu, 3 Oct 2019 07:57:29 +0000	[thread overview]
Message-ID: <20191003075729.4z4vn7hzhdpdeev5@whir> (raw)
In-Reply-To: <>

Alyssa Ross <> wrote:
> > How do "git init --shared" tests work for the Nix git package?  We could
> > try to follow that as an example...
> They're disabled, hehe:
> <>

Yeah, seems reasonable to disable here, too.

Thanks for all your time debugging and documenting this!  Using
BAIL_OUT could save future testers a lot of time.  And I also
made another patch to make mode failures more obvious:

Subject: [PATCH] t/search: bail out on `git init --shared' failures

We can save future testers some time if we bail out early
on "git init --shared" failures, since things like seccomp
or non-POSIX FSes would trigger failures.

BAIL_OUT has been in Test::Simple since Perl v5.10.0, so it's
old-enough to call for our purposes.

Thanks-to: Alyssa Ross <>
 t/search.t | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/t/search.t b/t/search.t
index 830c668e..a728d79f 100644
--- a/t/search.t
+++ b/t/search.t
@@ -17,7 +17,8 @@ my $git_dir = "$tmpdir/a.git";
 my $ibx = PublicInbox::Inbox->new({ mainrepo => $git_dir });
 my ($root_id, $last_id);
-is(0, system(qw(git init --shared -q --bare), $git_dir), "git init (main)");
+is(0, system(qw(git init --shared -q --bare), $git_dir), "git init (main)")
+	or BAIL_OUT("`git init --shared' failed, weird FS or seccomp?");
 eval { PublicInbox::Search->new($ibx)->xdb };
 ok($@, "exception raised on non-existent DB");

  reply	other threads:[~2019-10-03  7:57 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-15 13:48 [PATCH] t/spawn: fix with unusual env locations Alyssa Ross
2019-09-15 18:55 ` Eric Wong
2019-09-24  1:11   ` Alyssa Ross
2019-09-24  4:01     ` Eric Wong
2019-09-24 22:12       ` Test failures in build sandbox Alyssa Ross
2019-09-26  8:44         ` Eric Wong
2019-10-02 23:23           ` Alyssa Ross
2019-10-03  0:46             ` Alyssa Ross
2019-10-03  1:28               ` Eric Wong
2019-10-03  1:43                 ` Alyssa Ross
2019-10-03  7:57                   ` Eric Wong [this message]
2019-10-03 10:15                     ` [PATCH] t/search: bail out on `git init --shared' failures Alyssa Ross

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:

  List information:

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

  git send-email \
    --in-reply-to=20191003075729.4z4vn7hzhdpdeev5@whir \ \ \ \

* 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

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).