overlay/016: do not cd into $SCRATCH_MNT
authorAmir Goldstein <amir73il@gmail.com>
Tue, 13 Dec 2016 06:15:29 +0000 (08:15 +0200)
committerEryu Guan <eguan@redhat.com>
Tue, 13 Dec 2016 06:26:18 +0000 (14:26 +0800)
Avoid cd into $SCRATCH_MNT

Signed-off-by: Amir Goldstein <amir73il@gmail.com>
Reviewed-by: Eryu Guan <eguan@redhat.com>
Signed-off-by: Eryu Guan <eguan@redhat.com>
tests/overlay/016
tests/overlay/016.out

index 041ab3deb8fed7db406ee596337245a8c1e8c456..cffcde70511eb514f6531ca4b966bf1a1793151e 100755 (executable)
@@ -64,7 +64,6 @@ echo "This is old news" > $lowerdir/bar
 
 _scratch_mount
 
 
 _scratch_mount
 
-cd $SCRATCH_MNT
 
 #
 # case #1:
 
 #
 # case #1:
@@ -73,12 +72,12 @@ cd $SCRATCH_MNT
 # write to rwfd
 # read from rofd
 #
 # write to rwfd
 # read from rofd
 #
-$XFS_IO_PROG -r foo \
-       -C "open foo" \
+$XFS_IO_PROG -r $SCRATCH_MNT/foo \
+       -C "open $SCRATCH_MNT/foo" \
        -C "pwrite -S 0x61 0 16" \
        -C "file 0" \
        -C "pread -v 0 16" \
        -C "pwrite -S 0x61 0 16" \
        -C "file 0" \
        -C "pread -v 0 16" \
-| _filter_xfs_io
+| _filter_xfs_io | _filter_scratch
 
 #
 # case #2:
 
 #
 # case #2:
@@ -86,12 +85,12 @@ $XFS_IO_PROG -r foo \
 # write to rwfd
 # read from mapped memory
 #
 # write to rwfd
 # read from mapped memory
 #
-$XFS_IO_PROG -r bar \
+$XFS_IO_PROG -r $SCRATCH_MNT/bar \
        -C "mmap -r 0 16" \
        -C "mmap -r 0 16" \
-       -C "open bar" \
+       -C "open $SCRATCH_MNT/bar" \
        -C "pwrite -S 0x61 0 16" \
        -C "mread -v 0 16" \
        -C "pwrite -S 0x61 0 16" \
        -C "mread -v 0 16" \
-| _filter_xfs_io
+| _filter_xfs_io | _filter_scratch
 
 status=0
 exit
 
 status=0
 exit
index c49f8dcda0995401f339f5b3567d399828cc261a..a28aaa67fe58447bb9a547ef3add85971d752937 100644 (file)
@@ -1,8 +1,8 @@
 QA output created by 016
 wrote 16/16 bytes at offset 0
 XXX Bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
 QA output created by 016
 wrote 16/16 bytes at offset 0
 XXX Bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
-[000] foo            (foreign,non-sync,non-direct,read-only)
- 001  foo            (foreign,non-sync,non-direct,read-write)
+[000] SCRATCH_MNT/foo (foreign,non-sync,non-direct,read-only)
+ 001  SCRATCH_MNT/foo (foreign,non-sync,non-direct,read-write)
 00000000:  61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61  aaaaaaaaaaaaaaaa
 read 16/16 bytes at offset 0
 XXX Bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
 00000000:  61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61  aaaaaaaaaaaaaaaa
 read 16/16 bytes at offset 0
 XXX Bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)