From: Kienan Stewart Date: Thu, 21 Dec 2023 14:52:24 +0000 (-0500) Subject: jjb/lava: Update system tests to use Debian bookworm rootfs X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=d0ffdf18a1f18f7fd4eaac5882ab18d846b08725;p=lttng-ci.git jjb/lava: Update system tests to use Debian bookworm rootfs Signed-off-by: Kienan Stewart Change-Id: If40992f99c7b484351b2f54255fc37c4d89eed8b --- diff --git a/jobs/system-tests.yaml b/jobs/system-tests.yaml index 9e9e99e..eb64342 100644 --- a/jobs/system-tests.yaml +++ b/jobs/system-tests.yaml @@ -37,7 +37,7 @@ description: 'LTTng-UST git repo to checkout the UST id' - string: name: 'ROOTFS_URL' - default: 'https://obj.internal.efficios.com/lava/rootfs/rootfs_amd64_jammy_2023-05-18.tar.gz' + default: 'https://obj.internal.efficios.com/lava/rootfs_amd64_bookworm_2024-01-12.tar.gz' description: 'The URL at which the system root FS can be downloaded' - string: name: 'LTTNG_CI_REPO' diff --git a/lava/rootfs/vmdeboostrap/generate-root.py b/lava/rootfs/vmdeboostrap/generate-root.py index 4023adb..f68678d 100755 --- a/lava/rootfs/vmdeboostrap/generate-root.py +++ b/lava/rootfs/vmdeboostrap/generate-root.py @@ -75,8 +75,11 @@ packages = [ 'python3-pip', 'python3-setuptools', 'python3-sphinx', + 'rsync', 'stress', 'swig', + 'systemd-timesyncd', + 'systemtap-sdt-dev', 'texinfo', 'tree', 'uuid-dev', @@ -88,10 +91,10 @@ packages = [ def main(): parser = argparse.ArgumentParser(description='Generate lava lttng rootfs') parser.add_argument("--arch", default='amd64') - parser.add_argument("--distribution", default='jammy') - parser.add_argument("--mirror", default='http://archive.ubuntu.com/ubuntu') + parser.add_argument("--distribution", default='bookworm') + parser.add_argument("--mirror", default='https://deb.debian.org/debian') parser.add_argument( - "--component", default='universe,multiverse,main,restricted') + "--component", default='main') args = parser.parse_args() name = "rootfs_{}_{}_{}".format(args.arch, args.distribution, diff --git a/lava/system-tests/kernel-tests.yml b/lava/system-tests/kernel-tests.yml index 9610587..94dbac0 100644 --- a/lava/system-tests/kernel-tests.yml +++ b/lava/system-tests/kernel-tests.yml @@ -7,7 +7,6 @@ params: LTTNG_VERSION_STRING: "invalid_version_string" run: steps: - - apt install -y curl - git clone "${CI_REPO}" --branch="${CI_BRANCH}" ci - export TMPDIR="/tmp" - mkdir -p /tmp/coredump @@ -16,7 +15,5 @@ run: - source /root/lttngvenv/activate - pushd /root/lttngvenv/src/lttng-tools - lava-test-case build-test-suite --shell "make" - - systemctl stop systemd-timesyncd.service - lava-test-case run-tests --shell "$(dirs -l +1)/ci/scripts/system-tests/run-test-suites.sh ${LTTNG_VERSION_STRING}" - - systemctl start systemd-timesyncd.service - popd diff --git a/lava/system-tests/perf-tests.yml b/lava/system-tests/perf-tests.yml index a4e1068..f869ff0 100644 --- a/lava/system-tests/perf-tests.yml +++ b/lava/system-tests/perf-tests.yml @@ -7,7 +7,6 @@ params: LTTNG_VERSION_STRING: "invalid_version_string" run: steps: - - apt install -y libpfm4-dev curl - git clone "${CI_REPO}" --branch="${CI_BRANCH}" ci - export TMPDIR="/tmp" - mkdir -p /tmp/coredump diff --git a/lava/system-tests/setup.yml b/lava/system-tests/setup.yml index 597d856..ac57d9f 100644 --- a/lava/system-tests/setup.yml +++ b/lava/system-tests/setup.yml @@ -3,24 +3,21 @@ metadata: name: x86-env-setup description: "Basic environment setup for x86 board" os: + - debian - ubuntu devices: - x86 run: steps: - chmod 755 / - - systemctl start systemd-timesyncd - echo nameserver 172.18.0.13 > /etc/resolv.conf - ip a - groupadd tracing - depmod -a - - locale-gen en_US.UTF-8 - apt-get update - apt-get upgrade - - apt-get install -y systemtap-sdt-dev openssh-server - - pip3 install 'pip==20.3' + - pip3 install vlttng --break-system-packages - hash -r - - pip3 install vlttng - git clone "${CI_REPO}" --branch="${CI_BRANCH}" ci - mkdir -p /root/.ssh - chmod 700 /root/.ssh diff --git a/scripts/system-tests/lava2-submit.py b/scripts/system-tests/lava2-submit.py index dfd7ad4..7ddcbd1 100644 --- a/scripts/system-tests/lava2-submit.py +++ b/scripts/system-tests/lava2-submit.py @@ -198,7 +198,7 @@ def main(): parser.add_argument('-d', '--debug', required=False, action='store_true') parser.add_argument( '-r', '--rootfs-url', required=False, - default="https://obj.internal.efficios.com/lava/rootfs/rootfs_amd64_jammy_2023-05-18.tar.gz" + default="https://obj.internal.efficios.com/lava/rootfs_amd64_bookworm_2024-01-12.tar.gz" ) parser.add_argument('--ci-repo', required=False, default='https://github.com/lttng/lttng-ci.git') parser.add_argument('--ci-branch', required=False, default='master') diff --git a/scripts/system-tests/run-test-suites.sh b/scripts/system-tests/run-test-suites.sh index 90c4754..62ab7d2 100755 --- a/scripts/system-tests/run-test-suites.sh +++ b/scripts/system-tests/run-test-suites.sh @@ -68,16 +68,28 @@ verne() { [ "$res" -ne "0" ] } +function cleanup +{ + timedatectl set-ntp true +} + +trap cleanup EXIT SIGINT SIGTERM + lttng_version="$1" failed_tests=0 export LTTNG_ENABLE_DESTRUCTIVE_TESTS="will-break-my-system" +timedatectl set-ntp false +# When make check is interrupted, the default test driver +# (`config/test-driver`) will still delete the log and trs +# files for the currently running test. +# timeout 90m make --keep-going check || failed_tests=1 if [ -f "./tests/root_regression" ]; then cd "./tests" || exit 1 - prove --nocolor --verbose --merge --exec '' - < root_regression || failed_tests=1 + prove --nocolor --verbose --merge --exec '' - < root_regression || failed_tests=2 cd .. fi @@ -85,7 +97,7 @@ fi # should be retained until lttng-tools 2.13 is no longer supported if [ -f "./tests/root_destructive_tests" ]; then cd "./tests" || exit 1 - prove --nocolor --verbose --merge --exec '' - < root_destructive_tests || failed_tests=2 + prove --nocolor --verbose --merge --exec '' - < root_destructive_tests || failed_tests=3 cd .. else echo 'root_destructive_tests not found' @@ -95,4 +107,5 @@ if [[ "${failed_tests}" != "0" ]] ; then find tests/ -iname '*.trs' -print0 -or -iname '*.log' -print0 | tar czf /tmp/coredump/logs.tgz --null -T - fi +timedatectl set-ntp true exit $failed_tests diff --git a/scripts/system-tests/template_lava_job.jinja2 b/scripts/system-tests/template_lava_job.jinja2 index 865cf1a..72a3c6e 100644 --- a/scripts/system-tests/template_lava_job.jinja2 +++ b/scripts/system-tests/template_lava_job.jinja2 @@ -78,6 +78,7 @@ actions: name: vlttng-env-setup description: "Configure virtualenv for vlttng" os: + - debian - ubuntu devices: - x86