Whamcloud - gitweb
LU-459 tests: quiet spurious console/test messages
authorAndreas Dilger <adilger@whamcloud.com>
Wed, 25 Jan 2012 23:52:52 +0000 (16:52 -0700)
committerOleg Drokin <green@whamcloud.com>
Sat, 3 Mar 2012 14:09:41 +0000 (09:09 -0500)
Quiet a number of frequent and useless messages printed to the test
output and/or the console.  These distract from understanding what
is happening in the test and provide little, if any, value.

The "acl" mount option on the client has been deprecated since 1.8.0,
since it was added in mid-1.6, and is driven by the MDS config only.

Use textual debug/subsystem flags instead of numeric flags.  This has
been possible through all of 1.8, but is deprecated in 2.x so that
we can move to a more sophisticated debug mechanism in the future.

Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: I81bed13c22465dc179e19f5a6714b732d68c500c
Reviewed-on: http://review.whamcloud.com/2015
Reviewed-by: Yu Jian <yujian@whamcloud.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Minh Diep <mdiep@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
libcfs/include/libcfs/libcfs_fail.h
libcfs/libcfs/debug.c
lustre/quota/quota_master.c
lustre/tests/cfg/local.sh
lustre/tests/conf-sanity.sh
lustre/tests/parallel-scale-nfsv4.sh
lustre/tests/sanityn.sh
lustre/tests/test-framework.sh

index 9f941cc..23d2953 100644 (file)
@@ -79,10 +79,11 @@ enum {
 static inline int cfs_fail_check_set(__u32 id, __u32 value, int set)
 {
         int ret = 0;
+
         if (unlikely(CFS_FAIL_PRECHECK(id) &&
-            (ret = __cfs_fail_check_set(id, value, set)))) {
-                CERROR("*** cfs_fail_loc=%x ***\n", id);
-        }
+                     (ret = __cfs_fail_check_set(id, value, set))))
+                LCONSOLE_INFO("*** cfs_fail_loc=%x, val=%u***\n", id, value);
+
         return ret;
 }
 
index 7ccdf37..2246d76 100644 (file)
@@ -57,7 +57,7 @@ CFS_MODULE_PARM(libcfs_subsystem_debug, "i", int, 0644,
                 "Lustre kernel debug subsystem mask");
 EXPORT_SYMBOL(libcfs_subsystem_debug);
 
