<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/tools/testing/selftests/powerpc/ptrace/Makefile, branch linux-rolling-stable</title>
<subtitle>Hosts the 0x221E linux distro kernel.</subtitle>
<id>https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-rolling-stable</id>
<link rel='self' href='https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-rolling-stable'/>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/'/>
<updated>2024-04-29T13:54:42Z</updated>
<entry>
<title>selftests/powerpc: make sub-folders buildable on their own</title>
<updated>2024-04-29T13:54:42Z</updated>
<author>
<name>Madhavan Srinivasan</name>
<email>maddy@linux.ibm.com</email>
</author>
<published>2024-02-29T09:37:11Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=108e5e683333615023265a9a73a29d4c2fa16c70'/>
<id>urn:sha1:108e5e683333615023265a9a73a29d4c2fa16c70</id>
<content type='text'>
Build breaks when executing make with run_tests for sub-folders
under powerpc. This is because, CFLAGS and GIT_VERSION macros are
defined in Makefile of toplevel powerpc folder.

  make: Entering directory '/home/maddy/linux/tools/testing/selftests/powerpc/mm'
  gcc     hugetlb_vs_thp_test.c ../harness.c ../utils.c  -o /home/maddy/selftest_output//hugetlb_vs_thp_test
  hugetlb_vs_thp_test.c:6:10: fatal error: utils.h: No such file or directory
      6 | #include "utils.h"
        |          ^~~~~~~~~
  compilation terminated.

Fix this by adding the flags.mk in each sub-folder Makefile. Also remove
the CFLAGS and GIT_VERSION macros from powerpc/ folder Makefile since
the same is definied in flags.mk

Signed-off-by: Madhavan Srinivasan &lt;maddy@linux.ibm.com&gt;
Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
Link: https://msgid.link/20240229093711.581230-3-maddy@linux.ibm.com

</content>
</entry>
<entry>
<title>selftests/powerpc/ptrace: Update ptrace-perf watchpoint selftest</title>
<updated>2023-08-16T13:54:50Z</updated>
<author>
<name>Benjamin Gray</name>
<email>bgray@linux.ibm.com</email>
</author>
<published>2023-08-01T01:17:43Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=58709f6fc327a997daeeca77aa5e6bd4d4c238cf'/>
<id>urn:sha1:58709f6fc327a997daeeca77aa5e6bd4d4c238cf</id>
<content type='text'>
Now that ptrace and perf are no longer exclusive, update the
test to exercise interesting interactions.

An assembly file is used for the children to allow precise instruction
choice and addresses, while avoiding any compiler quirks.

Signed-off-by: Benjamin Gray &lt;bgray@linux.ibm.com&gt;
Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
Link: https://msgid.link/20230801011744.153973-7-bgray@linux.ibm.com

</content>
</entry>
<entry>
<title>selftests/powerpc: Fix incorrect kernel headers search path</title>
<updated>2023-02-15T11:41:00Z</updated>
<author>
<name>Mathieu Desnoyers</name>
<email>mathieu.desnoyers@efficios.com</email>
</author>
<published>2023-01-27T13:57:42Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=4f11410bf6da87defe8fd59b0413f0d9f71744da'/>
<id>urn:sha1:4f11410bf6da87defe8fd59b0413f0d9f71744da</id>
<content type='text'>
Use $(KHDR_INCLUDES) as lookup path for kernel headers. This prevents
building against kernel headers from the build environment in scenarios
where kernel headers are installed into a specific output directory
(O=...).

Cc: stable@vger.kernel.org # v5.18+
Signed-off-by: Mathieu Desnoyers &lt;mathieu.desnoyers@efficios.com&gt;
Acked-by: Shuah Khan &lt;skhan@linuxfoundation.org&gt;
Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
Link: https://lore.kernel.org/r/20230127135755.79929-22-mathieu.desnoyers@efficios.com
</content>
</entry>
<entry>
<title>selftests/powerpc/ptrace: Do more of ptrace-gpr in asm</title>
<updated>2022-07-25T02:05:16Z</updated>
<author>
<name>Michael Ellerman</name>
<email>mpe@ellerman.id.au</email>
</author>
<published>2022-06-27T14:02:36Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=611e385087efc2cc3a7033aedd3f84ad0cf2a703'/>
<id>urn:sha1:611e385087efc2cc3a7033aedd3f84ad0cf2a703</id>
<content type='text'>
The ptrace-gpr test includes some inline asm to load GPR and FPR
registers. It then goes back to C to wait for the parent to trace it and
then checks register contents.

The split between inline asm and C is fragile, it relies on the compiler
not using any non-volatile GPRs after the inline asm block. It also
requires a very large and unwieldy inline asm block.

So convert the logic to set registers, wait, and store registers to a
single asm function, meaning there's no window for the compiler to
intervene.

Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
Link: https://lore.kernel.org/r/20220627140239.2464900-10-mpe@ellerman.id.au

</content>
</entry>
<entry>
<title>selftests/powerpc/ptrace: Build the ptrace-gpr test as 32-bit when possible</title>
<updated>2022-07-25T02:05:16Z</updated>
<author>
<name>Michael Ellerman</name>
<email>mpe@ellerman.id.au</email>
</author>
<published>2022-06-27T14:02:35Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=149a497d5fda3e996a00437260a4c170e43909c8'/>
<id>urn:sha1:149a497d5fda3e996a00437260a4c170e43909c8</id>
<content type='text'>
The ptrace-gpr test can now be built 32-bit, so do that if that's the
compiler default rather than forcing a 64-bit build.

Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
Link: https://lore.kernel.org/r/20220627140239.2464900-9-mpe@ellerman.id.au

