List for cgit developers and users
 help / color / mirror / Atom feed
Subject: [PATCH] t0109: skip if strace is broken
Date: Tue, 11 Dec 2018 21:23:59 +0100	[thread overview]
Message-ID: <7479d5c040ad8158@krantz.zx2c4.com> (raw)

The strace binary might not work even though it is available. For instance,
ptrace might be disabled in the kernel or might be unsupported (e.g. when
running qemu-user for cross-building to another cpu arch). This patch skips
the t0109 tests in this case.

Signed-off-by: Samuel Lid?n Borell <samuel at kodafritt.se>
---
P.S. This is my first patch to cgit. Criticism is welcome :)

 tests/t0109-gitconfig.sh | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/tests/t0109-gitconfig.sh b/tests/t0109-gitconfig.sh
index 3ba6684..9d7f074 100755
--- a/tests/t0109-gitconfig.sh
+++ b/tests/t0109-gitconfig.sh
@@ -9,6 +9,12 @@ test -n "$(which strace 2>/dev/null)" || {
 	exit
 }
 
+strace true >/dev/null 2>&1 || {
+	skip_all='Skipping access validation tests: strace is not working'
+	test_done
+	exit
+}
+
 test_no_home_access () {
 	non_existent_path="/path/to/some/place/that/does/not/possibly/exist"
 	while test -d "$non_existent_path"; do
-- 
2.17.1




                 reply	other threads:[~2018-12-11 20:23 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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

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

  git send-email \
    --in-reply-to=7479d5c040ad8158@krantz.zx2c4.com \
    --to=cgit@lists.zx2c4.com \
    /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.
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 NNTP newsgroup(s).