<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-dev/tools/testing/selftests/powerpc, branch master</title>
<subtitle>Linux kernel development work - see feature branches</subtitle>
<id>https://git.zx2c4.com/linux-dev/atom/tools/testing/selftests/powerpc?h=master</id>
<link rel='self' href='https://git.zx2c4.com/linux-dev/atom/tools/testing/selftests/powerpc?h=master'/>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/'/>
<updated>2022-09-28T09:22:13Z</updated>
<entry>
<title>selftests/powerpc: Update bhrb filter sampling test for multiple branch filters</title>
<updated>2022-09-28T09:22:13Z</updated>
<author>
<name>Athira Rajeev</name>
<email>atrajeev@linux.vnet.ibm.com</email>
</author>
<published>2022-09-21T14:52:55Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=18213532de7156af689cb0511d2f95bcbe3c98a0'/>
<id>urn:sha1:18213532de7156af689cb0511d2f95bcbe3c98a0</id>
<content type='text'>
For PERF_SAMPLE_BRANCH_STACK sample type, different branch_sample_type,
ie branch filters are supported. The testcase "bhrb_filter_map_test"
tests the valid and invalid filter maps in different powerpc platforms.
Update this testcase to include scenario to cover multiple branch
filters at sametime. Since powerpc doesn't support multiple filters at
sametime, expect failure during perf_event_open.

Reported-by: Disha Goel &lt;disgoel@linux.vnet.ibm.com&gt;
Signed-off-by: Athira Rajeev &lt;atrajeev@linux.vnet.ibm.com&gt;
Reviewed-by: Kajol Jain &lt;kjain@linux.ibm.com&gt;
Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
Link: https://lore.kernel.org/r/20220921145255.20972-3-atrajeev@linux.vnet.ibm.com

</content>
</entry>
<entry>
<title>selftests/powerpc: Skip 4PB test on 4K PAGE_SIZE systems</title>
<updated>2022-09-04T12:39:59Z</updated>
<author>
<name>Michael Ellerman</name>
<email>mpe@ellerman.id.au</email>
</author>
<published>2022-09-01T02:02:15Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=501fe299826ead2cfa2046b5c244e36de254ec6a'/>
<id>urn:sha1:501fe299826ead2cfa2046b5c244e36de254ec6a</id>
<content type='text'>
Systems using the hash MMU with a 4K page size don't support 4PB address
space, so skip the test because the bug it tests for can't be triggered.

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

</content>
</entry>
<entry>
<title>selftests/powerpc: Add a test for execute-only memory</title>
<updated>2022-08-26T01:02:21Z</updated>
<author>
<name>Nicholas Miehlbradt</name>
<email>nicholas@linux.ibm.com</email>
</author>
<published>2022-08-17T05:06:40Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=98acee3f8db451eaab9fbd422e523c228aacf08c'/>
<id>urn:sha1:98acee3f8db451eaab9fbd422e523c228aacf08c</id>
<content type='text'>
This selftest is designed to cover execute-only protections
on the Radix MMU but will also work with Hash.

The tests are based on those found in pkey_exec_test with modifications
to use the generic mprotect() instead of the pkey variants.

Signed-off-by: Nicholas Miehlbradt &lt;nicholas@linux.ibm.com&gt;
Signed-off-by: Russell Currey &lt;ruscur@russell.cc&gt;
Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
Link: https://lore.kernel.org/r/20220817050640.406017-2-ruscur@russell.cc

</content>
</entry>
<entry>
<title>powerpc/selftests: Use timersub() for gettimeofday()</title>
<updated>2022-08-22T03:36:59Z</updated>
<author>
<name>ye xingchen</name>
<email>ye.xingchen@zte.com.cn</email>
</author>
<published>2022-08-16T10:51:06Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=c814bf958926ff45a9c1e899bd001006ab6cfbae'/>
<id>urn:sha1:c814bf958926ff45a9c1e899bd001006ab6cfbae</id>
<content type='text'>
Use timersub() function to simplify the code.

Reported-by: Zeal Robot &lt;zealci@zte.com.cn&gt;
Signed-off-by: ye xingchen &lt;ye.xingchen@zte.com.cn&gt;
Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
Link: https://lore.kernel.org/r/20220816105106.82666-1-ye.xingchen@zte.com.cn

</content>
</entry>
<entry>
<title>selftests/powerpc: Add missing PMU selftests to .gitignores</title>
<updated>2022-08-15T10:59:17Z</updated>
<author>
<name>Russell Currey</name>
<email>ruscur@russell.cc</email>
</author>
<published>2022-08-12T07:16:32Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=f889a2e89ea5b4db5cf09765ee5e310be43c7b6f'/>
<id>urn:sha1:f889a2e89ea5b4db5cf09765ee5e310be43c7b6f</id>
<content type='text'>
Some recently added selftests don't have their binaries in .gitignores,
so add them.