</content>
</entry>
<entry>
<title>selftests/powerpc/ptrace: Split CFLAGS better</title>
<updated>2022-07-25T02:05:15Z</updated>
<author>
<name>Michael Ellerman</name>
<email>mpe@ellerman.id.au</email>
</author>
<published>2022-06-27T14:02:29Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=3c20a1d07c377d7260ca853e216cc85bbd7857fa'/>
<id>urn:sha1:3c20a1d07c377d7260ca853e216cc85bbd7857fa</id>
<content type='text'>
Currently all ptrace tests are built 64-bit and with TM enabled.

Only the TM tests need TM enabled, so split those out into a separate
variable so that can be specified precisely.

Split the rest of the tests into a variable, and add -m64 to CFLAGS for
those tests, so that in a subsequent patch some tests can be made to
build 32-bit.

Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
Link: https://lore.kernel.org/r/20220627140239.2464900-3-mpe@ellerman.id.au

</content>
</entry>
<entry>
<title>selftests/powerpc/ptrace: Set LOCAL_HDRS</title>
<updated>2022-07-25T02:05:15Z</updated>
<author>
<name>Michael Ellerman</name>
<email>mpe@ellerman.id.au</email>
</author>
<published>2022-06-27T14:02:28Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=cf4baafd7846b3def67057a09b7603a6b566417a'/>
<id>urn:sha1:cf4baafd7846b3def67057a09b7603a6b566417a</id>
<content type='text'>
Set LOCAL_HDRS so header changes cause rebuilds. The lib.mk logic adds
all the headers in LOCAL_HDRS as dependencies, so there's no need to
also list them explicitly.

Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
Link: https://lore.kernel.org/r/20220627140239.2464900-2-mpe@ellerman.id.au

</content>
</entry>
<entry>
<title>powerpc/selftests: Add selftest to test concurrent perf/ptrace events</title>
<updated>2021-04-22T15:38:03Z</updated>
<author>
<name>Ravi Bangoria</name>
<email>ravi.bangoria@linux.ibm.com</email>
</author>
<published>2021-04-12T11:22:18Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=290f7d8ce2b1eea5413bb120e0d9d610675b7fba'/>
<id>urn:sha1:290f7d8ce2b1eea5413bb120e0d9d610675b7fba</id>
<content type='text'>
ptrace and perf watchpoints can't co-exists if their address range
overlaps. See commit 29da4f91c0c1 ("powerpc/watchpoint: Don't allow
concurrent perf and ptrace events") for more detail. Add selftest
for the same.

Sample o/p:
  # ./ptrace-perf-hwbreak
  test: ptrace-perf-hwbreak
  tags: git_version:powerpc-5.8-7-118-g937fa174a15d-dirty
  perf cpu event -&gt; ptrace thread event (Overlapping): Ok
  perf cpu event -&gt; ptrace thread event (Non-overlapping): Ok
  perf thread event -&gt; ptrace same thread event (Overlapping): Ok
  perf thread event -&gt; ptrace same thread event (Non-overlapping): Ok
  perf thread event -&gt; ptrace other thread event: Ok
  ptrace thread event -&gt; perf kernel event: Ok
  ptrace thread event -&gt; perf same thread event (Overlapping): Ok
  ptrace thread event -&gt; perf same thread event (Non-overlapping): Ok
  ptrace thread event -&gt; perf other thread event: Ok
  ptrace thread event -&gt; perf cpu event (Overlapping): Ok
  ptrace thread event -&gt; perf cpu event (Non-overlapping): Ok
  ptrace thread event -&gt; perf same thread &amp; cpu event (Overlapping): Ok
  ptrace thread event -&gt; perf same thread &amp; cpu event (Non-overlapping): Ok
  ptrace thread event -&gt; perf other thread &amp; cpu event: Ok
  success: ptrace-perf-hwbreak

Signed-off-by: Ravi Bangoria &lt;ravi.bangoria@linux.ibm.com&gt;
Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
Link: https://lore.kernel.org/r/20210412112218.128183-5-ravi.bangoria@linux.ibm.com

</content>
</entry>
<entry>
<title>selftests/powerpc/ptrace: Fix out-of-tree build</title>
<updated>2018-10-31T12:56:19Z</updated>
<author>
<name>Joel Stanley</name>
<email>joel@jms.id.au</email>
</author>
<published>2018-10-29T11:23:49Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=c39b79082a38a4f8c801790edecbbb4d62ed2992'/>
<id>urn:sha1:c39b79082a38a4f8c801790edecbbb4d62ed2992</id>
<content type='text'>
We should use TEST_GEN_PROGS, not TEST_PROGS. That tells the selftests
makefile (lib.mk) that those tests are generated (built), and so it
adds the $(OUTPUT) prefix for us, making the out-of-tree build work
correctly.

It also means we don't need our own clean rule, lib.mk does it.

We also have to update the ptrace-pkey and core-pkey rules to use
$(OUTPUT).

Signed-off-by: Joel Stanley &lt;joel@jms.id.au&gt;
Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
</content>
</entry>
<entry>
<title>Revert "selftests/powerpc: Fix out-of-tree build errors"</title>
<updated>2018-10-26T10:58:58Z</updated>
<author>
<name>Michael Ellerman</name>
<email>mpe@ellerman.id.au</email>
</author>
<published>2018-10-25T17:24:15Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=58cfbac25b1fd2b76f94566aed28a3662b0ff8c6'/>
<id>urn:sha1:58cfbac25b1fd2b76f94566aed28a3662b0ff8c6</id>
<content type='text'>
This reverts commit d8a2fe29d3c97038c8efcc328d5e7940c5310565.

That commit, by me, fixed the out of tree build errors by causing some
of the tests not to build at all.
</content>
</entry>
</feed>
