<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-stable.git/tools/testing/selftests/powerpc, branch linux-6.14.y</title>
<subtitle>Linux kernel stable tree</subtitle>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/'/>
<entry>
<title>selftests/powerpc: Fix argument order to timer_sub()</title>
<updated>2025-01-11T05:09:45+00:00</updated>
<author>
<name>Michael Ellerman</name>
<email>mpe@ellerman.id.au</email>
</author>
<published>2024-12-18T11:43:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=2bf66e66d2e6feece6175ec09ec590a0a8563bdd'/>
<id>2bf66e66d2e6feece6175ec09ec590a0a8563bdd</id>
<content type='text'>
Commit c814bf958926 ("powerpc/selftests: Use timersub() for
gettimeofday()"), got the order of arguments to timersub() wrong,
leading to a negative time delta being reported, eg:

  test: gettimeofday
  tags: git_version:v6.12-rc5-409-gdddf291c3030
  time = -3.297781
  success: gettimeofday

The correct order is minuend, subtrahend, which in this case is end,
start. Which gives:

  test: gettimeofday
  tags: git_version:v6.12-rc5-409-gdddf291c3030-dirty
  time = 3.300650
  success: gettimeofday

Fixes: c814bf958926 ("powerpc/selftests: Use timersub() for gettimeofday()")
Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
Signed-off-by: Madhavan Srinivasan &lt;maddy@linux.ibm.com&gt;
Link: https://patch.msgid.link/20241218114347.428108-1-mpe@ellerman.id.au

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Commit c814bf958926 ("powerpc/selftests: Use timersub() for
gettimeofday()"), got the order of arguments to timersub() wrong,
leading to a negative time delta being reported, eg:

  test: gettimeofday
  tags: git_version:v6.12-rc5-409-gdddf291c3030
  time = -3.297781
  success: gettimeofday

The correct order is minuend, subtrahend, which in this case is end,
start. Which gives:

  test: gettimeofday
  tags: git_version:v6.12-rc5-409-gdddf291c3030-dirty
  time = 3.300650
  success: gettimeofday

Fixes: c814bf958926 ("powerpc/selftests: Use timersub() for gettimeofday()")
Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
Signed-off-by: Madhavan Srinivasan &lt;maddy@linux.ibm.com&gt;
Link: https://patch.msgid.link/20241218114347.428108-1-mpe@ellerman.id.au

</pre>
</div>
</content>
</entry>
<entry>
<title>selftest/powerpc/ptrace: Cleanup duplicate macro definitions</title>
<updated>2024-12-18T08:10:12+00:00</updated>
<author>
<name>Madhavan Srinivasan</name>
<email>maddy@linux.ibm.com</email>
</author>
<published>2024-12-16T16:02:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=65f5038352e8f635fb827f7482f1d08fae4d16bf'/>
<id>65f5038352e8f635fb827f7482f1d08fae4d16bf</id>
<content type='text'>
Both core-pkey.c and ptrace-pkey.c tests have
similar macro definitions, move them to "pkeys.h"
and remove the macro definitions from the C file.

Reviewed-by: Ritesh Harjani (IBM) &lt;ritesh.list@gmail.com&gt;
Signed-off-by: Madhavan Srinivasan &lt;maddy@linux.ibm.com&gt;
Link: https://patch.msgid.link/20241216160257.87252-3-maddy@linux.ibm.com

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Both core-pkey.c and ptrace-pkey.c tests have
similar macro definitions, move them to "pkeys.h"
and remove the macro definitions from the C file.

Reviewed-by: Ritesh Harjani (IBM) &lt;ritesh.list@gmail.com&gt;
Signed-off-by: Madhavan Srinivasan &lt;maddy@linux.ibm.com&gt;
Link: https://patch.msgid.link/20241216160257.87252-3-maddy@linux.ibm.com

</pre>
</div>
</content>
</entry>
<entry>
<title>selftest/powerpc/ptrace/ptrace-pkey: Remove duplicate macros</title>
<updated>2024-12-18T08:10:12+00:00</updated>
<author>
<name>Madhavan Srinivasan</name>
<email>maddy@linux.ibm.com</email>
</author>
<published>2024-12-16T16:02:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=b0e1b95b1597ad3d87ff91d52f6b67cc9423c31e'/>
<id>b0e1b95b1597ad3d87ff91d52f6b67cc9423c31e</id>
<content type='text'>
./powerpc/ptrace/Makefile includes flags.mk.
In flags.mk, -I$(selfdir)/powerpc/include is
always included as part of CFLAGS. So it will
pick up the "pkeys.h" defined in powerpc/include.

ptrace-pkey.c test has macros defined which
are part of "pkeys.h" header file. Remove those
duplicates and include "pkeys.h"

Reviewed-by: Ritesh Harjani (IBM) &lt;ritesh.list@gmail.com&gt;
Signed-off-by: Madhavan Srinivasan &lt;maddy@linux.ibm.com&gt;
Link: https://patch.msgid.link/20241216160257.87252-2-maddy@linux.ibm.com

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
./powerpc/ptrace/Makefile includes flags.mk.
In flags.mk, -I$(selfdir)/powerpc/include is
always included as part of CFLAGS. So it will
pick up the "pkeys.h" defined in powerpc/include.

ptrace-pkey.c test has macros defined which
are part of "pkeys.h" header file. Remove those
duplicates and include "pkeys.h"

Reviewed-by: Ritesh Harjani (IBM) &lt;ritesh.list@gmail.com&gt;
Signed-off-by: Madhavan Srinivasan &lt;maddy@linux.ibm.com&gt;
Link: https://patch.msgid.link/20241216160257.87252-2-maddy@linux.ibm.com

</pre>
</div>
</content>
</entry>
<entry>
<title>selftest/powerpc/ptrace/core-pkey: Remove duplicate macros</title>
<updated>2024-12-18T08:10:12+00:00</updated>
<author>
<name>Madhavan Srinivasan</name>
<email>maddy@linux.ibm.com</email>
</author>
<published>2024-12-16T16:02:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=026ac4dda8f666f737b375731e30ef8f5698b215'/>
<id>026ac4dda8f666f737b375731e30ef8f5698b215</id>
<content type='text'>
./powerpc/ptrace/Makefile includes flags.mk. In flags.mk,
-I$(selfdir)/powerpc/include is always included as part of
CFLAGS. So it will pick up the "pkeys.h" defined in
powerpc/include.

core-pkey.c test has couple of macros defined which
are part of "pkeys.h" header file. Remove those
duplicates and include "pkeys.h"

Reviewed-by: Ritesh Harjani (IBM) &lt;ritesh.list@gmail.com&gt;
Signed-off-by: Madhavan Srinivasan &lt;maddy@linux.ibm.com&gt;
Link: https://patch.msgid.link/20241216160257.87252-1-maddy@linux.ibm.com

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
./powerpc/ptrace/Makefile includes flags.mk. In flags.mk,
-I$(selfdir)/powerpc/include is always included as part of
CFLAGS. So it will pick up the "pkeys.h" defined in
powerpc/include.

core-pkey.c test has couple of macros defined which
are part of "pkeys.h" header file. Remove those
duplicates and include "pkeys.h"

Reviewed-by: Ritesh Harjani (IBM) &lt;ritesh.list@gmail.com&gt;
Signed-off-by: Madhavan Srinivasan &lt;maddy@linux.ibm.com&gt;
Link: https://patch.msgid.link/20241216160257.87252-1-maddy@linux.ibm.com

</pre>
</div>
</content>
</entry>
<entry>
<title>selftests/powerpc: Fix typo in test-vphn.c</title>
<updated>2024-12-10T03:04:51+00:00</updated>
<author>
<name>Zhu Jun</name>
<email>zhujun2@cmss.chinamobile.com</email>
</author>
<published>2024-12-04T08:01:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=3a7a53c8d4813ef510a731f529b8c58208ab8896'/>
<id>3a7a53c8d4813ef510a731f529b8c58208ab8896</id>
<content type='text'>
The word 'accross' is wrong, so fix it.

Signed-off-by: Zhu Jun &lt;zhujun2@cmss.chinamobile.com&gt;
Signed-off-by: Madhavan Srinivasan &lt;maddy@linux.ibm.com&gt;
Link: https://patch.msgid.link/20241204080149.11759-1-zhujun2@cmss.chinamobile.com

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The word 'accross' is wrong, so fix it.

Signed-off-by: Zhu Jun &lt;zhujun2@cmss.chinamobile.com&gt;
Signed-off-by: Madhavan Srinivasan &lt;maddy@linux.ibm.com&gt;
Link: https://patch.msgid.link/20241204080149.11759-1-zhujun2@cmss.chinamobile.com

</pre>
</div>
</content>
</entry>
<entry>
<title>selftests/powerpc: Remove the path after initialization.</title>
<updated>2024-11-14T11:41:00+00:00</updated>
<author>
<name>zhang jiao</name>
<email>zhangjiao2@cmss.chinamobile.com</email>
</author>
<published>2024-09-30T01:27:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=7ca93aa9204b706e4afcd4fae0dc8798500598d5'/>
<id>7ca93aa9204b706e4afcd4fae0dc8798500598d5</id>
<content type='text'>
If there were no anamolies noted, then we can simply remove the log file
and return, but only after the path variable has been initialized.

Signed-off-by: zhang jiao &lt;zhangjiao2@cmss.chinamobile.com&gt;
Reviewed-by: Ritesh Harjani (IBM) &lt;ritesh.list@gmail.com&gt;
Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
Link: https://patch.msgid.link/20240930012757.2395-1-zhangjiao2@cmss.chinamobile.com
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
If there were no anamolies noted, then we can simply remove the log file
and return, but only after the path variable has been initialized.

Signed-off-by: zhang jiao &lt;zhangjiao2@cmss.chinamobile.com&gt;
Reviewed-by: Ritesh Harjani (IBM) &lt;ritesh.list@gmail.com&gt;
Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
Link: https://patch.msgid.link/20240930012757.2395-1-zhangjiao2@cmss.chinamobile.com
</pre>
</div>
</content>
</entry>
<entry>
<title>selftests/powerpc: Detect taint change in mitigation patching test</title>
<updated>2024-11-07T11:36:31+00:00</updated>
<author>
<name>Michael Ellerman</name>
<email>mpe@ellerman.id.au</email>
</author>
<published>2024-11-06T13:04:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=a8a54a65cac4f8202df36f925b6746328802d05f'/>
<id>a8a54a65cac4f8202df36f925b6746328802d05f</id>
<content type='text'>
Currently the mitigation patching test errors out if the kernel is
tainted prior to the test running.

That causes the test to fail unnecessarily if some other test has caused
the kernel to be tainted, or if a proprietary or force module is loaded
for example.

Instead just warn if the kernel is tainted to begin with, and only
report a change in the taint state as an error in the test.

Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
Link: https://patch.msgid.link/20241106130453.1741013-5-mpe@ellerman.id.au

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Currently the mitigation patching test errors out if the kernel is
tainted prior to the test running.

That causes the test to fail unnecessarily if some other test has caused
the kernel to be tainted, or if a proprietary or force module is loaded
for example.

Instead just warn if the kernel is tainted to begin with, and only
report a change in the taint state as an error in the test.

Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
Link: https://patch.msgid.link/20241106130453.1741013-5-mpe@ellerman.id.au

</pre>
</div>
</content>
</entry>
<entry>
<title>selftests/powerpc: Return errors from all tests</title>
<updated>2024-11-07T11:36:31+00:00</updated>
<author>
<name>Michael Ellerman</name>
<email>mpe@ellerman.id.au</email>
</author>
<published>2024-11-06T13:04:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=c6a75555b4b2643365a007b7162a670d69aa28fe'/>
<id>c6a75555b4b2643365a007b7162a670d69aa28fe</id>
<content type='text'>
Fix some tests which weren't returning an error code from main.

Although these tests only ever return success, they can still fail if
they time out and the harness kills them. If that happens they still
return success to the shell, which is incorrect and confuses the higher
level error reporting.

Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
Link: https://patch.msgid.link/20241106130453.1741013-4-mpe@ellerman.id.au

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fix some tests which weren't returning an error code from main.

Although these tests only ever return success, they can still fail if
they time out and the harness kills them. If that happens they still
return success to the shell, which is incorrect and confuses the higher
level error reporting.

Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
Link: https://patch.msgid.link/20241106130453.1741013-4-mpe@ellerman.id.au

</pre>
</div>
</content>
</entry>
<entry>
<title>selftests/powerpc: Fix 32-bit BE build errors on Ubuntu 24.04</title>
<updated>2024-11-07T11:36:30+00:00</updated>
<author>
<name>Michael Ellerman</name>
<email>mpe@ellerman.id.au</email>
</author>
<published>2024-11-06T13:04:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=d5f578f90a34d85f1cabd4c27af1b2d9fbffe64b'/>
<id>d5f578f90a34d85f1cabd4c27af1b2d9fbffe64b</id>
<content type='text'>
Starting with Ubuntu 24.04, building the selftests with the big endian
compiler (which defaults to 32-bit) fails with errors:

  stack_expansion_ldst.c:178:37: error: format '%lx' expects argument
  of type 'long unsigned int', but argument 2 has type 'rlim_t' {aka 'long long unsigned int'}
  subpage_prot.c:214:38: error: format '%lx' expects argument of type
  'long unsigned int', but argument 3 has type 'off_t' {aka 'long long int'}

Prior to 24.04 rlim_t was long unsigned int, and off_t was long int.

Cast to unsigned long long and long long before passing to printf to
avoid the errors.

Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
Link: https://patch.msgid.link/20241106130453.1741013-3-mpe@ellerman.id.au

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Starting with Ubuntu 24.04, building the selftests with the big endian
compiler (which defaults to 32-bit) fails with errors:

  stack_expansion_ldst.c:178:37: error: format '%lx' expects argument
  of type 'long unsigned int', but argument 2 has type 'rlim_t' {aka 'long long unsigned int'}
  subpage_prot.c:214:38: error: format '%lx' expects argument of type
  'long unsigned int', but argument 3 has type 'off_t' {aka 'long long int'}

Prior to 24.04 rlim_t was long unsigned int, and off_t was long int.

Cast to unsigned long long and long long before passing to printf to
avoid the errors.

Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
Link: https://patch.msgid.link/20241106130453.1741013-3-mpe@ellerman.id.au

</pre>
</div>
</content>
</entry>
<entry>
<title>selftests/powerpc: Give all tests 2 minutes timeout</title>
<updated>2024-11-07T11:36:30+00:00</updated>
<author>
<name>Michael Ellerman</name>
<email>mpe@ellerman.id.au</email>
</author>
<published>2024-11-06T13:04:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=5543d595954eefb3a6faa18a6dc7b1b3d6022052'/>
<id>5543d595954eefb3a6faa18a6dc7b1b3d6022052</id>
<content type='text'>
Each of the powerpc selftests runs with a timeout of 2 minutes by
default (see tools/testing/selftests/powerpc/harness.c).

But when tests are run with run_kselftest.sh it uses a timeout of 45
seconds, meaning some tests run OK standalone but fail when run with the
test runner.

So tell run_kselftest.sh to give each test 130 seconds, that should
allow the tests to complete, or be killed by the powerpc test harness
after 2 minutes. If for some reason the harness fails, or for the few
tests that don't use the harness, the 130 second timeout should catch
them if they get stuck.

Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
Link: https://patch.msgid.link/20241106130453.1741013-2-mpe@ellerman.id.au

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Each of the powerpc selftests runs with a timeout of 2 minutes by
default (see tools/testing/selftests/powerpc/harness.c).

But when tests are run with run_kselftest.sh it uses a timeout of 45
seconds, meaning some tests run OK standalone but fail when run with the
test runner.

So tell run_kselftest.sh to give each test 130 seconds, that should
allow the tests to complete, or be killed by the powerpc test harness
after 2 minutes. If for some reason the harness fails, or for the few
tests that don't use the harness, the 130 second timeout should catch
them if they get stuck.

Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
Link: https://patch.msgid.link/20241106130453.1741013-2-mpe@ellerman.id.au

</pre>
</div>
</content>
</entry>
</feed>
