diff mbox series

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

Message ID 20190521124622.11628-1-i.maximets@samsung.com
State Accepted
Headers show
Series [ovs-dev,v2] travis: Test with latest stable kernel releases. | expand

Commit Message

Ilya Maximets May 21, 2019, 12:46 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>
Tested-by: Yifeng Sun <pkusunyifeng@gmail.com>
Reviewed-by: Yifeng Sun <pkusunyifeng@gmail.com>
---

Right now we have a broken build with recent longterm 4.9.177.
So, this patch, should not be applied before the build with
4.9.177 fixed: https://patchwork.ozlabs.org/patch/1102480/

Version 2:
  * Rebased on current master.
  * No functional changes so I kept tags from v1.

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

Comments

Ben Pfaff May 24, 2019, 4:57 p.m. UTC | #1
On Tue, May 21, 2019 at 03:46:22PM +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>
> Tested-by: Yifeng Sun <pkusunyifeng@gmail.com>
> Reviewed-by: Yifeng Sun <pkusunyifeng@gmail.com>
> ---
> 
> Right now we have a broken build with recent longterm 4.9.177.
> So, this patch, should not be applied before the build with
> 4.9.177 fixed: https://patchwork.ozlabs.org/patch/1102480/
> 
> Version 2:
>   * Rebased on current master.
>   * No functional changes so I kept tags from v1.

Acked-by: Ben Pfaff <blp@ovn.org>

but I guess you should wait for the broken build to be fixed before
applying it.
Ilya Maximets June 10, 2019, 3:49 p.m. UTC | #2
On 24.05.2019 19:57, Ben Pfaff wrote:
> On Tue, May 21, 2019 at 03:46:22PM +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>
>> Tested-by: Yifeng Sun <pkusunyifeng@gmail.com>
>> Reviewed-by: Yifeng Sun <pkusunyifeng@gmail.com>
>> ---
>>
>> Right now we have a broken build with recent longterm 4.9.177.
>> So, this patch, should not be applied before the build with
>> 4.9.177 fixed: https://patchwork.ozlabs.org/patch/1102480/
>>
>> Version 2:
>>   * Rebased on current master.
>>   * No functional changes so I kept tags from v1.
> 
> Acked-by: Ben Pfaff <blp@ovn.org>
> 
> but I guess you should wait for the broken build to be fixed before
> applying it.


Thanks, Yifeng and Ben!
Since the build with recent 4.9 is fixed, I applied this patch to master.

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 9ca728d10..9c2d97803 100755
--- a/.travis/linux-build.sh
+++ b/.travis/linux-build.sh
@@ -19,11 +19,23 @@  function install_kernel()
         PREFIX="v2.6/longterm/v2.6.32"
     fi
 
-    url="https://cdn.kernel.org/pub/linux/kernel/${PREFIX}/linux-${1}.tar.xz"
+    base_url="https://cdn.kernel.org/pub/linux/kernel/${PREFIX}"
+    # Download page with list of all available kernel versions.
+    wget ${base_url}/
+    # 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}"
+
+    url="${base_url}/linux-${version}.tar.xz"
     # Download kernel sources. Try direct link on CDN failure.
     wget ${url} || wget ${url} || wget ${url/cdn/www}
-    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