linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] xfstests: set umask to avoid spurious generic/314 test failures
@ 2013-09-21 21:17 Eric Whitney
  2013-12-13  4:06 ` Jeff Liu
  2013-12-17 16:39 ` Rich Johnston
  0 siblings, 2 replies; 4+ messages in thread
From: Eric Whitney @ 2013-09-21 21:17 UTC (permalink / raw)
  To: xfs; +Cc: linux-ext4

Generic/314 can fail when the group write file mode bit for "subdir" does not
match that found in the golden output, as has been seen in ext4 regression
testing.  It appears that the golden output for generic/314 was taken on a
system where the $qa_user's umask cleared that mode bit - most likely, where
the umask was 022.  Depending upon the distro, it's not uncommon for a user's
default umask to have a different value, such as 002.  When that's the case,
we get a false negative failure when the group write mode bit for "subdir" is
not cleared.  This failure is unrelated to the value of the SGID mode bit
that is the object of this test.

We could either require that $qa_user's account be configured in advance with
a umask of 022, or explicitly set a umask value compatible with the golden
output when creating "subdir".  The latter option is more robust.

Signed-off-by: Eric Whitney <enwlinux@gmail.com>
---
 tests/generic/314 | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
 mode change 100644 => 100755 tests/generic/314

diff --git a/tests/generic/314 b/tests/generic/314
old mode 100644
new mode 100755
index 0dd98a3..f430b82
--- a/tests/generic/314
+++ b/tests/generic/314
@@ -57,7 +57,7 @@ chown $qa_user:12345 $TEST_DIR/$seq-dir
 chmod 2775 $TEST_DIR/$seq-dir
 
 # Make subdirs before & after acl set
-su $qa_user -c "mkdir $TEST_DIR/$seq-dir/subdir"
+su $qa_user -c "umask 022; mkdir $TEST_DIR/$seq-dir/subdir"
 su $qa_user -c "setfacl -m u:$qa_user:rwx,d:u:$qa_user:rwx $TEST_DIR/$seq-dir"
 su $qa_user -c "mkdir $TEST_DIR/$seq-dir/subdir2"
 
-- 
1.8.1.2


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] xfstests: set umask to avoid spurious generic/314 test failures
  2013-09-21 21:17 [PATCH] xfstests: set umask to avoid spurious generic/314 test failures Eric Whitney
@ 2013-12-13  4:06 ` Jeff Liu
  2013-12-13 11:17   ` Christoph Hellwig
  2013-12-17 16:39 ` Rich Johnston
  1 sibling, 1 reply; 4+ messages in thread
From: Jeff Liu @ 2013-12-13  4:06 UTC (permalink / raw)
  To: xfs@oss.sgi.com, Eric Whitney; +Cc: linux-ext4

Hi Folks,

We missed this patch from Eric for a few months, I observed the same
false alarm while analyzing xfstests logs against our next tree...

Eric's fix works fine to me.

Thanks,
-Jeff

On 09/22 2013 05:17 AM, Eric Whitney wrote:
> Generic/314 can fail when the group write file mode bit for "subdir" does not
> match that found in the golden output, as has been seen in ext4 regression
> testing.  It appears that the golden output for generic/314 was taken on a
> system where the $qa_user's umask cleared that mode bit - most likely, where
> the umask was 022.  Depending upon the distro, it's not uncommon for a user's
> default umask to have a different value, such as 002.  When that's the case,
> we get a false negative failure when the group write mode bit for "subdir" is
> not cleared.  This failure is unrelated to the value of the SGID mode bit
> that is the object of this test.
> 
> We could either require that $qa_user's account be configured in advance with
> a umask of 022, or explicitly set a umask value compatible with the golden
> output when creating "subdir".  The latter option is more robust.
> 
> Signed-off-by: Eric Whitney <enwlinux@gmail.com>
> ---
>  tests/generic/314 | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>  mode change 100644 => 100755 tests/generic/314
> 
> diff --git a/tests/generic/314 b/tests/generic/314
> old mode 100644
> new mode 100755
> index 0dd98a3..f430b82
> --- a/tests/generic/314
> +++ b/tests/generic/314
> @@ -57,7 +57,7 @@ chown $qa_user:12345 $TEST_DIR/$seq-dir
>  chmod 2775 $TEST_DIR/$seq-dir
>  
>  # Make subdirs before & after acl set
> -su $qa_user -c "mkdir $TEST_DIR/$seq-dir/subdir"
> +su $qa_user -c "umask 022; mkdir $TEST_DIR/$seq-dir/subdir"
>  su $qa_user -c "setfacl -m u:$qa_user:rwx,d:u:$qa_user:rwx $TEST_DIR/$seq-dir"
>  su $qa_user -c "mkdir $TEST_DIR/$seq-dir/subdir2"
>  
> 

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] xfstests: set umask to avoid spurious generic/314 test failures
  2013-12-13  4:06 ` Jeff Liu
@ 2013-12-13 11:17   ` Christoph Hellwig
  0 siblings, 0 replies; 4+ messages in thread
From: Christoph Hellwig @ 2013-12-13 11:17 UTC (permalink / raw)
  To: Jeff Liu; +Cc: xfs@oss.sgi.com, Eric Whitney, linux-ext4

Looks good to me too,

Reviewed-by: Christoph Hellwig <hch@lst.de>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] xfstests: set umask to avoid spurious generic/314 test failures
  2013-09-21 21:17 [PATCH] xfstests: set umask to avoid spurious generic/314 test failures Eric Whitney
  2013-12-13  4:06 ` Jeff Liu
@ 2013-12-17 16:39 ` Rich Johnston
  1 sibling, 0 replies; 4+ messages in thread
From: Rich Johnston @ 2013-12-17 16:39 UTC (permalink / raw)
  To: Eric Whitney, xfs@oss.sgi.com; +Cc: linux-ext4@vger.kernel.org

This patch has been committed.

Thanks
--Rich

commit d0b5b6f9a8ccdb1279f319866e4540e8a05ac7c4
Author: Eric Whitney <enwlinux@gmail.com>
Date:   Sat Sep 21 21:17:35 2013 +0000

     xfstests: set umask to avoid spurious generic/314 test failures

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2013-12-17 16:40 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-09-21 21:17 [PATCH] xfstests: set umask to avoid spurious generic/314 test failures Eric Whitney
2013-12-13  4:06 ` Jeff Liu
2013-12-13 11:17   ` Christoph Hellwig
2013-12-17 16:39 ` Rich Johnston

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).