Re: tests: kill debugfs on interrupted MMP test

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, Sep 16, 2012 at 09:12:06PM -0400, Theodore Ts'o wrote:
> On Mon, Sep 10, 2012 at 09:04:47AM -0000, Andreas Dilger wrote:
> > If the f_mmp test is interrupted during its test run, then it can
> > leave debugfs busy-looping in the background.  Since f_mmp is a
> > relatively long-running test, and is likely to be running during
> > a parallel test run, this can happen fairly often.
> > 
> > Set a signal trap for the f_mmp test script being killed, so that
> > the background debugfs command will always be killed by the test.
> > 
> > Signed-off-by: Andreas Dilger <adilger@xxxxxxxxx>
> 
> Thanks, applied.

Oops, I'm going to guess you didn't test your patch after making a
last minute change to it.  I had to make the following change to the
f_mmp script to fix a problem where kill would complain about a
non-existing process id (because it was triyng to kill the already
exited awk process):

diff --git a/tests/f_mmp/script b/tests/f_mmp/script
index c1f13fc..d921672 100644
--- a/tests/f_mmp/script
+++ b/tests/f_mmp/script
@@ -21,8 +21,8 @@ fi
 
 kill_debugfs() {
 	trap 0
-	PID=$(ps -o pid,command | awk "/debugfs -w $TMPFILE/ { print \$1 }" |
-	      grep -v awk)
+	PID=$(ps -o pid,command | grep -v awk |
+		awk "/debugfs -w $TMPFILE/ { print \$1 }")
 	[ "x$PID" != "x" ] && kill -9 $PID
 }
 

						- Ted
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Reiser Filesystem Development]     [Ceph FS]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite National Park]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]     [Linux Media]

  Powered by Linux