Skip to contentSkip to conversation

*** SUBJECT HERE ***

PATCH In review John Kacur 3 participants 11 messages Dec 14, 2009 – Dec 15, 2009 Kbuild

lore
Share & tools
lore

John Kacur

author
#0 lore raw

cover *** SUBJECT HERE ***

Clark:
Please pull the following patches from
git://git.kernel.org/pub/scm/linux/kernel/git/jkacur/rt-tests.git
branch: rt-tests-dev-carsten

These patches do two things
- They start the effort to separate common functionality into a library.
- They add a number of new tests.

I had to modify Carsten's original patches somewhat due to changes that have occurred since the original send.
In addition I separated them out a little bit, and added my own fixes.

Carsten Emde (4):
Start a separate library of functions for the rt-test suite. The
first couple are taken from cyclictest.
Make use of the library functions in cyclic test.
Make use of the new library functions in signaltest.
Add the following new tests - ptsematest - sigwaittest - svsematest -
sendme

John Kacur (3):
Use sched_getcpu - sched_getcpu is available since glibc 2.6 - the
current tests were broken in anycase.
Add the new tests to .gitignore
The version of check_privs that got added to the library must have
come from signaltest - because it doesn't have the fix that check_privs in cyclictest has - to return the sched_priority to 0

 .gitignore                    |    5 +
 Makefile                      |   43 ++-
 src/backfire/Makefile         |   14 +
 src/backfire/backfire.4       |   36 ++
 src/backfire/backfire.c       |  150 +++++++++
 src/backfire/sendme.8         |   42 +++
 src/backfire/sendme.c         |  291 +++++++++++++++++
 src/backfire/version.h        |    1 +
 src/cyclictest/cyclictest.c   |   84 +-----
 src/lib/rt-utils.c            |   66 ++++
 src/lib/rt-utils.h            |    6 +
 src/ptsematest/Makefile       |   16 +
 src/ptsematest/ptsematest.8   |   54 ++++
 src/ptsematest/ptsematest.c   |  423 +++++++++++++++++++++++++
 src/signaltest/signaltest.c   |   27 +--
 src/sigwaittest/Makefile      |   17 +
 src/sigwaittest/sigwaittest.8 |   57 ++++
 src/sigwaittest/sigwaittest.c |  618 ++++++++++++++++++++++++++++++++++++
 src/svsematest/Makefile       |   16 +
 src/svsematest/svsematest.8   |   57 ++++
 src/svsematest/svsematest.c   |  704 +++++++++++++++++++++++++++++++++++++++++
 21 files changed, 2621 insertions(+), 106 deletions(-)
 create mode 100644 src/backfire/Makefile
 create mode 100644 src/backfire/backfire.4
 create mode 100644 src/backfire/backfire.c
 create mode 100644 src/backfire/sendme.8
 create mode 100644 src/backfire/sendme.c
 create mode 100644 src/backfire/version.h
 create mode 100644 src/lib/rt-utils.c
 create mode 100644 src/lib/rt-utils.h
 create mode 100644 src/ptsematest/Makefile
 create mode 100644 src/ptsematest/ptsematest.8
 create mode 100644 src/ptsematest/ptsematest.c
 create mode 100644 src/sigwaittest/Makefile
 create mode 100644 src/sigwaittest/sigwaittest.8
 create mode 100644 src/sigwaittest/sigwaittest.c
 create mode 100644 src/svsematest/Makefile
 create mode 100644 src/svsematest/svsematest.8
 create mode 100644 src/svsematest/svsematest.c
author
#1 lore raw

PATCH 1/7 Start a separate library of functions for the rt-test suite. The first couple are taken from cyclictest.

From: Carsten Emde <[email protected]>

---
 src/lib/rt-utils.c |   65 ++++++++++++++++++++++++++++++++++++++++++++++++++++
 src/lib/rt-utils.h |    6 ++++
 2 files changed, 71 insertions(+), 0 deletions(-)
 create mode 100644 src/lib/rt-utils.c
 create mode 100644 src/lib/rt-utils.h
src/lib/rt-utils.c new file +65 -0
new file mode 100644
index 0000000..4e7597c
@@ -0,0 +1,65 @@
+#include <stdio.h>
+#include <string.h>
+#include <sched.h>
+#include "rt-utils.h"
+
+static char debugfileprefix[MAX_PATH];
+
+/*
+ * Finds the tracing directory in a mounted debugfs
+ */
+char *get_debugfileprefix(void)
+{
+	char type[100];
+	FILE *fp;
+	int size;
+
+	if (debugfileprefix[0] != '\0')
+		return debugfileprefix;
+
+	if ((fp = fopen("/proc/mounts","r")) == NULL)
+		return debugfileprefix;
+
+	while (fscanf(fp, "%*s %"
+		      STR(MAX_PATH)
+		      "s %99s %*s %*d %*d\n",
+		      debugfileprefix, type) == 2) {
+		if (strcmp(type, "debugfs") == 0)
+			break;
+	}
+	fclose(fp);
+
+	if (strcmp(type, "debugfs") != 0) {
+		debugfileprefix[0] = '\0';
+		return debugfileprefix;
+	}
+
+	size = sizeof(debugfileprefix) - strlen(debugfileprefix);
+	strncat(debugfileprefix, "/tracing/", size);
+
+	return debugfileprefix;
+}
+
+int check_privs(void)
+{
+	int policy = sched_getscheduler(0);
+	struct sched_param param;
+
+	/* if we're already running a realtime scheduler
+	 * then we *should* be able to change things later
+	 */
+	if (policy == SCHED_FIFO || policy == SCHED_RR)
+		return 0;
+
+	/* try to change to SCHED_FIFO */
+	param.sched_priority = 1;
+	if (sched_setscheduler(0, SCHED_FIFO, &param)) {
+		fprintf(stderr, "Unable to change scheduling policy!\n");
+		fprintf(stderr, "either run as root or join realtime group\n");
+		return 1;
+	}
+
+	/* we're good; change back and return success */
+	sched_setscheduler(0, policy, NULL);
+	return 0;
+}
src/lib/rt-utils.h new file +6 -0
new file mode 100644
index 0000000..e9c8cdd
@@ -0,0 +1,6 @@
+#define _STR(x) #x
+#define STR(x) _STR(x)
+#define MAX_PATH 256
+
+int check_privs(void);
+char *get_debugfileprefix(void);
Signature · 1 line
1.6.5.2
author
#2 lore raw

PATCH 2/7 Make use of the library functions in cyclic test.

From: Carsten Emde <[email protected]>

---
 Makefile                    |    6 ++-
 src/cyclictest/cyclictest.c |   84 ++++++------------------------------------
 2 files changed, 16 insertions(+), 74 deletions(-)
Makefile +4 -2
index d0c4da0..2bb0009 100644
@@ -8,17 +8,19 @@ prefix  ?= /usr/local
 bindir  ?= $(prefix)/bin
 mandir	?= $(prefix)/share/man/man8
 
-CFLAGS = -Wall -Wno-nonnull
+CFLAGS = -Wall -Wno-nonnull -Isrc/lib
 ifndef DEBUG
 	CFLAGS	+= -O2
 else
 	CFLAGS	+= -O0 -g
 endif
 
+UTILS	= src/lib/rt-utils.o
+
 .PHONY: all
 all: $(TARGETS)
 
-cyclictest: src/cyclictest/cyclictest.c
+cyclictest: src/cyclictest/cyclictest.c $(UTILS)
 	$(CC) $(CFLAGS) -D VERSION_STRING=$(VERSION_STRING) $^ -o $@ $(LIBS)
 
 signaltest: src/signaltest/signaltest.c
src/cyclictest/cyclictest.c +12 -71

135 lines not on this page · raw message

author
#3 lore raw

PATCH 3/7 Make use of the new library functions in signaltest.

From: Carsten Emde <[email protected]>

---
 Makefile                    |    2 +-
 src/signaltest/signaltest.c |   27 ++-------------------------
 2 files changed, 3 insertions(+), 26 deletions(-)
Makefile +1 -1
index 2bb0009..2507a1f 100644
@@ -23,7 +23,7 @@ all: $(TARGETS)
 cyclictest: src/cyclictest/cyclictest.c $(UTILS)
 	$(CC) $(CFLAGS) -D VERSION_STRING=$(VERSION_STRING) $^ -o $@ $(LIBS)
 
-signaltest: src/signaltest/signaltest.c
+signaltest: src/signaltest/signaltest.c $(UTILS)
 	$(CC) $(CFLAGS) -D VERSION_STRING=$(VERSION_STRING) $^ -o $@ $(LIBS)
 
 classic_pi: src/pi_tests/classic_pi.c
src/signaltest/signaltest.c +2 -24
index b637aae..e6016c9 100644
@@ -27,6 +27,8 @@
 #include <sys/time.h>
 #include <sys/mman.h>
 
+#include "rt-utils.h"
+
 #define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0]))
 
 /* Ugly, but .... */
@@ -306,31 +308,6 @@ static void print_stat(struct thread_param *par, int index, int verbose)
 	}
 }
 
-static int
-check_privs(void)
-{
-	int policy = sched_getscheduler(0);
-	struct sched_param param;
-
-	/* if we're already running a realtime scheduler
-	 * then we *should* be able to change things later
-	 */
-	if (policy == SCHED_FIFO || policy == SCHED_RR)
-		return 0;
-
-	/* try to change to SCHED_FIFO */
-	param.sched_priority = 1;
-	if (sched_setscheduler(0, SCHED_FIFO, &param)) {
-		fprintf(stderr, "Unable to change scheduling policy!\n");
-		fprintf(stderr, "either run as root or join realtime group\n");
-		return 1;
-	}
-
-	/* we're good; change back and return success */
-	sched_setscheduler(0, policy, NULL);
-	return 0;
-}
author
#4 lore raw

PATCH 4/7 Add the following new tests - ptsematest - sigwaittest - svsematest - sendme

From: Carsten Emde <[email protected]>

---
 Makefile                      |   35 ++-
 src/backfire/Makefile         |   14 +
 src/backfire/backfire.4       |   36 ++
 src/backfire/backfire.c       |  150 +++++++++
 src/backfire/sendme.8         |   42 +++
 src/backfire/sendme.c         |  291 +++++++++++++++++
 src/backfire/version.h        |    1 +
 src/ptsematest/Makefile       |   16 +
 src/ptsematest/ptsematest.8   |   54 ++++
 src/ptsematest/ptsematest.c   |  439 +++++++++++++++++++++++++
 src/sigwaittest/Makefile      |   17 +
 src/sigwaittest/sigwaittest.8 |   57 ++++
 src/sigwaittest/sigwaittest.c |  634 +++++++++++++++++++++++++++++++++++++
 src/svsematest/Makefile       |   16 +
 src/svsematest/svsematest.8   |   57 ++++
 src/svsematest/svsematest.c   |  704 +++++++++++++++++++++++++++++++++++++++++
 16 files changed, 2557 insertions(+), 6 deletions(-)
 create mode 100644 src/backfire/Makefile
 create mode 100644 src/backfire/backfire.4
 create mode 100644 src/backfire/backfire.c
 create mode 100644 src/backfire/sendme.8
 create mode 100644 src/backfire/sendme.c
 create mode 100644 src/backfire/version.h
 create mode 100644 src/ptsematest/Makefile
 create mode 100644 src/ptsematest/ptsematest.8
 create mode 100644 src/ptsematest/ptsematest.c
 create mode 100644 src/sigwaittest/Makefile
 create mode 100644 src/sigwaittest/sigwaittest.8
 create mode 100644 src/sigwaittest/sigwaittest.c
 create mode 100644 src/svsematest/Makefile
 create mode 100644 src/svsematest/svsematest.8
 create mode 100644 src/svsematest/svsematest.c
Makefile +29 -6
index 2507a1f..3a85336 100644
@@ -1,12 +1,14 @@
 VERSION_STRING = 0.56
 
 TARGETS	= cyclictest signaltest classic_pi pi_stress \
-	  hwlatdetect rt-migrate-test
+	  hwlatdetect rt-migrate-test ptsematest sigwaittest svsematest \
+	  sendme
 LIBS 	= -lpthread -lrt
 DESTDIR	?=
 prefix  ?= /usr/local
 bindir  ?= $(prefix)/bin
-mandir	?= $(prefix)/share/man/man8
+mandir	?= $(prefix)/share/man
+srcdir	?= $(prefix)/src
 
 CFLAGS = -Wall -Wno-nonnull -Isrc/lib
 ifndef DEBUG
@@ -39,6 +41,18 @@ hwlatdetect:  src/hwlatdetect/hwlatdetect.py
 rt-migrate-test: src/rt-migrate-test/rt-migrate-test.c
 	$(CC) $(CFLAGS) -D_GNU_SOURCE -D VERSION_STRING=\"$(VERSION_STRING)\" $^ -o $@ $(LIBS)
 
+ptsematest: src/ptsematest/ptsematest.c $(UTILS)
+	$(CC) $(CFLAGS) -D VERSION_STRING=$(VERSION_STRING) $^ -o $@ $(LIBS)
+
+sigwaittest: src/sigwaittest/sigwaittest.c $(UTILS)
+	$(CC) $(CFLAGS) -D VERSION_STRING=$(VERSION_STRING) $^ -o $@ $(LIBS)
+
+svsematest: src/svsematest/svsematest.c $(UTILS)
+	$(CC) $(CFLAGS) -D VERSION_STRING=$(VERSION_STRING) $^ -o $@ $(LIBS)
+
+sendme: src/backfire/sendme.c $(UTILS)
+	$(CC) $(CFLAGS) -D VERSION_STRING=$(VERSION_STRING) $^ -o $@ $(LIBS)
+
 CLEANUP  = $(TARGETS) *.o .depend *.*~ *.orig *.rej rt-tests.spec
 CLEANUP += $(if $(wildcard .git), ChangeLog)
 
@@ -57,11 +71,20 @@ changelog:
 
 .PHONY: all
 install: all
-	mkdir -p "$(DESTDIR)$(bindir)" "$(DESTDIR)$(mandir)"
+	mkdir -p "$(DESTDIR)$(bindir)" "$(DESTDIR)$(mandir)/man4"
+	mkdir -p "$(DESTDIR)$(bindir)" "$(DESTDIR)$(mandir)/man8"
 	cp $(TARGETS) "$(DESTDIR)$(bindir)"
-	gzip src/cyclictest/cyclictest.8 -c >"$(DESTDIR)$(mandir)/cyclictest.8.gz"
-	gzip src/pi_tests/pi_stress.8 -c >"$(DESTDIR)$(mandir)/pi_stress.8.gz"
-	gzip src/hwlatdetect/hwlatdetect.8 -c >"$(DESTDIR)$(mandir)/hwlatdetect.8.gz"
+	mkdir -p "$(DESTDIR)$(srcdir)/backfire"
+	sed s/__VERSION_STRING__/$(VERSION_STRING)/ <src/backfire/backfire.c >"$(DESTDIR)$(srcdir)/backfire/backfire.c"
+	cp src/backfire/Makefile "$(DESTDIR)$(srcdir)/backfire"
+	gzip src/backfire/backfire.4 -c >"$(DESTDIR)$(mandir)/man4/backfire.4.gz
+	gzip src/cyclictest/cyclictest.8 -c >"$(DESTDIR)$(mandir)/man8/cyclictest.8.gz"
+	gzip src/pi_tests/pi_stress.8 -c >"$(DESTDIR)$(mandir)/man8/pi_stress.8.gz"
+	gzip src/hwlatdetect/hwlatdetect.8 -c >"$(DESTDIR)$(mandir)/man8/hwlatdetect.8.gz"
+	gzip src/ptsematest/ptsematest.8 -c >"$(DESTDIR)$(mandir)/man8/ptsematest.8.gz"
+	gzip src/sigwaittest/sigwaittest.8 -c >"$(DESTDIR)$(mandir)/man8/sigwaittest.8.gz"
+	gzip src/svsematest/svsematest.8 -c >"$(DESTDIR)$(mandir)/man8/svsematest.8.gz"
+	gzip src/backfire/sendme.8 -c >"$(DESTDIR)$(mandir)/man8/sendme.8.gz"
 
 .PHONY: release
 release: clean changelog
src/backfire/Makefile new file +14 -0
new file mode 100644
index 0000000..33a0e02
@@ -0,0 +1,14 @@
+obj-m := backfire.o
+
+all:	modules modules_install
+	@echo Done
+
+modules:
+	make -C /lib/modules/$(shell uname -r)/build M=$(PWD) modules
+
+modules_install:
+	make -C /lib/modules/$(shell uname -r)/build M=$(PWD) modules_install
+
+clean:
+	make -C /lib/modules/$(shell uname -r)/build M=$(PWD) clean
+	@rm -f *.o Module.markers modules.order
src/backfire/backfire.4 new file +36 -0
new file mode 100644
index 0000000..66dccd1
@@ -0,0 +1,36 @@
+.TH "backfire" "4" "0.1" "" "Driver"
+.SH "NAME"
+.LP
+backfire \- send a signal from driver to user
+.SH "DESCRIPTION"
+.LP
+The \fBbackfire\fR driver reads a numerical string that is sent to the
+\fB/dev/backfire\fR device and sends the corresponding signal to the calling
+user program. Reading from \fB/dev/backfire\fR returns the time of the day
+when the most recent sent request was serviced or 0, if a sent request was
+not yet received. The time of the day is displayed in seconds since
+1970-01-01 00:00:00 UTC followed by the fraction of the second in
+microseconds separated by a comma.
+.SH "PURPOSE"
+.LP
+The \fBbackfire\fR driver is normally used in combination with the program
+\fBsendme\fR to benchmark the performance of the kernel's signal sending
+capabilities.
+.SH "EXAMPLES"
+.LP
+.nf
+head -1 /dev/backfire
+0,0
+trap "echo Got signal 7" 7
+echo 7 >/dev/backfire
+Got signal 7
+head -1 /dev/backfire
+1234567890,123456
+.fi
+.LP
+.SH "AUTHORS"
+.LP
+Carsten Emde <[email protected]>
+.SH "SEE ALSO"
+.LP
+sendme(8)
src/backfire/backfire.c new file +150 -0

150 lines not on this page · raw message

src/backfire/sendme.8 new file +42 -0

42 lines not on this page · raw message

src/backfire/sendme.c new file +291 -0

291 lines not on this page · raw message

src/backfire/version.h new file +1 -0
new file mode 100644
index 0000000..cbe3858
@@ -0,0 +1 @@
+#define VERSION "0.5"
src/ptsematest/Makefile new file +16 -0
new file mode 100644
index 0000000..c0bfa7c
@@ -0,0 +1,16 @@
+CFLAGS += -Wall -O2
+LDFLAGS += -lpthread
+
+all:	ptsematest
+	@echo Done
+
+ptsematest.o: ptsematest.c
+
+ptsematest:
+
+clean:
+	@rm -f *.o
+
+tar:	clean
+	@rm -f ptsematest
+	$(shell bn=`basename $$PWD`; cd ..; tar -zcf $$bn.tgz $$bn)
src/ptsematest/ptsematest.8 new file +54 -0

54 lines not on this page · raw message

src/ptsematest/ptsematest.c new file +439 -0

439 lines not on this page · raw message

src/sigwaittest/Makefile new file +17 -0
new file mode 100644
index 0000000..521daeb
@@ -0,0 +1,17 @@
+CFLAGS += -Wall -O2
+LDFLAGS += -lpthread -lrt
+
+all:	sigwaittest
+	@echo Done
+
+sigwaittest.o: sigwaittest.c
+
+sigwaittest:
+
+clean:
+	@rm -f *.o
+
+tar:	clean
+	@rm -f sigwaittest
+	$(shell bn=`basename $$PWD`; cd ..; tar -zcf $$bn.tgz $$bn)
+
src/sigwaittest/sigwaittest.8 new file +57 -0

57 lines not on this page · raw message

src/sigwaittest/sigwaittest.c new file +634 -0

634 lines not on this page · raw message

src/svsematest/Makefile new file +16 -0
new file mode 100644
index 0000000..aab2da0
@@ -0,0 +1,16 @@
+CFLAGS += -Wall -O2
+LDFLAGS += -lpthread -lrt
+
+all:	svsematest
+	@echo Done
+
+svsematest.o: svsematest.c
+
+svsematest:
+
+clean:
+	@rm -f *.o
+
+tar:	clean
+	@rm -f svsematest
+	$(shell bn=`basename $$PWD`; cd ..; tar -zcf $$bn.tgz $$bn)
src/svsematest/svsematest.8 new file +57 -0

57 lines not on this page · raw message

src/svsematest/svsematest.c new file +704 -0

704 lines not on this page · raw message

Signature · 1 line
1.6.5.2
author
#5 lore raw

PATCH 5/7 Use sched_getcpu - sched_getcpu is available since glibc 2.6 - the current tests were broken in anycase.

---
 src/ptsematest/ptsematest.c   |   18 +-----------------
 src/sigwaittest/sigwaittest.c |   18 +-----------------
 2 files changed, 2 insertions(+), 34 deletions(-)
src/ptsematest/ptsematest.c +1 -17
index e040417..c4426f3 100644
@@ -33,17 +33,13 @@
 #include <sys/time.h>
 #include <sys/mman.h>
 #include <linux/unistd.h>
+#include <utmpx.h>
 #include "rt-utils.h"
 
 #define __USE_GNU
 #include <pthread.h>
 
-#undef HAS_SCHED_GETCPU
-
 #define gettid() syscall(__NR_gettid)
-#ifndef HAS_SCHED_GETCPU
-#define getcpu(cpu, node, cache) syscall(__NR_getcpu, cpu, node, cache)
-#endif
 
 #define USEC_PER_SEC 1000000
 
@@ -112,13 +108,7 @@ void *semathread(void *param)
 			if(par->max_cycles && par->samples >= par->max_cycles)
 				par->shutdown = 1;
 			if (mustgetcpu) {
-#ifdef HAS_SCHED_GETCPU
 				par->cpu = sched_getcpu();
-#else
-				int c, s;
-	                        s = getcpu(&c, NULL, NULL);
-			        par->cpu = (s == -1) ? s : c;
-#endif
 			}
 		} else {
 			/* Receiver */
@@ -160,13 +150,7 @@ void *semathread(void *param)
 			if (par->max_cycles && par->samples >= par->max_cycles)
 				par->shutdown = 1;
 			if (mustgetcpu) {
-#ifdef HAS_SCHED_GETCPU
 				par->cpu = sched_getcpu();
-#else
-				int c, s;
-	                        s = getcpu(&c, NULL, NULL);
-			        par->cpu = (s == -1) ? s : c;
-#endif
 		        }
 			nanosleep(&par->delay, NULL);
 			pthread_mutex_unlock(&syncmutex[par->num]);
src/sigwaittest/sigwaittest.c +1 -17
index a3bbebc..740e13d 100644
@@ -35,17 +35,13 @@
 #include <sys/types.h>
 #include <sys/time.h>
 #include <linux/unistd.h>
+#include <utmpx.h>
 #include "rt-utils.h"
 
 #define __USE_GNU
 #include <pthread.h>
 
-#undef HAS_SCHED_GETCPU
-
 #define gettid() syscall(__NR_gettid)
-#ifndef HAS_SCHED_GETCPU
-#define getcpu(cpu, node, cache) syscall(__NR_getcpu, cpu, node, cache)
-#endif
 
 #define USEC_PER_SEC 1000000
 
@@ -143,13 +139,7 @@ void *semathread(void *param)
 				par->shutdown = 1;
 
 			if (mustgetcpu) {
-#ifdef HAS_SCHED_GETCPU
 				par->cpu = sched_getcpu();
-#else
-				int c, s;
-	                        s = getcpu(&c, NULL, NULL);
-			        par->cpu = (s == -1) ? s : c;
-#endif
 			}
 			sigwait(&sigset, &sig);
 		} else {
@@ -173,13 +163,7 @@ void *semathread(void *param)
 				par->shutdown = 1;
 
 			if (mustgetcpu) {
-#ifdef HAS_SCHED_GETCPU
 				par->cpu = sched_getcpu();
-#else
-				int c, s;
-	                        s = getcpu(&c, NULL, NULL);
-			        par->cpu = (s == -1) ? s : c;
-#endif
 		        }
 			/*
 			 * Latency is the time spent between sending and
Signature · 1 line
1.6.5.2
author
#6 lore raw

PATCH 6/7 Add the new tests to .gitignore

---
 .gitignore |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)
.gitignore +5 -0
index c77f406..d03a635 100644
@@ -18,3 +18,8 @@ hwlatdetect
 tags
 TAGS
 rt-migrate-test
+ptsematest
+sendme
+sigwaittest
+svsematest
+
Signature · 1 line
1.6.5.2
author
#7 lore raw

PATCH 7/7 The version of check_privs that got added to the library must have come from signaltest - because it doesn't have the fix that check_privs in cyclictest has - to return the sched_priority to 0

This is a good example of why common functions should be put into libraries - so all programs benefit from fixes.

---
 src/lib/rt-utils.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
src/lib/rt-utils.c +1 -0
index 4e7597c..417c38b 100644
@@ -60,6 +60,7 @@ int check_privs(void)
 	}
 
 	/* we're good; change back and return success */
+	param.sched_priority = 0;
 	sched_setscheduler(0, policy, NULL);
 	return 0;
 }
Signature · 1 line
1.6.5.2
#8 lore raw

Re: [PATCH 4/7] Add the following new tests - ptsematest - sigwaittest - svsematest - sendme

In reply to John Kacur

John,

thanks a lot for taking care of the new tests.

By some reason, the spec file was not included in the patch. This patch is needed to prevent the rpm build from finding installed but unpackaged files.

rt-tests.spec-in 2009-12-15 02:16:51.320459770 +0100 renamed from rt-tests.spec-in-orig 2009-12-15 02:15:36.724746547 +0100 +0 -0
@@ -36,10 +36,20 @@

/usr/bin/signaltest
/usr/bin/hwlatdetect
/usr/bin/rt-migrate-test
+/usr/bin/ptsematest
+/usr/bin/sendme
+/usr/bin/sigwaittest
+/usr/bin/svsematest
+
%doc
/usr/share/man/man8/cyclictest.8.gz
/usr/share/man/man8/pi_stress.8.gz
/usr/share/man/man8/hwlatdetect.8.gz
+/usr/share/man/man4/backfire.4.gz
+/usr/share/man/man8/ptsematest.8.gz
+/usr/share/man/man8/sendme.8.gz
+/usr/share/man/man8/sigwaittest.8.gz
+/usr/share/man/man8/svsematest.8.gz

%changelog
* Thu Dec 10 2009 Clark Williams <[email protected]> - 0.56-1

#9 lore raw

Re: [PATCH 4/7] Add the following new tests - ptsematest - sigwaittest - svsematest - sendme

I've already fixed that after pulling John's branch. I'll push a 0.57 version of rt-tests with all these changes in just a bit.

Clark

Quoted 34 lines · On Tue, 15 Dec 2009 02:23:48 +0100 Carsten Emde <[email protected]> wrote:

John,

thanks a lot for taking care of the new tests.

By some reason, the spec file was not included in the patch. This patch is needed to prevent the rpm build from finding installed but unpackaged files.

rt-tests.spec-in 2009-12-15 02:16:51.320459770 +0100 renamed from rt-tests.spec-in-orig 2009-12-15 02:15:36.724746547 +0100 +10 -0
@@ -36,10 +36,20 @@
 /usr/bin/signaltest
 /usr/bin/hwlatdetect
 /usr/bin/rt-migrate-test
+/usr/bin/ptsematest
+/usr/bin/sendme
+/usr/bin/sigwaittest
+/usr/bin/svsematest
+
 %doc
 /usr/share/man/man8/cyclictest.8.gz
 /usr/share/man/man8/pi_stress.8.gz
 /usr/share/man/man8/hwlatdetect.8.gz
+/usr/share/man/man4/backfire.4.gz
+/usr/share/man/man8/ptsematest.8.gz
+/usr/share/man/man8/sendme.8.gz
+/usr/share/man/man8/sigwaittest.8.gz
+/usr/share/man/man8/svsematest.8.gz
 
 %changelog
 * Thu Dec 10 2009 Clark Williams <[email protected]> - 0.56-1
author
#10 lore raw

Re: [PATCH 4/7] Add the following new tests - ptsematest - sigwaittest - svsematest - sendme

In reply to Carsten Emde
Quoted 10 lines · ----- "Carsten Emde

John,

thanks a lot for taking care of the new tests.

By some reason, the spec file was not included in the patch. This patch is needed to prevent the rpm build from finding installed but unpackaged files.

Thanks Carsten - applied.
Clark, you can pull it from branch rt-tests-dev
in git://git.kernel.org/pub/scm/linux/kernel/git/jkacur/rt-tests.git