Whamcloud - gitweb
LU-7471 tests: Modified make_custom_file_for_progress fn 46/17346/7
authorAditya Pandit <aditya.pandit@seagate.com>
Tue, 24 Nov 2015 09:35:40 +0000 (15:05 +0530)
committerOleg Drokin <oleg.drokin@intel.com>
Tue, 24 Jan 2017 05:21:53 +0000 (05:21 +0000)
After executing tests like test_200 and if there is not
enough space the function make_custom_file_for_progress was returning
1 on error but this error was not getting caught properly.
Modified the code to catch the error properly.

Test-Parameters: trivial testlist=sanity-hsm

Seagate-bug-id: MRP-3026
Signed-off-by: Mikhail V. Pridushchenko <mikhail.v.pridushchenko@seagate.com>
Signed-off-by: Aditya Pandit <aditya.pandit@seagate.com>
Change-Id: I0db45e327d6f49d066b5c631096a459b8acd2758
Signed-off-by: Ashish Purkar <ashish.purkar@seagate.com>
Reviewed-on: https://review.whamcloud.com/17346
Reviewed-by: Emoly Liu <emoly.liu@intel.com>
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
lustre/tests/sanity-hsm.sh

index 8577d25..dd700c3 100755 (executable)
@@ -698,8 +698,7 @@ make_custom_file_for_progress() {
        [[ $blksz -gt 0 ]] || error "Invalid stripe size"
 
        cleanup_large_files
-       check_enough_free_space $fsize $blksz
-       [ $? != 0 ] && return $?
+       check_enough_free_space $fsize $blksz || return $?
        dd if=/dev/zero of=$file2 count=$fsize bs=$blksz conv=fsync ||
                file_creation_failure dd $file2 $?
        path2fid $1 || error "cannot get fid on $1"