diff mbox series

[ovs-dev,2/2] travis: Test with latest stable kernel releases.

Message ID 20190520132939.14196-3-i.maximets@samsung.com
State Superseded
Headers show
Series travis: CDN download failures + latest stable kernels. | expand

Commit Message

Ilya Maximets May 20, 2019, 1:29 p.m. UTC
Instead of managing kernel minor versions manually we could always test
with the most recent stable release of the desired branch.

With this patch applied Travis will always check with the most recent
kernels, so we'll be notified about changes in upstream kernels that
breaks the build of our kernel module. However, this will also break
Travis checks on patches that doesn't touch the kernel parts until
we fix the module.

Signed-off-by: Ilya Maximets <i.maximets@samsung.com>
---

Whould like to here some opinions on this patch.

Also, right now we have a broken build with recent longterm 4.9.177.
So, this patch, probably, should not be applied before the build with
4.9.177 fixed.

 .travis.yml            | 32 ++++++++++++++++----------------
 .travis/linux-build.sh | 18 +++++++++++++++---
 2 files changed, 31 insertions(+), 19 deletions(-)

Comments

Ben Pfaff May 20, 2019, 11:17 p.m. UTC | #1
On Mon, May 20, 2019 at 04:29:39PM +0300, Ilya Maximets wrote:
> Instead of managing kernel minor versions manually we could always test
> with the most recent stable release of the desired branch.
> 
> With this patch applied Travis will always check with the most recent
> kernels, so we'll be notified about changes in upstream kernels that
> breaks the build of our kernel module. However, this will also break
> Travis checks on patches that doesn't touch the kernel parts until
> we fix the module.
> 
> Signed-off-by: Ilya Maximets <i.maximets@samsung.com>
> ---
> 
> Whould like to here some opinions on this patch.
> 
> Also, right now we have a broken build with recent longterm 4.9.177.
> So, this patch, probably, should not be applied before the build with
> 4.9.177 fixed.

I think it's pretty clever and I'm generally in favor of it, but I don't
have an idea of how often the Travis checks would break.  Maybe the only
easy way to find out is to try it.
Yifeng Sun May 20, 2019, 11:59 p.m. UTC | #2
I tested it and it works fine. Thanks.
Yifeng

Tested-by: Yifeng Sun <pkusunyifeng@gmail.com>
Reviewed-by: Yifeng Sun <pkusunyifeng@gmail.com>

