>From 5520631bafe004aead6db710e66de2cf43fc0a80 Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Tue, 11 Apr 2023 19:10:29 +0200 Subject: [PATCH] tests: Fix a test failure. * tests/write-error: Make executable. Skip the test if we're running as root. --- tests/write-error | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) mode change 100644 => 100755 tests/write-error diff --git a/tests/write-error b/tests/write-error old mode 100644 new mode 100755 index 150c162..1f3a7f1 --- a/tests/write-error +++ b/tests/write-error @@ -24,7 +24,11 @@ fail=0 mkdir d || framework_failure_ echo > d/f || framework_failure_ chmod a-w d || framework_failure_ - -returns_ 1 gzip d/f > out 2> err || fail=1 +if test -w d; then + echo >&2 "$0: being root, skipping this test" + fail=77 +else + returns_ 1 gzip d/f > out 2> err || fail=1 +fi Exit $fail -- 2.34.1