From 136332490521738ee08de0e6291cdad6822f02c4 Mon Sep 17 00:00:00 2001 From: Elena Gryaznova Date: Fri, 26 Nov 2010 20:12:33 +0300 Subject: [PATCH] b=23956 change conf-sanity test_37 to be functional on remote setup i=Mikhail.Pershin fix test_37 to not be skipped on remote setup; use the existing mds device instead of create a new one --- lustre/tests/conf-sanity.sh | 36 ++++++++++++++++++++---------------- 1 file changed, 20 insertions(+), 16 deletions(-) diff --git a/lustre/tests/conf-sanity.sh b/lustre/tests/conf-sanity.sh index cba8b95..c3c3379 100644 --- a/lustre/tests/conf-sanity.sh +++ b/lustre/tests/conf-sanity.sh @@ -1622,28 +1622,32 @@ test_36() { # 12743 run_test 36 "df report consistency on OSTs with different block size" test_37() { - client_only && skip "client only testing" && return 0 - LOCAL_MDSDEV="$TMP/mdt.img" - SYM_MDSDEV="$TMP/sym_mdt.img" + local mntpt=$(facet_mntpt mds) + local mdsdev=$MDSDEV + local mdsdev_sym="$TMP/sym_mdt.img" + + echo "MDS : $mdsdev" + echo "SYMLINK : $mdsdev_sym" + do_facet mds rm -f $mdsdev_sym + + do_facet mds ln -s $mdsdev $mdsdev_sym - echo "MDS : $LOCAL_MDSDEV" - echo "SYMLINK : $SYM_MDSDEV" - rm -f $LOCAL_MDSDEV + echo "mount symlink device - $mdsdev_sym" - touch $LOCAL_MDSDEV - mkfs.lustre --reformat --fsname=lustre --mdt --mgs --device-size=9000 $LOCAL_MDSDEV || - error "mkfs.lustre $LOCAL_MDSDEV failed" - ln -s $LOCAL_MDSDEV $SYM_MDSDEV + local rc=0 + mount_op=$(do_facet mds mount -v -t lustre $MDS_MOUNT_OPTS $mdsdev_sym $mntpt 2>&1 ) + rc=${PIPESTATUS[0]} - echo "mount symlink device - $SYM_MDSDEV" + echo mount_op=$mount_op - mount_op=`mount -v -t lustre -o loop $SYM_MDSDEV ${MOUNT%/*}/mds 2>&1 | grep "unable to set tunable"` - umount -d ${MOUNT%/*}/mds - rm -f $LOCAL_MDSDEV $SYM_MDSDEV + do_facet mds "umount -d $mntpt && rm -f $mdsdev_sym" - if [ -n "$mount_op" ]; then - error "**** FAIL: set tunables failed for symlink device" + if $(echo $mount_op | grep -q "unable to set tunable"); then + error "set tunables failed for symlink device" fi + + [ $rc -eq 0 ] || error "mount symlink $mdsdev_sym failed! rc=$rc" + return 0 } run_test 37 "verify set tunables works for symlink device" -- 1.8.3.1