diff mbox

[xfstests-bld] test-appliance: yet another file permissions fix

Message ID 20170228204643.37016-1-ebiggers3@gmail.com (mailing list archive)
State New, archived
Headers show

Commit Message

Eric Biggers Feb. 28, 2017, 8:46 p.m. UTC
From: Eric Biggers <ebiggers@google.com>

Several directories in the kvm-xfstests appliance were still not being
given the correct file permissions, since they were rsync'ed directly
into the mounted root filesystem with the '-a' option.  Unfortunately it
seems we can't express "go+u-w" with rsync options (it's not accepted by
--chmod), but we can copy the files through 'tar' instead, similar to
what is done elsewhere.

(I didn't notice this earlier because it is kvm-xfstests specific, and
it only broke a couple tests such as generic/128.)

Signed-off-by: Eric Biggers <ebiggers@google.com>
---
 kvm-xfstests/test-appliance/gen-image | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

Theodore Ts'o March 1, 2017, 7:42 p.m. UTC | #1
On Tue, Feb 28, 2017 at 12:46:43PM -0800, Eric Biggers wrote:
> From: Eric Biggers <ebiggers@google.com>
> 
> Several directories in the kvm-xfstests appliance were still not being
> given the correct file permissions, since they were rsync'ed directly
> into the mounted root filesystem with the '-a' option.  Unfortunately it
> seems we can't express "go+u-w" with rsync options (it's not accepted by
> --chmod), but we can copy the files through 'tar' instead, similar to
> what is done elsewhere.
> 
> (I didn't notice this earlier because it is kvm-xfstests specific, and
> it only broke a couple tests such as generic/128.)
> 
> Signed-off-by: Eric Biggers <ebiggers@google.com>

Thanks, applied.

					- Ted
--
To unsubscribe from this list: send the line "unsubscribe fstests" 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/kvm-xfstests/test-appliance/gen-image b/kvm-xfstests/test-appliance/gen-image
index 67f8c6b..dbd9b84 100755
--- a/kvm-xfstests/test-appliance/gen-image
+++ b/kvm-xfstests/test-appliance/gen-image
@@ -111,7 +111,8 @@  fi
 update_xfstests()
 {
    tar -C $ROOTDIR/root -xf ../../xfstests.tar.gz
-   rsync --exclude-from kvm-exclude-files -avH files/* $ROOTDIR
+   tar -X kvm-exclude-files -C files \
+	--owner=root --group=root --mode=go+u-w -c . | tar -C $ROOTDIR -x
    rsync -avH ../../xfstests/git-versions $ROOTDIR/root/xfstests
    chown -R root:root $ROOTDIR/root
    chmod -R go+u-w $ROOTDIR/root