Introduce empty rcu test
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Thu, 24 Nov 2022 17:36:32 +0000 (12:36 -0500)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Thu, 24 Nov 2022 17:36:44 +0000 (12:36 -0500)
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
.gitignore
Makefile
src/rcu.h
tests/Makefile [new file with mode: 0644]
tests/regression/Makefile [new file with mode: 0644]
tests/regression/side-rcu-test.c [new file with mode: 0644]

index 3ebeca930a7fbf64f1583212640aa5848b93dd32..27b12dc2b801d0d2f040db7f33c91d3b1de7e5ae 100644 (file)
@@ -1,2 +1,3 @@
 /src/test
+/tests/regression/side-rcu-test
 *.o
index 9fe370352e6edfe85bf45604ba72fa309d850471..ccc4ea117ed088bbdc587c9c6d07cf71a89d815b 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,10 +1,10 @@
-SUBDIRS := src/
+SUBDIRS := src/ tests/
 
 all: $(SUBDIRS)
 $(SUBDIRS):
        $(MAKE) -C $@
 
 clean:
-       $(MAKE) clean -C src/
+       for dir in $(SUBDIRS); do $(MAKE) clean -C $$dir; done
 
-.PHONY: all $(SUBDIRS) clean clean-$(SUBDIRS)
+.PHONY: all $(SUBDIRS) clean
index 6d4e4ecf0eb874d2c004a45d92841e737451028a..45a5eacb1706b6d1a7f403300695a9a9b1c07e30 100644 (file)
--- a/src/rcu.h
+++ b/src/rcu.h
 #include <pthread.h>
 #include <stdbool.h>
 #include <poll.h>
-#include <side/trace.h>
 #include <rseq/rseq.h>
 #include <linux/futex.h>
 #include <sys/time.h>
 #include <unistd.h>
 #include <sys/syscall.h>
+#include <side/macros.h>
 
 #define SIDE_CACHE_LINE_SIZE           256
 
diff --git a/tests/Makefile b/tests/Makefile
new file mode 100644 (file)
index 0000000..34b13a7
--- /dev/null
@@ -0,0 +1,10 @@
+SUBDIRS := regression/
+
+all: $(SUBDIRS)
+$(SUBDIRS):
+       $(MAKE) -C $@
+
+clean:
+       $(MAKE) clean -C regression/
+
+.PHONY: all $(SUBDIRS) clean clean-$(SUBDIRS)
diff --git a/tests/regression/Makefile b/tests/regression/Makefile
new file mode 100644 (file)
index 0000000..4b74ec6
--- /dev/null
@@ -0,0 +1,17 @@
+all: side-rcu-test
+
+HEADERS = ../../src/rcu.h
+
+CFLAGS = -g -O2 -Wall
+CPPFLAGS = -I../../include/ -D_GNU_SOURCE
+
+side-rcu-test.o: side-rcu-test.c $(HEADERS)
+       $(CC) $(CFLAGS) $(CPPFLAGS) -c -o $@ $<
+
+side-rcu-test: side-rcu-test.o ../../src/rcu.o ../../src/smp.o
+       $(CC) $(CFLAGS) -o $@ $^ -lrseq
+
+.PHONY: clean
+
+clean:
+       rm -f side-rcu-test *.o
diff --git a/tests/regression/side-rcu-test.c b/tests/regression/side-rcu-test.c
new file mode 100644 (file)
index 0000000..4d6b281
--- /dev/null
@@ -0,0 +1,6 @@
+#include "../../src/rcu.h"
+
+int main(int argc, char **argv)
+{
+       return 0;
+}
This page took 0.026667 seconds and 4 git commands to generate.