From 0b3eec3ec9778ed3b5a8a57a1295bd4b8b6b199c Mon Sep 17 00:00:00 2001 From: Ben Pfaff Date: Mon, 15 May 2023 18:36:53 -0700 Subject: [PATCH] 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. --- tests/data/file.at | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) 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. -- 2.30.2