Two test cases

Wenji Huang wenji.huang at oracle.com
Tue Dec 9 01:36:22 UTC 2008


Denys Vlasenko wrote:
> On Mon, 2008-12-08 at 16:05 +0100, Denys Vlasenko wrote:
>> I built 2.6.28-rc7 + utrace and sigstep.c indeed fails.
>>
>> Here is the shortened version of sigstep.c.
>> Looks like when we PTRACE_SINGLESTEP after raise (SIGUSR2),
>> the child is left to run freely.
>>
>> (Sorry about GNU indent style... utrace-tests requires that)
>>
>> Can you confirm that it also fails for you on 2.6.28-rc7 + utrace
>> but works on vanilla 2.6.28-rc7?
> 
> Please also test simplified version of the second test,
> see below.
> 
> It appears that PTRACE_SINGLESTEP is a culprit here too,
> no need to play with signals as in previous test,
> it happens without any signals.
> 
> It also does not require many single-steps or forks,
> for me it happens on the very first iteration.
> (I removed the part which makes lots of forks).
> --
> vda
Thanks for your wonderful simplification.
I occasionally found these two test cases. Sorry, don't remember where 
they were from. Maybe they had been updated by somebody from original 
texts. And I also made some modifications. The current code is mixed 
version which maybe confuse people. I am a little lazy ^-^.

The two tests works fine on 2.6.27.5-41.fc9.x86_64 as you mentioned.

Test passed on 2.6.28-rc7:
[wjhuang at single-test]$ uname -a
Linux 2.6.28-rc7 #28 SMP Mon Dec 1
22:06:56 KST 2008 i686 i686 i386 GNU/Linux
[wjhuang at single-test]$ cat /proc/kallsyms |grep utrace
[wjhuang at single-test]$ ./sigstep
[wjhuang at single-test]$ echo $?
0
[wjhuang at single-test]$ ./multi-step-same-time
[wjhuang at single-test]$ echo $?
0

Only failed on 2.6.28-rc7+ latest utrace.

Regards,
Wenji




More information about the utrace-devel mailing list