mirror of
https://github.com/checkpoint-restore/criu
synced 2025-09-01 23:05:39 +00:00
test: Merge zdtm/live streaming and transition tests
These two sets are the same -- they test something and ask to be C/R-ed at the time they do it. No other differences. Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
SUBDIRS = streaming transition static
|
SUBDIRS = transition static
|
||||||
|
|
||||||
default: all
|
default: all
|
||||||
.PHONY: default
|
.PHONY: default
|
||||||
|
@@ -1,91 +0,0 @@
|
|||||||
include ../../Makefile.inc
|
|
||||||
|
|
||||||
LIBDIR = ../../lib
|
|
||||||
LIB = $(LIBDIR)/libzdtmtst.a
|
|
||||||
override CPPFLAGS += -I$(LIBDIR)
|
|
||||||
CFLAGS = -g -O2 -Wall -Werror -fno-strict-aliasing
|
|
||||||
CFLAGS += $(USERCFLAGS)
|
|
||||||
|
|
||||||
TST_NOFILE = \
|
|
||||||
pipe_loop00 \
|
|
||||||
pipe_shared00 \
|
|
||||||
socket_loop00 \
|
|
||||||
netlink00 \
|
|
||||||
file_aio \
|
|
||||||
socket-tcp \
|
|
||||||
socket-tcp6 \
|
|
||||||
|
|
||||||
TST_FILE = \
|
|
||||||
unix_sock \
|
|
||||||
fifo_dyn \
|
|
||||||
fifo_loop \
|
|
||||||
|
|
||||||
TST = $(TST_NOFILE) $(TST_FILE)
|
|
||||||
SRC = $(TST:%=%.c)
|
|
||||||
OBJ = $(SRC:%.c=%.o)
|
|
||||||
DEP = $(SRC:%.c=%.d)
|
|
||||||
PID = $(TST:%=%.pid)
|
|
||||||
OUT = $(TST:%=%.out)
|
|
||||||
|
|
||||||
DEPEND.c = $(COMPILE.c) -MM -MP
|
|
||||||
%.d: %.c
|
|
||||||
$(DEPEND.c) $(OUTPUT_OPTION) $<
|
|
||||||
|
|
||||||
all: $(TST)
|
|
||||||
install: all
|
|
||||||
.PHONY: all install
|
|
||||||
|
|
||||||
$(TST_NOFILE:%=%.pid): %.pid: %
|
|
||||||
$(<D)/$(<F) --pidfile=$@ --outfile=$<.out
|
|
||||||
|
|
||||||
$(TST_FILE:%=%.pid): %.pid: %
|
|
||||||
$(<D)/$(<F) --pidfile=$@ --outfile=$<.out --filename=$<.test
|
|
||||||
|
|
||||||
%.out: %.pid %
|
|
||||||
-kill -TERM `cat $<`
|
|
||||||
|
|
||||||
start: $(PID)
|
|
||||||
|
|
||||||
%.is_running: %.pid
|
|
||||||
kill -0 `cat $<`
|
|
||||||
|
|
||||||
check_start: $(PID:%.pid=%.is_running)
|
|
||||||
|
|
||||||
stop:
|
|
||||||
-kill -TERM `cat *.pid`
|
|
||||||
|
|
||||||
WAIT_TIME=10
|
|
||||||
wait_stop:
|
|
||||||
-for i in `seq 1 $(WAIT_TIME)`; do \
|
|
||||||
kill -0 `cat *.pid 2>/dev/null` 2>/dev/null || break; \
|
|
||||||
sleep 1; \
|
|
||||||
done
|
|
||||||
|
|
||||||
$(TST): $(LIB)
|
|
||||||
|
|
||||||
file_aio: override LDLIBS += -lrt -pthread
|
|
||||||
socket-tcp: override CFLAGS += -D STREAM
|
|
||||||
socket-tcp6: override CFLAGS += -D ZDTM_IPV6 -D STREAM
|
|
||||||
|
|
||||||
$(LIB): force
|
|
||||||
$(Q) $(MAKE) -C $(LIBDIR)
|
|
||||||
|
|
||||||
clean:
|
|
||||||
$(RM) -f $(OBJ) $(TST) *~
|
|
||||||
|
|
||||||
cleandep: clean
|
|
||||||
$(RM) -f $(DEP)
|
|
||||||
|
|
||||||
%.cleanout: %
|
|
||||||
$(Q) $(RM) -f -r $<.pid $<.init.pid $<.out* $<.test
|
|
||||||
|
|
||||||
cleanout:
|
|
||||||
$(RM) -f *.pid *.out* *.test*
|
|
||||||
|
|
||||||
realclean: cleandep cleanout
|
|
||||||
|
|
||||||
.PHONY: force clean cleandep cleanout realclean start check_start stop wait_stop
|
|
||||||
|
|
||||||
ifeq ($(filter-out no-deps-targets, $(MAKECMDGOALS)),)
|
|
||||||
-include $(DEP)
|
|
||||||
endif
|
|
@@ -3,7 +3,7 @@ include ../../Makefile.inc
|
|||||||
LIBDIR = ../../lib
|
LIBDIR = ../../lib
|
||||||
LIB = $(LIBDIR)/libzdtmtst.a
|
LIB = $(LIBDIR)/libzdtmtst.a
|
||||||
override CPPFLAGS += -I$(LIBDIR)
|
override CPPFLAGS += -I$(LIBDIR)
|
||||||
CFLAGS = -g -O2 -Wall -Werror
|
CFLAGS = -g -O2 -Wall -Werror -fno-strict-aliasing
|
||||||
CFLAGS += $(USERCFLAGS)
|
CFLAGS += $(USERCFLAGS)
|
||||||
|
|
||||||
TST_NOFILE = \
|
TST_NOFILE = \
|
||||||
@@ -14,9 +14,21 @@ TST_NOFILE = \
|
|||||||
fork2 \
|
fork2 \
|
||||||
thread-bomb \
|
thread-bomb \
|
||||||
maps007 \
|
maps007 \
|
||||||
|
pipe_loop00 \
|
||||||
|
pipe_shared00 \
|
||||||
|
socket_loop00 \
|
||||||
|
netlink00 \
|
||||||
|
file_aio \
|
||||||
|
socket-tcp \
|
||||||
|
socket-tcp6 \
|
||||||
|
|
||||||
|
|
||||||
TST_FILE = \
|
TST_FILE = \
|
||||||
file_read \
|
file_read \
|
||||||
|
unix_sock \
|
||||||
|
fifo_dyn \
|
||||||
|
fifo_loop \
|
||||||
|
|
||||||
|
|
||||||
TST = $(TST_NOFILE) $(TST_FILE)
|
TST = $(TST_NOFILE) $(TST_FILE)
|
||||||
SRC = $(TST:%=%.c)
|
SRC = $(TST:%=%.c)
|
||||||
@@ -61,11 +73,14 @@ wait_stop:
|
|||||||
|
|
||||||
$(TST): $(LIB)
|
$(TST): $(LIB)
|
||||||
|
|
||||||
|
file_aio: override LDLIBS += -lrt -pthread
|
||||||
|
socket-tcp: override CFLAGS += -D STREAM
|
||||||
|
socket-tcp6: override CFLAGS += -D ZDTM_IPV6 -D STREAM
|
||||||
ptrace.o: override CFLAGS += -pthread
|
ptrace.o: override CFLAGS += -pthread
|
||||||
ptrace: override LDFLAGS += -pthread
|
ptrace: override LDFLAGS += -pthread
|
||||||
fork2: override CFLAGS += -D FORK2
|
fork2: override CFLAGS += -D FORK2
|
||||||
thread-bomb.o: override CFLAGS += -pthread
|
thread-bomb.o: override CFLAGS += -pthread
|
||||||
thread-bomb: override LDFLAGS += -pthread
|
thread-bomb: override LDFLAGS += -pthread
|
||||||
|
|
||||||
%: %.sh
|
%: %.sh
|
||||||
cp $< $@
|
cp $< $@
|
||||||
|
Reference in New Issue
Block a user