From: Bobi Jam Date: Tue, 5 Jul 2011 09:19:40 +0000 (+0800) Subject: LU-346 fix conf-sanity test_23a X-Git-Tag: 2.0.64.0~2 X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=commitdiff_plain;h=cc840c750bf6f4ec8323decbfcf89e0279eea245;ds=sidebyside LU-346 fix conf-sanity test_23a ctrl-c sends SIGINT signal, and the SIGINT will be delivered to the process tree, but it does not work on non-job-controlled (usually in script) child process. SIGTERM works on child process, but it does not spread offspring processes, so we send it to all lustre mount processes. excerpt from bash manpage: set [--abefhkmnptuvxBCEHPT] [-o option-name] [arg ...] set [+abefhkmnptuvxBCEHPT] [+o option-name] [arg ...] -m Monitor mode. Job control is enabled. This option is on by default for interactive shells on systems that support it. Non-builtin commands run by bash have signal handlers set to the values inherited by the shell from its parent. When job control is not in effect, asynchronous commands ignore SIGINT and SIGQUIT in addition to these inherited handlers. Change-Id: I099fe53373470ad2182f7bd20ff88cb896b1f955 Signed-off-by: Bobi Jam Reviewed-on: http://review.whamcloud.com/1049 Tested-by: Hudson Tested-by: Maloo Reviewed-by: Oleg Drokin --- diff --git a/lustre/tests/conf-sanity.sh b/lustre/tests/conf-sanity.sh index 11cf00f..d9fe5266 100644 --- a/lustre/tests/conf-sanity.sh +++ b/lustre/tests/conf-sanity.sh @@ -782,10 +782,12 @@ test_23a() { # was test_23 echo mount pid is ${MOUNT_PID}, mount.lustre pid is ${MOUNT_LUSTRE_PID} ps --ppid $MOUNT_PID ps --ppid $MOUNT_LUSTRE_PID - # FIXME why o why can't I kill these? Manual "ctrl-c" works... - kill -TERM $MOUNT_LUSTRE_PID echo "waiting for mount to finish" ps -ef | grep mount + # "ctrl-c" sends SIGINT but it usually (in script) does not work on child process + # SIGTERM works but it does not spread to offspring processses + kill -s SIGTERM $MOUNT_PID + kill -s SIGTERM $MOUNT_LUSTRE_PID # we can not wait $MOUNT_PID because it is not a child of this shell local PID1 local PID2