From 27a6d69ab38825602bdbd5a5d0161e465326ea8d Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Tue, 4 Jun 2019 13:49:36 +0200 Subject: tests: successfully validate rc versions For testing versions the version string differs for git tag (v2.22.0-rc3) and tarball file name (2.22.0.rc3). Let's fix validation for testing versions. Signed-off-by: Christian Hesse --- tests/t0001-validate-git-versions.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tests') diff --git a/tests/t0001-validate-git-versions.sh b/tests/t0001-validate-git-versions.sh index a65b35e..3200f31 100755 --- a/tests/t0001-validate-git-versions.sh +++ b/tests/t0001-validate-git-versions.sh @@ -33,7 +33,7 @@ test_expect_success 'test submodule version matches Makefile' ' sed -e "s/^[0-9]* \\([0-9a-f]*\\) [0-9] .*$/\\1/") && cd git && git describe --match "v[0-9]*" $sm_sha1 - ) | sed -e "s/^v//" >sm_version && + ) | sed -e "s/^v//" -e "s/-/./" >sm_version && test_cmp sm_version makefile_version fi ' -- cgit v1.2.3-24-g4f1b From ca98c9e7bf31617efc3ff7d3575efe5bba3cde1a Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Wed, 11 Dec 2019 10:55:24 +0100 Subject: 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 --- tests/t0109-gitconfig.sh | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'tests') 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)" || { exit } +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 -- cgit v1.2.3-24-g4f1b