[CRIU] [PATCHv2] fixed kernel version detection
Christopher Covington
cov at codeaurora.org
Thu Sep 18 05:46:28 PDT 2014
On 09/18/2014 08:39 AM, Matthias Neuer wrote:
> My debian testing produces the following output for uname:
> $ uname -r
> 3.14-2-amd64
>
> and so:
> $ set -- `uname -r | sed 's/\./ /g'`
> $ echo $1
> 3
> $ echo $2
> 14-2-amd64
>
> this causes zdtm.sh to fail for me on line 293:
> [ $1 -eq 3 -a $2 -ge 11 ] && return 0
>
> because "14-2-amd64 -ge 11" is false.
>
> Signed-off-by: Matthias Neuer <matthias.neuer at uni-ulm.de>
> ---
> test/zdtm.sh | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/test/zdtm.sh b/test/zdtm.sh
> index f6011ea..b9a7708 100755
> --- a/test/zdtm.sh
> +++ b/test/zdtm.sh
> @@ -291,7 +291,7 @@ git://git.kernel.org/pub/scm/linux/kernel/git/gorcunov/linux-cr.git
> ===================================================================
> EOF
>
> - set -- `uname -r | sed 's/\./ /g'`
> + set -- `uname -r | sed 's/[\.-]/ /g'`
>
> [ $1 -gt 3 ] && return 0
> [ $1 -eq 3 -a $2 -ge 11 ] && return 0
>
Reviewed-by: Christopher Covington <cov at codeaurora.org>
--
Employee of Qualcomm Innovation Center, Inc.
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
hosted by the Linux Foundation.
More information about the CRIU
mailing list