bugmail-sender at Sun.COM wrote: > > *Synopsis*: pkill fails on native and sn1 branded zones [snip] > === *Description* ============================================================ > Running the zone testsuite v1.70 during snv_106 test campaign in ON_PIT, > testcase pkill_001 failed on native and sn1 branded zones but passed on lnx > zones. > > This is new to this build, testcase passed on all kinds of branded zones in > snv_105. > > Testcase pkill_001 starts sleep commands in the background in a local zone : > > zlogin -l root sauce-z2 /usr/bin/sleep 128301 & > > And then tries to pkill them as follow : > > pkill -z 2 -f "^/usr/bin/sleep 128301" > > However this does not succeed > > The same is reproducible manually : > > <email address omitted>:...ts/z_func_other/1.70,19/source# pkill -z 2 -f > "^/usr/bin/sleep 128301" <email address > omitted>:...ts/z_func_other/1.70,19/source# echo $? > 1 > <email address omitted>:...ts/z_func_other/1.70,19/source# pkill -z 2 > "^/usr/bin/sleep" <email address > omitted>:...ts/z_func_other/1.70,19/source# echo $? > 1 > <email address omitted>:...ts/z_func_other/1.70,19/source# pkill -z 2 "sleep" > <email address > omitted>:...ts/z_func_other/1.70,19/source# echo $? > 1 > > Here are the log for this testcase : > > Test_Case_Start| 235982 tests/os/functional/pkill_1/pkill_001 | 19:12:32 0 | > stdout| > stdout| ASSERTION pkill_001_native: From the global zone, "pkill -z > valid_zoneid > stdout| valid_pattern" run as root, will kill all processes, regardless of > stdout| user, in zone "valid_zoneid" that match "valid_pattern". > stdout| pkill_001: starting 3 processes as user zones1 in zone mitikas-a-z3 > stdout| pkill_001: starting 3 processes as user zones1 in zone mitikas-a-z1 > stdout| pkill_001: starting 3 processes as user zones1 in zone mitikas-a-z4 > stdout| pkill_001: starting 3 processes as user zones1 in zone mitikas-a-z2 > stdout| pkill_001: starting 3 processes as user zones1 in zone global > stdout| pkill_001: starting 3 processes as user root in zone mitikas-a-z3 > stdout| pkill_001: starting 3 processes as user root in zone mitikas-a-z1 > stdout| pkill_001: starting 3 processes as user root in zone mitikas-a-z4 > stdout| pkill_001: starting 3 processes as user root in zone mitikas-a-z2 > stdout| pkill_001: starting 3 processes as user root in zone global > stderr| pkill_001: Ignore all "Terminated" information - this is expected > stderr| pkill_001 : pkill returned unexpected non-zero return value > stderr| Terminated > stderr| Terminated > stderr| Terminated > stderr| Terminated > stderr| Terminated > stderr| Terminated > stderr| Terminated > Test_Case_End| 235982 tests/os/functional/pkill_1/pkill_001 | UNRESOLVED | > 19:12:35 0 | > > *** (#1 of 1): 2009-01-13 13:20:19 GMT+00:00 <User 1-237X3Z> > > === *Public Comments* ======================================================== > Appears to be due to ksh93 update: > > # ptree 101659 > 100557 /usr/lib/ssh/sshd > 100924 /usr/lib/ssh/sshd > 100925 /usr/lib/ssh/sshd > 100945 -ksh > 100951 sh > 101659 zlogin -l root nv /usr/bin/sleep 3600 > 101660 sh -c /usr/bin/sleep 3600 > 101663 /usr/bin/ksh93 /usr/bin/sleep 3600 > > sleep is a ksh93 script, so it's "-f" full process name is: > > /usr/bin/ksh93 /usr/bin/sleep 3600 > > This happens for the global zone as well: > > $ /usr/bin/sleep 3600& > $ pkill sleep > > THe above does not kill the sleep, which appears as a process named > > /usr/bin/ksh93 /usr/bin/sleep 3600 > > Same goes for > $ sleep 3600 & > $ pkill sleep > > /usr/bin/sleep is a ksh93 script which calls it's own sleep builtin. > function. > > For scripts which implement "sleep-for-syncronization" hackary, this could > easily break them. > > *** (#1 of 1): 2009-01-14 00:47:44 GMT+00:00 stephen.lawrence at sun.com
Stephen: Does the testcase work if you change $ pkill -z 2 -f "^/usr/bin/sleep 128301" # to $ pkill -z 2 -f "/usr/bin/sleep 128301" # (e.g. remove the leading '^' character from the process name pattern) ? ---- Bye, Roland -- __ . . __ (o.\ \/ /.o) roland.mainz at nrubsig.org \__\/\/__/ MPEG specialist, C&&JAVA&&Sun&&Unix programmer /O /==\ O\ TEL +49 641 3992797 (;O/ \/ \O;)