Hi everyone!!
Just wanted to ask how do you all do testing for haiku. In my case it is very time consuming. I mean rebuilding and then rebooting. Previously I worked with Installer and I just run jam -q Installer and reboot. But nowadays, I’ve been working on btrfs, and here I need to completely rebuild the image. If I work 2h, more than 1h is this rebuilding and rebooting.
Any tips on how I can speed this up?
Thanks!
I run Haiku in a VM which speeds up rebooting. On speeding up rebuilding I have no advice. Maybe you tell what part of Haiku you are developing?
Thanks for ur reply! well I’m already using VM (qemu). It helps but rebooting it again and again takes alot of time. To answer ur question I am working on btrfs file system (src/add-ons/kernel/file_systems/btrfs)
Adding -j number_of_threads for parallelization should help reduce compilation time, if you have cores available.
Do you really need to rebuild the full image? I’ve never done something as low-level as filesystem driver, but maybe it’s enough to rebuild just haiku.hpkg, install it and reboot. That (and haiku_devel.hpkg) is the most I’ve ever needed, never the full image.
wrt filesystems in particular, you can run them in userspace. Other people will have to expand on that, as I’ve never gone there.
Running the filesystem in userspace is a good idea. For the simpler tests you can even use btrfs_shell, a simhle command line application that allows to call filesystem methods directly (read and write files, list directories, etc). It can run from Linux if you are cross compiling from there, or inside Haiku, no virtual machine needed.
Then there is userlandfs. That allows to run the filesystem in userspace but inside Haiku. This can be used for more advanced testing: running multiple accesses in parallel (reading a file with diskprobe, copying files and exploring directories in tracker, …). I think the btrfs jamfiles are not set up for that yet, but once they are, you can easily rebuild just the filesystem userlandfs add-on, install that, and unmount/remount your test btrfs partition. No need to reboot. I think we have this set up for other filesystems, I’ll see if I can find some details
Jam can update the image:
jam -q -j4 @nightly-raw update btrfs
I work on xfs driver and here’s what I do to quickly test it. (Should be similar for btrfs)
- Generate driver binary (
jam -q btrfs) - Place it as non-packaged module under
/boot/system/non-packaged/add-ons/kernel/file_systems/btrfs
Make sure you don’t already have btrfs binary under packaged directory to avoid conflict, no rebooting required and you can compile new driver version within seconds ![]()
Hope this helps.