I got xfstests working on Mac OS!

[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]



Well, technically I taught kvm-xfstests how to use qemu to use MacOS's
Hypervisor Virtualization Framework (hvf) --- hvf is MacOS / Apple
Silicon's analogue to kvm on x86_64 --- to boot an arm64 Linux kernel,
and I'm using the arm64 test appliance that had been created to run on
Google Compute Engine's arm platforms to run xfstests on a Macbook Air
M2.

The arm64 kernel was built using the "install-kconfig ; kbuild"
commands which are shipped with xfstests-bld[1], and the same kernel
can be used for arn64 GCE VM's in the cloud.  For now the kernel was
built in a Parallels VM running Debian Testing, although there are
some hacks[2] to allow you to build a Linux kernel using Apple's XCode
compilers without needing to boot up a Parallels VM.  I haven't had
time to play with that yet, though.

[1] https://github.com/tytso/xfstests-bld
[2] https://github.com/GayPizzaSpecifications/mac-linux-kdk

A quick demo video of this all working can be found here[3], and all
of the changes have been checked in and are available at [1].

[3] https://www.youtube.com/watch?v=JF_bcOCf_5Y

						- Ted

P.S.  Note: the current version of gcc-13 shipping with Debian
testing as of this writing will core dump while building one of the
kernel files (with host=aarch64 and target=aarch64) from v6.7-rc5.
This appears to be a compiler bug in gcc; Clang works just fine
building the arm64 test kernel which I used for this demo.

P.P.S.  Yes, "kvm-xfstests" is more and more of a misnomer these days;
the script can also be called as "qemu-xfstests", but I find
"kvm-xfstests" easier to type.  :-)

P.P.P.S.  No, I haven't tried using Asahi Linux on my Macbook Air M2
15" yet --- it's on my todo list to play with --- but it should work
just fine there.  There may be some minor changes needed to the
scripts in kvm-xfstests so that it works on a Fedora userspace, since
I do all of my development using Debian.  It should mostly work, as I
did fixed up issues so that kvm-xfstests would work on Fedora/x86_64 a
few months ago.  Some things may have bit rotted though, and I only
got the ability to run the test appliance working on Fedora; building
an updated Test Appliance doesn't yet work, since it would require
getting debootstrap to work on Fedora.  Patches welcome...




[Index of Archives]     [Linux Filesystems Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux