Testing the init scripts
The initscripts are hooks used by mkinitcpio to load the zfs filesystem at boot in the ramdisk.
Using test.sh
-
Build the packages containing the changed initscripts.
The -U flag can be passed to keep the sums for the initscript in-sync with conf.sh so builds don't fail.
-
Use repo.sh to add the packages to the testing repository.
# ./repo.sh lts test
-
Use test.sh to start VM with ZFS as the boot filesystem.
# ./testing/test.sh lts-test-00-bootfs
-
Run the vm image artifact
NOTE: Not implemented yet.
$ ./testing/test.sh <test>
Using dash
It is possible to use the ash shell to parse the initscripts while developing,
# pacman -Sy dash
$ dash
$ . src/zfs-utils/zfs-utils.initcpio.hook
$ run_hook