blkid: Detect when value not found and return empty string.
[libguestfs.git] / fuse / test-fuse.sh
index 2c0aec5..dfc944d 100755 (executable)
@@ -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,14 +92,21 @@ $guestfish <<EOF
   run
   part-disk /dev/sda mbr
   mkfs ext2 /dev/sda1
-  mount /dev/sda1 /
+  mount_options acl,user_xattr /dev/sda1 /
   write /hello.txt hello
   write /world.txt "hello world"
   touch /empty
+  touch /user_xattr
+  setxattr user.test hello123 8 /user_xattr
+  touch /acl
+  # XXX hack until libguestfs gets ACL support
+  debug sh "setfacl -m u:500:r /sysroot/acl" | cat > /dev/null
 EOF
 
 stage Mounting the filesystem
-$guestmount -a "$image" -m /dev/sda1 "$mp"
+$guestmount \
+    -a "$image" -m /dev/sda1 \
+    -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