From: Ben Pfaff Date: Tue, 16 May 2023 01:36:53 +0000 (-0700) Subject: tests: Skip PSPP permissions test if permissions don't work as expected. X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0b3eec3ec9778ed3b5a8a57a1295bd4b8b6b199c;p=pspp tests: Skip PSPP permissions test if permissions don't work as expected. If permissions don't work from shell, then we can't expect them to work from PSPP. Thanks to Marshall DeBerry for reporting the problem. --- diff --git a/tests/data/file.at b/tests/data/file.at index e48fe05a65..4e19bcc464 100644 --- a/tests/data/file.at +++ b/tests/data/file.at @@ -39,9 +39,15 @@ AT_CLEANUP AT_SETUP([Write error - no permission]) -mkdir directory -touch directory/foobar.sav -chmod 000 directory +AT_CHECK([ + mkdir directory + touch directory/foobar.sav + chmod 000 directory +]) + +# If we can write to the directory, then permissions just don't work +# properly. (Perhaps we're running as root.) +AT_SKIP_IF([: > directory/foo]) AT_DATA([file.sps], [dnl DATA LIST NOTABLE/x 1.