diff options
author | Christian Hesse | 2019-12-11 10:55:24 +0100 |
---|---|---|
committer | Christian Hesse | 2019-12-11 11:04:02 +0100 |
commit | ca98c9e7bf31617efc3ff7d3575efe5bba3cde1a (patch) | |
tree | 6e8d96857a61296c3c34c1a95e180226e3c7a828 /tests | |
parent | d8e5dd25a0d2e32ef3453a96112eea817336e4d7 (diff) | |
download | cgit-ca98c9e7bf31617efc3ff7d3575efe5bba3cde1a.tar.gz cgit-ca98c9e7bf31617efc3ff7d3575efe5bba3cde1a.tar.bz2 cgit-ca98c9e7bf31617efc3ff7d3575efe5bba3cde1a.zip |
tests: skip tests if strace is not functional
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 <mail@eworm.de>
Diffstat (limited to 'tests')
-rwxr-xr-x | tests/t0109-gitconfig.sh | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/t0109-gitconfig.sh b/tests/t0109-gitconfig.sh index 3ba6684..8cee75c 100755 --- a/tests/t0109-gitconfig.sh +++ b/tests/t0109-gitconfig.sh | |||
@@ -9,6 +9,12 @@ test -n "$(which strace 2>/dev/null)" || { | |||
9 | exit | 9 | exit |
10 | } | 10 | } |
11 | 11 | ||
12 | strace true 2>/dev/null || { | ||
13 | skip_all='Skipping access validation tests: strace not functional' | ||
14 | test_done | ||
15 | exit | ||
16 | } | ||
17 | |||
12 | test_no_home_access () { | 18 | test_no_home_access () { |
13 | non_existent_path="/path/to/some/place/that/does/not/possibly/exist" | 19 | non_existent_path="/path/to/some/place/that/does/not/possibly/exist" |
14 | while test -d "$non_existent_path"; do | 20 | while test -d "$non_existent_path"; do |