-unsigned int libcfs_debug = (D_EMERG | D_ERROR | D_WARNING | D_CONSOLE |
+unsigned int libcfs_debug = (D_CANTMASK |
                              D_NETERROR | D_HA | D_CONFIG | D_IOCTL);
 CFS_MODULE_PARM(libcfs_debug, "i", int, 0644,
                 "Lustre kernel debug mask");
index 7982b61..e8e0dae 100644 (file)
@@ -792,7 +792,7 @@ static int close_quota_files(struct obd_quotactl *oqctl,
                 if (!Q_TYPESET(oqctl, i))
                         continue;
                 if (qinfo->qi_files[i] == NULL) {
-                        CWARN("quota[%d] is off already\n", i);
+                        CDEBUG(D_QUOTA, "quota[%d] is off already\n", i);
                         rc = -EALREADY;
                         continue;
                 }
index acbd6b2..3f1d81f 100644 (file)
@@ -22,7 +22,7 @@ for num in $(seq $MDSCOUNT); do
 done
 MDSDEVBASE=${MDSDEVBASE:-$TMP/${FSNAME}-mdt}
 MDSSIZE=${MDSSIZE:-200000}
-MDSOPT=${MDSOPT:-"--mountfsoptions=errors=remount-ro,user_xattr,acl"}
+MDSOPT=${MDSOPT:-"--mountfsoptions=user_xattr"}
 
 MGSDEV=${MGSDEV:-$MDSDEV1}
 MGSSIZE=${MGSSIZE:-$MDSSIZE}
@@ -43,7 +43,8 @@ STRIPE_BYTES=${STRIPE_BYTES:-1048576}
 STRIPES_PER_OBJ=${STRIPES_PER_OBJ:-0}
 SINGLEMDS=${SINGLEMDS:-"mds1"}
 TIMEOUT=${TIMEOUT:-20}
-PTLDEBUG=${PTLDEBUG:-0x33f0404}
+PTLDEBUG=${PTLDEBUG:-"vfstrace rpctrace dlmtrace neterror ha config ioctl super"}
+SUBSYSTEM=${SUBSYSTEM:-"all -lnet -lnd -pinger"}
 
 # promise 2MB for every cpu
 _debug_mb=$((($(cut -d "-" -f 2 /sys/devices/system/cpu/possible)+1)*2))
@@ -57,8 +58,6 @@ fi
 
 DEBUG_SIZE=${DEBUG_SIZE:-$_debug_mb}
 
-SUBSYSTEM=${SUBSYSTEM:- 0xffb7e3ff}
-
 ENABLE_QUOTA=${ENABLE_QUOTA:-""}
 QUOTA_TYPE="ug3"
 QUOTA_USERS=${QUOTA_USERS:-"quota_usr quota_2usr sanityusr sanityusr1"}
@@ -105,7 +104,7 @@ MKFSOPT=""
     OSTOPT=$OSTOPT" --failnode=`h2$NETTYPE $ostfailover_HOST`"
 OST_MKFS_OPTS="--ost --fsname=$FSNAME --device-size=$OSTSIZE --mgsnode=$MGSNID --param sys.timeout=$TIMEOUT $MKFSOPT $OSTOPT $OST_MKFS_OPTS"
 
-MDS_MOUNT_OPTS=${MDS_MOUNT_OPTS:-"-o loop,user_xattr,acl"}
+MDS_MOUNT_OPTS=${MDS_MOUNT_OPTS:-"-o loop,user_xattr"}
 OST_MOUNT_OPTS=${OST_MOUNT_OPTS:-"-o loop"}
 MGS_MOUNT_OPTS=${MGS_MOUNT_OPTS:-$MDS_MOUNT_OPTS}
 
@@ -113,7 +112,7 @@ MGS_MOUNT_OPTS=${MGS_MOUNT_OPTS:-$MDS_MOUNT_OPTS}
 MOUNT=${MOUNT:-/mnt/${FSNAME}}
 MOUNT1=${MOUNT1:-$MOUNT}
 MOUNT2=${MOUNT2:-${MOUNT}2}
-MOUNTOPT=${MOUNTOPT:-"-o user_xattr,acl,flock"}
+MOUNTOPT=${MOUNTOPT:-"-o user_xattr,flock"}
 DIR=${DIR:-$MOUNT}
 DIR1=${DIR:-$MOUNT1}
 DIR2=${DIR2:-$MOUNT2}
index da81213..02434ce 100644 (file)
@@ -1210,7 +1210,7 @@ test_32a() {
                { skip_env "Cannot untar $DISK1_8" && return 0; }
 
        load_modules
-       $LCTL set_param debug=$PTLDEBUG
+       $LCTL set_param debug="$PTLDEBUG"
 
        $TUNEFS $tmpdir/mds || error "tunefs failed"
 
index 2c43a9e..ec71a41 100755 (executable)
@@ -15,7 +15,7 @@ cleanup_mount $MOUNT
 # mount lustre on mds
 lustre_client=$(facet_active_host $SINGLEMDS)
 zconf_mount_clients $lustre_client $MOUNT \
-    "-o user_xattr,acl,flock,32bitapi" || \
+    "-o user_xattr,flock,32bitapi" || \
     error "mount lustre on $lustre_client failed"
 
 # setup the nfs
index e2098ed..df7e017 100644 (file)
@@ -7,8 +7,9 @@ ONLY=${ONLY:-"$*"}
 ALWAYS_EXCEPT="                14b  19         22    28   29          35    $SANITYN_EXCEPT"
 # UPDATE THE COMMENT ABOVE WITH BUG NUMBERS WHEN CHANGING ALWAYS_EXCEPT!
 
-# bug number for skipped test:                                                    12652 12652
-grep -q 'Enterprise Server 10' /etc/SuSE-release && ALWAYS_EXCEPT="$ALWAYS_EXCEPT 11    14" || true
+# bug number for skipped test:        12652 12652
+grep -q 'Enterprise Server 10' /etc/SuSE-release 2> /dev/null &&
+       ALWAYS_EXCEPT="$ALWAYS_EXCEPT 11    14" || true
 
 # Tests that fail on uml
 [ "$UML" = "true" ] && EXCEPT="$EXCEPT 7"
@@ -134,8 +135,9 @@ test_2e() {
 run_test 2e "check chmod on root is propagated to others"
 
 test_3() {
-       ( cd $DIR1 ; ln -s this/is/good $tfile )
-       [ "this/is/good" = "`perl -e 'print readlink("'$DIR2/$tfile'");'`" ] ||
+       local target="this/is/good"
+       ln -s $target $DIR1/$tfile || error "ln -s $target $DIR1/$tfile failed"
+       [ "$(ls -l $DIR2/$tfile | sed -e 's/.* -> //')" = "$target" ] ||
                error "link $DIR2/$tfile not as expected"
 }
 run_test 3 "symlink on one mtpt, readlink on another ==========="
@@ -238,7 +240,6 @@ test_12() {
 run_test 12 "test lock ordering (link, stat, unlink) ==========="
 
 test_13() {    # bug 2451 - directory coherency
-       rm -rf $DIR1/d13
        mkdir $DIR1/d13 || error
        cd $DIR1/d13 || error
        ls
@@ -464,21 +465,25 @@ test_24b() {
 run_test 24b "lfs df should show both filesystems ==============="
 
 test_25() {
-       [ `lctl get_param -n mdc.*-mdc-*.connect_flags | grep -c acl` -lt 2 ] && \
-           skip "must have acl, skipping" && return
+       [ `lctl get_param -n mdc.*-mdc-*.connect_flags | grep -c acl` -lt 2 ] &&
+               skip "must have acl, skipping" && return
 
        mkdir -p $DIR1/$tdir
        touch $DIR1/$tdir/f1 || error "touch $DIR1/$tdir/f1"
        chmod 0755 $DIR1/$tdir/f1 || error "chmod 0755 $DIR1/$tdir/f1"
 
        $RUNAS $CHECKSTAT $DIR2/$tdir/f1 || error "checkstat $DIR2/$tdir/f1 #1"
-       setfacl -m u:$RUNAS_ID:--- -m g:$RUNAS_GID:--- $DIR1/$tdir || error "setfacl $DIR2/$tdir #1"
+       setfacl -m u:$RUNAS_ID:--- -m g:$RUNAS_GID:--- $DIR1/$tdir ||
+               error "setfacl $DIR2/$tdir #1"
        $RUNAS $CHECKSTAT $DIR2/$tdir/f1 && error "checkstat $DIR2/$tdir/f1 #2"
-       setfacl -m u:$RUNAS_ID:r-x -m g:$RUNAS_GID:r-x $DIR1/$tdir || error "setfacl $DIR2/$tdir #2"
+       setfacl -m u:$RUNAS_ID:r-x -m g:$RUNAS_GID:r-x $DIR1/$tdir ||
+               error "setfacl $DIR2/$tdir #2"
        $RUNAS $CHECKSTAT $DIR2/$tdir/f1 || error "checkstat $DIR2/$tdir/f1 #3"
-       setfacl -m u:$RUNAS_ID:--- -m g:$RUNAS_GID:--- $DIR1/$tdir || error "setfacl $DIR2/$tdir #3"
+       setfacl -m u:$RUNAS_ID:--- -m g:$RUNAS_GID:--- $DIR1/$tdir ||
+               error "setfacl $DIR2/$tdir #3"
        $RUNAS $CHECKSTAT $DIR2/$tdir/f1 && error "checkstat $DIR2/$tdir/f1 #4"
-       setfacl -x u:$RUNAS_ID: -x g:$RUNAS_GID: $DIR1/$tdir || error "setfacl $DIR2/$tdir #4"
+       setfacl -x u:$RUNAS_ID: -x g:$RUNAS_GID: $DIR1/$tdir ||
+               error "setfacl $DIR2/$tdir #4"
        $RUNAS $CHECKSTAT $DIR2/$tdir/f1 || error "checkstat $DIR2/$tdir/f1 #5"
 
        rm -rf $DIR1/$tdir
index 640e737..b7b289c 100644 (file)
@@ -603,14 +603,13 @@ set_debug_size () {
 
 set_default_debug () {
     local debug=${1:-"$PTLDEBUG"}
-    local subsystem_debug=${2:-"$SUBSYSTEM"}
+    local subsys=${2:-"$SUBSYSTEM"}
     local debug_size=${3:-$DEBUG_SIZE}
 
-    lctl set_param debug="$debug"
-    lctl set_param subsystem_debug="${subsystem_debug# }"
+    [ -n "$debug" ] && lctl set_param debug="$debug" >/dev/null
+    [ -n "$subsys" ] && lctl set_param subsystem_debug="${subsys# }" >/dev/null
 
-    set_debug_size $debug_size
-    sync
+    [ -n "$debug_size" ] && set_debug_size $debug_size > /dev/null
 }
 
 set_default_debug_nodes () {
@@ -943,18 +942,16 @@ zconf_umount_clients() {
     do_nodes $clients "running=\\\$(grep -c $mnt' ' /proc/mounts);
 if [ \\\$running -ne 0 ] ; then
 echo Stopping client \\\$(hostname) $mnt opts:$force;
-lsof -t $mnt || need_kill=no;
+lsof $mnt || need_kill=no;
 if [ "x$force" != "x" -a "x\\\$need_kill" != "xno" ]; then
     pids=\\\$(lsof -t $mnt | sort -u);
     if [ -n \\\"\\\$pids\\\" ]; then
              kill -9 \\\$pids;
     fi
 fi;
-busy=\\\$(umount $force $mnt 2>&1 | grep -c "busy");
-if [ \\\$busy -ne 0 ] ; then
+while umount $force $mnt 2>&1 | grep -q "busy"; do
     echo "$mnt is still busy, wait one second" && sleep 1;
-    umount $force $mnt;
-fi
+done;
 fi"
 }
 
@@ -1262,7 +1259,8 @@ wait_update () {
 
         local RESULT
         local WAIT=0
-        local sleep=5
+        local sleep=1
+        local print=10
         while [ true ]; do
             RESULT=$(do_node $node "$TEST")
             if [ "$RESULT" == "$FINAL" ]; then
@@ -1271,7 +1269,8 @@ wait_update () {
                 return 0
             fi
             [ $WAIT -ge $MAX ] && break
-            echo "Waiting $((MAX - WAIT)) secs for update"
+            [ $((WAIT % print)) -eq 0 ] &&
+                echo "Waiting $((MAX - WAIT)) secs for update"
             WAIT=$((WAIT + sleep))
             sleep $sleep
         done