List for cgit developers and users
 help / color / mirror / Atom feed
* [PATCH 1/1] tests: skip tests if strace is not functional
@ 2019-12-11  9:57 list
  2019-12-11  9:59 ` Jason
  0 siblings, 1 reply; 6+ messages in thread
From: list @ 2019-12-11  9:57 UTC (permalink / raw)


From: Christian Hesse <mail at eworm.de>

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 at eworm.de>
---
 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


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2019-12-11 10:06 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-11  9:57 [PATCH 1/1] tests: skip tests if strace is not functional list
2019-12-11  9:59 ` Jason
2019-12-11 10:00   ` Jason
2019-12-11 10:05     ` list
2019-12-11 10:06       ` Jason
2019-12-11 10:01   ` list

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