@@ -253,15 +253,13 @@ echo ""
echo "=== Recursive change ACL ==="
rm -fr root
mkdir root
-pushd root >/dev/null
# create an arbitrary little tree
-for i in 1 2 3 4 5 6 7 8 9 0
-do
+( cd root ; for i in 1 2 3 4 5 6 7 8 9 0; do
mkdir -p a/$i
mkdir -p b/c$i/$i
touch a/$i/mumble
-done
-popd >/dev/null
+done )
+
chown -R 12345:54321 root
echo "Change #1..."
_runas -u 12345 -g 54321 -- chacl -r u::rwx,g::-w-,o::--x root
@@ -54,10 +54,7 @@ _scratch_mount >> $seqres.full 2>&1
# Test different directory sizes to test various directory formats
for f in 1 2 3 4 5 8 12 18 27 40 60 90 135 202 303 454 681 1020 1530 2295; do
mkdir $SCRATCH_MNT/dir$f
- pushd $SCRATCH_MNT/dir$f >/dev/null
- filldir $f
- renamedir
- popd >/dev/null
+ ( cd $SCRATCH_MNT/dir$f ; filldir $f ; renamedir )
done
status=0
@@ -21,30 +21,28 @@ _scratch_mount
cd $SCRATCH_MNT
# create file with async I/O
-$XFS_IO_PROG -f -c 'pwrite -b 4k -S 0x12 0 4k' async_file > /dev/null
+$XFS_IO_PROG -f -c 'pwrite -b 4k -S 0x12 0 4k' $SCRATCH_MNT/async_file > /dev/null
# create file with sync I/O
-$XFS_IO_PROG -f -s -c 'pwrite -b 4k -S 0x34 0 4k' sync_file > /dev/null
+$XFS_IO_PROG -f -s -c 'pwrite -b 4k -S 0x34 0 4k' $SCRATCH_MNT/sync_file > /dev/null
# create file with direct I/O
-$XFS_IO_PROG -f -d -c 'pwrite -b 4k -S 0x56 0 4k' direct_file > /dev/null
+$XFS_IO_PROG -f -d -c 'pwrite -b 4k -S 0x56 0 4k' $SCRATCH_MNT/direct_file > /dev/null
# create file, truncate and then dirty again
-$XFS_IO_PROG -f -c 'pwrite -b 4k -S 0x78 0 4k' trunc_file > /dev/null
-$XFS_IO_PROG -f -c 'truncate 2k' trunc_file > /dev/null
-$XFS_IO_PROG -c 'pwrite 1k 0 1k' trunc_file > /dev/null
+$XFS_IO_PROG -f -c 'pwrite -b 4k -S 0x78 0 4k' $SCRATCH_MNT/trunc_file > /dev/null
+$XFS_IO_PROG -f -c 'truncate 2k' $SCRATCH_MNT/trunc_file > /dev/null
+$XFS_IO_PROG -c 'pwrite 1k 0 1k' $SCRATCH_MNT/trunc_file > /dev/null
-pushd / > /dev/null
_scratch_cycle_mount
-popd > /dev/null
# check file size and contents
-od -Ad -x async_file
-od -Ad -x sync_file
-od -Ad -x direct_file
-od -Ad -x trunc_file
+od -Ad -x $SCRATCH_MNT/async_file
+od -Ad -x $SCRATCH_MNT/sync_file
+od -Ad -x $SCRATCH_MNT/direct_file
+od -Ad -x $SCRATCH_MNT/trunc_file
-rm -f async_file sync_file direct_file trunc_file
+rm -f $SCRATCH_MNT/*
status=0
exit
@@ -42,7 +42,7 @@ create_files()
# We use slightly longer file name to make directory grow faster and
# hopefully convert between various types
for (( i = 0; i < $files; i++ )); do
- touch somewhatlongerfilename$i
+ echo -n > somewhatlongerfilename$i
done
}
@@ -50,12 +50,13 @@ for (( i = 0; i <= $moves; i++ )); do
mkdir $SCRATCH_MNT/dir$i
done
+start_dir=$PWD
for (( l = 0; l < $loops; l++ )); do
mkdir $SCRATCH_MNT/dir0/dir
- pushd $SCRATCH_MNT/dir0/dir &>/dev/null
+ cd $SCRATCH_MNT/dir0/dir
create_files &
BGPID=$!
- popd &>/dev/null
+ cd $start_dir
for (( i = 0; i < $moves; i++ )); do
mv $SCRATCH_MNT/dir$i/dir $SCRATCH_MNT/dir$((i+1))/dir
done