Skip to content

Move freebsd CI tests to github#634

Draft
tavip wants to merge 11 commits intolkl:masterfrom
tavip:lkl-github-ci-freebsd
Draft

Move freebsd CI tests to github#634
tavip wants to merge 11 commits intolkl:masterfrom
tavip:lkl-github-ci-freebsd

Conversation

@tavip
Copy link
Copy Markdown
Member

@tavip tavip commented May 10, 2026

No description provided.

tavip added 9 commits May 10, 2026 04:25
DMA_OPS was renamed to ARCH_HAS_DMA_OPS in Linux 6.12. This breaks DMA
and PCI support. We did not catch this issue because we were using an
older qemu in CI which did not route NVME requests through the iommu.

Signed-off-by: Octavian Purdila <tavip@google.com>
Instead of mounting a filesystem to test PCI VFIO just open the NVME
block device and read it.

Signed-off-by: Octavian Purdila <tavip@google.com>
Add support for running qemu on github and run the PCI VFIO test. Also
add a couple of scripts to make it easier to run the test locally:

  ./tools/lkl/scripts/qemu-x86_64-make-images.sh
  . ./tools/lkl/scripts/qemu-x86_64-start-and-set-env.sh
  LKL_QEMU_TEST=1 make -C tools/lkl run-tests

Signed-off-by: Octavian Purdila <tavip@google.com>
To simplify CI management remove circleci jobs that already exists on
github.

Signed-off-by: Octavian Purdila <tavip@google.com>
Explicitly tell the yaml parser how many spaces to expect for
indentation. This avoids issues when the kernel buffer is truncated
(because it overflows) and the first line contains more spaces.

Signed-off-by: Octavian Purdila <tavip@google.com>
Otherwise host memcpy can be used and bypasses kasan
interceptors. Unclear why the tests are passing in CI most of the time
without this fix. They do fail reliably on my local environment.

Signed-off-by: Octavian Purdila <tavip@google.com>
Variable test name such as "disk btrfs ‑ cleanfs disk-8XLW" confuses
the test reporter:

This pull request removes 81 and adds 87 tests. Note that renamed
tests count towards both.

Signed-off-by: Octavian Purdila <tavip@google.com>
clang builds generates a high volume of warnings regarding undefined
behavior due to null pointer arithmetic in asm-generic/io.h:

./include/asm-generic/io.h:548:31: warning: performing pointer
arithmetic on a null pointer has undefined behavior
[-Wnull-pointer-arithmetic]
548 |         val = __raw_readb(PCI_IOBASE + addr);

Suppresses the -Wnull-pointer-arithmetic warning for these macros to
reduce compiler noise.

Signed-off-by: Octavian Purdila <tavip@google.com>
Cross compiling with clang requires a sysroot, so do the require
plumbing to make it work with compilation and linking in tools/lkl.

If a SYSROOT option is provided pass it to clang as well as add
standard paths relative to the sysroot for headers and libraries.

Signed-off-by: Octavian Purdila <tavip@google.com>
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 10, 2026

Test Results

106 files   - 15  106 suites   - 15   7m 13s ⏱️ +27s
252 tests  -  7  241 ✅  -  7  11 💤 ±0  0 ❌ ±0 
821 runs  + 6  765 ✅ + 6  56 💤 ±0  0 ❌ ±0 

Results for commit 1d1dc26. ± Comparison against base commit 2550325.

This pull request removes 81 and adds 74 tests. Note that renamed tests count towards both.
disk btrfs ‑ cleanfs disk-8XLW
disk btrfs ‑ cleanfs disk-Nit4
disk btrfs ‑ cleanfs disk-YO49
disk btrfs ‑ cleanfs disk-jjQ2
disk ext4 ‑ cleanfs disk-1Ibl
disk ext4 ‑ cleanfs disk-5VbV
disk ext4 ‑ cleanfs disk-7Qr7
disk ext4 ‑ cleanfs disk-lkTM
disk vfat ‑ cleanfs disk-3YpC
disk vfat ‑ cleanfs disk-NpLC
…
disk btrfs ‑ cleanfs
disk ext4 ‑ cleanfs
disk vfat ‑ cleanfs
disk xfs ‑ cleanfs
disk-vfio-pci ‑ blkdev
disk-vfio-pci ‑ cleanup
disk-vfio-pci ‑ init
disk-vfio-pci ‑ start_kernel
disk-vfio-pci ‑ stop_kernel
disk-vfio-pci ‑ wait_guest
…

♻️ This comment has been updated with latest results.

@tavip tavip force-pushed the lkl-github-ci-freebsd branch from dffd2a3 to 959a789 Compare May 10, 2026 08:49
tavip added 2 commits May 10, 2026 09:19
Fixes the following warnings and errors:

In file included from lib/virtio_net_fd.c:16:
~/freebsd-sysroot/usr/include/sys/syslimits.h:38:2: warning: "No
user-serviceable parts inside." [-W#warnings]
   38 | #warning "No user-serviceable parts inside."
      |  ^

lklfuse.c:284:18: error: use of undeclared identifier 'O_LARGEFILE'
  284 |         if (fi->flags & O_LARGEFILE)
      |                         ^
lklfuse.c:290:18: error: use of undeclared identifier 'O_NOATIME'
  290 |         if (fi->flags & O_NOATIME)
      |                         ^
lklfuse.c:298:18: error: use of undeclared identifier 'O_TMPFILE'
  298 |         if (fi->flags & O_TMPFILE)
      |                         ^

lib/posix-host.c:266:6: error: call to undeclared function
'pthread_attr_get_np'; ISO C99 and later do not support implicit
function declarations [-Wimplicit-function-declaration]
  266 |         if (pthread_getattr_np(pthread_self(), &thread_attr))

Signed-off-by: Octavian Purdila <tavip@google.com>
Add script to create a FreeBSD sysroot and enable clang based
build.

Builds are enabled in CI as well, but tests are not yet enabled.

Signed-off-by: Octavian Purdila <tavip@google.com>
@tavip tavip force-pushed the lkl-github-ci-freebsd branch from 959a789 to 1d1dc26 Compare May 10, 2026 10:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant