X-Git-Url: http://git.annexia.org/?p=libguestfs.git;a=blobdiff_plain;f=fuse%2Ftest-fuse.sh;h=0a429f73b30fa3b649f1c53480064a36875ed223;hp=6d2f0fe05b37b6db09ac49dfebeacf0bf49799ee;hb=0d6fd9e1d2488841c912c5351086e536772837ef;hpb=37a242286896afe119163335143ffbdd6842127b diff --git a/fuse/test-fuse.sh b/fuse/test-fuse.sh index 6d2f0fe..0a429f7 100755 --- a/fuse/test-fuse.sh +++ b/fuse/test-fuse.sh @@ -1,6 +1,6 @@ #!/bin/bash - # libguestfs -# Copyright (C) 2009 Red Hat Inc. +# Copyright (C) 2009-2011 Red Hat Inc. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -92,15 +92,20 @@ $guestfish < /dev/null EOF stage Mounting the filesystem $guestmount \ - -a "$image" -m /dev/sda1 \ + -a "$image" -m /dev/sda1:/:acl,user_xattr \ -o uid="$(id -u)" -o gid="$(id -g)" "$mp" # To debug guestmount, add this to the end of the preceding command: # -v -x & sleep 60 @@ -223,9 +228,22 @@ world bigger biggest" ] +stage 'Checking extended attribute (xattr) read operation' +if getfattr --help > /dev/null 2>&1 ; then + [ "$(getfattr -d user_xattr | grep -v ^#)" = 'user.test="hello123"' ] +fi + +stage Checking POSIX ACL read operation +if getfacl --help > /dev/null 2>&1 ; then + [ "$(getfacl -n acl | grep -v ^#)" = "user::rw- +user:500:r-- +group::r-- +mask::r-- +other::r--" ] +fi + # These ones are not yet tested by the current script: #stage XXX statfs/statvfs -#stage XXX xattr operations # These ones cannot easily be tested by the current script, eg because # this script doesn't run as root: