All of lore.kernel.org
 help / color / mirror / Atom feed
From: Michael Ellerman <mpe@ellerman.id.au>
To: Gustavo Luiz Duarte <gustavold@linux.ibm.com>,
	linuxppc-dev@lists.ozlabs.org
Cc: mikey@neuling.org, gromero@linux.ibm.com,
	Gustavo Luiz Duarte <gustavold@linux.ibm.com>
Subject: Re: [PATCH v2 2/3] selftests/powerpc: Add tm-signal-pagefault test
Date: Wed, 05 Feb 2020 16:27:52 +1100	[thread overview]
Message-ID: <8736bp38o7.fsf@mpe.ellerman.id.au> (raw)
In-Reply-To: <20200203160906.24482-2-gustavold@linux.ibm.com>

Gustavo Luiz Duarte <gustavold@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@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.

cheers

  reply	other threads:[~2020-02-05  5:29 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-03 16:09 [PATCH v2 1/3] powerpc/tm: Clear the current thread's MSR[TS] after treclaim Gustavo Luiz Duarte
2020-02-03 16:09 ` Gustavo Luiz Duarte
2020-02-03 16:09 ` [PATCH v2 2/3] selftests/powerpc: Add tm-signal-pagefault test Gustavo Luiz Duarte
2020-02-05  5:27   ` Michael Ellerman [this message]
2020-02-06 22:16     ` Gustavo Luiz Duarte
2020-02-03 16:09 ` [PATCH v2 3/3] selftests/powerpc: Don't rely on segfault to rerun the test Gustavo Luiz Duarte
2020-02-05  4:58 ` [PATCH v2 1/3] powerpc/tm: Clear the current thread's MSR[TS] after treclaim Michael Neuling
2020-02-05  4:58   ` Michael Neuling
2020-02-06 22:13   ` Gustavo Luiz Duarte
2020-02-06 22:13     ` Gustavo Luiz Duarte
2020-02-07  0:41     ` Michael Neuling
2020-02-07  0:41       ` Michael Neuling
2020-02-05 14:45 ` Sasha Levin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8736bp38o7.fsf@mpe.ellerman.id.au \
    --to=mpe@ellerman.id.au \
    --cc=gromero@linux.ibm.com \
    --cc=gustavold@linux.ibm.com \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=mikey@neuling.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.