diff mbox

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

Message ID 1397343317-14669-4-git-send-email-tytso@mit.edu
State Not Applicable, archived
Headers show

Commit Message

Theodore Ts'o April 12, 2014, 10:55 p.m. UTC
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@mit.edu>
---
 tests/generic/237     | 2 +-
 tests/generic/237.out | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

Comments

Christoph Hellwig April 13, 2014, 8:17 a.m. UTC | #1
On Sat, Apr 12, 2014 at 06:55:17PM -0400, Theodore Ts'o wrote:
> 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@mit.edu>


I've not seen this yet.  What exact configuration do you use to get the
error?
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Theodore Ts'o April 13, 2014, 12:43 p.m. UTC | #2
On Sun, Apr 13, 2014 at 01:17:38AM -0700, Christoph Hellwig wrote:
> On Sat, Apr 12, 2014 at 06:55:17PM -0400, Theodore Ts'o wrote:
> > 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@mit.edu>
> 
> I've not seen this yet.  What exact configuration do you use to get the
> error?

I was using a 32-bit kernel, using a recent Linus upstream.  The bug
was showing up for both ext4 and xfs, and xfstests-bld is using a very
recent version of the acl package?

If you're not seeing it, perhaps the most likely cause would be the
fact that I was using an i386 kernel, and/or the version of the acl
userspace package found in kvm-xfstests?

If you want a repro, you could grab:

	git://git.kernel.org/pub/scm/fs/ext2/xfstests-bld.git

and then building the per the README.

If you don't have a Debian testing system conviently to hand, you
could pull down:

https://www.kernel.org/pub/linux/kernel/people/tytso/kvm-xfstests/root_fs.img.i386

... and then update the image to have the xfstests upstream version of
/root/xfstests/tests/generic/237*.

Cheers,

						- Ted
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Dave Chinner April 14, 2014, 12:14 a.m. UTC | #3
On Sat, Apr 12, 2014 at 06:55:17PM -0400, Theodore Ts'o wrote:
> 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@mit.edu>
> ---
>  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: ,'

This is getting unweildy. Can you factor this into a local
_filter_setfacl_error function of some kind? It would also help if
you put a comment iterating all the different output formats it's
now trying to filter out, too.

Cheers,

Dave.
Theodore Ts'o April 15, 2014, 2:08 a.m. UTC | #4
After looking at this more closely, this patch isn't needed.  It was a
configuration screw up on my end.

					- Ted
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

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.