It was mostly file opening procs not being implemented correctly (or at all) that prevented this from working.
I implemented absolute_path_from_handle before realizing that the os package was mistakenly using fstat instead of _fstat, after carefully referencing the NetBSD implementation. I decided to include it anyway, despite it technically not being needed anymore.
(The issue was that fstat depends on absolute_path_from_handle returning a path without error, and since it wasn't implemented on FreeBSD, it failed. fstat was being used in file_size which is being used in read_entire_file_from_handle, so FreeBSD failed every test that had to open a file, even with the incorrect O_* flag values fixed.)
It was mostly file opening procs not being implemented correctly (or at all) that prevented this from working.
I implemented
absolute_path_from_handle
before realizing that theos
package was mistakenly usingfstat
instead of_fstat
, after carefully referencing the NetBSD implementation. I decided to include it anyway, despite it technically not being needed anymore.(The issue was that
fstat
depends onabsolute_path_from_handle
returning a path without error, and since it wasn't implemented on FreeBSD, it failed.fstat
was being used infile_size
which is being used inread_entire_file_from_handle
, so FreeBSD failed every test that had to open a file, even with the incorrectO_*
flag values fixed.)Of note,
set -e
is necessary for the CI to register any failures. See https://github.com/vmactions/freebsd-vm/issues/72.Thanks to @andreas-jonsson for the implementation of the NetBSD CI config, from which I have made only slight changes.