Whamcloud - gitweb
LU-15011 tests: ost-pools to remove big files 20/45120/2
authorAlex Zhuravlev <bzzz@whamcloud.com>
Sun, 3 Oct 2021 06:52:27 +0000 (09:52 +0300)
committerOleg Drokin <green@whamcloud.com>
Sun, 17 Oct 2021 18:11:50 +0000 (18:11 +0000)
otherwise those files can affect subtest 29

Signed-off-by: Alex Zhuravlev <bzzz@whamcloud.com>
Change-Id: Ia07c10882aba97758a3d11965693134eb2238e9a
Reviewed-on: https://review.whamcloud.com/45120
Tested-by: jenkins <devops@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: James Nunez <jnunez@whamcloud.com>
lustre/tests/ost-pools.sh

index a10ca50..6ffda0e 100755 (executable)
@@ -302,6 +302,7 @@ test_1n() {
        add_pool ${POOL}1234567 "OST0000" "$FSNAME-OST0000_UUID "
        local POOL_ROOT=${POOL_ROOT:-$DIR/$tdir}
        create_dir $POOL_ROOT ${POOL}1234567
        add_pool ${POOL}1234567 "OST0000" "$FSNAME-OST0000_UUID "
        local POOL_ROOT=${POOL_ROOT:-$DIR/$tdir}
        create_dir $POOL_ROOT ${POOL}1234567
+       stack_trap "rm -f $POOL_ROOT/file"
        dd if=/dev/zero of=$POOL_ROOT/file bs=1M count=100
        RC=$?; [[ $RC -eq 0 ]] ||
                error "failed to write to $POOL_ROOT/file: $RC"
        dd if=/dev/zero of=$POOL_ROOT/file bs=1M count=100
        RC=$?; [[ $RC -eq 0 ]] ||
                error "failed to write to $POOL_ROOT/file: $RC"
@@ -1274,6 +1275,7 @@ test_23a() {
        if [ $? -eq 0 ]; then
                $LFS quota -v -u $RUNAS_ID $dir
                cancel_lru_locks osc
        if [ $? -eq 0 ]; then
                $LFS quota -v -u $RUNAS_ID $dir
                cancel_lru_locks osc
+               stack_trap "rm -f $file"
                stat=$(LOCALE=C $RUNAS dd if=/dev/zero of=$file bs=$BUNIT_SZ \
                        count=$BUNIT_SZ seek=$((BUNIT_SZ*2)) 2>&1)
                RC=$?
                stat=$(LOCALE=C $RUNAS dd if=/dev/zero of=$file bs=$BUNIT_SZ \
                        count=$BUNIT_SZ seek=$((BUNIT_SZ*2)) 2>&1)
                RC=$?