Skip to content

Commit af1a574

Browse files
committed
[veristat] use danobi/vmtest to run veristat
Signed-off-by: Manu Bretelle <chantr4@gmail.com>
1 parent aa8f30b commit af1a574

File tree

4 files changed

+9
-34
lines changed

4 files changed

+9
-34
lines changed

.github/scripts/bpf-objects-rootfs.sh

Lines changed: 0 additions & 12 deletions
This file was deleted.

.github/workflows/kernel-veristat.yml

Lines changed: 5 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -48,16 +48,6 @@ jobs:
4848
# zstd is installed by default in the runner images.
4949
run: zstd -d -T0 vmlinux-${{ env.ARCH_AND_TOOL }}.tar.zst --stdout | tar -xf -
5050

51-
- name: Prepare rootfs
52-
uses: libbpf/ci/prepare-rootfs@main
53-
with:
54-
project-name: 'libbpf'
55-
arch: x86_64
56-
kernel: LATEST
57-
kernel-root: '.'
58-
kbuild-output: ${{ env.KBUILD_OUTPUT }}
59-
image-output: '/tmp/root.img'
60-
6151
- name: Configure AWS Credentials
6252
# Disabling BPF objects download and veristat-meta benchmark for PRs
6353
# created from fork repositories. These won't have access to required
@@ -74,26 +64,22 @@ jobs:
7464
run: |
7565
set -eux
7666
if [ -n "$AWS_ROLE_ARN" ]; then
77-
mkdir /tmp/bpf_objects
78-
aws s3 sync s3://veristat-bpf-binaries /tmp/bpf_objects
67+
mkdir ./bpf_objects
68+
aws s3 sync s3://veristat-bpf-binaries ./bpf_objects
7969
fi
8070
env:
8171
AWS_ROLE_ARN: ${{ secrets.AWS_ROLE_ARN }}
8272

83-
- name: Add BPF objects to rootfs
84-
if: ${{ github.event.pull_request.head.repo.full_name == github.repository }}
85-
shell: bash
86-
run: ./.github/scripts/bpf-objects-rootfs.sh
87-
8873
- name: Run veristat
89-
uses: libbpf/ci/run-qemu@main
74+
uses: chantra/libbpf-ci/run-vmtest@vmtest
9075
with:
9176
arch: x86_64
9277
img: '/tmp/root.img'
9378
vmlinuz: '${{ github.workspace }}/vmlinuz'
9479
kernel-root: '.'
9580
max-cpu: 8
96-
kernel-test: run_veristat_kernel,run_veristat_meta
81+
# Don't run meta's veristat from forked repo.
82+
kernel-test: ${{ github.event.pull_request.head.repo.full_name == github.repository && 'run_veristat_kernel,run_veristat_meta' || 'run_veristat_kernel' }}
9783
output-dir: '${{ github.workspace }}'
9884

9985
- name: Compare and save veristat.kernel.csv
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
VERISTAT_OBJECTS_DIR="/bpf_objects"
1+
VERISTAT_OBJECTS_DIR="${WORKING_DIR}/bpf_objects"
22
VERISTAT_OBJECTS_GLOB="*.o"
33
VERISTAT_OUTPUT="veristat-meta"
44
VERISTAT_CFG_FILE="${VMTEST_CONFIGS_PATH}/veristat_meta.cfg"

ci/vmtest/vmtest_selftests.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,9 @@ ARCH=$(uname -m)
1717
STATUS_FILE=/mnt/vmtest/exitstatus
1818
OUTPUT_DIR=/mnt/vmtest
1919

20-
BPF_SELFTESTS_DIR="/${PROJECT_NAME}/selftests/bpf"
21-
VMTEST_CONFIGS_PATH="/${PROJECT_NAME}/vmtest/configs"
20+
WORKING_DIR="/${PROJECT_NAME}"
21+
BPF_SELFTESTS_DIR="${WORKING_DIR}/selftests/bpf"
22+
VMTEST_CONFIGS_PATH="${WORKING_DIR}/ci/vmtest/configs"
2223

2324
read_lists() {
2425
(for path in "$@"; do

0 commit comments

Comments
 (0)