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

[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]



From: Eric Biggers <ebiggers@xxxxxxxxxx>

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@xxxxxxxxxx>
---
 kvm-xfstests/test-appliance/gen-image | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

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
-- 
2.11.0.483.g087da7b7c-goog

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



[Index of Archives]     [Linux Filesystems Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux