[PATCH v2 2/3] selftests/powerpc: Add tm-signal-pagefault test

Gustavo Luiz Duarte gustavold at linux.vnet.ibm.com
Fri Feb 7 09:16:05 AEDT 2020



On 2/5/20 2:27 AM, Michael Ellerman wrote:
> Gustavo Luiz Duarte <gustavold at linux.ibm.com> writes:
>> This test triggers a TM Bad Thing by raising a signal in transactional state
>> and forcing a pagefault to happen in kernelspace when the kernel signal
>> handling code first touches the user signal stack.
>>
>> This is inspired by the test tm-signal-context-force-tm but uses userfaultfd to
>> make the test deterministic. While this test always triggers the bug in one
>> run, I had to execute tm-signal-context-force-tm several times (the test runs
>> 5000 times each execution) to trigger the same bug.
> 
> Using userfaultfd is a very nice touch. But it's not always enabled,
> which leads to eg:
> 
>    root at mpe-ubuntu-le:~# /home/michael/tm-signal-pagefault
>    test: tm_signal_pagefault
>    tags: git_version:v5.5-9354-gc1e346e7fc44
>    userfaultfd() failed: Function not implemented
>    failure: tm_signal_pagefault
> 
> It would be nice if that resulted in a skip, not a failure.
> 
> It looks like it shouldn't be too hard to skip if the userfaultfd call
> returns ENOSYS.

Good point. I will fix that on v3.

> 
> cheers
> 


More information about the Linuxppc-dev mailing list