On Fri, Oct 30, 2020 at 11:22 PM William Roberts <bill.c.roberts@xxxxxxxxx> wrote: > On Fri, Oct 30, 2020 at 4:22 PM Ondrej Mosnacek <omosnace@xxxxxxxxxx> wrote: > > > > Only do it when we can't install the kernel-modules package for the > > running kernel to make the CI run faster. Now that rawhide images are > > updating regularly again, it is rarely necessary. > > > > Also don't run `dnf clean all -y` before installing dependencies. There > > really is no point and it just slows things down when we do need to > > update the kernel. > > > > Signed-off-by: Ondrej Mosnacek <omosnace@xxxxxxxxxx> > > --- > > travis-ci/run-kvm-test.sh | 21 ++++++++++++--------- > > travis-ci/run-testsuite.sh | 1 - > > 2 files changed, 12 insertions(+), 10 deletions(-) > > > > diff --git a/travis-ci/run-kvm-test.sh b/travis-ci/run-kvm-test.sh > > index d22c92b..6afbf96 100755 > > --- a/travis-ci/run-kvm-test.sh > > +++ b/travis-ci/run-kvm-test.sh > > @@ -121,15 +121,18 @@ fi > > # so forks know where to go. > > # > > > > -# First update to the latest kernel. > > -ssh -tt -o StrictHostKeyChecking=no -o LogLevel=QUIET "root@$ipaddy" \ > > - dnf install -y kernel > > - > > -# Then reboot. > > -sudo virsh reboot fedoravm > > -sleep 5 > > - > > -while ! nc -w 10 -z "$ipaddy" 22; do sleep 0.5s; done > > +# Check if kernel-modules-$(uname -r) can be installed from repos, > > +# otherwise update kernel and reboot. > > +kernel_avail="$(ssh -tt -o StrictHostKeyChecking=no -q "root@$ipaddy" \ > > + sh -c "dnf check-update kernel-modules-\$(uname -r) | wc -l")" > > +if [ $kernel_avail -eq 0 ]; then > > + ssh -tt -o StrictHostKeyChecking=no -o LogLevel=QUIET "root@$ipaddy" \ > > + dnf update -y kernel-core > > + > > + sudo virsh reboot fedoravm > > + sleep 5 > > + while ! nc -w 10 -z "$ipaddy" 22; do sleep 0.5s; done > > +fi > > > > # And run the testsuite. > > project_dir="$(basename "$TRAVIS_BUILD_DIR")" > > diff --git a/travis-ci/run-testsuite.sh b/travis-ci/run-testsuite.sh > > index 9b5f954..051f9d8 100755 > > --- a/travis-ci/run-testsuite.sh > > +++ b/travis-ci/run-testsuite.sh > > @@ -16,7 +16,6 @@ pwd > > # the CI. > > setenforce 0 > > > > -dnf clean all -y > > dnf install -y \ > > --allowerasing \ > > --skip-broken \ > > -- > > 2.26.2 > > > > Ack Thanks, but I'm not sure if you realized that this is a patch for the testsuite CI, not the userspace one :) Can I still add you ack? Note that userspace CI doesn't need the kernel update + reboot (nor this patch), as it doesn't test on development images. -- Ondrej Mosnacek Software Engineer, Platform Security - SELinux kernel Red Hat, Inc.