[CRIU] [PATCH] criu: don't clean up submounts

Andrew Vagin avagin at parallels.com
Tue Aug 26 02:06:40 PDT 2014


On Tue, Aug 26, 2014 at 12:55:51PM +0400, Pavel Emelyanov wrote:
> On 08/25/2014 02:45 PM, Andrew Vagin wrote:
> > I'm scared, when I see smth like that:
> > rm: cannot remove ‘/var/lib/jenkins/jobs/CRIU/workspace/test/dump/static/cgroup00/31195/1/.criu.cgyard.6qctPl/systemd/tasks’: Operation not permitted
> > 
> > Reported-by: Mr Jenkins
> > Signed-off-by: Andrew Vagin <avagin at openvz.org>
> > ---
> >  Makefile               | 2 +-
> >  test/zdtm.sh           | 4 ++--
> >  test/zdtm/Makefile.inc | 4 +++-
> >  3 files changed, 6 insertions(+), 4 deletions(-)
> > 
> > diff --git a/Makefile b/Makefile
> > index 346f338..ee29cc7 100644
> > --- a/Makefile
> > +++ b/Makefile
> > @@ -25,7 +25,7 @@ export VERSION_SO_MAJOR VERSION_SO_MINOR
> >  
> >  FIND		:= find
> >  CSCOPE		:= cscope
> > -RM		:= rm -f
> > +RM		:= rm -f --one-file-system
> 
> Does --one-file-system make sense when the -r is absent?

No, it doesn't. But it does nothing in this case.

[avagin at localhost ~]$ touch xxxx
[avagin at localhost ~]$ rm -f --one-file-system xxxx
[avagin at localhost ~]$ echo $?
0

> 
> >  LD		:= $(CROSS_COMPILE)ld
> >  CC		:= $(CROSS_COMPILE)gcc
> >  NM		:= $(CROSS_COMPILE)nm
> > diff --git a/test/zdtm.sh b/test/zdtm.sh
> > index 06152a6..62994fe 100755
> > --- a/test/zdtm.sh
> > +++ b/test/zdtm.sh
> > @@ -677,7 +677,7 @@ EOF
> >  
> >  	cat $test.out
> >  	cat $test.out | grep -q PASS || return 2
> > -	[ "$CLEANUP" -ne 0 ] && rm -rf `dirname $ddump`
> > +	[ "$CLEANUP" -ne 0 ] && rm -rf --one-file-system `dirname $ddump`
> >  	echo "Test: $test, Result: PASS"
> >  	return 0
> >  }
> > @@ -942,5 +942,5 @@ else
> >  	fi
> >  fi
> >  
> > -[ -n "$TMP_TREE" ] && rm -rf $TMP_TREE
> > +[ -n "$TMP_TREE" ] && rm -rf --one-file-system $TMP_TREE
> >  [ -n "$ZDTM_FAILED" ] && exit 1 || exit 0
> > diff --git a/test/zdtm/Makefile.inc b/test/zdtm/Makefile.inc
> > index 215609b..510dc52 100644
> > --- a/test/zdtm/Makefile.inc
> > +++ b/test/zdtm/Makefile.inc
> > @@ -29,4 +29,6 @@ else
> >  	Q =
> >  endif
> >  
> > -export E Q
> > +RM := rm -f --one-file-system
> > +
> > +export E Q RM
> > 
> 


More information about the CRIU mailing list