I also alphabetically sorted sampling_tests/.gitignore while I was in
there.

Signed-off-by: Russell Currey &lt;ruscur@russell.cc&gt;
Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
Link: https://lore.kernel.org/r/20220812071632.56095-1-ruscur@russell.cc

</content>
</entry>
<entry>
<title>selftests/powerpc: Avoid GCC 12 uninitialised variable warning</title>
<updated>2022-08-01T12:21:18Z</updated>
<author>
<name>Michael Ellerman</name>
<email>mpe@ellerman.id.au</email>
</author>
<published>2022-08-01T08:48:34Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=ff446cd76854d47f451a84c26bb70934ae2ec5a7'/>
<id>urn:sha1:ff446cd76854d47f451a84c26bb70934ae2ec5a7</id>
<content type='text'>
GCC 12 thinks that `actual` might be used uninitialised. It's not, the
use is guarded by `bad_mmcr2` which is only set to true at the same
point where `actual` is initialised.

  cycles_with_mmcr2_test.c: In function ‘cycles_with_mmcr2’:
  cycles_with_mmcr2_test.c:81:17: error: ‘actual’ may be used uninitialized [-Werror=maybe-uninitialized]
     81 |                 printf("Bad MMCR2 value seen is 0x%lx\n", actual);

Silence the warning by initialising `actual` to zero.

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

</content>
</entry>
<entry>
<title>selftests/powerpc: Fix matrix multiply assist test</title>
<updated>2022-07-28T06:22:15Z</updated>
<author>
<name>Rashmica Gupta</name>
<email>rashmica@linux.ibm.com</email>
</author>
<published>2022-06-17T04:39:35Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=cd1e64935f79e31d666172c52c951ca97152b783'/>
<id>urn:sha1:cd1e64935f79e31d666172c52c951ca97152b783</id>
<content type='text'>
The ISA states: "when ACC[i] contains defined data, the contents of VSRs
4×i to 4×i+3 are undefined until either a VSX Move From ACC instruction
is used to copy the contents of ACC[i] to VSRs 4×i to 4×i+3 or some other
instruction directly writes to one of these VSRs." We aren't doing this.

This test only works on Power10 because the hardware implementation
happens to map ACC0 to VSRs 0-3, but will fail on any other implementation
that doesn't do this. So add xxmfacc between writing to the accumulator
and accessing the VSRs.

Fixes: 3527e1ab9a79 ("selftests/powerpc: Add matrix multiply assist (MMA) test")
Signed-off-by: Rashmica Gupta &lt;rashmica@linux.ibm.com&gt;
Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
Link: https://lore.kernel.org/r/20220617043935.428083-1-rashmica@linux.ibm.com

</content>
</entry>
<entry>
<title>selftests/powerpc/ptrace: Add peek/poke of FPRs</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:39Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=6c9c7d8fbc3a2a0cfed0e7a5b39581847b632f0b'/>
<id>urn:sha1:6c9c7d8fbc3a2a0cfed0e7a5b39581847b632f0b</id>
<content type='text'>
Currently the ptrace-gpr test only tests the GET/SET(FP)REGS ptrace
APIs. But there's an alternate (older) API, called PEEK/POKEUSR.

Add some minimal testing of PEEK/POKEUSR of the FPRs. This is sufficient
to detect the bug that was fixed recently in the 32-bit ptrace FPR
handling.

Depends-on: 8e1278444446 ("powerpc/32: Fix overread/overwrite of thread_struct via ptrace")
Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
Link: https://lore.kernel.org/r/20220627140239.2464900-13-mpe@ellerman.id.au

</content>
</entry>
<entry>
<title>selftests/powerpc/ptrace: Use more interesting values</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:38Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=c5a814cc992002c36fa5b7db5fbd55efb7430386'/>
<id>urn:sha1:c5a814cc992002c36fa5b7db5fbd55efb7430386</id>
<content type='text'>
The ptrace-gpr test uses fixed values to test that registers can be
read/written via ptrace. In particular it sets all GPRs to 1, which
means the test could miss some types of bugs - eg. if the kernel was
only returning the low word.

So generate some random values at startup and use those instead.

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

</content>
</entry>
<entry>
<title>selftests/powerpc/ptrace: Make child errors more obvious</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:37Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=7b1513d02edf4a6334618070641f47abbbef0cef'/>
<id>urn:sha1:7b1513d02edf4a6334618070641f47abbbef0cef</id>
<content type='text'>
Use the FAIL_IF() macro so that errors in the child report a line
number, rather than just silently exiting.

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

</content>
</entry>
</feed>
