X-Git-Url: https://git.whamcloud.com/?a=blobdiff_plain;f=lustre%2Ftests%2Fsanityn.sh;h=294b4966bf4a2c7699ceff047f96eda44d033312;hb=b63efc864794860f84f852ba3c89390676b18070;hp=d1ad5698b0073864f8efb7fadc73ad81e4b2e54c;hpb=852cd92ab282875ef00d6e1401920cbe6d99c644;p=fs%2Flustre-release.git diff --git a/lustre/tests/sanityn.sh b/lustre/tests/sanityn.sh index d1ad569..294b4966 100644 --- a/lustre/tests/sanityn.sh +++ b/lustre/tests/sanityn.sh @@ -332,7 +332,7 @@ COUNT=${COUNT:-2500} # The FSXNUM reduction for ZFS is needed until ORI-487 is fixed. # We don't want to skip it entirely, but ZFS is VERY slow and cannot # pass a 2500 operation dual-mount run within the time limit. -if [ "$OSTFSTYPE" = "zfs" ]; then +if [ "$(facet_fstype ost1)" = "zfs" ]; then FSXNUM=$((COUNT / 5)) FSXP=1 elif [ "$SLOW" = "yes" ]; then @@ -499,7 +499,7 @@ run_test 24a "lfs df [-ih] [path] test =========================" test_24b() { touch $DIR1/$tfile - fsnum=`lfs df | grep -c "filesystem summary:"` + fsnum=$(lfs_df | grep -c "summary") [ $fsnum -eq 2 ] || error "lfs df shows $fsnum != 2 filesystems." } run_test 24b "lfs df should show both filesystems ===============" @@ -946,23 +946,23 @@ test_36() { #bug 16417 while [ $i -le 10 ]; do lctl mark "start test" - local before=$($LFS df | awk '{if ($1 ~/^filesystem/) \ - {print $5; exit} }') - dd if=/dev/zero of=$DIR1/$tdir/file000 bs=1M count=$SIZE - sync # sync data from client's cache - sync_all_data # sync data from server's cache (delayed - # allocation) + local before=$($LFS df | awk '{ if ($1 ~/^filesystem/) \ + { print $5; exit} }') + dd if=/dev/zero of=$DIR1/$tdir/$tfile bs=1M count=$SIZE || + error "dd $DIR1/$tdir/$tfile ${SIZE}MB failed" + sync # sync data from client cache + sync_all_data # sync data from server cache (delayed allocation) sleep 1 - local after_dd=$($LFS df | awk '{if ($1 ~/^filesystem/) \ - {print $5; exit} }') - multiop_bg_pause $DIR2/$tdir/file000 O_r${SIZE_B}c || return 3 + local after_dd=$($LFS df | awk '{ if ($1 ~/^filesystem/) \ + { print $5; exit} }') + multiop_bg_pause $DIR2/$tdir/$tfile O_r${SIZE_B}c || return 3 read_pid=$! - rm -f $DIR1/$tdir/file000 + rm -f $DIR1/$tdir/$tfile kill -USR1 $read_pid wait $read_pid wait_delete_completed - local after=$($LFS df | awk '{if ($1 ~/^filesystem/) \ - {print $5; exit} }') + local after=$($LFS df | awk '{ if ($1 ~/^filesystem/) \ + { print $5; exit} }') echo "*** cycle($i) *** before($before) after_dd($after_dd)" \ "after($after)" # this free space! not used @@ -973,7 +973,7 @@ test_36() { #bug 16417 let i=i+1 done } -run_test 36 "handle ESTALE/open-unlink corectly" +run_test 36 "handle ESTALE/open-unlink correctly" test_37() { # bug 18695 mkdir -p $DIR1/$tdir @@ -1981,6 +1981,6 @@ log "cleanup: ======================================================" [ "$(mount | grep $MOUNT2)" ] && umount $MOUNT2 -complete $(basename $0) $SECONDS +complete $SECONDS check_and_cleanup_lustre exit_status