From: huanghua Date: Fri, 20 Oct 2006 09:16:54 +0000 (+0000) Subject: check nlink count for hard link X-Git-Tag: v1_8_0_110~486^2~418 X-Git-Url: https://git.whamcloud.com/gitweb?a=commitdiff_plain;h=e3cd2039c6ed2081b8de3c269092bf6945863adc;p=fs%2Flustre-release.git check nlink count for hard link --- diff --git a/lustre/tests/sanity.sh b/lustre/tests/sanity.sh index 95b5a96..f8910a2 100644 --- a/lustre/tests/sanity.sh +++ b/lustre/tests/sanity.sh @@ -1260,7 +1260,9 @@ test_31g() { touch $DIR/d31ga/f ln $DIR/d31ga/f $DIR/d31gb/g $CHECKSTAT -t file $DIR/d31ga/f || error "source" + [ `./stat -c%h $DIR/d31ga/f` == '2' ] || error "source nlink" $CHECKSTAT -t file $DIR/d31gb/g || error "target" + [ `./stat -c%h $DIR/d31gb/g` == '2' ] || error "target nlink" } run_test 31g "cross directory link===============" @@ -1271,7 +1273,9 @@ test_31h() { touch $DIR/d31h/f ln $DIR/d31h/f $DIR/d31h/dir/g $CHECKSTAT -t file $DIR/d31h/f || error "source" + [ `./stat -c%h $DIR/d31h/f` == '2' ] || error "source nlink" $CHECKSTAT -t file $DIR/d31h/dir/g || error "target" + [ `./stat -c%h $DIR/d31h/dir/g` == '2' ] || error "target nlink" } run_test 31h "cross directory link under child===============" @@ -1282,7 +1286,9 @@ test_31i() { touch $DIR/d31i/dir/f ln $DIR/d31i/dir/f $DIR/d31i/g $CHECKSTAT -t file $DIR/d31i/dir/f || error "source" + [ `./stat -c%h $DIR/d31i/dir/f` == '2' ] || error "source nlink" $CHECKSTAT -t file $DIR/d31i/g || error "target" + [ `./stat -c%h $DIR/d31i/g` == '2' ] || error "target nlink" } run_test 31i "cross directory link under parent==============="