[CRIU] [PATCH 4/4] RFC: Make ZDTM run on embedded root filesystems

Andrew Vagin avagin at parallels.com
Fri Jul 11 00:56:51 PDT 2014


On Thu, Jul 10, 2014 at 04:59:28PM -0400, Christopher Covington wrote:
> Hi Andrew,
> 
> On 07/10/2014 04:13 PM, Andrew Vagin wrote:
> > On Thu, Jul 10, 2014 at 11:09:07AM -0400, Christopher Covington wrote:
> >> Modify the ZDTM script so that it can run on minimalistic root
> >> filesystems without much more than busybox.
> > 
> > Is it really needed?
> 
> It would make testing changes across multiple architectures a lot easier. What
> root filesystems do you use for testing? What are the cumulative disk space
> and boot time requirements? On AArch64 for example the OpenEmbedded root
> filesystem from Linaro took forever to boot on simulators last time I checked.
> Running busybox init is way faster.
> 
> In my opinion, the easier it is to run the tests, the more often they will be
> run and the higher quality CRIU will become.

Yes, I'm agree with this fact. How do you compile sources? You probably
should have a full root for that? Maybe we can mount this root for
testing? Or maybe we can construct a minimal root like we do for
executing test in namespaces.

I want to avoid moving logic from Makefile to zdtm.sh.

zdtm is used for testing OpenVZ and I use make for debuging tests, so
we can't remove this logic from Makefiles. But supporting the same logic
in two places is not a good idea and we need to avoid that.

So lets try to find a way how to construct a root fs with make and only
if we will not find how to do that, we will adopt this patch.

Thanks.

> 
> >> Signed-off-by: Christopher Covington <cov at codeaurora.org>
> >> ---
> >>  test/zdtm.sh | 63 ++++++++++++++++++++++++++----------------------------------
> >>  1 file changed, 27 insertions(+), 36 deletions(-)
> >>
> >> diff --git a/test/zdtm.sh b/test/zdtm.sh
> >> index 479427a..517f2a4 100755
> >> --- a/test/zdtm.sh
> >> +++ b/test/zdtm.sh
> >> @@ -255,30 +255,7 @@ check_criu()
> >>  
> >>  check_mainstream()
> >>  {
> >> -	local -a ver_arr
> >> -	local ver_str=`uname -r`
> >> -
> >> -	zdtm_sep "CRIU CHECK"
> >> -
> >> -	$CRIU check && return 0
> >> -	MAINSTREAM_KERNEL=1
> >> -
> >> -	cat >&2 <<EOF
> >> -============================= WARNING =============================
> >> -Not all features needed for CRIU are merged to upstream kernel yet,
> >> -so for now we maintain our own branch which can be cloned from:
> >> -git://git.kernel.org/pub/scm/linux/kernel/git/gorcunov/linux-cr.git
> >> -===================================================================
> >> -EOF
> >> -
> >> -	ver_arr=(`echo ${ver_str//./ }`)
> >> -
> >> -	[ "${ver_arr[0]}" -gt 3 ] && return 0
> >> -	[[ "${ver_arr[0]}" -eq 3 && "${ver_arr[1]}" -ge 11 ]] && return 0
> >> -
> >> -	echo "A version of kernel should be greater or equal to 3.11" >&2
> >> -
> >> -	return 1
> >> +	return 0
> > 
> > You must understand that this patch can't be committed.
> 
> Please tell me how it should change. I posted this early draft with the
> Request For Comments prefix in the hope of receiving some guidance from those
> more familiar with the script and makefiles.

For this case we can add a special option and check it at the begining of
this function.



More information about the CRIU mailing list