[CRIU] [PATCH 2/2] zdtm:mnt_ext_dev: output a message if ZDTM_MNT_EXT_DEV is not set

Dmitrii Shcherbakov dshcherbakov at virtuozzo.com
Sun Nov 20 22:24:25 PST 2016


Andrei,

Good catch - too much python lately. What is even worse is that it
"works" if you test the negative case only.

With a fixed version:

uname -r
4.4.0-47-generic

dpkg --status criu | grep -i version
Version: 2.0-2ubuntu3

root at ubuntu:/tmp/criu/test# losetup | grep -i zdtm
/dev/loop3         0      0         0  0
/home/administrator/src/criu/test/zdtm/static/zdtm.loop


root at ubuntu:/tmp/criu/test# sh -c 'ZDTM_MNT_EXT_DEV=/dev/loop3
./zdtm.py run -t zdtm/static/mnt_ext_dev'
Checking feature mnt_id
=== Run 1/1 ================

====================== Run zdtm/static/mnt_ext_dev in ns
=======================
Start test
Test is SUID
./mnt_ext_dev --pidfile=mnt_ext_dev.pid --outfile=mnt_ext_dev.out --
dirname=mnt_ext_dev.test
Run criu dump
Run criu restore
Send the 15 signal to  72
Wait for zdtm/static/mnt_ext_dev(72) to die for 0.100000
Removing dump/zdtm/static/mnt_ext_dev/43
====================== Test zdtm/static/mnt_ext_dev PASS
=======================

root at ubuntu:/tmp/criu/test# sh -c './zdtm.py run -t
zdtm/static/mnt_ext_dev'
=== Run 1/1 ================

======================= Run zdtm/static/mnt_ext_dev in h
=======================
Start test
./mnt_ext_dev --pidfile=mnt_ext_dev.pid --outfile=mnt_ext_dev.out --
dirname=mnt_ext_dev.test
Makefile:309: recipe for target 'mnt_ext_dev.pid' failed
make: *** [mnt_ext_dev.pid] Error 1
################## Test zdtm/static/mnt_ext_dev FAIL at start
##################
Test output: ================================
08:47:55.912:    32: ERR: mnt_ext_dev.c:33: ZDTM_MNT_EXT_DEV is not set
(errno = 2 (No such file or directory))
08:47:55.912:    31: ERR: test.c:229: Test exited unexpectedly with
code 1

 <<< ================================
##################################### FAIL
#####################################


On Пт, 2016-11-18 at 16:26 -0800, Andrei Vagin wrote:
> On Fri, Nov 18, 2016 at 12:05:12PM +0300, Dmitrii Shcherbakov wrote:
> > 
> > Should be easier to debug if the variable is not passed by
> > accident.
> > 
> > Signed-off-by: Dmitrii Shcherbakov <dshcherbakov at virtuozzo.com>
> > ---
> >  test/zdtm/static/mnt_ext_dev.c | 1 +
> >  1 file changed, 1 insertion(+)
> > 
> > diff --git a/test/zdtm/static/mnt_ext_dev.c
> > b/test/zdtm/static/mnt_ext_dev.c
> > index 7c3bd56..2560953 100644
> > --- a/test/zdtm/static/mnt_ext_dev.c
> > +++ b/test/zdtm/static/mnt_ext_dev.c
> > @@ -30,6 +30,7 @@ int main(int argc, char **argv)
> >  	mkdir(dirname, 0777);
> >  	loop = getenv("ZDTM_MNT_EXT_DEV");
> >  	if (loop == NULL)
> > +		pr_perror("ZDTM_MNT_EXT_DEV is not set");
> Have you tested this patch?
> > 
> >  		return 1;
> >  
> >  	if (mount(loop, dirname, "ext4", 0, NULL) == -1) {
-- 
Regards,
Dmitrii Shcherbakov




More information about the CRIU mailing list