Conversation
Oracle Linux uses /usr/libexec/qemu-kvm, test that first and fallback to the standard name of qemu. Signed-off-by: Stephen Brennan <stephen.s.brennan@oracle.com>
The "litevm" runner runs an Oracle Linux kernel, but it does so in whatever host rootfs is available. This means that we are not running tests of the actual drgn RPM which Oracle Linux provides. It also means that if we want to create a test kmod (similar to drgn), it is very difficult to build it. The "heavyvm" runner runs an Oracle Linux kernel within a full Oracle Linux userspace disk image. This solves both problems, but since the disk image is very large and slow to interact with, it cannot really be used in Github Actions and it's cumbersome to use locally. What's more, sharing the code for testing & module builds is difficult, so in practice we don't actually get much benefit. Plus, rebuilding the image is a maintenance chore. To simplify and sidestep these issues, a new "vm" runner will replace both. Tests will run within an Oracle Linux userspace chroot which we create by using the official podman images to run "dnf --installroot". The chroot contains necessary build dependencies for kernel modules as well as drgn and anything else the tests need. With this, the chroots can be created quickly enough to be useful in CI (say, a couple minutes). They are much smaller than the VM runners of heavyvm, with the flexibility of allowing bind mounts and kernel module builds. We also add a "hello world" kernel module which will become the test kmod over time. The test runner itself is stubbed out, we will add it next. Signed-off-by: Stephen Brennan <stephen.s.brennan@oracle.com>
Signed-off-by: Stephen Brennan <stephen.s.brennan@oracle.com>
This allows networking to function well enough inside the chroot, at least if you're running a local resolver. Signed-off-by: Stephen Brennan <stephen.s.brennan@oracle.com>
Signed-off-by: Stephen Brennan <stephen.s.brennan@oracle.com>
With the new vm test runner, we can actually have our own kernel module. So try that module name first. Export a symbol so that it will show up in the smoke test. Signed-off-by: Stephen Brennan <stephen.s.brennan@oracle.com>
The previous behavior loaded DWARF debuginfo for the kmod during CTF testing, which resulted in some collisions between the two type systems. In particular: AttributeError: 'struct address_space' has no member 'host' drgn_tools/kernfs_memcg.py: 236: AttributeError Thankfully, our drgn CTF support has (somewhat hidden) support for loading kernel module CTF, if we have the ELF file. Let's use that so we're completely CTF in CTF-mode, and completely DWARF in DWARF-mode. Signed-off-by: Stephen Brennan <stephen.s.brennan@oracle.com>
* Update the logger to print out what's happening in non-verbose mode, for things like building kmod or rootfs. We don't want *no* output, we just don't want to see all the output. * Use "echo b>/proc/sysrq-trigger" to shut down, avoiding the "poweroff" command which brings in a systemd dependency. This is directly lifted from drgn's approach. * Use "exec switch_root" rather than "chroot" to in the init. This is important because "exec switch_root" leaves behind the old mounts, which means that drgn will interpret paths in the old mount namespace. This causes tests to fail (e.g. pstack, mounts) because they expect the mount namespace to match their view. * Automatically detect non-pytest commands and set "interactive", and don't run them twice (DWARF/CTF). * Use "stty" to set the terminal size, similar to how drgn does it. * Add "hostname" to the rootfs so bash shows a relevant prompt. * When a DWARF test fails, don't skip the CTF test for that target! Signed-off-by: Stephen Brennan <stephen.s.brennan@oracle.com>
Signed-off-by: Stephen Brennan <stephen.s.brennan@oracle.com>
This is embarassing. I never committed this one. Oh well. Signed-off-by: Stephen Brennan <stephen.s.brennan@oracle.com>
Historically we have not maintained RHCK testing infrastructure, but with the new rootfs based testing, it's honestly not too hard to do this. Add the necessary configuration plumbing. There's one failure on OL8 RHCK that I'll need to fix. Signed-off-by: Stephen Brennan <stephen.s.brennan@oracle.com>
OL8 RHCK does not set CONFIG_CMA. Even with the config disabled, the variable totalcma_pages still exists, but of course it's zero and nothing appears in /proc/meminfo. This causes a test failure, because we expect meminfo entries which are present in procfs should be present in corelens. Resolve the test failure by properly detecting CONFIG_CMA as unset. In that case, CMA stats are not returned. Signed-off-by: Stephen Brennan <stephen.s.brennan@oracle.com>
a4e3056 to
7b640f2
Compare
Now that all tests except UEK-NEXT are passing, switch the Github CI runner to use the new test framework. There are definitely still missing features here, primarily that we do not delete the extracted RPMs after the test. We'll see whether that becomes an issue. Signed-off-by: Stephen Brennan <stephen.s.brennan@oracle.com>
Signed-off-by: Stephen Brennan <stephen.s.brennan@oracle.com>
Signed-off-by: Stephen Brennan <stephen.s.brennan@oracle.com>
The virtiofsd on the latest Ubuntu image on Github Actions does not seem to have the --readonly option. This enforces read-only behavior from the host side, which would be better for security, but we trust our guest. We are really just making the FS read-only as an assertion that we do not expect the tests to modify anything. So let's drop --readonly from the virtiofsd command line, and instead use a mount option in the guest to make it read-only. This is good enough for the intended purpose. Signed-off-by: Stephen Brennan <stephen.s.brennan@oracle.com>
This feature from litevm is definitely still necessary for running in the Github CI. Signed-off-by: Stephen Brennan <stephen.s.brennan@oracle.com>
Interactive mode looks nicer because output is directly attached to the console, but the trade-off is that we cannot detect the pass/fail status of the test, which kind of defeats the purpose of CI. Signed-off-by: Stephen Brennan <stephen.s.brennan@oracle.com>
Signed-off-by: Stephen Brennan <stephen.s.brennan@oracle.com>
To run the test framework under SELinux we can add relabel=private, this is just like the "Z" flag in the "-v" command. Signed-off-by: Stephen Brennan <stephen.s.brennan@oracle.com>
Signed-off-by: Stephen Brennan <stephen.s.brennan@oracle.com>
Member
|
Was the new runner running inside other OS, or qemu with oracle linux? |
Member
Author
|
The new runner is QEMU with Oracle Linux user space.
We should be able to replace both with the new runner. |
biger410
approved these changes
Jun 3, 2026
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Introduce a new test runner,
testing.vm, which will replace both thetesting.litevmandtesting.heavyvmrunners, while adding more features and being overall... better.The new test runner has the following benefits:
drgnRPMs in our tests. (Compared to the old "litevm" runner, which ran in the host's rootfs.)dnf --installrootin a container, which is much faster than scripting the ISO installer, and easier to update than the prebuilt cloud VM images.Some other notes:
testing.litevm,testing.heavyvm) once this is stable on Github CI.3.12, 3.14 soon, OL10: 3.12, 3.14 soon).
There is a known failure on UEK-NEXT due to changes in the slab allocator. Imran is currently taking a look at it, but I don't think this should block merging this.