From mboxrd@z Thu Jan 1 00:00:00 1970 From: list at eworm.de (Christian Hesse) Date: Wed, 11 Dec 2019 10:57:50 +0100 Subject: [PATCH 1/1] tests: skip tests if strace is not functional Message-ID: <20191211095750.34396-1-list@eworm.de> From: Christian Hesse Chances are that strace is available but not functional due to restricted permissions: strace: test_ptrace_get_syscall_info: PTRACE_TRACEME: Operation not permitted strace: ptrace(PTRACE_TRACEME, ...): Operation not permitted +++ exited with 1 +++ Just skip the tests then. Signed-off-by: Christian Hesse --- tests/t0109-gitconfig.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tests/t0109-gitconfig.sh b/tests/t0109-gitconfig.sh index 3ba6684..6ae7305 100755 --- a/tests/t0109-gitconfig.sh +++ b/tests/t0109-gitconfig.sh @@ -9,6 +9,12 @@ test -n "$(which strace 2>/dev/null)" || { exit } +test -n "$(strace true 2>/dev/null)" || { + skip_all='Skipping access validation tests: strace not functional' + 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