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/