Skip to content

Commit

Permalink
non-root: add non-root test case to travis runs
Browse files Browse the repository at this point in the history
To test CAP_CHECKPOINT_RESTORE this is using our vagrant based setup to
install the latest kernel from the Fedora vanilla kernel mainline
repository which already has a 5.9.0 rcX based kernels with
CAP_CHECKPOINT_RESTORE support.

This also installs the latest version of libcap with CAP_CHECKPOINT_RESTORE
support.

Signed-off-by: Adrian Reber <[email protected]>
  • Loading branch information
adrianreber committed Sep 2, 2020
1 parent fe5035c commit 6a6f93e
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 1 deletion.
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ env:
- TR_ARCH=x86_64 CLANG=1
- TR_ARCH=openj9-test
- TR_ARCH=vagrant-fedora-no-vdso
- TR_ARCH=vagrant-fedora-non-root
jobs:
include:
- os: linux
Expand Down
5 changes: 4 additions & 1 deletion scripts/travis/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,10 @@ setup-vagrant:
vagrant-fedora-no-vdso: setup-vagrant
./vagrant.sh fedora-no-vdso

.PHONY: setup-vagrant vagrant-fedora-no-vdso
vagrant-fedora-non-root: setup-vagrant
./vagrant.sh fedora-non-root

.PHONY: setup-vagrant vagrant-fedora-no-vdso vagrant-fedora-non-root

%:
$(MAKE) -C ../build $@$(target-suffix)
11 changes: 11 additions & 0 deletions scripts/travis/vagrant.sh
Original file line number Diff line number Diff line change
Expand Up @@ -49,4 +49,15 @@ fedora-no-vdso() {
ssh default 'cd /vagrant/criu/test; sudo ./zdtm.py run -a --keep-going'
}

fedora-non-root() {
ssh default 'curl -s https://repos.fedorapeople.org/repos/thl/kernel-vanilla.repo | sudo tee /etc/yum.repos.d/kernel-vanilla.repo'
ssh default 'sudo dnf -y --enablerepo=kernel-vanilla-mainline update kernel-core; sudo dnf -y install glibc-static'
vagrant reload
ssh default uname -a
ssh default 'cd /vagrant; tar xf criu.tar; cd criu; make -j 4'
ssh default 'cd /vagrant; git clone https://git.kernel.org/pub/scm/libs/libcap/libcap.git; cd libcap; make -C progs'
ssh default 'sudo /vagrant/libcap/progs/setcap cap_checkpoint_restore+eip /vagrant/criu/criu/criu'
ssh default 'cd /vagrant/criu; sudo ./test/zdtm.py run -t zdtm/static/env00 -f h --ignore-taint; sudo chmod 777 test test/zdtm/static/ test/dump/zdtm/static/env00; sudo ./test/zdtm.py run -t zdtm/static/env00 -f h --user --ignore-taint'
}

$1

0 comments on commit 6a6f93e

Please sign in to comment.