[CRIU] [PATCH 3/5] criu: check that ghost files are cleaned up in error cases

Andrew Vagin avagin at virtuozzo.com
Fri May 20 14:59:42 PDT 2016


On Fri, May 20, 2016 at 02:17:40PM +0300, Pavel Emelyanov wrote:
> > diff --git a/criu/include/fault-injection.h b/criu/include/fault-injection.h
> > index f1e5c72..1861702 100644
> > --- a/criu/include/fault-injection.h
> > +++ b/criu/include/fault-injection.h
> > @@ -7,6 +7,8 @@ enum faults {
> >  	FI_DUMP_EARLY,
> >  	FI_RESTORE_ROOT_ONLY,
> >  	FI_DUMP_PAGES,
> > +	FI_CLEAN_REMAPS,	/* before creating mount namespaces */
> > +	FI_CLEAN_REMAPS2,	/* after creating mount namespaces */
> 
> There's FI_RESTORE_ROOT_ONLY injection that was added exactly for
> this -- to check that ghost files are removed. Why is it not enough?

FI_CLEAN_REMAPS2 is executed when all tasks called restore_task_mnt_ns()

FI_RESTORE_ROOT_ONLY is called when a root task called
restore_task_mnt_ns()
> 
> >  	/* not fatal */
> >  	FI_CHECK_OPEN_HANDLE = 128,
> >  	FI_NO_MEMFD = 129,
> > diff --git a/test/jenkins/criu-fault.sh b/test/jenkins/criu-fault.sh
> > index 6a55aac..1ae51c6 100755
> > --- a/test/jenkins/criu-fault.sh
> > +++ b/test/jenkins/criu-fault.sh
> > @@ -8,3 +8,5 @@ prep
> >  ./test/zdtm.py run -t zdtm/static/inotify_irmap --fault 128 --keep-going --pre 2 -f uns || fail
> >  ./test/zdtm.py run -t zdtm/static/env00 --fault 129 -f uns || fail
> >  ./test/zdtm.py run -t zdtm/transition/fork --fault 130 -f h || fail
> > +./test/zdtm.py run -t zdtm/static/mntns_ghost --fault 5 || fail
> > +./test/zdtm.py run -t zdtm/static/mntns_ghost --fault 4 || fail
> > 
> 


More information about the CRIU mailing list