On Mon, May 20, 2019 at 6:29 AM Ilya Maximets <i.maximets@samsung.com> wrote:
>
> Instead of managing kernel minor versions manually we could always test
> with the most recent stable release of the desired branch.
>
> With this patch applied Travis will always check with the most recent
> kernels, so we'll be notified about changes in upstream kernels that
> breaks the build of our kernel module. However, this will also break
> Travis checks on patches that doesn't touch the kernel parts until
> we fix the module.
>
> Signed-off-by: Ilya Maximets <i.maximets@samsung.com>
> ---
>
> Whould like to here some opinions on this patch.
>
> Also, right now we have a broken build with recent longterm 4.9.177.
> So, this patch, probably, should not be applied before the build with
> 4.9.177 fixed.
>
>  .travis.yml            | 32 ++++++++++++++++----------------
>  .travis/linux-build.sh | 18 +++++++++++++++---
>  2 files changed, 31 insertions(+), 19 deletions(-)
>
> diff --git a/.travis.yml b/.travis.yml
> index 765692f7a..6621fb535 100644
> --- a/.travis.yml
> +++ b/.travis.yml
> @@ -28,24 +28,24 @@ before_script: export PATH=$PATH:$HOME/bin
>
>  env:
>    - OPTS="--disable-ssl"
> -  - TESTSUITE=1 KERNEL=3.16.54
> +  - TESTSUITE=1 KERNEL=3.16
>    - TESTSUITE=1 OPTS="--enable-shared"
>    - BUILD_ENV="-m32" OPTS="--disable-ssl"
> -  - KERNEL=3.16.65 DPDK=1 OPTS="--enable-shared"
> -  - KERNEL=3.16.65 TESTSUITE=1 DPDK=1
> -  - KERNEL=3.16.65 DPDK_SHARED=1
> -  - KERNEL=3.16.65 DPDK_SHARED=1 OPTS="--enable-shared"
> -  - KERNEL=4.20.17
> -  - KERNEL=4.19.37
> -  - KERNEL=4.18.20
> -  - KERNEL=4.17.19
> -  - KERNEL=4.16.18
> -  - KERNEL=4.15.18
> -  - KERNEL=4.14.114
> -  - KERNEL=4.9.171
> -  - KERNEL=4.4.179
> -  - KERNEL=3.19.8
> -  - KERNEL=3.16.65
> +  - KERNEL=3.16 DPDK=1 OPTS="--enable-shared"
> +  - KERNEL=3.16 TESTSUITE=1 DPDK=1
> +  - KERNEL=3.16 DPDK_SHARED=1
> +  - KERNEL=3.16 DPDK_SHARED=1 OPTS="--enable-shared"
> +  - KERNEL=4.20
> +  - KERNEL=4.19
> +  - KERNEL=4.18
> +  - KERNEL=4.17
> +  - KERNEL=4.16
> +  - KERNEL=4.15
> +  - KERNEL=4.14
> +  - KERNEL=4.9
> +  - KERNEL=4.4
> +  - KERNEL=3.19
> +  - KERNEL=3.16
>    - TESTSUITE=1 LIBS=-ljemalloc
>
>  matrix:
> diff --git a/.travis/linux-build.sh b/.travis/linux-build.sh
> index c8c9748ac..b268bb60e 100755
> --- a/.travis/linux-build.sh
> +++ b/.travis/linux-build.sh
> @@ -21,11 +21,23 @@ function install_kernel()
>
>      cdn="https://cdn."
>      direct="https://www."
> -    link="kernel.org/pub/linux/kernel/${PREFIX}/linux-${1}.tar.xz"
> +    base_link="kernel.org/pub/linux/kernel/${PREFIX}"
> +    # Download page with list of all available kernel versions.
> +    wget ${direct}${base_link}/
> +    # Uncompress in case server returned gzipped page.
> +    (file index* | grep ASCII) || (mv index* index.new.gz && gunzip index*)
> +    # Get version of the latest stable release.
> +    hi_ver=$(echo ${1} | sed 's/\./\\\./')
> +    lo_ver=$(cat ./index* | grep -P -o "${hi_ver}\.[0-9]+" | \
> +             sed 's/.*\..*\.\(.*\)/\1/' | sort -h | tail -1)
> +    version="${1}.${lo_ver}"
> +
> +    link="${base_link}/linux-${version}.tar.xz"
>      # Download kernel sources. Try direct link on CDN failure.
>      wget ${cdn}${link} || wget ${cdn}${link} || wget ${direct}${link}
> -    tar xvf linux-${1}.tar.xz > /dev/null
> -    cd linux-${1}
> +
> +    tar xvf linux-${version}.tar.xz > /dev/null
> +    cd linux-${version}
>      make allmodconfig
>
>      # Cannot use CONFIG_KCOV: -fsanitize-coverage=trace-pc is not supported by compiler
> --
> 2.17.1
>
Ilya Maximets May 21, 2019, 12:51 p.m. UTC | #3
On 21.05.2019 2:17, Ben Pfaff wrote:
> On Mon, May 20, 2019 at 04:29:39PM +0300, Ilya Maximets wrote:
>> Instead of managing kernel minor versions manually we could always test
>> with the most recent stable release of the desired branch.
>>
>> With this patch applied Travis will always check with the most recent
>> kernels, so we'll be notified about changes in upstream kernels that
>> breaks the build of our kernel module. However, this will also break
>> Travis checks on patches that doesn't touch the kernel parts until
>> we fix the module.
>>
>> Signed-off-by: Ilya Maximets <i.maximets@samsung.com>
>> ---
>>
>> Whould like to here some opinions on this patch.
>>
>> Also, right now we have a broken build with recent longterm 4.9.177.
>> So, this patch, probably, should not be applied before the build with
>> 4.9.177 fixed.
> 
> I think it's pretty clever and I'm generally in favor of it, but I don't
> have an idea of how often the Travis checks would break.  Maybe the only
> easy way to find out is to try it.

