forked from torvalds/linux
-
Notifications
You must be signed in to change notification settings - Fork 10
ci: run xfstests quick group in a nested VM #1622
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
ddiss
wants to merge
1
commit into
btrfs:master
Choose a base branch
from
ddiss:btrfs_gh_ci
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,81 @@ | ||
| name: CI | ||
|
|
||
| on: | ||
| pull_request: | ||
|
|
||
| jobs: | ||
| test: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - name: install toolchains, rapido and xfstests dependencies | ||
| run: | | ||
| sudo apt-get update -y | ||
| # cargo default package is v1.75, which doesn't support v4 lock files | ||
| sudo apt-get install -y --no-install-recommends --no-install-suggests \ | ||
| cargo-1.85 rustc qemu-system-x86 qemu-utils \ | ||
| make flex bison libelf-dev acl attr automake bc dbench dump \ | ||
| e2fsprogs fio gawk libtool sed libgdbm-compat-dev \ | ||
| gcc git indent libacl1-dev libaio-dev libcap-dev libgdbm-dev \ | ||
| libtool-bin liburing-dev libuuid1 lvm2 make psmisc python3 quota \ | ||
| uuid-dev uuid-runtime xfsprogs linux-headers-$(uname -r) sqlite3 \ | ||
| xfsdump xfslibs-dev btrfs-progs pkg-config | ||
| # chmod /dev/kvm to allow non-root QEMU to use it. | ||
| # chmod needs to go after install, as udev may be triggered. | ||
| sudo chmod 0666 /dev/kvm | ||
| # TODO: https://github.com/rapido-linux/rapido once rs_wip is merged | ||
| git clone --depth 1 -b rs_wip https://github.com/ddiss/rapido \ | ||
| ${HOME}/rapido | ||
| pushd ${HOME}/rapido | ||
| cargo-1.85 build --offline --release | ||
| popd | ||
| - name: build mainline kernel and xfstests | ||
| run: | | ||
| cp ${HOME}/rapido/kernel/fstests_btrfs_zram.defconfig .config | ||
| make olddefconfig | ||
| make -j$(nproc) | ||
| make modules_install INSTALL_MOD_PATH=./mods | ||
| # this gives us modules.dep, etc. which rapido needs. | ||
| # XXX should come with modules_install but doesn't... perhaps due to no modules? | ||
| objtree=./ INSTALL_MOD_PATH=./mods ./scripts/depmod.sh \ | ||
| "$(cat include/config/kernel.release)" | ||
| git clone --depth 1 -b master \ | ||
| https://git.kernel.org/pub/scm/fs/xfs/xfstests-dev.git \ | ||
| ${HOME}/xfstests | ||
| pushd ${HOME}/xfstests | ||
| make -j$(nproc) | ||
| popd | ||
| - name: boot mainline kernel and run xfstests | ||
| run: | | ||
| linux_dir="${PWD}" | ||
| pushd ${HOME}/rapido | ||
| # rapido fstests-btrfs uses 5x guest-zram-dev by default (for raid), | ||
| # but we probably don't have enough memory. Use compressed qcow2: | ||
| test_img="${HOME}/fstests_test_zstd.qcow2" | ||
| scratch_img="${HOME}/fstests_scratch_zstd.qcow2" | ||
| qemu-img create -f qcow2 -o compression_type=zstd "$test_img" 8G | ||
| qemu-img create -f qcow2 -o compression_type=zstd "$scratch_img" 8G | ||
ddiss marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| mkdir -p "${HOME}/9p" | ||
| cat > rapido.conf <<EOF | ||
| KERNEL_SRC=${linux_dir} | ||
| KERNEL_INSTALL_MOD_PATH=${linux_dir}/mods | ||
| FSTESTS_SRC=${HOME}/xfstests | ||
| FSTESTS_ZRAM_SIZE=0 | ||
| VIRTFS_SHARE_PATH=${HOME}/9p | ||
| EOF | ||
| printf 'QEMU_EXTRA_ARGS="-nographic -device virtio-rng-pci -drive id=test,file='"$test_img"',if=none,cache=none -device virtio-blk-pci,drive=test,bus=pci.0,serial=TEST_DEV -drive id=scratch,file='"$scratch_img"',if=none,cache=none -device virtio-blk-pci,drive=scratch,bus=pci.0,serial=SCRATCH_DEV"' \ | ||
| >> rapido.conf | ||
| cat rapido.conf | ||
| ./rapido cut \ | ||
| -x "./check -R xunit -g quick; cp results/result.xml /host/; exit" \ | ||
| fstests-btrfs | ||
| popd | ||
| - name: dump results | ||
| run: | | ||
| cat "${HOME}/9p/result.xml" | ||
| - name: Archive xunit test results | ||
| uses: actions/upload-artifact@v4 | ||
| with: | ||
| name: xunit-results | ||
| path: ~/9p/result.xml | ||
| retention-days: 2 | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.