Skipping tests that are unimplemented in 32-bit emulation

Alan Somers asomers at
Sun Jul 29 17:23:37 UTC 2018

I recently tried running the i386 test suite in a chroot on an amd64
system.  162 tests failed, and 33 were broken.  Some of the failures were
due to system calls that haven't been implemented in 32-bit emulation.
setfib(2) is an example.  I think it's unlikely that anybody will ever need
32-bit emulation for setfib(2), so perhaps we should just skip the test?
What's the best way to do that?  I can come up with two ways:

1) At runtime, check the hw.machine sysctl and see if it matches some
compile time preprocessor constant.  I don't know what constant to use,
though.  Checking __amd64__ would only work for i386 binaries on amd64
kernels, and not something else like mips binaries on mips64 kernels (I
don't know if we support that, but I don't want to rule it out).

2) At buildtime, put an "allowed_architectures=i386" metadata property into
the Kyuafile for that test program.  This would require support in
/usr/share/mk/  It would also require patching Kyua itself,
because currently "Kyua config" returns the architecture for which it was
built, not the one on which it's running.


More information about the freebsd-testing mailing list