linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: "Naveen N. Rao" <naveen.n.rao@linux.vnet.ibm.com>
To: Michael Ellerman <mpe@ellerman.id.au>
Cc: linuxppc-dev@lists.ozlabs.org
Subject: Re: [PATCH v2 2/2] selftests/powerpc: Add test to verify rfi flush across a system call
Date: Fri, 25 May 2018 17:00:43 +0530	[thread overview]
Message-ID: <1527247830.8e16y8urfz.naveen@linux.ibm.com> (raw)
In-Reply-To: <87k1rsqat1.fsf@concordia.ellerman.id.au>

Michael Ellerman wrote:
> "Naveen N. Rao" <naveen.n.rao@linux.vnet.ibm.com> writes:
>> Michael Ellerman wrote:
>>> "Naveen N. Rao" <naveen.n.rao@linux.vnet.ibm.com> writes:
>>>> diff --git a/tools/testing/selftests/powerpc/security/rfi_flush.c b/to=
ols/testing/selftests/powerpc/security/rfi_flush.c
>>>> new file mode 100644
>>>> index 000000000000..a20fe8eca161
>>>> --- /dev/null
>>>> +++ b/tools/testing/selftests/powerpc/security/rfi_flush.c
>>>> @@ -0,0 +1,132 @@
>>> ...
>>>> +
>>>> +int rfi_flush_test(void)
>>>> +{
>>>> +	char *p;
>>>> +	int repetitions =3D 10;
>>>> +	int fd, passes =3D 0, iter, rc =3D 0;
>>>> +	struct perf_event_read v;
>>>> +	uint64_t l1d_misses_total =3D 0;
>>>> +	unsigned long iterations =3D 100000, zero_size =3D 24*1024;
>>>> +	int rfi_flush_org, rfi_flush;
>>>> +
>>>> +	SKIP_IF(geteuid() !=3D 0);
>>>> +
>>>> +	if (read_debugfs_file("powerpc/rfi_flush", &rfi_flush_org)) {
>>>> +		perror("error reading powerpc/rfi_flush debugfs file");
>>>> +	        printf("unable to determine current rfi_flush setting");
>>>> +		return 1;
>>>> +	}
>>>=20
>>> This leads to a hard error on old kernels, which I don't want (breaks m=
y CI).
>>
>> Hmm... didn't realize new tests would be run on older kernels. Are those=
=20
>> older stable/distro releases, or actually just earlier kernel versions?
>=20
> All of the above :)
>=20
> Obviously keeping all the tests working across all kernel versions ever
> is impossible, but when it's relatively easy like in this case, it's
> nice to do.
>=20
> So that was mostly just an FYI, I don't expect test writers to get their
> tests running across all kernel versions.

Good to know, thanks!
- Naveen

=

      reply	other threads:[~2018-05-25 11:31 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-21 15:13 [PATCH v2 0/2] selftests/powerpc: Add test for rfi_flush Naveen N. Rao
2018-05-21 15:13 ` [PATCH v2 1/2] selftests/powerpc: Move UCONTEXT_NIA() into utils.h Naveen N. Rao
2018-10-22  9:34   ` [v2,1/2] " Michael Ellerman
2018-05-21 15:13 ` [PATCH v2 2/2] selftests/powerpc: Add test to verify rfi flush across a system call Naveen N. Rao
2018-05-24 13:20   ` Michael Ellerman
2018-05-24 18:29     ` Naveen N. Rao
2018-05-25 10:39       ` Michael Ellerman
2018-05-25 11:30         ` Naveen N. Rao [this message]

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=1527247830.8e16y8urfz.naveen@linux.ibm.com \
    --to=naveen.n.rao@linux.vnet.ibm.com \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=mpe@ellerman.id.au \
    /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;
as well as URLs for NNTP newsgroup(s).