Linux-rt-users archive on lore.kernel.org
 help / color / Atom feed
* [PATCH 1/8] rt-tests: queuelat: Fix some warnings in determine_maximum_mpps.sh
@ 2019-11-25 14:16 John Kacur
  2019-11-25 14:16 ` [PATCH 2/8] rt-tests: ssdd: Add short and long functions as well as help John Kacur
                   ` (4 more replies)
  0 siblings, 5 replies; 7+ messages in thread
From: John Kacur @ 2019-11-25 14:16 UTC (permalink / raw)
  To: rt-users; +Cc: Clark Williams, John Kacur

Coverity advises to quote some values to prevent word splitting and to
export variables separately after declaraing them to avoid masking
errors.

Fix these warnings

Signed-off-by: John Kacur <jkacur@redhat.com>
---
 src/queuelat/determine_maximum_mpps.sh | 15 ++++++++-------
 1 file changed, 8 insertions(+), 7 deletions(-)

diff --git a/src/queuelat/determine_maximum_mpps.sh b/src/queuelat/determine_maximum_mpps.sh
index cd45454720f7..3acd6ba2e362 100755
--- a/src/queuelat/determine_maximum_mpps.sh
+++ b/src/queuelat/determine_maximum_mpps.sh
@@ -18,7 +18,7 @@ for mpps in `seq 3 3 50`; do
 	echo testing $mpps Mpps
 
 	OUTFILE=`mktemp`
-	$PREAMBLE queuelat -m $MAXLAT -c $CYCLES_PER_PACKET -f `sh get_cpuinfo_mhz.sh` -p $mpps -t 30 > $OUTFILE
+	$PREAMBLE queuelat -m $MAXLAT -c $CYCLES_PER_PACKET -f `sh get_cpuinfo_mhz.sh` -p "$mpps" -t 30 > $OUTFILE
 
 	exceeded=`grep exceeded $OUTFILE`
 	if [ ! -z "$exceeded" ]; then
@@ -34,7 +34,7 @@ for mpps in `seq $first_mpps -1 3`; do
 	echo testing $mpps Mpps
 
 	OUTFILE=`mktemp`
-	$PREAMBLE queuelat -m $MAXLAT -c $CYCLES_PER_PACKET -f `sh get_cpuinfo_mhz.sh` -p $mpps -t 30 > $OUTFILE
+	$PREAMBLE queuelat -m $MAXLAT -c $CYCLES_PER_PACKET -f `sh get_cpuinfo_mhz.sh` -p "$mpps" -t 30 > $OUTFILE
 
 	exceeded=`grep exceeded $OUTFILE`
 	if [ -z "$exceeded" ]; then
@@ -51,7 +51,7 @@ for mpps in `seq $second_mpps 0.3 $first_mpps`; do
 	echo testing $mpps Mpps
 
 	OUTFILE=`mktemp`
-	$PREAMBLE queuelat -m $MAXLAT -c $CYCLES_PER_PACKET -f `sh get_cpuinfo_mhz.sh` -p $mpps -t 30 > $OUTFILE
+	$PREAMBLE queuelat -m $MAXLAT -c $CYCLES_PER_PACKET -f `sh get_cpuinfo_mhz.sh` -p "$mpps" -t 30 > $OUTFILE
 
 	exceeded=`grep exceeded $OUTFILE`
 	if [ ! -z "$exceeded" ]; then
@@ -68,7 +68,7 @@ for mpps in `seq $third_mpps -0.1 3`; do
 	echo testing $mpps Mpps
 
 	OUTFILE=`mktemp`
-	$PREAMBLE queuelat -m $MAXLAT -c $CYCLES_PER_PACKET -f `sh get_cpuinfo_mhz.sh` -p $mpps -t 30 > $OUTFILE
+	$PREAMBLE queuelat -m $MAXLAT -c $CYCLES_PER_PACKET -f `sh get_cpuinfo_mhz.sh` -p "$mpps" -t 30 > $OUTFILE
 
 	exceeded=`grep exceeded $OUTFILE`
 	if [ -z "$exceeded" ]; then
@@ -87,13 +87,14 @@ while [ $queuelat_failure == 1 ]; do
 	echo "$mpps Mpps"
 
 	for i in `seq 1 10`; do 
-		$PREAMBLE ./queuelat -m $MAXLAT -c $CYCLES_PER_PACKET -f `get_cpuinfo_mhz.sh` -p $mpps -t 30 > $OUTFILE
+		$PREAMBLE ./queuelat -m $MAXLAT -c $CYCLES_PER_PACKET -f `get_cpuinfo_mhz.sh` -p "$mpps" -t 30 > $OUTFILE
 		exceeded=`grep exceeded $OUTFILE`
 
 		if [ ! -z "$exceeded" ]; then
 			echo "mpps failure (run $i) $mpps"
 			export queuelat_failure=1
-			export mpps=`echo $mpps - 0.1 | bc`
+			mpps=`echo $mpps - 0.1 | bc`
+			export mpps
 			break
 		fi
 		echo "run $i success"
@@ -109,7 +110,7 @@ while [ $queuelat_failure == 1 ]; do
 	echo -n "Starting 10 minutes run with "
 	echo "$mpps Mpps"
 
-	$PREAMBLE queuelat -m $MAXLAT -c $CYCLES_PER_PACKET -f `get_cpuinfo_mhz.sh` -p $mpps -t 600 > $OUTFILE
+	$PREAMBLE queuelat -m $MAXLAT -c $CYCLES_PER_PACKET -f `get_cpuinfo_mhz.sh` -p "$mpps" -t 600 > $OUTFILE
 	exceeded=`grep exceeded $OUTFILE`
 
 	if [ ! -z "$exceeded" ]; then
-- 
2.20.1


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

* [PATCH 2/8] rt-tests: ssdd: Add short and long functions as well as help
  2019-11-25 14:16 [PATCH 1/8] rt-tests: queuelat: Fix some warnings in determine_maximum_mpps.sh John Kacur
@ 2019-11-25 14:16 ` John Kacur
  2019-11-25 14:16 ` [PATCH 5/8] rt-tests: cyclictest: Get a snapshot of cyclictest without interuppting it John Kacur
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 7+ messages in thread
From: John Kacur @ 2019-11-25 14:16 UTC (permalink / raw)
  To: rt-users; +Cc: Clark Williams, John Kacur

Add short and long functions as well as help to make ssdd consistent
with the rest of the test suite. Add a help function as well

Signed-off-by: John Kacur <jkacur@redhat.com>
---
 src/ssdd/ssdd.8 | 10 +++++++---
 src/ssdd/ssdd.c | 45 +++++++++++++++++++++++++++++++++++++++------
 2 files changed, 46 insertions(+), 9 deletions(-)

diff --git a/src/ssdd/ssdd.8 b/src/ssdd/ssdd.8
index 44638489f0d1..99f30145d079 100644
--- a/src/ssdd/ssdd.8
+++ b/src/ssdd/ssdd.8
@@ -3,7 +3,7 @@
 ssdd \- have a tracer do a bunch of PTRACE_SINGLESTEPs
 .SH SYNOPSIS
 .B ssdd
-.RI "[nforks] [niters]"
+.RI "<options>"
 .SH DESCRIPTION
 Have a tracer do a bunch of PTRACE_SINGLESTEPs against
 a tracee as fast as possible.  Create several of these
@@ -12,15 +12,19 @@ interfere with each other.
 The tracer waits on each PTRACE_SINGLESTEP with a waitpid(2)
 and checks that waitpid's return values for correctness.
 .SH OPTIONS
-.B nforks
+.B \-f, \-\-forks
 number of tracer/tracee pairs to fork off.
 Default is 10.
 .br
 .TP
-.B niters
+.B \-i, \-\-iters
 number of PTRACE_SINGLESTEP iterations to
 do before declaring success, for each tracer/
 tracee pair set up. Default is 10,000.
+.br
+.TP
+.B \-h, \-\-help
+Display usage
 
 .SH AUTHOR
 ssdd was written by Joe Korty <joe.korty@concurrent-rt.com>
diff --git a/src/ssdd/ssdd.c b/src/ssdd/ssdd.c
index 2c3a779be9f1..080ed17107a8 100644
--- a/src/ssdd/ssdd.c
+++ b/src/ssdd/ssdd.c
@@ -27,6 +27,7 @@
 #include <stdlib.h>
 #include <stddef.h>
 #include <unistd.h>
+#include <getopt.h>
 #include <string.h>
 #include <signal.h>
 #include <errno.h>
@@ -65,6 +66,17 @@ static const char *get_state_name(int state)
 
 static int got_sigchld;
 
+enum option_value { OPT_NFORKS=1, OPT_NITERS, OPT_HELP };
+
+static void usage()
+{
+	printf("ssdd <options>\n");
+	printf("\t-f --forks=<number of forks>\n");
+	printf("\t-i --iters=<number of iterations>\n");
+	printf("\t-h --help\n");
+	exit(0);
+}
+
 static int do_wait(pid_t *wait_pid, int *ret_sig)
 {
 	int status, child_status;
@@ -276,13 +288,34 @@ int main(int argc, char **argv)
 
 	setbuf(stdout, NULL);
 
-	argc--, argv++;
-	if (argc) {
-		nforks = atoi(*argv);
-		argc--, argv++;
-		if (argc)
-			nsteps = atoi(*argv);
+	for (;;) {
+		int option_index = 0;
+
+		static struct option long_options[] = {
+			{"forks", required_argument, NULL, OPT_NFORKS},
+			{"iters", required_argument, NULL, OPT_NITERS},
+			{"help", no_argument, NULL, OPT_HELP},
+			{NULL, 0, NULL, 0},
+		};
+		int c = getopt_long(argc, argv, "f:i:h", long_options, &option_index);
+		if (c == -1)
+			break;
+		switch(c) {
+			case 'f':
+			case OPT_NFORKS:
+				nforks = atoi(optarg);
+				break;
+			case 'i':
+			case OPT_NITERS:
+				nsteps = atoi(optarg);
+				break;
+			case 'h':
+			case OPT_HELP:
+				usage();
+				break;
+		}
 	}
+
 	printf("#main : %d\n", getpid());
 	printf("#forks: %d\n", nforks);
 	printf("#steps: %d\n", nsteps);
-- 
2.20.1


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

* [PATCH 5/8] rt-tests: cyclictest: Get a snapshot of cyclictest without interuppting it
  2019-11-25 14:16 [PATCH 1/8] rt-tests: queuelat: Fix some warnings in determine_maximum_mpps.sh John Kacur
  2019-11-25 14:16 ` [PATCH 2/8] rt-tests: ssdd: Add short and long functions as well as help John Kacur
@ 2019-11-25 14:16 ` John Kacur
  2019-11-25 14:16 ` [PATCH 6/8] cyclictest: Sync manpage with the help option John Kacur
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 7+ messages in thread
From: John Kacur @ 2019-11-25 14:16 UTC (permalink / raw)
  To: rt-users; +Cc: Clark Williams, John Kacur

Right now if you are running cyclictest you can send it SIGUSR1
and it will spill out the data at a moment in time, and keep running.

However, this can be problematic if you are using another program such
as rteval to consume the data.

This feature here lets you send SIGUSR2 to cyclictest and it dumps
status to shared memory so you can read it without interrupting
cyclictest and without interferring with the data it is outputing.

To use it, start cyclictest in one term, then in another term send it
SIGUSR2, and then you can just cat the results like this:

    [jkacur@planxty rt-tests]$ ps ax | tail
    14083 ?        I      0:00 [kworker/1:0-events]
    14108 ?        I      0:01 [kworker/u16:3-events_unbound]
    14150 ?        I      0:00 [kworker/7:0-mm_percpu_wq]
    14287 pts/9    SLl+   0:14 ./cyclictest -t
    14324 ?        I      0:00 [kworker/1:2]
    14341 ?        I      0:00 [kworker/0:2]
    14342 ?        I      0:00 [kworker/2:1]
    14363 ?        I      0:00 [kworker/u16:0-events_unbound]
    14381 pts/2    R+     0:00 ps ax
    14382 pts/2    S+     0:00 tail

    [jkacur@planxty rt-tests]$ cat /dev/shm/cyclictest_shm
    [jkacur@planxty rt-tests]$ kill -s USR2 14287
    [jkacur@planxty rt-tests]$ cat /dev/shm/cyclictest_shm
    #---------------------------
    # cyclictest current status:
    T: 0 (14288) P: 0 I:1000 C: 124852 Min:     20 Act:   65 Avg:  104 Max:     354
    T: 1 (14289) P: 0 I:1500 C:  83235 Min:      6 Act:   77 Avg:   82 Max:     330
    T: 2 (14290) P: 0 I:2000 C:  62426 Min:      9 Act:   71 Avg:  110 Max:     358
    T: 3 (14291) P: 0 I:2500 C:  49940 Min:      9 Act:   77 Avg:  111 Max:     453
    T: 4 (14292) P: 0 I:3000 C:  41617 Min:     14 Act:   68 Avg:   69 Max:     815
    T: 5 (14293) P: 0 I:3500 C:  35672 Min:     15 Act:   68 Avg:  105 Max:     360
    T: 6 (14294) P: 0 I:4000 C:  31212 Min:     15 Act:   64 Avg:  103 Max:     372
    T: 7 (14295) P: 0 I:4500 C:  27744 Min:     20 Act:  118 Avg:   93 Max:     681
    #---------------------------

Signed-off-by: John Kacur <jkacur@redhat.com>
---
 src/cyclictest/cyclictest.c | 184 ++++++++++++++++++++++++++++++++++++
 1 file changed, 184 insertions(+)

diff --git a/src/cyclictest/cyclictest.c b/src/cyclictest/cyclictest.c
index bca028fedffd..1c515ae1354c 100644
--- a/src/cyclictest/cyclictest.c
+++ b/src/cyclictest/cyclictest.c
@@ -231,10 +231,14 @@ static struct thread_param **parameters;
 static struct thread_stat **statistics;
 
 static void print_stat(FILE *fp, struct thread_param *par, int index, int verbose, int quiet);
+static void rstat_print_stat(struct thread_param *par, int index, int verbose, int quiet);
+static void rstat_setup(void);
 
 static int latency_target_fd = -1;
 static int32_t latency_target_value = 0;
 
+static int rstat_fd = -1;
+
 /* Latency trick
  * if the file /dev/cpu_dma_latency exists,
  * open it and write a zero into it. This will tell
@@ -1475,6 +1479,22 @@ static void sighand(int sig)
 		fprintf(stderr, "#---------------------------\n");
 		quiet = oldquiet;
 		return;
+	} else if (sig == SIGUSR2) {
+		int i;
+		int oldquiet = quiet;
+
+		if (rstat_fd == -1) {
+			fprintf(stderr, "ERROR: rstat_fd not valid\n");
+			return;
+		}
+		quiet = 0;
+		dprintf(rstat_fd, "#---------------------------\n");
+		dprintf(rstat_fd, "# cyclictest current status:\n");
+		for (i = 0; i < num_threads; i++)
+			rstat_print_stat(parameters[i], i, 0, 0);
+		dprintf(rstat_fd, "#---------------------------\n");
+		quiet = oldquiet;
+		return;
 	}
 	shutdown = 1;
 	if (refresh_on_max)
@@ -1642,6 +1662,62 @@ static void print_stat(FILE *fp, struct thread_param *par, int index, int verbos
 	}
 }
 
+static void rstat_print_stat(struct thread_param *par, int index, int verbose, int quiet)
+{
+	struct thread_stat *stat = par->stats;
+	int fd = rstat_fd;
+
+	if (!verbose) {
+		if (quiet != 1) {
+			char *fmt;
+			if (use_nsecs)
+				fmt = "T:%2d (%5d) P:%2d I:%ld C:%7lu "
+				        "Min:%7ld Act:%8ld Avg:%8ld Max:%8ld";
+			else
+				fmt = "T:%2d (%5d) P:%2d I:%ld C:%7lu "
+				        "Min:%7ld Act:%5ld Avg:%5ld Max:%8ld";
+
+			dprintf(fd, fmt, index, stat->tid, par->prio,
+				par->interval, stat->cycles, stat->min,
+				stat->act, stat->cycles ?
+				(long)(stat->avg/stat->cycles) : 0, stat->max);
+
+			if (smi)
+				dprintf(fd," SMI:%8ld", stat->smi_count);
+
+			dprintf(fd, "\n");
+		}
+	} else {
+		while (stat->cycles != stat->cyclesread) {
+			unsigned long diff_smi;
+			long diff = stat->values
+			    [stat->cyclesread & par->bufmsk];
+
+			if (smi)
+				diff_smi = stat->smis
+				[stat->cyclesread & par->bufmsk];
+
+			if (diff > stat->redmax) {
+				stat->redmax = diff;
+				stat->cycleofmax = stat->cyclesread;
+			}
+			if (++stat->reduce == oscope_reduction) {
+				if (!smi)
+					dprintf(fd, "%8d:%8lu:%8ld\n", index,
+						stat->cycleofmax, stat->redmax);
+				else
+					dprintf(fd, "%8d:%8lu:%8ld%8ld\n",
+						index, stat->cycleofmax,
+						stat->redmax, diff_smi);
+
+				stat->reduce = 0;
+				stat->redmax = 0;
+			}
+			stat->cyclesread++;
+		}
+	}
+}
+
 
 /*
  * thread that creates a named fifo and hands out run stats when someone
@@ -1729,6 +1805,105 @@ static void trigger_update(struct thread_param *par, int diff, int64_t ts)
 	pthread_mutex_unlock(&trigger_lock);
 }
 
+/* Running status shared memory open */
+static int rstat_shm_open(void)
+{
+	int fd;
+
+	errno = 0;
+	fd = shm_unlink("/cyclictest_shm");
+
+	if ((fd == -1) && (errno != ENOENT)) {
+		fprintf(stderr, "ERROR: shm_unlink %s\n", strerror(errno));
+		return fd;
+	}
+
+	errno = 9;
+	fd = shm_open("/cyclictest_shm", O_RDWR|O_CREAT|O_EXCL, S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP|S_IROTH|S_IWOTH);
+	if (fd == -1) {
+		fprintf(stderr, "ERROR: shm_open %s\n", strerror(errno));
+	}
+
+	rstat_fd = fd;
+
+	return fd;
+}
+
+static int rstat_ftruncate(int fd)
+{
+	int err;
+
+	errno = 0;
+	err = ftruncate(fd, _SC_PAGE_SIZE);
+	if (err) {
+		fprintf(stderr, "ftruncate error %s\n", strerror(errno));
+	}
+
+	return err;
+}
+
+static void *rstat_mmap(int fd)
+{
+	void *mptr;
+
+	errno = 0;
+	mptr = mmap(0, _SC_PAGE_SIZE, PROT_READ|PROT_WRITE, MAP_SHARED, fd, 0);
+
+	if (mptr == (void*)-1) {
+		fprintf(stderr, "ERROR: mmap, %s\n", strerror(errno));
+	}
+
+	return mptr;
+}
+
+static int rstat_mlock(void *mptr)
+{
+	int err;
+
+	err = mlock(mptr, _SC_PAGE_SIZE);
+
+	errno = 0;
+	if (err == -1) {
+		fprintf(stderr, "ERROR, mlock %s\n", strerror(errno));
+	}
+
+	return err;
+}
+
+static void rstat_setup(void)
+{
+	int res;
+	void *mptr = NULL;
+
+	int sfd = rstat_shm_open();
+	if (sfd < 0)
+		goto rstat_err;
+
+	res = rstat_ftruncate(sfd);
+	if (res)
+		goto rstat_err1;
+
+	mptr = rstat_mmap(sfd);
+	if (mptr == MAP_FAILED)
+		goto rstat_err1;
+
+	res = rstat_mlock(mptr);
+	if (res)
+		goto rstat_err2;
+
+	return;
+
+rstat_err2:
+	munmap(mptr, _SC_PAGE_SIZE);
+rstat_err1:
+	close(sfd);
+	shm_unlink("/cyclictest_shm");
+rstat_err:
+	rstat_fd = -1;
+	return;
+}
+
+
 int main(int argc, char **argv)
 {
 	sigset_t sigset;
@@ -1869,6 +2044,7 @@ int main(int argc, char **argv)
 
 	}
 
+
 	mode = use_nanosleep + use_system;
 
 	sigemptyset(&sigset);
@@ -1878,6 +2054,10 @@ int main(int argc, char **argv)
 	signal(SIGINT, sighand);
 	signal(SIGTERM, sighand);
 	signal(SIGUSR1, sighand);
+	signal(SIGUSR2, sighand);
+
+	/* Set-up shm */
+	rstat_setup();
 
 	parameters = calloc(num_threads, sizeof(struct thread_param *));
 	if (!parameters)
@@ -2138,5 +2318,9 @@ int main(int argc, char **argv)
 	if (affinity_mask)
 		rt_bitmask_free(affinity_mask);
 
+	/* Remove running status shared memory file if it exists */
+	if (rstat_fd >= 0)
+		shm_unlink("/cyclictest_shm");
+
 	exit(ret);
 }
-- 
2.20.1


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

* [PATCH 6/8] cyclictest: Sync manpage with the help option
  2019-11-25 14:16 [PATCH 1/8] rt-tests: queuelat: Fix some warnings in determine_maximum_mpps.sh John Kacur
  2019-11-25 14:16 ` [PATCH 2/8] rt-tests: ssdd: Add short and long functions as well as help John Kacur
  2019-11-25 14:16 ` [PATCH 5/8] rt-tests: cyclictest: Get a snapshot of cyclictest without interuppting it John Kacur
@ 2019-11-25 14:16 ` John Kacur
  2019-11-25 14:16 ` [PATCH 7/8] svsematest: Add -S, --smp option to manpage John Kacur
  2019-11-25 14:16 ` [PATCH 8/8] rt-tests: Add SPDX tags John Kacur
  4 siblings, 0 replies; 7+ messages in thread
From: John Kacur @ 2019-11-25 14:16 UTC (permalink / raw)
  To: rt-users; +Cc: Clark Williams, John Kacur

Sync the manpage with the help option, as the manpage has not kept-up
with changes to help

Signed-off-by: John Kacur <jkacur@redhat.com>
---
 src/cyclictest/cyclictest.8 | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/src/cyclictest/cyclictest.8 b/src/cyclictest/cyclictest.8
index b64a16ae8bbb..00e2d2403996 100644
--- a/src/cyclictest/cyclictest.8
+++ b/src/cyclictest/cyclictest.8
@@ -67,6 +67,9 @@ Specify a length for the test run.
 .br
 Append 'm', 'h', or 'd' to specify minutes, hours or days.
 .TP
+.B \-\-latency=PM_Q0S
+write PM_Q0S to /dev/cpu_dma_latency
+.TP
 .B \-F, \-\-fifo=<path>
 Create a named pipe at path and write stats to it
 .TP
@@ -95,9 +98,6 @@ Lock current and future memory allocations to prevent being paged out
 Delay updating the screen until a new max latency is hit. (useful for
 running cyclictest on low-bandwidth connections)
 .TP
-.B \-n, \-\-nanosleep
-Use clock_nanosleep instead of posix interval timers. Setting this option runs the tests with clock_nanosleep instead of posix interval timers.
-.TP
 .B \-N, \-\-nsecs
 Show results in nanoseconds instead of microseconds, which is the default unit.
 .TP
@@ -165,6 +165,9 @@ where n=task number c=count v=latency value in us.
 .TP
 .B \-\-dbg_cyclictest
 Print info userful for debugging cyclictest
+.TP
+.B \-x, \-\-posix_timers
+Use POSIX timers instead of clock_nanosleep.
 
 .SH SEE ALSO
 .BR numa (3),
-- 
2.20.1


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

* [PATCH 7/8] svsematest: Add -S, --smp option to manpage
  2019-11-25 14:16 [PATCH 1/8] rt-tests: queuelat: Fix some warnings in determine_maximum_mpps.sh John Kacur
                   ` (2 preceding siblings ...)
  2019-11-25 14:16 ` [PATCH 6/8] cyclictest: Sync manpage with the help option John Kacur
@ 2019-11-25 14:16 ` John Kacur
  2019-11-25 14:16 ` [PATCH 8/8] rt-tests: Add SPDX tags John Kacur
  4 siblings, 0 replies; 7+ messages in thread
From: John Kacur @ 2019-11-25 14:16 UTC (permalink / raw)
  To: rt-users; +Cc: Clark Williams, John Kacur

The -S, or --smp option is in the help but missing from the manpage.

We should really revisit these tests as these options have changed a bit
in cyclictest and they are all modeled after cyclictest.

Signed-off-by: John Kacur <jkacur@redhat.com>
---
 src/svsematest/svsematest.8 | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/svsematest/svsematest.8 b/src/svsematest/svsematest.8
index f67ab4c669d3..98322c105803 100644
--- a/src/svsematest/svsematest.8
+++ b/src/svsematest/svsematest.8
@@ -38,6 +38,9 @@ Set the number of loops. The default is 0 (endless). This option is useful for a
 .B \-p, \-\-prio=PRIO
 Set the priority of the process.
 .TP
+.B \-S, \-\-smp
+SMP testing: options -a -t and same priority of all threads
+.TP
 .B \-t, \-\-threads[=NUM]
 Set the number of test threads (default is 1, if this option is not given). If NUM is specified, create NUM test threads. If NUM is not specified, NUM is set to the number of available CPUs.
 .SH "EXAMPLES"
-- 
2.20.1


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

* [PATCH 8/8] rt-tests: Add SPDX tags
  2019-11-25 14:16 [PATCH 1/8] rt-tests: queuelat: Fix some warnings in determine_maximum_mpps.sh John Kacur
                   ` (3 preceding siblings ...)
  2019-11-25 14:16 ` [PATCH 7/8] svsematest: Add -S, --smp option to manpage John Kacur
@ 2019-11-25 14:16 ` John Kacur
  2019-11-25 14:33   ` Sebastian Andrzej Siewior
  4 siblings, 1 reply; 7+ messages in thread
From: John Kacur @ 2019-11-25 14:16 UTC (permalink / raw)
  To: rt-users; +Cc: Clark Williams, John Kacur

Add SPDX tags instead of having out-of-date and incomplete licences at
the top of files

Signed-off-by: John Kacur <jkacur@redhat.com>
---
 src/backfire/backfire.c                  | 17 +--------------
 src/cyclictest/cyclictest.c              |  5 +----
 src/cyclictest/rt_numa.h                 |  1 +
 src/hackbench/hackbench.c                |  1 +
 src/hwlatdetect/hwlatdetect.py           |  8 ++-----
 src/include/bionic.h                     |  1 +
 src/include/error.h                      |  1 +
 src/include/pip_stress.h                 |  1 +
 src/include/rt-get_cpu.h                 |  1 +
 src/include/rt-sched.h                   | 24 +++++----------------
 src/include/rt-utils.h                   |  1 +
 src/lib/error.c                          |  1 +
 src/lib/rt-get_cpu.c                     |  1 +
 src/lib/rt-sched.c                       | 25 ++++++----------------
 src/lib/rt-utils.c                       |  1 +
 src/pi_tests/classic_pi.c                | 22 ++++---------------
 src/pi_tests/pi_stress.c                 | 22 ++++---------------
 src/pi_tests/pip_stress.c                | 14 +-----------
 src/pi_tests/sigtest.c                   | 22 ++++---------------
 src/pi_tests/tst-mutexpi10.c             | 27 ++++++------------------
 src/pmqtest/pmqtest.c                    | 16 +-------------
 src/ptsematest/ptsematest.c              | 17 +--------------
 src/queuelat/determine_maximum_mpps.sh   |  3 +++
 src/queuelat/get_cpuinfo_mhz.sh          |  3 +++
 src/queuelat/queuelat.c                  |  8 +++++++
 src/queuelat/targeted-ipi/targeted-ipi.c |  7 ++++++
 src/rt-migrate-test/rt-migrate-test.c    | 19 +----------------
 src/sched_deadline/cyclicdeadline.c      |  8 +++++++
 src/sched_deadline/deadline_test.c       | 24 ++++++---------------
 src/signaltest/signaltest.c              |  2 ++
 src/sigwaittest/sigwaittest.c            |  2 ++
 src/ssdd/ssdd.c                          | 12 +++++------
 src/svsematest/svsematest.c              | 16 ++------------
 33 files changed, 95 insertions(+), 238 deletions(-)

diff --git a/src/backfire/backfire.c b/src/backfire/backfire.c
index a8ac9f5e2b28..81a31d49f47b 100644
--- a/src/backfire/backfire.c
+++ b/src/backfire/backfire.c
@@ -1,22 +1,7 @@
+// SPDX-License-Identifier: GPL-2.0-or-later
 /*
  * backfire - send signal back to caller
- *
  * Copyright (C) 2007  Carsten Emde <C.Emde@osadl.org>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307,
- * USA.
  */
 
 #include <linux/module.h>
diff --git a/src/cyclictest/cyclictest.c b/src/cyclictest/cyclictest.c
index 1c515ae1354c..1862435e7a8c 100644
--- a/src/cyclictest/cyclictest.c
+++ b/src/cyclictest/cyclictest.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0-or-later
 /*
  * High resolution timer test software
  *
@@ -6,10 +7,6 @@
  * (C) 2008-2012 Clark Williams <williams@redhat.com>
  * (C) 2005-2007 Thomas Gleixner <tglx@linutronix.de>
  *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License Version
- * 2 as published by the Free Software Foundation.
- *
  */
 #include <stdio.h>
 #include <stdlib.h>
diff --git a/src/cyclictest/rt_numa.h b/src/cyclictest/rt_numa.h
index 983502d34c94..1f7c5a482150 100644
--- a/src/cyclictest/rt_numa.h
+++ b/src/cyclictest/rt_numa.h
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0-or-later
 /*
  * A numa library for cyclictest.
  * The functions here are designed to work whether cyclictest has been
diff --git a/src/hackbench/hackbench.c b/src/hackbench/hackbench.c
index ba804f519950..5a883d341f2e 100644
--- a/src/hackbench/hackbench.c
+++ b/src/hackbench/hackbench.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0-or-later
 /*
  * This is the latest version of hackbench.c, that tests scheduler and
  * unix-socket (or pipe) performance.
diff --git a/src/hwlatdetect/hwlatdetect.py b/src/hwlatdetect/hwlatdetect.py
index c11a6f8ea5b1..b69e660b113a 100755
--- a/src/hwlatdetect/hwlatdetect.py
+++ b/src/hwlatdetect/hwlatdetect.py
@@ -1,14 +1,10 @@
 #!/usr/bin/python3
 
+# SPDX-License-Identifier: GPL-2.0-or-later
+
 # (C) 2018,2019 Clark Williams <williams@redhat.com>
 # (C) 2015,2016 Clark Williams <williams@redhat.com>
 # (C) 2009 Clark Williams <williams@redhat.com>
-#
-# This program is free software; you can redistribute it and/or
-# modify it under the terms of the GNU General Public License Version 2
-# as published by the Free Software Foundation.
-
-
 
 import sys
 import os
diff --git a/src/include/bionic.h b/src/include/bionic.h
index 54f9c54b0824..e0433437f5d2 100644
--- a/src/include/bionic.h
+++ b/src/include/bionic.h
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0-or-later
 #ifndef BIONIC_H
 #define BIONIC_H
 
diff --git a/src/include/error.h b/src/include/error.h
index 4acff4952dd6..d205e49ff041 100644
--- a/src/include/error.h
+++ b/src/include/error.h
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0-or-later
 #ifndef __ERROR_H
 #define __ERROR_H
 
diff --git a/src/include/pip_stress.h b/src/include/pip_stress.h
index 8ed24522851c..ee8b545ab117 100644
--- a/src/include/pip_stress.h
+++ b/src/include/pip_stress.h
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0-or-later
 #ifndef __PIP_STRESS_H
 #define __PIP_STRESS_H
 
diff --git a/src/include/rt-get_cpu.h b/src/include/rt-get_cpu.h
index 15d05fcb15fa..74bf8f0fac25 100644
--- a/src/include/rt-get_cpu.h
+++ b/src/include/rt-get_cpu.h
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0-or-later
 #ifndef __RT_GET_CPU_H
 #define __RT_GET_CPU_H
 #include <stdio.h>
diff --git a/src/include/rt-sched.h b/src/include/rt-sched.h
index 679c4bd10ae2..80171c76e0ee 100644
--- a/src/include/rt-sched.h
+++ b/src/include/rt-sched.h
@@ -1,23 +1,9 @@
+// SPDX-License-Identifier: GPL-2.0-or-later
 /*
-   rt-sched.h - sched_setattr() and sched_getattr() API
-
-   (C) Dario Faggioli <raistlin@linux.it>, 2009, 2010
-   Copyright (C) 2014 BMW Car IT GmbH, Daniel Wagner <daniel.wagner@bmw-carit.de
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 2 of the License, or
-   (at your option) any later version.
-
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program; if not, write to the Free Software
-   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301
-   USA */
+ * rt-sched.h - sched_setattr() and sched_getattr() API
+ * (C) Dario Faggioli <raistlin@linux.it>, 2009, 2010
+ * Copyright (C) 2014 BMW Car IT GmbH, Daniel Wagner <daniel.wagner@bmw-carit.de
+ */
 
 /* This file is based on Dario Faggioli's libdl. Eventually it will be
    replaced by a proper implemenation of this API. */
diff --git a/src/include/rt-utils.h b/src/include/rt-utils.h
index 405fa7855346..6ec2b2011959 100644
--- a/src/include/rt-utils.h
+++ b/src/include/rt-utils.h
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0-or-later
 #ifndef __RT_UTILS_H
 #define __RT_UTILS_H
 
diff --git a/src/lib/error.c b/src/lib/error.c
index b32aa0270780..4434a842da17 100644
--- a/src/lib/error.c
+++ b/src/lib/error.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0-or-later
 /*
  * Copyright (C) 2009 John Kacur <jkacur@redhat.com>
  *
diff --git a/src/lib/rt-get_cpu.c b/src/lib/rt-get_cpu.c
index 83430dd4d068..608cd9bb76e0 100644
--- a/src/lib/rt-get_cpu.c
+++ b/src/lib/rt-get_cpu.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0-or-later
 /*
  * Copyright (C) 2009 John Kacur <jkacur@redhat.com>
  */
diff --git a/src/lib/rt-sched.c b/src/lib/rt-sched.c
index 4a8e3c42b49f..2aaf02d42aee 100644
--- a/src/lib/rt-sched.c
+++ b/src/lib/rt-sched.c
@@ -1,23 +1,10 @@
+// SPDX-License-Identifier: GPL-2.0-or-later
 /*
-   rt-sched.h - sched_setattr() and sched_getattr() API
-
-   (C) Dario Faggioli <raistlin@linux.it>, 2009, 2010
-   Copyright (C) 2014 BMW Car IT GmbH, Daniel Wagner <daniel.wagner@bmw-carit.de
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 2 of the License, or
-   (at your option) any later version.
-
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program; if not, write to the Free Software
-   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301
-   USA */
+ * rt-sched.h - sched_setattr() and sched_getattr() API
+ *
+ * (C) Dario Faggioli <raistlin@linux.it>, 2009, 2010
+ * Copyright (C) 2014 BMW Car IT GmbH, Daniel Wagner <daniel.wagner@bmw-carit.de
+ */
 
 /* This file is based on Dario Faggioli's libdl. Eventually it will be
    replaced by a proper implemenation of this API. */
diff --git a/src/lib/rt-utils.c b/src/lib/rt-utils.c
index e1b166afcd6c..1998a327d036 100644
--- a/src/lib/rt-utils.c
+++ b/src/lib/rt-utils.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0-or-later
 /*
  * Copyright (C) 2009 Carsten Emde <carsten.emde@osadl.org>
  * Copyright (C) 2010 Clark Williams <williams@redhat.com>
diff --git a/src/pi_tests/classic_pi.c b/src/pi_tests/classic_pi.c
index 695ee4c4bd03..64af8890276f 100644
--- a/src/pi_tests/classic_pi.c
+++ b/src/pi_tests/classic_pi.c
@@ -1,22 +1,8 @@
+// SPDX-License-Identifier: GPL-2.0-or-later
 /*
-  classic_pi - Classic Priority Inversion deadlock test case
-  
-   Copyright (C) 2006, 2007 Clark Williams <williams@redhat.com>
-  
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 2 of the License, or
-   (at your option) any later version.
-
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program; if not, write to the Free Software
-   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301
-   USA */
+ * classic_pi - Classic Priority Inversion deadlock test case
+ * Copyright (C) 2006, 2007 Clark Williams <williams@redhat.com>
+ */
 
 /* This program tests Priority Inheritance mutexes and their ability
    to avoid Priority Inversion deadlocks
diff --git a/src/pi_tests/pi_stress.c b/src/pi_tests/pi_stress.c
index 1286370c474b..7fa98dfb9ad4 100644
--- a/src/pi_tests/pi_stress.c
+++ b/src/pi_tests/pi_stress.c
@@ -1,22 +1,8 @@
+// SPDX-License-Identifier: GPL-2.0-or-later
 /*
-   pi_stress - Priority Inheritance stress test
-
-   Copyright (C) 2006, 2007 Clark Williams <williams@redhat.com>
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 2 of the License, or
-   (at your option) any later version.
-
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program; if not, write to the Free Software
-   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301
-   USA */
+ * pi_stress - Priority Inheritance stress test
+ * Copyright (C) 2006, 2007 Clark Williams <williams@redhat.com>
+ */
 
 /* This program stress tests pthreads priority inheritance mutexes
 
diff --git a/src/pi_tests/pip_stress.c b/src/pi_tests/pip_stress.c
index e6cf0ce940ca..c9dbd992e15d 100644
--- a/src/pi_tests/pip_stress.c
+++ b/src/pi_tests/pip_stress.c
@@ -1,20 +1,8 @@
+// SPDX-License-Identifier: GPL-2.0-or-later
 /*
 	Pip stress - Priority Inheritance with processes
 
     Copyright (C) 2009, John Kacur <jkacur@redhat.com>
-
-    This program is free software: you can redistribute it and/or modify
-    it under the terms of the GNU General Public License as published by
-    the Free Software Foundation, either version 2 of the License, or
-    (at your option) any later version.
-
-    This program is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-    GNU General Public License for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
 
 /*
diff --git a/src/pi_tests/sigtest.c b/src/pi_tests/sigtest.c
index 0cf520c01335..17dd0d43bdc6 100644
--- a/src/pi_tests/sigtest.c
+++ b/src/pi_tests/sigtest.c
@@ -1,22 +1,8 @@
+// SPDX-License-Identifier: GPL-2.0-or-later
 /*
-  sigtest - simple little program to verify signal behavior
-  
-   Copyright (C) 2006, 2007 Clark Williams <williams@redhat.com>
-  
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 2 of the License, or
-   (at your option) any later version.
-
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program; if not, write to the Free Software
-   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301
-   USA */
+ * sigtest - simple little program to verify signal behavior
+ * Copyright (C) 2006, 2007 Clark Williams <williams@redhat.com>
+*/
 
 #include <stdio.h>
 #include <signal.h>
diff --git a/src/pi_tests/tst-mutexpi10.c b/src/pi_tests/tst-mutexpi10.c
index a63ea23ba621..97a345edd26e 100644
--- a/src/pi_tests/tst-mutexpi10.c
+++ b/src/pi_tests/tst-mutexpi10.c
@@ -1,25 +1,10 @@
+// SPDX-License-Identifier: LGPL-2.1-or-later
 /*
-   Classic Priority Inversion deadlock test case
-  
-   Copyright (C) 2006 Free Software Foundation, Inc.
-   This file is part of the GNU C Library.
-     Contributed by Clark Williams<williams@redhat.com>, 2006
-  
-   The GNU C Library is free software; you can redistribute it and/or
-   modify it under the terms of the GNU Lesser General Public License as
-   published by the Free Software Foundation; either version 2.1 of the
-   License, or (at your option) any later version.
-  
-   The GNU C Library is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   Lesser General Public License for more details.
-  
-   You should have received a copy of the GNU Lesser General Public
-   License along with the GNU C Library; see the file COPYING.LIB.  If not,
-   write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-   Boston, MA 02111-1307, USA.  */
-
+ * Classic Priority Inversion deadlock test case
+ * Copyright (C) 2006 Free Software Foundation, Inc.
+ * This file is part of the GNU C Library.
+ * Contributed by Clark Williams<williams@redhat.com>, 2006
+ */ 
 
 /* This program tests Priority Inheritance mutexes and their ability
    to avoid Priority Inversion deadlocks
diff --git a/src/pmqtest/pmqtest.c b/src/pmqtest/pmqtest.c
index 3ce799bd6319..3ce29252b9a2 100644
--- a/src/pmqtest/pmqtest.c
+++ b/src/pmqtest/pmqtest.c
@@ -1,22 +1,8 @@
+// SPDX-License-Identifier: GPL-2.0-or-later
 /*
  * pmqtest.c
  *
  * Copyright (C) 2009 Carsten Emde <C.Emde@osadl.org>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307,
- * USA.
  */
 
 #include <stdio.h>
diff --git a/src/ptsematest/ptsematest.c b/src/ptsematest/ptsematest.c
index 553759212ac9..78fa444c5578 100644
--- a/src/ptsematest/ptsematest.c
+++ b/src/ptsematest/ptsematest.c
@@ -1,22 +1,7 @@
+// SPDX-License-Identifier: GPL-2.0-or-later
 /*
  * ptsematest.c
- *
  * Copyright (C) 2009 Carsten Emde <C.Emde@osadl.org>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307,
- * USA.
  */
 
 #include <stdio.h>
diff --git a/src/queuelat/determine_maximum_mpps.sh b/src/queuelat/determine_maximum_mpps.sh
index 3acd6ba2e362..52d54c0f9065 100755
--- a/src/queuelat/determine_maximum_mpps.sh
+++ b/src/queuelat/determine_maximum_mpps.sh
@@ -1,5 +1,8 @@
 #!/bin/bash
 
+# SPDX-License-Identifier: GPL-2.0-or-later
+# Copyright (C) 2018 Marcelo Tosatti <mtosatti@redhat.com>
+
 #  A script to determine the maximum mpps. Logic:
 #  Increase mpps in 0.5 units 
 # 
diff --git a/src/queuelat/get_cpuinfo_mhz.sh b/src/queuelat/get_cpuinfo_mhz.sh
index fb5158f31040..eafdd9577424 100755
--- a/src/queuelat/get_cpuinfo_mhz.sh
+++ b/src/queuelat/get_cpuinfo_mhz.sh
@@ -1,5 +1,8 @@
 #!/bin/bash
 
+# SPDX-License-Identifier: GPL-2.0-or-later
+# Copyright (C) 2018 Marcelo Tosatti <mtosatti@redhat.com>
+
 mhz=`cat /proc/cpuinfo  | grep "cpu MHz" | uniq | cut -f 3 -d " "`
 echo $mhz
 
diff --git a/src/queuelat/queuelat.c b/src/queuelat/queuelat.c
index a5525e41776a..cccb50ef0cc4 100644
--- a/src/queuelat/queuelat.c
+++ b/src/queuelat/queuelat.c
@@ -1,3 +1,11 @@
+// SPDX-License-Identifier: GPL-2.0-or-later
+
+/*
+ * Copyright (C) 2018 Marcelo Tosatti <mtosatti@redhat.com>
+ * Copyright (C) 2019 John Kacur <jkacur@redhat.com>
+ * Copyright (C) 2019 Clark Williams <williams@redhat.com>
+ */
+
 #include <string.h>
 #include <stdlib.h>
 #include <sys/types.h>
diff --git a/src/queuelat/targeted-ipi/targeted-ipi.c b/src/queuelat/targeted-ipi/targeted-ipi.c
index 4a10e0b24ecb..be2b153260c5 100644
--- a/src/queuelat/targeted-ipi/targeted-ipi.c
+++ b/src/queuelat/targeted-ipi/targeted-ipi.c
@@ -1,3 +1,10 @@
+// SPDX-License-Identifier: GPL-2.0-or-later
+/*
+ * Copyright (C) 2018 Marcelo Tosatti <mtosatti@redhat.com>
+ * Copyright (C) 2019 John Kacur <jkacur@redhat.com>
+ * Copyright (C) 2019 Clark Williams <williams@redhat.com>
+ */
+
 #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
 
 #include <linux/module.h>
diff --git a/src/rt-migrate-test/rt-migrate-test.c b/src/rt-migrate-test/rt-migrate-test.c
index f0a285d1d45f..4863238edeb4 100644
--- a/src/rt-migrate-test/rt-migrate-test.c
+++ b/src/rt-migrate-test/rt-migrate-test.c
@@ -1,24 +1,7 @@
+// SPDX-License-Identifier: GPL-2.0-only
 /*
  * rt-migrate-test.c
- *
  * Copyright (C) 2007-2009 Steven Rostedt <srostedt@redhat.com>
- *
- * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License (not later!)
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- *
- * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  */
 #include <stdio.h>
 #ifndef __USE_XOPEN2K
diff --git a/src/sched_deadline/cyclicdeadline.c b/src/sched_deadline/cyclicdeadline.c
index 7b5e8b36c4ea..a08e28e73c42 100644
--- a/src/sched_deadline/cyclicdeadline.c
+++ b/src/sched_deadline/cyclicdeadline.c
@@ -1,3 +1,11 @@
+// SPDX-License-Identifier: GPL-2.0-only
+
+/*
+ * Copyright (C) 2016 Red Hat Inc, Steven Rostedt <srostedt@redhat.com>
+ * Copyright (C) 2019 John Kacur <jkacur@redhat.com>
+ * Copyright (C) 2019 Clark Williams <williams@redhat.com>
+ */
+
 #include <pthread.h>
 #include <stdarg.h>
 #include <stdlib.h>
diff --git a/src/sched_deadline/deadline_test.c b/src/sched_deadline/deadline_test.c
index 5b5f40dbb74d..4cef2609912e 100644
--- a/src/sched_deadline/deadline_test.c
+++ b/src/sched_deadline/deadline_test.c
@@ -1,22 +1,12 @@
+// SPDX-License-Identifier: GPL-2.0-only
+
 /*
  * Copyright (C) 2016 Red Hat Inc, Steven Rostedt <srostedt@redhat.com>
- *
- * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License (not later!)
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not,  see <http://www.gnu.org/licenses>
- *
- * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- *
+ * Copyright (C) 2019 John Kacur <jkacur@redhat.com>
+ * Copyright (C) 2019 Clark Williams <williams@redhat.com>
+ */
+
+/*
  * deadline_test.c
  *
  * This program is used to test the deadline scheduler (SCHED_DEADLINE tasks).
diff --git a/src/signaltest/signaltest.c b/src/signaltest/signaltest.c
index 4c952561d7f2..b5c86c5635cb 100644
--- a/src/signaltest/signaltest.c
+++ b/src/signaltest/signaltest.c
@@ -1,3 +1,5 @@
+// SPDX-License-Identifier: GPL-2.0-only
+
 /*
  * RT signal roundtrip test software
  *
diff --git a/src/sigwaittest/sigwaittest.c b/src/sigwaittest/sigwaittest.c
index 2d0c04132fa7..4678b68675b2 100644
--- a/src/sigwaittest/sigwaittest.c
+++ b/src/sigwaittest/sigwaittest.c
@@ -1,3 +1,5 @@
+// SPDX-License-Identifier: GPL-2.0-or-later
+
 /*
  * sigwaittest.c
  *
diff --git a/src/ssdd/ssdd.c b/src/ssdd/ssdd.c
index 080ed17107a8..f165da96e23a 100644
--- a/src/ssdd/ssdd.c
+++ b/src/ssdd/ssdd.c
@@ -1,3 +1,9 @@
+// SPDX-License-Identifier: GPL-2.0-or-later
+
+/*
+ * Copyright (C) 2019 Joe Korty <joe.korty@concurrent-rt.com>
+ */
+
 /*
  * Have a tracer do a bunch of PTRACE_SINGLESTEPs against
  * a tracee as fast as possible.  Create several of these
@@ -16,12 +22,6 @@
  * The tracer waits on each PTRACE_SINGLESTEP with a waitpid(2)
  * and checks that waitpid's return values for correctness.
  *
- * This program was originally written by
- * Joe Korty <joe.korty@concurrent-rt.com>
- * This program is free software; you can redistribute it and / or modify
- * it under the terms of the GNU General Public License Version 2
- * of the licence, or (at your option) any later version
- * see COPYING for more information
  */
 #include <stdio.h>
 #include <stdlib.h>
diff --git a/src/svsematest/svsematest.c b/src/svsematest/svsematest.c
index 15e36af76288..7c15393fe1be 100644
--- a/src/svsematest/svsematest.c
+++ b/src/svsematest/svsematest.c
@@ -1,22 +1,10 @@
+// SPDX-License-Identifier: GPL-2.0-or-later
+
 /*
  * svsematest.c
  *
  * Copyright (C) 2009 Carsten Emde <C.Emde@osadl.org>
  *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307,
- * USA.
  */
 
 #include <stdio.h>
-- 
2.20.1


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

* Re: [PATCH 8/8] rt-tests: Add SPDX tags
  2019-11-25 14:16 ` [PATCH 8/8] rt-tests: Add SPDX tags John Kacur
@ 2019-11-25 14:33   ` Sebastian Andrzej Siewior
  0 siblings, 0 replies; 7+ messages in thread
From: Sebastian Andrzej Siewior @ 2019-11-25 14:33 UTC (permalink / raw)
  To: John Kacur; +Cc: rt-users, Clark Williams

On 2019-11-25 15:16:44 [+0100], John Kacur wrote:
> diff --git a/src/cyclictest/cyclictest.c b/src/cyclictest/cyclictest.c
> index 1c515ae1354c..1862435e7a8c 100644
> --- a/src/cyclictest/cyclictest.c
> +++ b/src/cyclictest/cyclictest.c
> @@ -1,3 +1,4 @@
> +// SPDX-License-Identifier: GPL-2.0-or-later
>  /*
>   * High resolution timer test software
>   *
> @@ -6,10 +7,6 @@
>   * (C) 2008-2012 Clark Williams <williams@redhat.com>
>   * (C) 2005-2007 Thomas Gleixner <tglx@linutronix.de>
>   *
> - * This program is free software; you can redistribute it and/or
> - * modify it under the terms of the GNU General Public License Version
> - * 2 as published by the Free Software Foundation.
> - *
>   */

The original text says v2 (only). You replace it with v2-or-later.

> diff --git a/src/hackbench/hackbench.c b/src/hackbench/hackbench.c
> index ba804f519950..5a883d341f2e 100644
> --- a/src/hackbench/hackbench.c
> +++ b/src/hackbench/hackbench.c
> @@ -1,3 +1,4 @@
> +// SPDX-License-Identifier: GPL-2.0-or-later
>  /*
>   * This is the latest version of hackbench.c, that tests scheduler and
>   * unix-socket (or pipe) performance.

The "original"
(https://web.archive.org/web/20090701000000*/http://devresources.linux-foundation.org/craiger/hackbench/src/hackbench.c)

was imported to rt-eval and then moved to rt-tests. I know at some point
Ingo (and others) heavily modified it. But the license was never
published/stated so I'm unsure if it can become GPLv2-or-later.

I'm not an expert but I don't think this is correct.

Sebastian

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

end of thread, back to index

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-25 14:16 [PATCH 1/8] rt-tests: queuelat: Fix some warnings in determine_maximum_mpps.sh John Kacur
2019-11-25 14:16 ` [PATCH 2/8] rt-tests: ssdd: Add short and long functions as well as help John Kacur
2019-11-25 14:16 ` [PATCH 5/8] rt-tests: cyclictest: Get a snapshot of cyclictest without interuppting it John Kacur
2019-11-25 14:16 ` [PATCH 6/8] cyclictest: Sync manpage with the help option John Kacur
2019-11-25 14:16 ` [PATCH 7/8] svsematest: Add -S, --smp option to manpage John Kacur
2019-11-25 14:16 ` [PATCH 8/8] rt-tests: Add SPDX tags John Kacur
2019-11-25 14:33   ` Sebastian Andrzej Siewior

Linux-rt-users archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-rt-users/0 linux-rt-users/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-rt-users linux-rt-users/ https://lore.kernel.org/linux-rt-users \
		linux-rt-users@vger.kernel.org
	public-inbox-index linux-rt-users

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-rt-users


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git