All of lore.kernel.org
 help / color / mirror / Atom feed
From: Richard Palethorpe <rpalethorpe@suse.com>
To: ltp@lists.linux.it
Subject: [LTP] [RFC PATCH 2/6] API: Add tst_ to create_sig_proc
Date: Mon, 17 May 2021 17:30:25 +0100	[thread overview]
Message-ID: <20210517163029.22974-3-rpalethorpe@suse.com> (raw)
In-Reply-To: <20210517163029.22974-1-rpalethorpe@suse.com>

Signed-off-by: Richard Palethorpe <rpalethorpe@suse.com>
---
 include/tst_sig_proc.h                         |  2 +-
 lib/tst_sig_proc.c                             |  2 +-
 libs/libltpsigwait/sigwait.c                   | 18 +++++++++---------
 .../clock_nanosleep/clock_nanosleep01.c        |  2 +-
 testcases/kernel/syscalls/ppoll/ppoll01.c      |  4 ++--
 testcases/kernel/syscalls/utils/mq_timed.h     |  2 +-
 6 files changed, 15 insertions(+), 15 deletions(-)

diff --git a/include/tst_sig_proc.h b/include/tst_sig_proc.h
index b85981e77..39a201037 100644
--- a/include/tst_sig_proc.h
+++ b/include/tst_sig_proc.h
@@ -7,6 +7,6 @@
 
 #include <sys/types.h>
 
-pid_t create_sig_proc(int sig, int count, unsigned int usec);
+pid_t tst_create_sig_proc(int sig, int count, unsigned int usec);
 
 #endif	/* TST_SIG_PROC_H__ */
diff --git a/lib/tst_sig_proc.c b/lib/tst_sig_proc.c
index 509418af4..4826f9679 100644
--- a/lib/tst_sig_proc.c
+++ b/lib/tst_sig_proc.c
@@ -11,7 +11,7 @@
 #define TST_NO_DEFAULT_MAIN
 #include "tst_test.h"
 
-pid_t create_sig_proc(int sig, int count, unsigned int usec)
+pid_t tst_create_sig_proc(int sig, int count, unsigned int usec)
 {
 	pid_t pid, cpid;
 
diff --git a/libs/libltpsigwait/sigwait.c b/libs/libltpsigwait/sigwait.c
index 2be949929..aa8ef226d 100644
--- a/libs/libltpsigwait/sigwait.c
+++ b/libs/libltpsigwait/sigwait.c
@@ -19,7 +19,7 @@ void test_empty_set(swi_func sigwaitinfo, int signo,
 	SAFE_SIGEMPTYSET(&sigs);
 
 	/* Run a child that will wake us up */
-	child = create_sig_proc(signo, INT_MAX, 100000);
+	child = tst_create_sig_proc(signo, INT_MAX, 100000);
 
 	TEST(sigwaitinfo(&sigs, &si, NULL));
 	if (TST_RET == -1) {
@@ -49,7 +49,7 @@ void test_timeout(swi_func sigwaitinfo, int signo, enum tst_ts_type type)
 	SAFE_SIGEMPTYSET(&sigs);
 
 	/* Run a child that will wake us up */
-	child = create_sig_proc(signo, INT_MAX, 100000);
+	child = tst_create_sig_proc(signo, INT_MAX, 100000);
 
 	TEST(sigwaitinfo(&sigs, &si, tst_ts_get(&ts)));
 	if (TST_RET == -1) {
@@ -79,7 +79,7 @@ void test_unmasked_matching(swi_func sigwaitinfo, int signo,
 	SAFE_SIGADDSET(&sigs, signo);
 
 	/* Run a child that will wake us up */
-	child = create_sig_proc(signo, INT_MAX, 100000);
+	child = tst_create_sig_proc(signo, INT_MAX, 100000);
 
 	TEST(sigwaitinfo(&sigs, &si, NULL));
 	if (TST_RET == signo) {
@@ -106,7 +106,7 @@ void test_unmasked_matching_noinfo(swi_func sigwaitinfo, int signo,
 	SAFE_SIGADDSET(&sigs, signo);
 
 	/* Run a child that will wake us up */
-	child = create_sig_proc(signo, INT_MAX, 100000);
+	child = tst_create_sig_proc(signo, INT_MAX, 100000);
 
 	TEST(sigwaitinfo(&sigs, NULL, NULL));
 	if (TST_RET == signo)
@@ -139,7 +139,7 @@ void test_masked_matching(swi_func sigwaitinfo, int signo,
 	SAFE_SIGDELSET(&sigs, SIGCHLD);
 
 	/* Run a child that will wake us up */
-	child = create_sig_proc(signo, 1, 0);
+	child = tst_create_sig_proc(signo, 1, 0);
 
 	TEST(sigwaitinfo(&sigs, &si, NULL));
 	if (TST_RET == signo) {
@@ -191,8 +191,8 @@ void test_masked_matching_rt(swi_func sigwaitinfo, int signo,
 	SAFE_SIGDELSET(&sigs, SIGCHLD);
 
 	/* Run a child that will wake us up */
-	child[0] = create_sig_proc(signo, 1, 0);
-	child[1] = create_sig_proc(signo + 1, 1, 0);
+	child[0] = tst_create_sig_proc(signo, 1, 0);
+	child[1] = tst_create_sig_proc(signo + 1, 1, 0);
 
 	/* Ensure that the signals have been sent */
 	SAFE_WAITPID(child[0], &status, 0);
@@ -252,7 +252,7 @@ void test_masked_matching_noinfo(swi_func sigwaitinfo, int signo,
 	SAFE_SIGDELSET(&sigs, SIGCHLD);
 
 	/* Run a child that will wake us up */
-	child = create_sig_proc(signo, 1, 0);
+	child = tst_create_sig_proc(signo, 1, 0);
 
 	TEST(sigwaitinfo(&sigs, NULL, NULL));
 	if (TST_RET == signo)
@@ -294,7 +294,7 @@ void test_bad_address(swi_func sigwaitinfo, int signo,
 	SAFE_SIGDELSET(&sigs, SIGCHLD);
 
 	/* Run a child that will wake us up */
-	child = create_sig_proc(signo, 1, 0);
+	child = tst_create_sig_proc(signo, 1, 0);
 
 	TEST(sigwaitinfo(&sigs, (void *)1, NULL));
 	if (TST_RET == -1) {
diff --git a/testcases/kernel/syscalls/clock_nanosleep/clock_nanosleep01.c b/testcases/kernel/syscalls/clock_nanosleep/clock_nanosleep01.c
index 382497918..983dfe1ad 100644
--- a/testcases/kernel/syscalls/clock_nanosleep/clock_nanosleep01.c
+++ b/testcases/kernel/syscalls/clock_nanosleep/clock_nanosleep01.c
@@ -139,7 +139,7 @@ static void do_test(unsigned int i)
 	tst_res(TINFO, "case %s", tc->desc);
 
 	if (tc->ttype == SEND_SIGINT || tc->ttype == BAD_TS_ADDR_REM)
-		pid = create_sig_proc(SIGINT, 40, 500000);
+		pid = tst_create_sig_proc(SIGINT, 40, 500000);
 
 	tst_ts_set_sec(rq, tc->tv_sec);
 	tst_ts_set_nsec(rq, tc->tv_nsec);
diff --git a/testcases/kernel/syscalls/ppoll/ppoll01.c b/testcases/kernel/syscalls/ppoll/ppoll01.c
index 3d2f92f2a..3ea155445 100644
--- a/testcases/kernel/syscalls/ppoll/ppoll01.c
+++ b/testcases/kernel/syscalls/ppoll/ppoll01.c
@@ -251,8 +251,8 @@ static void do_test(unsigned int i)
 			tst_brk(TBROK, "sigprocmask");
 	}
 	if (tc->sigint_count > 0) {
-		pid = create_sig_proc(SIGINT, tc->sigint_count,
-			tc->sigint_delay);
+		pid = tst_create_sig_proc(SIGINT, tc->sigint_count,
+					  tc->sigint_delay);
 	}
 
 	/* test */
diff --git a/testcases/kernel/syscalls/utils/mq_timed.h b/testcases/kernel/syscalls/utils/mq_timed.h
index adf46034b..84831b548 100644
--- a/testcases/kernel/syscalls/utils/mq_timed.h
+++ b/testcases/kernel/syscalls/utils/mq_timed.h
@@ -45,7 +45,7 @@ static pid_t set_sig(struct tst_ts *ts,
 	gettime(CLOCK_REALTIME, tst_ts_get(ts));
 	*ts = tst_ts_add_us(*ts, 3000000);
 
-	return create_sig_proc(SIGINT, 40, 50000);
+	return tst_create_sig_proc(SIGINT, 40, 50000);
 }
 
 static void set_timeout(struct tst_ts *ts,
-- 
2.31.1


  parent reply	other threads:[~2021-05-17 16:30 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-17 16:30 [LTP] [RFC PATCH 0/6] Check exported library symbols and cleanup Richard Palethorpe
2021-05-17 16:30 ` [LTP] [RFC PATCH 1/6] API: Make some internal symbols static Richard Palethorpe
2021-05-18  7:57   ` Petr Vorel
2021-05-17 16:30 ` Richard Palethorpe [this message]
2021-05-18  9:16   ` [LTP] [RFC PATCH 2/6] API: Add tst_ to create_sig_proc Li Wang
2021-05-19 15:13   ` Petr Vorel
2021-05-17 16:30 ` [LTP] [RFC PATCH 3/6] API: Add tst_ to file_* functions Richard Palethorpe
2021-05-18  9:23   ` Li Wang
2021-05-19 15:11   ` Petr Vorel
2021-05-17 16:30 ` [LTP] [RFC PATCH 4/6] API: add tst_ to mount_overlay Richard Palethorpe
2021-05-18  8:43   ` Li Wang
2021-05-19 15:12   ` Petr Vorel
2021-05-17 16:30 ` [LTP] [RFC PATCH 5/6] API: Add tst_ to hugepage opt vars Richard Palethorpe
2021-05-18  8:42   ` Li Wang
2021-05-17 16:30 ` [LTP] [RFC PATCH 6/6] API: Check exported symbols Richard Palethorpe
2021-05-18  8:18   ` Petr Vorel
2021-05-18  9:57     ` Richard Palethorpe
2021-05-18 14:57       ` Petr Vorel
2021-05-19  9:11         ` Richard Palethorpe
2021-05-19 12:02           ` Cyril Hrubis
2021-05-19 15:10             ` Petr Vorel

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=20210517163029.22974-3-rpalethorpe@suse.com \
    --to=rpalethorpe@suse.com \
    --cc=ltp@lists.linux.it \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.