linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] powerpc/selftests: miscellaneous improvements
@ 2023-08-17 16:21 Nathan Lynch via B4 Relay
  2023-08-17 16:21 ` [PATCH 1/2] powerpc/selftests: sort mm/.gitignore, add exec_prot Nathan Lynch via B4 Relay
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Nathan Lynch via B4 Relay @ 2023-08-17 16:21 UTC (permalink / raw)
  To: Michael Ellerman, Nicholas Piggin, Christophe Leroy
  Cc: Nathan Lynch, linuxppc-dev

Just some minor things to tidy up I noticed when adding tests.

---
Nathan Lynch (2):
      powerpc/selftests: sort mm/.gitignore, add exec_prot
      selftests/powerpc: add const qualification where possible

 tools/testing/selftests/powerpc/harness.c         |  4 ++--
 tools/testing/selftests/powerpc/include/subunit.h | 16 ++++++++--------
 tools/testing/selftests/powerpc/include/utils.h   |  2 +-
 tools/testing/selftests/powerpc/mm/.gitignore     | 17 +++++++++--------
 4 files changed, 20 insertions(+), 19 deletions(-)
---
base-commit: 4f894fe22343138f0dc0ce18b49abfa45cdfeb6b
change-id: 20230817-powerpc-selftest-misc-12c61153e328

Best regards,
-- 
Nathan Lynch <nathanl@linux.ibm.com>


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH 1/2] powerpc/selftests: sort mm/.gitignore, add exec_prot
  2023-08-17 16:21 [PATCH 0/2] powerpc/selftests: miscellaneous improvements Nathan Lynch via B4 Relay
@ 2023-08-17 16:21 ` Nathan Lynch via B4 Relay
  2023-08-17 16:21 ` [PATCH 2/2] selftests/powerpc: add const qualification where possible Nathan Lynch via B4 Relay
  2023-08-23 11:55 ` [PATCH 0/2] powerpc/selftests: miscellaneous improvements Michael Ellerman
  2 siblings, 0 replies; 4+ messages in thread
From: Nathan Lynch via B4 Relay @ 2023-08-17 16:21 UTC (permalink / raw)
  To: Michael Ellerman, Nicholas Piggin, Christophe Leroy
  Cc: Nathan Lynch, linuxppc-dev

From: Nathan Lynch <nathanl@linux.ibm.com>

Add exec_prot to to mm/.gitignore and sort the result.

Signed-off-by: Nathan Lynch <nathanl@linux.ibm.com>
---
 tools/testing/selftests/powerpc/mm/.gitignore | 17 +++++++++--------
 1 file changed, 9 insertions(+), 8 deletions(-)

diff --git a/tools/testing/selftests/powerpc/mm/.gitignore b/tools/testing/selftests/powerpc/mm/.gitignore
index 4e1a294eec35..0df1a3afc5e2 100644
--- a/tools/testing/selftests/powerpc/mm/.gitignore
+++ b/tools/testing/selftests/powerpc/mm/.gitignore
@@ -1,15 +1,16 @@
 # SPDX-License-Identifier: GPL-2.0-only
+bad_accesses
+exec_prot
 hugetlb_vs_thp_test
-subpage_prot
-tempfile
-prot_sao
-segv_errors
-wild_bctr
 large_vm_fork_separation
-bad_accesses
-tlbie_test
+large_vm_gpr_corruption
 pkey_exec_prot
 pkey_siginfo
+prot_sao
+segv_errors
 stack_expansion_ldst
 stack_expansion_signal
-large_vm_gpr_corruption
+subpage_prot
+tempfile
+tlbie_test
+wild_bctr

-- 
2.41.0


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH 2/2] selftests/powerpc: add const qualification where possible
  2023-08-17 16:21 [PATCH 0/2] powerpc/selftests: miscellaneous improvements Nathan Lynch via B4 Relay
  2023-08-17 16:21 ` [PATCH 1/2] powerpc/selftests: sort mm/.gitignore, add exec_prot Nathan Lynch via B4 Relay
@ 2023-08-17 16:21 ` Nathan Lynch via B4 Relay
  2023-08-23 11:55 ` [PATCH 0/2] powerpc/selftests: miscellaneous improvements Michael Ellerman
  2 siblings, 0 replies; 4+ messages in thread
From: Nathan Lynch via B4 Relay @ 2023-08-17 16:21 UTC (permalink / raw)
  To: Michael Ellerman, Nicholas Piggin, Christophe Leroy
  Cc: Nathan Lynch, linuxppc-dev

From: Nathan Lynch <nathanl@linux.ibm.com>

Various char * parameters in the common powerpc selftest APIs can be
const.

Signed-off-by: Nathan Lynch <nathanl@linux.ibm.com>
---
 tools/testing/selftests/powerpc/harness.c         |  4 ++--
 tools/testing/selftests/powerpc/include/subunit.h | 16 ++++++++--------
 tools/testing/selftests/powerpc/include/utils.h   |  2 +-
 3 files changed, 11 insertions(+), 11 deletions(-)

diff --git a/tools/testing/selftests/powerpc/harness.c b/tools/testing/selftests/powerpc/harness.c
index 0ad4f12b3d43..5876220d8ff2 100644
--- a/tools/testing/selftests/powerpc/harness.c
+++ b/tools/testing/selftests/powerpc/harness.c
@@ -24,7 +24,7 @@
 /* Setting timeout to -1 disables the alarm */
 static uint64_t timeout = 120;
 
-int run_test(int (test_function)(void), char *name)
+int run_test(int (test_function)(void), const char *name)
 {
 	bool terminated;
 	int rc, status;
@@ -101,7 +101,7 @@ void test_harness_set_timeout(uint64_t time)
 	timeout = time;
 }
 
-int test_harness(int (test_function)(void), char *name)
+int test_harness(int (test_function)(void), const char *name)
 {
 	int rc;
 
diff --git a/tools/testing/selftests/powerpc/include/subunit.h b/tools/testing/selftests/powerpc/include/subunit.h
index 068d55fdf80f..b0bb774617c9 100644
--- a/tools/testing/selftests/powerpc/include/subunit.h
+++ b/tools/testing/selftests/powerpc/include/subunit.h
@@ -6,37 +6,37 @@
 #ifndef _SELFTESTS_POWERPC_SUBUNIT_H
 #define _SELFTESTS_POWERPC_SUBUNIT_H
 
-static inline void test_start(char *name)
+static inline void test_start(const char *name)
 {
 	printf("test: %s\n", name);
 }
 
-static inline void test_failure_detail(char *name, char *detail)
+static inline void test_failure_detail(const char *name, const char *detail)
 {
 	printf("failure: %s [%s]\n", name, detail);
 }
 
-static inline void test_failure(char *name)
+static inline void test_failure(const char *name)
 {
 	printf("failure: %s\n", name);
 }
 
-static inline void test_error(char *name)
+static inline void test_error(const char *name)
 {
 	printf("error: %s\n", name);
 }
 
-static inline void test_skip(char *name)
+static inline void test_skip(const char *name)
 {
 	printf("skip: %s\n", name);
 }
 
-static inline void test_success(char *name)
+static inline void test_success(const char *name)
 {
 	printf("success: %s\n", name);
 }
 
-static inline void test_finish(char *name, int status)
+static inline void test_finish(const char *name, int status)
 {
 	if (status)
 		test_failure(name);
@@ -44,7 +44,7 @@ static inline void test_finish(char *name, int status)
 		test_success(name);
 }
 
-static inline void test_set_git_version(char *value)
+static inline void test_set_git_version(const char *value)
 {
 	printf("tags: git_version:%s\n", value);
 }
diff --git a/tools/testing/selftests/powerpc/include/utils.h b/tools/testing/selftests/powerpc/include/utils.h
index 36c30c611457..66d7b2368dd4 100644
--- a/tools/testing/selftests/powerpc/include/utils.h
+++ b/tools/testing/selftests/powerpc/include/utils.h
@@ -32,7 +32,7 @@ typedef uint16_t u16;
 typedef uint8_t u8;
 
 void test_harness_set_timeout(uint64_t time);
-int test_harness(int (test_function)(void), char *name);
+int test_harness(int (test_function)(void), const char *name);
 
 int read_auxv(char *buf, ssize_t buf_size);
 void *find_auxv_entry(int type, char *auxv);

-- 
2.41.0


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH 0/2] powerpc/selftests: miscellaneous improvements
  2023-08-17 16:21 [PATCH 0/2] powerpc/selftests: miscellaneous improvements Nathan Lynch via B4 Relay
  2023-08-17 16:21 ` [PATCH 1/2] powerpc/selftests: sort mm/.gitignore, add exec_prot Nathan Lynch via B4 Relay
  2023-08-17 16:21 ` [PATCH 2/2] selftests/powerpc: add const qualification where possible Nathan Lynch via B4 Relay
@ 2023-08-23 11:55 ` Michael Ellerman
  2 siblings, 0 replies; 4+ messages in thread
From: Michael Ellerman @ 2023-08-23 11:55 UTC (permalink / raw)
  To: Nicholas Piggin, Christophe Leroy, Nathan Lynch; +Cc: linuxppc-dev

On Thu, 17 Aug 2023 11:21:51 -0500, Nathan Lynch wrote:
> Just some minor things to tidy up I noticed when adding tests.
> 

Applied to powerpc/next.

[1/2] powerpc/selftests: sort mm/.gitignore, add exec_prot
      https://git.kernel.org/powerpc/c/ae3a8cc292d01a1558dff837bb485712dfaeb9c6
[2/2] selftests/powerpc: add const qualification where possible
      https://git.kernel.org/powerpc/c/701ca3657d5d489add2bedce0c31938e521c7913

cheers

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2023-08-23 12:18 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-08-17 16:21 [PATCH 0/2] powerpc/selftests: miscellaneous improvements Nathan Lynch via B4 Relay
2023-08-17 16:21 ` [PATCH 1/2] powerpc/selftests: sort mm/.gitignore, add exec_prot Nathan Lynch via B4 Relay
2023-08-17 16:21 ` [PATCH 2/2] selftests/powerpc: add const qualification where possible Nathan Lynch via B4 Relay
2023-08-23 11:55 ` [PATCH 0/2] powerpc/selftests: miscellaneous improvements Michael Ellerman

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).