test_9() {
[ $(lustre_version_code ost1) -ge $(version_code 2.6.54) ] ||
{ skip "Need OST version at least 2.6.54"; return; }
- $SETSTRIPE -i 0 -c 1 $DIR/$tfile || "setstripe failed"
+ $SETSTRIPE -i 0 -c 1 $DIR/$tfile || error "setstripe failed"
replay_barrier ost1
# do IO
dd if=/dev/zero of=$DIR/$tfile count=1 bs=1M > /dev/null ||
wait_request_state $fid1 RESTORE SUCCEED
$LFS hsm_release $file1 || error "cannot release '$file1'"
- dd if=$file2 of=/dev/null bs=1M || "cannot read '$file2'"
+ dd if=$file2 of=/dev/null bs=1M || error "cannot read '$file2'"
$LFS hsm_release $file2 &&
error "release should fail on read-only mount"
rm -f $DIR/$tdir/d0/foo || error "(4) Fail to unlink $DIR/$tdir/d0/foo"
do_facet $SINGLEMDS $LCTL set_param fail_loc=0
- ls -ail $DIR/$tdir/d0/foo > /dev/null 2>&1 && "(5) 'ls' should fail"
+ ls -ail $DIR/$tdir/d0/foo > /dev/null 2>&1 &&
+ error "(5) 'ls' should fail"
echo "Trigger namespace LFSCK to repair the missing remote name entry"
$START_NAMESPACE -r -A ||
rmdir $DIR/$tdir/d0/foo || error "(3) Fail to rmdir $DIR/$tdir/d0/foo"
do_facet $SINGLEMDS $LCTL set_param fail_loc=0
- ls -ail $DIR/$tdir/d0/foo > /dev/null 2>&1 && "(4) 'ls' should fail"
+ ls -ail $DIR/$tdir/d0/foo > /dev/null 2>&1 &&
+ error "(4) 'ls' should fail"
echo "Trigger namespace LFSCK to repair the missing remote name entry"
$START_NAMESPACE -r -A ||
do_facet $SINGLEMDS $LCTL set_param fail_loc=0
rm -rf $DIR/$tdir/d0 || error "(5) Fail to unlink the dir d0"
- ls -ail $DIR/$tdir/d0 > /dev/null 2>&1 && "(6) 'ls' should fail"
+ ls -ail $DIR/$tdir/d0 > /dev/null 2>&1 && error "(6) 'ls' should fail"
echo "Trigger namespace LFSCK to repair the lost parent"
$START_NAMESPACE -r -A ||
do_facet $SINGLEMDS $LCTL set_param fail_loc=0
rmdir $DIR/$tdir/d0 || error "(4) Fail to unlink the dir d0"
- ls -ail $DIR/$tdir/d0 > /dev/null 2>&1 && "(5) 'ls' should fail"
+ ls -ail $DIR/$tdir/d0 > /dev/null 2>&1 && error "(5) 'ls' should fail"
echo "Trigger namespace LFSCK to repair the missing remote name entry"
$START_NAMESPACE -r -A ||
local foofid=$($LFS path2fid $DIR/$tdir/d0/foo)
$LFS fid2path $DIR $foofid
local count2=$($LFS fid2path $DIR $foofid | wc -l)
- [ $count2 -eq 2 ] || "(6) Fail to inject error: $count2"
+ [ $count2 -eq 2 ] || error "(6) Fail to inject error: $count2"
echo "Trigger namespace LFSCK to repair the nlink count"
$START_NAMESPACE -r -A ||
mount_client $MOUNT || error "(17) Fail to start client!"
- stat $DIR/$tdir/foo/f0 || "(18) f0 is not recovered"
+ stat $DIR/$tdir/foo/f0 || error "(18) f0 is not recovered"
ls -ail $MOUNT/.lustre/lost+found/
trap cleanup_quota_test EXIT
# enable ost quota
- set_ost_qtype "ug" || "enable ost quota failed"
+ set_ost_qtype "ug" || error "enable ost quota failed"
# test for user
log "User quota (block hardlimit:$LIMIT MB)"
trap cleanup_quota_test EXIT
# enable mdt quota
- set_mdt_qtype "ug" || "enable mdt quota failed"
+ set_mdt_qtype "ug" || error "enable mdt quota failed"
# test for user
log "User quota (inode hardlimit:$LIMIT files)"
$RUNAS createmany -m $TESTFILE $((ilimit + 1)) &&
quota_error u $TSTUSR "create succeeded, expect EDQUOT"
- $RUNAS unlinkmany $TESTFILE $ilimit || "unlink files failed"
+ $RUNAS unlinkmany $TESTFILE $ilimit || error "unlink files failed"
wait_delete_completed
sync_all_data || true
$RUNAS createmany -m $TESTFILE $((ilimit + 1)) ||
quota_error -u $TSTUSR "create failed, expect success"
- $RUNAS unlinkmany $TESTFILE $((ilimit + 1)) || "unlink failed"
- rmdir $DIR/${tdir}-1 || "unlink remote dir failed"
+ $RUNAS unlinkmany $TESTFILE $((ilimit + 1)) || error "unlink failed"
+ rmdir $DIR/${tdir}-1 || error "unlink remote dir failed"
cleanup_quota_test
resetquota -u $TSTUSR
error "set limit for root group successfully, expect failure"
# root user can overrun quota
- set_ost_qtype "ug" || "enable ost quota failed"
+ set_ost_qtype "ug" || error "enable ost quota failed"
$LFS setquota -u $TSTUSR -b 0 -B 2M -i 0 -I 0 $DIR ||
error "set quota failed"
setup_quota_test || error "setup quota failed with $?"
trap cleanup_quota_test EXIT
- set_mdt_qtype "ug" || "enable mdt quota failed"
+ set_mdt_qtype "ug" || error "enable mdt quota failed"
$LFS setquota -u $TSTUSR -b 0 -B 0 -i 0 -I 1 $DIR ||
error "set quota failed"
setup_quota_test || error "setup quota failed with $?"
trap cleanup_quota_test EXIT
- set_ost_qtype "u" || "enable ost quota failed"
+ set_ost_qtype "u" || error "enable ost quota failed"
quota_show_check b u $TSTUSR
$LFS setquota -u $TSTUSR -b 0 -B "$blimit"M -i 0 -I 0 $DIR ||
$LFS mkdir -i 1 $DIR/${tdir}-1 || error "create remote dir failed"
chmod 0777 $DIR/${tdir}-1
- set_mdt_qtype "u" || "enable mdt quota failed"
+ set_mdt_qtype "u" || error "enable mdt quota failed"
quota_show_check f u $TSTUSR
$LFS setquota -u $TSTUSR -b 0 -B 0 -i 0 -I $ilimit $DIR ||
setup_quota_test || error "setup quota failed with $?"
trap cleanup_quota_test EXIT
- set_ost_qtype "u" || "enable ost quota failed"
+ set_ost_qtype "u" || error "enable ost quota failed"
quota_show_check b u $TSTUSR
$LFS setquota -u $TSTUSR -b 0 -B 10M -i 0 -I 0 $DIR ||
# verify mdt stats first.
mkdir ${testdir} || error "mkdir failed"
check_stats $SINGLEMDS "mkdir" 1
- touch ${testdir}/${tfile} || "touch failed"
+ touch ${testdir}/${tfile} || error "touch failed"
check_stats $SINGLEMDS "open" 1
check_stats $SINGLEMDS "close" 1
[ $(lustre_version_code $SINGLEMDS) -ge $(version_code 2.8.54) ] && {
- mknod ${testdir}/${tfile}-pipe p || "mknod failed"
+ mknod ${testdir}/${tfile}-pipe p || error "mknod failed"
check_stats $SINGLEMDS "mknod" 2
}
- rm -f ${testdir}/${tfile}-pipe || "pipe remove failed"
+ rm -f ${testdir}/${tfile}-pipe || error "pipe remove failed"
check_stats $SINGLEMDS "unlink" 1
rm -f ${testdir}/${tfile} || error "file remove failed"
check_stats $SINGLEMDS "unlink" 2
remote_mds_nodsh && skip "remote MDS with nodsh" && return
local testdir=$DIR/${tdir}/stats_testdir
mkdir -p ${testdir} || error "mkdir failed"
- touch ${testdir}/${tfile} || "touch failed"
+ touch ${testdir}/${tfile} || error "touch failed"
cancel_lru_locks mdc
# clear stats.
local nsdir="ldlm.namespaces.*-MDT0000-mdc-*"
local unused=$($LCTL get_param -n $nsdir.lock_unused_count)
- [ $unused -eq 0 ] || "$unused locks are not cleared"
+ [ $unused -eq 0 ] || error "$unused locks are not cleared"
local nr=1000
createmany -o $DIR/$tdir/f $nr ||
test_222b () {
[ $PARALLEL == "yes" ] && skip "skip parallel run" && return
- rm -rf $DIR/$tdir
- test_mkdir -p $DIR/$tdir
- $SETSTRIPE -c 1 -i 0 $DIR/$tdir
- createmany -o $DIR/$tdir/$tfile 10
- cancel_lru_locks mdc
- cancel_lru_locks osc
- #define OBD_FAIL_LDLM_AGL_DELAY 0x31a
- $LCTL set_param fail_loc=0x31a
- rm -r $DIR/$tdir || "AGL for rmdir failed"
- $LCTL set_param fail_loc=0
+ rm -rf $DIR/$tdir
+ test_mkdir -p $DIR/$tdir
+ $SETSTRIPE -c 1 -i 0 $DIR/$tdir
+ createmany -o $DIR/$tdir/$tfile 10
+ cancel_lru_locks mdc
+ cancel_lru_locks osc
+ #define OBD_FAIL_LDLM_AGL_DELAY 0x31a
+ $LCTL set_param fail_loc=0x31a
+ rm -r $DIR/$tdir || error "AGL for rmdir failed"
+ $LCTL set_param fail_loc=0
}
run_test 222b "AGL for rmdir should not trigger CLIO lock failure ============="
touch d0/0 || error "create 0 failed"
mv d0/0 d1/0 || error "rename d0/0 d1/0 failed"
stat d0/0 && error "stat mv filed succeed"
- mv $DIR2/$tdir/d1/0 $DIR2/$tdir/d0/0 || "rename d1/0 d0/0 failed"
+ mv $DIR2/$tdir/d1/0 $DIR2/$tdir/d0/0 || error "rename d1/0 d0/0 failed"
stat d0/0 || error "stat failed"
local t=$(ls -ai $DIR1/$tdir/d0 | sort -u | wc -l)