public inbox for fstests@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] kvm-xfstests, gce-xfstests: correct file permissions with --update-files
@ 2016-11-16  1:40 Eric Biggers
  2016-12-09 21:21 ` Eric Biggers
  0 siblings, 1 reply; 2+ messages in thread
From: Eric Biggers @ 2016-11-16  1:40 UTC (permalink / raw)
  To: Theodore Ts'o; +Cc: fstests, Eric Biggers

The xfstests-bld repository may have been cloned with a umask that
masked out the other bits.  When using --update-files in this situation,
the VM ended up in a state where non-root users were unable to execute
anything, which made all tests using the fsgqa user get skipped.  Fix
this by copying the r and x group bits to the other bits when creating
files.tar.gz.  Also set the owner and group to root while we're at it.

Signed-off-by: Eric Biggers <ebiggers@google.com>
---
 kvm-xfstests/gce-xfstests | 3 ++-
 kvm-xfstests/kvm-xfstests | 3 ++-
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/kvm-xfstests/gce-xfstests b/kvm-xfstests/gce-xfstests
index 04eee78..8839ea2 100755
--- a/kvm-xfstests/gce-xfstests
+++ b/kvm-xfstests/gce-xfstests
@@ -471,7 +471,8 @@ then
 	exit 1
     fi
     (cd "$DIR/test-appliance"; \
-     tar -X gce-exclude-files --exclude=etc -C files -cf - . | \
+     tar -X gce-exclude-files --exclude=etc -C files \
+		--owner=root --group=root --mode=o+g-w -cf - . | \
 	 gzip -9n > $LOCAL_FILES)
     get_local_hash "$LOCAL_FILES"
     get_remote_hash "$GS_FILES"
diff --git a/kvm-xfstests/kvm-xfstests b/kvm-xfstests/kvm-xfstests
index fbdae7a..bcada9e 100755
--- a/kvm-xfstests/kvm-xfstests
+++ b/kvm-xfstests/kvm-xfstests
@@ -75,7 +75,8 @@ then
 	exit 1
     fi
     (cd "$DIR/test-appliance"; \
-     tar -X kvm-exclude-files -C files -cf - . | \
+     tar -X kvm-exclude-files -C files \
+		--owner=root --group=root --mode=o+g-w -cf - . | \
 	 gzip -9n > "$TDIR/files.tar.gz")
     tar -r -f $VDH -C "$TDIR" files.tar.gz
     rm -rf "$TDIR"
-- 
2.8.0.rc3.226.g39d4020


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

* Re: [PATCH] kvm-xfstests, gce-xfstests: correct file permissions with --update-files
  2016-11-16  1:40 [PATCH] kvm-xfstests, gce-xfstests: correct file permissions with --update-files Eric Biggers
@ 2016-12-09 21:21 ` Eric Biggers
  0 siblings, 0 replies; 2+ messages in thread
From: Eric Biggers @ 2016-12-09 21:21 UTC (permalink / raw)
  To: Theodore Ts'o; +Cc: fstests

On Tue, Nov 15, 2016 at 05:40:56PM -0800, Eric Biggers wrote:
> The xfstests-bld repository may have been cloned with a umask that
> masked out the other bits.  When using --update-files in this situation,
> the VM ended up in a state where non-root users were unable to execute
> anything, which made all tests using the fsgqa user get skipped.  Fix
> this by copying the r and x group bits to the other bits when creating
> files.tar.gz.  Also set the owner and group to root while we're at it.
> 
> Signed-off-by: Eric Biggers <ebiggers@google.com>

Hi Ted, are you planning to apply this patch?  I see you applied the patch to
fix --update-xfstests-tar but not this one, to fix --update-files.

Thanks!

Eric

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

end of thread, other threads:[~2016-12-09 21:21 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-11-16  1:40 [PATCH] kvm-xfstests, gce-xfstests: correct file permissions with --update-files Eric Biggers
2016-12-09 21:21 ` Eric Biggers

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox