summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohn Kacur <jkacur@redhat.com>2016-06-23 13:51:00 +0200
committerJohn Kacur <jkacur@redhat.com>2016-06-23 13:51:00 +0200
commitba6cf8f41e60f7b119bf5dc58e189e0dd0c29547 (patch)
tree289e3fcd5b42039d0e5a726c675277c75f56537a
parentb4e54ae39c132ebd124002841204665b59eee05b (diff)
downloadrt-tests-ba6cf8f41e60f7b119bf5dc58e189e0dd0c29547.tar.gz
rt-tests: Add cyclicdeadline and deadline_test to the Make system
- Add cyclicdeadline and deadline_test to the Makefile - Conditionally define _GNU_SOURCE in the new programs - Add the new programs to the .gitignore file Signed-off-by: John Kacur <jkacur@redhat.com>
-rw-r--r--.gitignore2
-rw-r--r--Makefile11
-rw-r--r--src/sched_deadline/cyclicdeadline.c2
-rw-r--r--src/sched_deadline/deadline_test.c2
4 files changed, 16 insertions, 1 deletions
diff --git a/.gitignore b/.gitignore
index ceee8bf..b8884d5 100644
--- a/.gitignore
+++ b/.gitignore
@@ -30,6 +30,8 @@ SRPMS
/pip_stress
/hackbench
/pmqtest
+/cyclicdeadline
+/deadline_test
rt-tests.spec
tags
diff --git a/Makefile b/Makefile
index d60282e..8c0294d 100644
--- a/Makefile
+++ b/Makefile
@@ -14,7 +14,9 @@ sources = cyclictest.c \
sendme.c \
signaltest.c \
sigwaittest.c \
- svsematest.c
+ svsematest.c \
+ cyclicdeadline.c \
+ deadline_test.c
TARGETS = $(sources:.c=)
LIBS = -lrt -lpthread
@@ -83,6 +85,7 @@ VPATH += src/pmqtest:
VPATH += src/backfire:
VPATH += src/lib:
VPATH += src/hackbench:
+VPATH += src/sched_deadline:
$(OBJDIR)/%.o: %.c | $(OBJDIR)
$(CC) -D VERSION=$(VERSION) -c $< $(CFLAGS) $(CPPFLAGS) -o $@
@@ -103,6 +106,12 @@ $(OBJDIR):
cyclictest: $(OBJDIR)/cyclictest.o $(OBJDIR)/librttest.a
$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $< $(LIBS) $(RTTESTLIB) $(NUMA_LIBS)
+cyclicdeadline: $(OBJDIR)/cyclicdeadline.o $(OBJDIR)/librttest.a
+ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $< $(LIBS) $(RTTESTLIB)
+
+deadline_test: $(OBJDIR)/deadline_test.o $(OBJDIR)/librttest.a
+ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $< $(LIBS) $(RTTESTLIB)
+
signaltest: $(OBJDIR)/signaltest.o $(OBJDIR)/librttest.a
$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $< $(LIBS) $(RTTESTLIB)
diff --git a/src/sched_deadline/cyclicdeadline.c b/src/sched_deadline/cyclicdeadline.c
index 9c50456..f530488 100644
--- a/src/sched_deadline/cyclicdeadline.c
+++ b/src/sched_deadline/cyclicdeadline.c
@@ -1,4 +1,6 @@
+#ifndef _GNU_SOURCE
#define _GNU_SOURCE
+#endif
#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 8a813c4..2794730 100644
--- a/src/sched_deadline/deadline_test.c
+++ b/src/sched_deadline/deadline_test.c
@@ -29,7 +29,9 @@
* Look for "simple_test"
*
*/
+#ifndef _GNU_SOURCE
#define _GNU_SOURCE
+#endif
#include <pthread.h>
#include <stdarg.h>
#include <stdlib.h>