From: Michael Ellerman <mpe@ellerman.id.au>
To: Thiago Jung Bauermann <bauerman@linux.vnet.ibm.com>,
linuxppc-dev@lists.ozlabs.org
Cc: linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org,
Ram Pai <linuxram@us.ibm.com>,
Thiago Jung Bauermann <bauerman@linux.vnet.ibm.com>
Subject: Re: [PATCH 1/2] selftests/powerpc: Add ptrace tests for Protection Key registers
Date: Fri, 18 May 2018 00:03:01 +1000 [thread overview]
Message-ID: <87tvr6mlbe.fsf@concordia.ellerman.id.au> (raw)
In-Reply-To: <20180223183344.21038-1-bauerman@linux.vnet.ibm.com>
Thiago Jung Bauermann <bauerman@linux.vnet.ibm.com> writes:
> This test exercises read and write access to the AMR, IAMR and UAMOR.
>
> Signed-off-by: Thiago Jung Bauermann <bauerman@linux.vnet.ibm.com>
> ---
> tools/testing/selftests/powerpc/include/reg.h | 1 +
> tools/testing/selftests/powerpc/ptrace/Makefile | 5 +-
> tools/testing/selftests/powerpc/ptrace/child.h | 130 ++++++++
> .../testing/selftests/powerpc/ptrace/ptrace-pkey.c | 326 +++++++++++++++++++++
This is failing on machines without pkeys:
test: ptrace_pkey
tags: git_version:52e7d87
[FAIL] Test FAILED on line 117
[FAIL] Test FAILED on line 191
failure: ptrace_pkey
I think the first fail is in the child here:
int ptrace_read_regs(pid_t child, unsigned long type, unsigned long regs[],
int n)
{
struct iovec iov;
long ret;
FAIL_IF(start_trace(child));
iov.iov_base = regs;
iov.iov_len = n * sizeof(unsigned long);
ret = ptrace(PTRACE_GETREGSET, child, type, &iov);
FAIL_IF(ret != 0);
Which makes sense.
The test needs to skip if pkeys are not available/enabled. Using the
availability of the REGSET might actually be a nice way to detect that,
because it's read-only.
cheers
next prev parent reply other threads:[~2018-05-17 14:03 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-23 18:33 Thiago Jung Bauermann
2018-02-23 18:33 ` [PATCH 2/2] selftests/powerpc: Add core file test " Thiago Jung Bauermann
2018-02-23 18:51 ` Ram Pai
2018-05-17 14:03 ` Michael Ellerman
2018-02-23 18:50 ` [PATCH 1/2] selftests/powerpc: Add ptrace tests " Ram Pai
2018-03-27 17:35 ` Thiago Jung Bauermann
2018-05-17 14:03 ` Michael Ellerman [this message]
2018-05-25 2:14 ` Thiago Jung Bauermann
2018-05-25 10:26 ` Michael Ellerman
-- strict thread matches above, loose matches on Subject: below --
2018-01-26 5:55 [PATCH 0/2] Testcases for protection keys feature in powerpc/next Thiago Jung Bauermann
2018-01-26 5:55 ` [PATCH 1/2] selftests/powerpc: Add ptrace tests for Protection Key registers Thiago Jung Bauermann
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=87tvr6mlbe.fsf@concordia.ellerman.id.au \
--to=mpe@ellerman.id.au \
--cc=bauerman@linux.vnet.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=linuxram@us.ibm.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome