1
1
mirror of https://github.com/NixOS/mobile-nixos.git synced 2024-12-15 19:23:01 +03:00
mobile-nixos/examples/testing/crash-before-switch-root
Samuel Dionne-Riel bb7e9a3b7b examples: Add testing/crash-before-switch-root
Can be used as a single point of failure (hah!)
2020-11-08 18:37:13 -05:00
..
configuration.nix examples: Add testing/crash-before-switch-root 2020-11-08 18:37:13 -05:00
crash.rb examples: Add testing/crash-before-switch-root 2020-11-08 18:37:13 -05:00
default.nix examples: Add testing/crash-before-switch-root 2020-11-08 18:37:13 -05:00
README.md examples: Add testing/crash-before-switch-root 2020-11-08 18:37:13 -05:00

crash-before-switch-root

What does this test?

A simple known method to crash the system at boot.

This can be used to check changes to the errors handling.

Why is this scary?

Not scary at all. Only pretty useless in daily use!

How is success defined?

The boot process should proceed normally (splash, etc), but be interrupted before switch root.

The crashing happens after mounting /mnt, but before switching root.

Running

Assuming you are cd'd into the root of a Mobile NixOS checkout:

nix-build ./examples/testing/crash-before-switch-root && ./result

This will build for qemu-x86_64 by default.

As always, be mindful of your NIX_PATH.