From: braam Date: Mon, 22 Apr 2002 17:34:25 +0000 (+0000) Subject: - minor further changes to the test script: X-Git-Tag: v1_7_100~5743 X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=commitdiff_plain;h=0e09dc78da5b3e118ecca326fee62b06d9381a83 - minor further changes to the test script: - add a fail function to common.sh to notify user that umount failed - give all attaches a name. - clean up llmountcleanup.sh with name2dev - remove debugging printouts from obdctl --- diff --git a/lustre/tests/common.sh b/lustre/tests/common.sh index 57fea7d..4245861 100644 --- a/lustre/tests/common.sh +++ b/lustre/tests/common.sh @@ -217,7 +217,7 @@ setup_mds() { $OBDCTL <<- EOF device ${MDS_DEVNO} - attach mds + attach mds MDSDEV setup ${MDS} ${MDSFS} quit EOF @@ -268,10 +268,10 @@ setup_ost() { $OBDCTL <<- EOF device ${OBD_DEVNO} - attach ${OSTTYPE} + attach ${OSTTYPE} OSTDEV setup ${OBD} ${OBDARG} device ${OST_DEVNO} - attach ost + attach ost OSTDEV setup ${OBD_DEVNO} quit EOF @@ -287,7 +287,7 @@ setup_osc() { OSC_DEVNO=$DEVNO; DEVNO=`expr $DEVNO + 1` $OBDCTL <<- EOF || return $rc device ${OSC_DEVNO} - attach osc + attach osc OSCDEV setup -1 quit EOF @@ -452,3 +452,8 @@ cleanup_client() { cleanup_mount && cleanup_osc DEVNO=0 } + +fail() { + echo $1 + exit 1 +} diff --git a/lustre/tests/fs.sh b/lustre/tests/fs.sh index 1db9a94..736258f 100644 --- a/lustre/tests/fs.sh +++ b/lustre/tests/fs.sh @@ -18,7 +18,7 @@ mknod /dev/obd c 10 241 $R/usr/src/obd/utils/obdctl < /proc/sys/portals/debug $OBDCTL < /proc/sys/portals/debug $OBDCTL < /proc/sys/portals/debug $OBDCTL < /proc/sys/portals/debug $OBDCTL < /proc/sys/portals/debug $OBDCTL < /proc/sys/portals/debug $OBDCTL < /proc/sys/lustre/fail_loc shift @@ -11,7 +14,7 @@ test_fail() { echo 0 > /proc/sys/lustre/fail_loc umount /mnt/lustre || exit 1 - mount -t lustre_lite -o device=5 none /mnt/lustre || exit 1 + mount -t lustre_lite -o device=`$OBDCTL name2dev OSCDEV` none /mnt/lustre || exit 1 } [ -c /dev/request ] || mknod /dev/request c 10 244 diff --git a/lustre/utils/obdctl.c b/lustre/utils/obdctl.c index b59e28d..b9f1289 100644 --- a/lustre/utils/obdctl.c +++ b/lustre/utils/obdctl.c @@ -451,17 +451,10 @@ static int jt_attach(int argc, char **argv) data.ioc_inlbuf2 = argv[2]; } - printf("%s: len %d addr %p type %s data %s\n", - cmdname(argv[0]), data.ioc_len, buf, - MKSTR(data.ioc_inlbuf1), MKSTR(data.ioc_inlbuf2)); - if (obd_ioctl_pack(&data, &buf, max)) { fprintf(stderr, "error: %s: invalid ioctl\n", cmdname(argv[0])); return -2; } - printf("%s: len %d addr %p raw %p type %s data %s and %s\n", - cmdname(argv[0]), data.ioc_len, buf, rawbuf, - MKSTR(data.ioc_inlbuf1), MKSTR(data.ioc_inlbuf2), &buf[516]); rc = ioctl(fd, OBD_IOC_ATTACH , buf); if (rc < 0) @@ -545,18 +538,10 @@ static int jt_setup(int argc, char **argv) data.ioc_inlbuf2 = argv[2]; } - printf("%s: len %d addr %p device %s type %s\n", - cmdname(argv[0]), data.ioc_len, buf, - MKSTR(data.ioc_inlbuf1), MKSTR(data.ioc_inlbuf2)); - if (obd_ioctl_pack(&data, &buf, max)) { fprintf(stderr, "error: %s: invalid ioctl\n", cmdname(argv[0])); return -2; } - printf("%s: len %d addr %p raw %p device %s type %s\n", - cmdname(argv[0]), data.ioc_len, buf, rawbuf, - MKSTR(data.ioc_inlbuf1), MKSTR(data.ioc_inlbuf2)); - rc = ioctl(fd, OBD_IOC_SETUP , buf); if (rc < 0) fprintf(stderr, "error: %s: %s\n", cmdname(argv[0]),