mirror of
https://github.com/checkpoint-restore/criu.git
synced 2026-07-22 09:39:13 +00:00
So here's the new test class that handles the test from groups set. The class is inherited from zdtm_test one as what it does is -- starts the pseudo-init in ns/uns flavors and asks one to spawn() the sub-tests from the list. All groups tests can only be run inside ns flavor, so if the host flavor is asked, just the pseudo-init is spawned. This is because using ns flavor is the easiest way to spawn all the sub tests under this init (however, h flavor can be supported by marking the pseudo-init as sub-reaper). On stop this pseudo-init is signalled to stop, it in turn stops all the sub-tests and then exits. When the pid namespace destruction is complete, the sub-tests .out-s are checked. Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
52 lines
947 B
Makefile
52 lines
947 B
Makefile
include ../Makefile.inc
|
|
|
|
CFLAGS = -g -O2 -Wall -Werror -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=0
|
|
CFLAGS += $(USERCFLAGS)
|
|
|
|
LIBDIR = .
|
|
LIB = libzdtmtst.a
|
|
GRPS = groups
|
|
|
|
LIBSRC = datagen.c msg.c parseargs.c test.c streamutil.c lock.c ns.c tcp.c fs.c
|
|
LIBOBJ = $(LIBSRC:%.c=%.o)
|
|
LIBDEP = $(LIBSRC:%.c=%.d)
|
|
|
|
DEPEND.c = $(COMPILE.c) -MM -MP
|
|
%.d: %.c
|
|
$(DEPEND.c) $(OUTPUT_OPTION) $<
|
|
|
|
all: $(LIB)
|
|
@true
|
|
install: all
|
|
.PHONY: all install
|
|
|
|
$(LIB): $(LIBOBJ)
|
|
$(Q) ar rv $@ $^
|
|
|
|
clean:
|
|
$(RM) -f $(LIBOBJ) $(LIB) *~
|
|
|
|
cleandep:
|
|
$(RM) -f $(LIBDEP)
|
|
|
|
cleanout:
|
|
@true
|
|
|
|
$(GRPS): $(LIB)
|
|
|
|
$(GRPS:%=%.pid): $(GRPS)
|
|
$(<D)/$(<F) --pidfile=$@ --outfile=$<.out
|
|
|
|
$(GRPS:%=%.out): $(GRPS:%=%.pid)
|
|
-kill -TERM `cat $<`
|
|
|
|
$(GRPS:%=%.cleanout): $(GRPS)
|
|
$(Q) $(RM) -f -r $<.pid $<.out* *$<.test* $<.*.test $<.state $<.init.pid
|
|
|
|
realclean: clean cleandep
|
|
|
|
.PHONY: clean cleandep cleanout realclean
|
|
|
|
ifeq ($(filter-out no-deps-targets, $(MAKECMDGOALS)),)
|
|
-include $(LIBDEP)
|
|
endif
|