From: Karl Berry Date: Sun, 24 Dec 2023 16:55:04 +0000 (-0800) Subject: test: do not leave files as mode zero. X-Git-Tag: v1.16.90~44 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=448fd777fdbe4bebddcd14449748d72dab93336b;p=thirdparty%2Fautomake.git test: do not leave files as mode zero. Follows up on https://bugs.gnu.org/67868. * t/dist-with-unreadable-makefile-fails.sh: chmod u+rw at end. Also follow usual pattern of ending tests with :, not explicit exit. * t/tap-bad-prog.tap: chmod u+r at end (since only r removed). --- diff --git a/t/dist-with-unreadable-makefile-fails.sh b/t/dist-with-unreadable-makefile-fails.sh index 1adc4fd47..37881b163 100644 --- a/t/dist-with-unreadable-makefile-fails.sh +++ b/t/dist-with-unreadable-makefile-fails.sh @@ -45,8 +45,9 @@ test ! -r Makefile.am || skip_ "cannot drop file read permissions" ./configure # 'dist' should fail because we can't copy Makefile.am. -if $MAKE dist; then - exit 1 -else - exit 0 -fi +! $MAKE dist + +# restore sane permissions for future greps and finds. +chmod u+rw Makefile.am + +: diff --git a/t/tap-bad-prog.tap b/t/tap-bad-prog.tap index cb92a9b32..bb0187df9 100644 --- a/t/tap-bad-prog.tap +++ b/t/tap-bad-prog.tap @@ -82,4 +82,7 @@ command_ok_ 'no spurious results' \ -D TODO -r 'still get "missing plan"' \ count_test_results total=3 pass=0 fail=0 xpass=0 xfail=0 skip=0 error=3 +# restore sane permissions for future greps and finds. +chmod u+r noread.test + :