[CRIU] [PATCH 2/2] test/Makefile: use the override directive

Andrew Vagin avagin at odin.com
Fri May 1 09:08:57 PDT 2015


On Thu, Apr 30, 2015 at 01:52:42PM -0400, Christopher Covington wrote:
> Hi Andrew,
> 
> On 04/30/2015 12:17 PM, Andrew Vagin wrote:
> > It looks better
> > 
> > Signed-off-by: Andrew Vagin <avagin at openvz.org>
> > ---
> >  test/Makefile | 10 +++++++---
> >  1 file changed, 7 insertions(+), 3 deletions(-)
> > 
> > diff --git a/test/Makefile b/test/Makefile
> > index e9b9562..844bf7c 100644
> > --- a/test/Makefile
> > +++ b/test/Makefile
> > @@ -30,13 +30,17 @@ zdtm: zdtm-tst-list .FORCE
> >  	$(MAKE) -f Makefile.zdtm zdtm_ns_user
> >  
> >  zdtm-pre-dump: zdtm-tst-list
> > -	ZDTM_ARGS="-P -p -i 3 -C" $(MAKE) -f Makefile.zdtm ns/static/pipe00
> > +	$(MAKE) -f Makefile.zdtm ns/static/pipe00
> >  
> >  zdtm-snapshot: zdtm-tst-list
> > -	ZDTM_ARGS="-s -i 3 -C" $(MAKE) -f Makefile.zdtm ns/static/pipe00
> > +	$(MAKE) -f Makefile.zdtm ns/static/pipe00
> >  
> >  zdtm-iter: zdtm-tst-list
> > -	ZDTM_ARGS="-i 3 -C" $(MAKE) -f Makefile.zdtm ns/static/pipe00
> > +	$(MAKE) -f Makefile.zdtm ns/static/pipe00
> > +
> > +zdtm-pre-dump: override ZDTM_ARGS=-P -p -i 3 -C
> > +zdtm-snapshot: override ZDTM_ARGS=-s -i 3 -C
> > +zdtm-iter: override ZDTM_ARGS=-i 3 -C
> 
> I find this more difficult to follow. What about something like:
> 
>     Z="-P -p -i 3 -C"
>     $(MAKE) -f Makefile.zdtm ns/static/pipe00 ZDTM_ARGS=$(Z)


This doesn't work. I don't know why and I am not a big fun of
Makefiles:).

 zdtm-iter: zdtm-tst-list
-       ZDTM_ARGS="-i 3 -C" $(MAKE) -f Makefile.zdtm ns/static/pipe00
+       Z="-i 3 -C"
+       $(MAKE) -f Makefile.zdtm ns/static/pipe00 ZDTM_ARGS=$(Z)

[root at jenkins criu]# make -C test/ zdtm-iter
make: Entering directory '/root/criu/test'
Z="-i 3 -C"
make -f Makefile.zdtm ns/static/pipe00 ZDTM_ARGS=

ps:  We can drop the second patch. The first patch is
     still required.

> 
> Chris
> 
> -- 
> Qualcomm Innovation Center, Inc.
> The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
> a Linux Foundation Collaborative Project


More information about the CRIU mailing list