Skip to content
Jesus Alvarez edited this page Jul 31, 2017 · 1 revision

Testing the init scripts

The initscripts are hooks used by mkinitcpio to load the zfs filesystem at boot in the ramdisk.

Using test.sh

  1. 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.

  2. Use repo.sh to add the packages to the testing repository.

    # ./repo.sh lts test

  3. Use test.sh to start VM with ZFS as the boot filesystem.

    # ./testing/test.sh lts-test-00-bootfs

  4. 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