I agree. I've sent rebased v2. So, we could apply it once build with 4.9.177
fixed and see what will happen.

Best regards, Ilya Maximets.
diff mbox series

Patch

diff --git a/.travis.yml b/.travis.yml
index 765692f7a..6621fb535 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -28,24 +28,24 @@  before_script: export PATH=$PATH:$HOME/bin
 
 env:
   - OPTS="--disable-ssl"
-  - TESTSUITE=1 KERNEL=3.16.54
+  - TESTSUITE=1 KERNEL=3.16
   - TESTSUITE=1 OPTS="--enable-shared"
   - BUILD_ENV="-m32" OPTS="--disable-ssl"
-  - KERNEL=3.16.65 DPDK=1 OPTS="--enable-shared"
-  - KERNEL=3.16.65 TESTSUITE=1 DPDK=1
-  - KERNEL=3.16.65 DPDK_SHARED=1
-  - KERNEL=3.16.65 DPDK_SHARED=1 OPTS="--enable-shared"
-  - KERNEL=4.20.17
-  - KERNEL=4.19.37
-  - KERNEL=4.18.20
-  - KERNEL=4.17.19
-  - KERNEL=4.16.18
-  - KERNEL=4.15.18
-  - KERNEL=4.14.114
-  - KERNEL=4.9.171
-  - KERNEL=4.4.179
-  - KERNEL=3.19.8
-  - KERNEL=3.16.65
+  - KERNEL=3.16 DPDK=1 OPTS="--enable-shared"
+  - KERNEL=3.16 TESTSUITE=1 DPDK=1
+  - KERNEL=3.16 DPDK_SHARED=1
+  - KERNEL=3.16 DPDK_SHARED=1 OPTS="--enable-shared"
+  - KERNEL=4.20
+  - KERNEL=4.19
+  - KERNEL=4.18
+  - KERNEL=4.17
+  - KERNEL=4.16
+  - KERNEL=4.15
+  - KERNEL=4.14
+  - KERNEL=4.9
+  - KERNEL=4.4
+  - KERNEL=3.19
+  - KERNEL=3.16
   - TESTSUITE=1 LIBS=-ljemalloc
 
 matrix:
diff --git a/.travis/linux-build.sh b/.travis/linux-build.sh
index c8c9748ac..b268bb60e 100755
--- a/.travis/linux-build.sh
+++ b/.travis/linux-build.sh
@@ -21,11 +21,23 @@  function install_kernel()
 
     cdn="https://cdn."
     direct="https://www."
-    link="kernel.org/pub/linux/kernel/${PREFIX}/linux-${1}.tar.xz"
+    base_link="kernel.org/pub/linux/kernel/${PREFIX}"
+    # Download page with list of all available kernel versions.
+    wget ${direct}${base_link}/
+    # Uncompress in case server returned gzipped page.
+    (file index* | grep ASCII) || (mv index* index.new.gz && gunzip index*)
+    # Get version of the latest stable release.
+    hi_ver=$(echo ${1} | sed 's/\./\\\./')
+    lo_ver=$(cat ./index* | grep -P -o "${hi_ver}\.[0-9]+" | \
+             sed 's/.*\..*\.\(.*\)/\1/' | sort -h | tail -1)
+    version="${1}.${lo_ver}"
+
+    link="${base_link}/linux-${version}.tar.xz"
     # Download kernel sources. Try direct link on CDN failure.
     wget ${cdn}${link} || wget ${cdn}${link} || wget ${direct}${link}
-    tar xvf linux-${1}.tar.xz > /dev/null
-    cd linux-${1}
+
+    tar xvf linux-${version}.tar.xz > /dev/null
+    cd linux-${version}
     make allmodconfig
 
     # Cannot use CONFIG_KCOV: -fsanitize-coverage=trace-pc is not supported by compiler