Skip to content

Move freebsd CI tests to github#634

Merged
thehajime merged 14 commits into
lkl:masterfrom
tavip:lkl-github-ci-freebsd
Jun 4, 2026
Merged

Move freebsd CI tests to github#634
thehajime merged 14 commits into
lkl:masterfrom
tavip:lkl-github-ci-freebsd

Conversation

@tavip
Copy link
Copy Markdown
Member

@tavip tavip commented May 10, 2026

No description provided.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 10, 2026

Test Results

106 files  ± 0  106 suites  ±0   7m 37s ⏱️ +9s
205 tests ± 0  194 ✅ ± 0  11 💤 ±0  0 ❌ ±0 
789 runs   - 33  733 ✅  - 33  56 💤 ±0  0 ❌ ±0 

Results for commit bf73cae. ± Comparison against base commit 9523b2a.

This pull request removes 13 and adds 13 tests. Note that renamed tests count towards both.
disk btrfs ‑ cleanfs
disk btrfs ‑ prepfs btrfs
disk ext4 ‑ cleanfs
disk ext4 ‑ prepfs ext4
disk vfat ‑ cleanfs
disk vfat ‑ prepfs vfat
disk xfs ‑ cleanfs
disk xfs ‑ prepfs xfs
disk-vfio-pci ‑ wait_guest
lklfuse btrfs ‑ prepfs btrfs
…
disk btrfs ‑ cleanfsimg
disk btrfs ‑ prepfsimg btrfs
disk ext4 ‑ cleanfsimg
disk ext4 ‑ prepfsimg ext4
disk vfat ‑ cleanfsimg
disk vfat ‑ prepfsimg vfat
disk xfs ‑ cleanfsimg
disk xfs ‑ prepfsimg xfs
lklfuse btrfs ‑ prepfsimg btrfs
lklfuse ext4 ‑ prepfsimg ext4
…

♻️ This comment has been updated with latest results.

@tavip tavip force-pushed the lkl-github-ci-freebsd branch 2 times, most recently from 959a789 to 1d1dc26 Compare May 10, 2026 10:12
Copy link
Copy Markdown

@ddiss ddiss left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not familiar with the BSDs, but this all looks reasonable to me.
FWIW, it looks like https://download.freebsd.org/releases/VM-IMAGES/14.4-RELEASE/amd64/Latest/ (and 15.0) also carries cloudinit images, which might be usable alongside the new cloud-localds logic.

@tavip
Copy link
Copy Markdown
Member Author

tavip commented May 11, 2026

Thanks @ddiss ! Yes, I am working on using cloud init images for running tests on VMs, hope to post that soon.

tavip added 10 commits June 3, 2026 18:16
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>
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>
Add scripts to create FreeBSD images and to start a FreeBSD VM. Rename
Linux VM scripts so that we can use the same logic in the workflow for
both FreeBSD and Linux runs.

Signed-off-by: Octavian Purdila <tavip@google.com>
Skip building and running tests for disk-vfio-pci on FreeBSD.

Signed-off-by: Octavian Purdila <tavip@google.com>
Add filesystem image setup and cleanup helpers and use them to avoid
code duplication between the disk and lklfuse tests.

Signed-off-by: Octavian Purdila <tavip@google.com>
To avoid "file text busy" error when running the lklfuse_lock_conflict
test use lkl_test_cmd instead of lkl_test_exec for BSD test runs. This
will avoid copying the binary again.

Signed-off-by: Octavian Purdila <tavip@google.com>
Make the output quiet and remove unused ssh_push.

Signed-off-by: Octavian Purdila <tavip@google.com>
Switch running the FreeBSD tests to github and remove the circleci
FreeBSD steps. Doing so requires minor changes in the test
infrastructure.

Signed-off-by: Octavian Purdila <tavip@google.com>
@tavip tavip force-pushed the lkl-github-ci-freebsd branch from 1d1dc26 to d8c5d92 Compare June 4, 2026 00:28
@tavip tavip marked this pull request as ready for review June 4, 2026 00:51
@tavip tavip requested a review from thehajime June 4, 2026 00:51
Copy link
Copy Markdown
Member

@thehajime thehajime left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks @tavip for the great clean up !
using cloudinit image is the right direction.

I left 1 tiny comment; other than that, it would be perfect.
thanks again !

Comment thread .github/workflows/ci.yml Outdated
Now that we have many builds for the same OS (gcc, clang, freebsd) a
common ccache for all these builds is not working anymore. Use
separate ccache instances for each build variant.

Signed-off-by: Octavian Purdila <tavip@google.com>
@tavip tavip force-pushed the lkl-github-ci-freebsd branch 4 times, most recently from 2e9319d to 646e374 Compare June 4, 2026 19:45
tavip added 3 commits June 4, 2026 20:27
Even though we don't actually run tests for fuzzers (yet) integrating
it in the matrix test job will allow us to reuse some of the
optimizations we've been using there (like ccache). Also, eventually,
we will enable tests for fuzzers as well.

Also remove the clang-build as we already exercise it now with both
FreeBSD and fuzzers.

Signed-off-by: Octavian Purdila <tavip@google.com>
Add a test that runs first and waits for the VM to boot. Alternatively
this can be implemented in CI only, but implementing it this way is
also useful for local testing.

Signed-off-by: Octavian Purdila <tavip@google.com>
Remove dead code caught by LLVM. Fixes the following warnings:

lib/net.c:44:20: warning: unused function 'set_sockaddr' [-Wunused-function]
static inline void set_sockaddr(struct lkl_sockaddr_in *sin, unsigned int addr,

lib/config.c:431:16: warning: variable 'bytes_read' set but not used [-Wunused-but-set-variable]
        int ret = -1, bytes_read = 0;

Signed-off-by: Octavian Purdila <tavip@google.com>
@tavip tavip force-pushed the lkl-github-ci-freebsd branch from 646e374 to bf73cae Compare June 4, 2026 20:27
@thehajime thehajime merged commit 91ecb83 into lkl:master Jun 4, 2026
17 of 19 checks passed
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.

3 participants