[CRIU] [RFC PATCHv2 07/32] zdtm: zdtm.py: properly handle 'crlib' in group tests

Ivan Shapovalov intelfx at intelfx.name
Mon Mar 14 08:19:02 PDT 2016


On 2016-03-14 at 14:36 +0300, Pavel Emelyanov wrote:
> On 03/12/2016 11:42 AM, Ivan Shapovalov wrote:
> 
> What does "properly" means?

That is, _support_ crlib in group tests. In case of a group test,
self.__name does not point to a test binary, hence existing code
adds a wrong directory to criu's -L path and crlib does not work.

-- 
Ivan Shapovalov / intelfx /

> 
> > 
> > Signed-off-by: Ivan Shapovalov <intelfx at intelfx.name>
> > ---
> >  test/zdtm.py | 5 ++++-
> >  1 file changed, 4 insertions(+), 1 deletion(-)
> > 
> > diff --git a/test/zdtm.py b/test/zdtm.py
> > index 79ffcd1..bdf50b2 100755
> > --- a/test/zdtm.py
> > +++ b/test/zdtm.py
> > @@ -395,7 +395,10 @@ class zdtm_test:
> >  		if self.__flavor.ns:
> >  			opts += ["--root", self.__flavor.root]
> >  		if test_flag(self.__desc, 'crlib'):
> > -			opts += ["-L",
> > os.path.dirname(os.path.realpath(self.__name)) + '/lib']
> > +			for test in self._bins:
> > +				lib =
> > os.path.dirname(os.path.realpath(test)) + '/lib'
> > +				if os.path.isdir(lib):
> > +					opts += ["-L", lib]
> >  		return opts
> >  
> >  	def getdopts(self):
> > 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: This is a digitally signed message part
URL: <http://lists.openvz.org/pipermail/criu/attachments/20160314/41e157df/attachment.sig>


More information about the CRIU mailing list