xfs
[Top] [All Lists]

[PATCH 3/3] generic/237: fix filtering for expected failure message

To: xfs@xxxxxxxxxxx
Subject: [PATCH 3/3] generic/237: fix filtering for expected failure message
From: Theodore Ts'o <tytso@xxxxxxx>
Date: Sat, 12 Apr 2014 18:55:17 -0400
Cc: Ext4 Developers List <linux-ext4@xxxxxxxxxxxxxxx>, Theodore Ts'o <tytso@xxxxxxx>
Delivered-to: xfs@xxxxxxxxxxx
Dkim-signature: v=1; a=rsa-sha256; c=simple/simple; d=thunk.org; s=mail; t=1397343321; bh=blf0MNn/FwCTCckto3I2aqHXmTqEk1KB3nPN/RlcSCs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=MuE7tGApdpxHQTixaIW31U5EYWlrxzTFdLZ2+o7DFUrDWyv1Nvneo7FetSteggnS8 WCnc4LPastE+H4M0sE0392gI+ihIe9/ujMpA2cUWYuAUJmFMxVei5uRcnz2kzuuCSI mvu83thJrp+xws5K1q4/urPctduW6a8sh+n9v3vQ=
In-reply-to: <1397343317-14669-1-git-send-email-tytso@xxxxxxx>
References: <1397343317-14669-1-git-send-email-tytso@xxxxxxx>
Newer kernels return EACCES instead of EPERM when modifying an acl
fails.  Update the filtering to handle this.

Signed-off-by: "Theodore Ts'o" <tytso@xxxxxxx>
---
 tests/generic/237     | 2 +-
 tests/generic/237.out | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/tests/generic/237 b/tests/generic/237
index 6a61ec8..b068150 100755
--- a/tests/generic/237
+++ b/tests/generic/237
@@ -68,7 +68,7 @@ touch file1
 chown $acl1.$acl1 file1
 
 echo "Expect to FAIL"
-$runas -u $acl2 -g $acl2 -- `which setfacl` -m u::rwx file1 2>&1 | sed 
's/^setfacl: \/.*file1: Operation not permitted$/setfacl: file1: Operation not 
permitted/'
+$runas -u $acl2 -g $acl2 -- `which setfacl` -m u::rwx file1 2>&1 | sed -e 
's/Permission denied/Operation not permitted/' -e 's/file1: //' -e 
's,[/a-zA-Z]*setfacl: ,setfacl: ,'
 
 echo "Test over."
 # success, all done
diff --git a/tests/generic/237.out b/tests/generic/237.out
index 09d98c6..4edafa6 100644
--- a/tests/generic/237.out
+++ b/tests/generic/237.out
@@ -1,4 +1,4 @@
 QA output created by 237
 Expect to FAIL
-setfacl: file1: Operation not permitted
+setfacl: Operation not permitted
 Test over.
-- 
1.9.0

<Prev in Thread] Current Thread [Next in Thread>