X-Git-Url: http://git.annexia.org/?a=blobdiff_plain;f=fuse%2Ftest-fuse.sh;h=344ab582ff03166d9c060bb5a16b72b5186b5448;hb=fe6072ecc6f7ea6f7ce50199c0788ac5aa6c76e3;hp=15e96313204b28c9bbc18eb994b301d2b06ac985;hpb=d20b9cd6b82e26dd2f8cf43d9cc8f1e518f2e077;p=libguestfs.git diff --git a/fuse/test-fuse.sh b/fuse/test-fuse.sh index 15e9631..344ab58 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 @@ -31,6 +31,10 @@ nr_stages=$(grep "^stage " $0 | wc -l) # and move to that directory for the initial phase of the script. top_builddir=$(cd "$top_builddir" > /dev/null; pwd) +# Set TMPDIR so the appliance doesn't conflict with globally +# installed libguestfs. +export TMPDIR=$top_builddir + # Set libguestfs up for running locally. export LIBGUESTFS_PATH="$top_builddir/appliance" @@ -92,14 +96,21 @@ $guestfish < /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 @@ -197,17 +208,18 @@ truncate -c -s 0 truncated [ "$(stat -c %s truncated)" -eq 0 ] rm -f truncated -stage Checking utimens and timestamps -for ts in 12345 1234567 987654321; do - # NB: It's not possible to set the ctime with touch. - touch -a -d @$ts timestamp - [ "$(stat -c %X timestamp)" -eq $ts ] - touch -m -d @$ts timestamp - [ "$(stat -c %Y timestamp)" -eq $ts ] - touch -d @$ts timestamp - [ "$(stat -c %X timestamp)" -eq $ts ] - [ "$(stat -c %Y timestamp)" -eq $ts ] -done +# Disabled because of RHBZ#660687 on Debian. +# stage Checking utimens and timestamps +# for ts in 12345 1234567 987654321; do +# # NB: It's not possible to set the ctime with touch. +# touch -a -d @$ts timestamp +# [ "$(stat -c %X timestamp)" -eq $ts ] +# touch -m -d @$ts timestamp +# [ "$(stat -c %Y timestamp)" -eq $ts ] +# touch -d @$ts timestamp +# [ "$(stat -c %X timestamp)" -eq $ts ] +# [ "$(stat -c %Y timestamp)" -eq $ts ] +# done stage Checking writes cp hello.txt copy.txt