diff options
author | aszlig <aszlig@nix.build> | 2019-08-31 06:30:50 +0200 |
---|---|---|
committer | Samuel Leathers <disasm@gmail.com> | 2019-08-31 00:30:50 -0400 |
commit | d7c7fc460300e30cbb105bf2e0d9021f368be492 (patch) | |
tree | 8dfd0c7d6277b0446f0a040445edb3127b2ba0bb /pkgs | |
parent | 5a581c420c33f1188484f9d45d1cba6e97ae1d45 (diff) | |
download | nixlib-d7c7fc460300e30cbb105bf2e0d9021f368be492.tar nixlib-d7c7fc460300e30cbb105bf2e0d9021f368be492.tar.gz nixlib-d7c7fc460300e30cbb105bf2e0d9021f368be492.tar.bz2 nixlib-d7c7fc460300e30cbb105bf2e0d9021f368be492.tar.lz nixlib-d7c7fc460300e30cbb105bf2e0d9021f368be492.tar.xz nixlib-d7c7fc460300e30cbb105bf2e0d9021f368be492.tar.zst nixlib-d7c7fc460300e30cbb105bf2e0d9021f368be492.zip |
nixos/tests/systemd: Fix x-initrd-mount flakiness (#67798)
It turns out that checking for the last mount time of an ext4 file system isn't a very reliable way to check whether the file system was properly unmounted. When creating that test in the first place (88530e02b6fa9b5429dc09972b), I was reluctant to inspect the file system when the VM is down and was searching for a way to check for a clean unmount *after* the file system was mounted again to make sure we don't need to create a 512 MB raw image on the host. Fortunately however, when converting from qcow2, qemu-img actually writes a sparse file, so for most file systems (that is, file systems supporting sparse files) this shouldn't waste a lot of disk space. So when investigating the flakiness, I found that whenever the test is failing, the unmount of /test-x-initrd-mount was done *before* the final step during which systemd remounts+unmounts all the remaining file systems. I haven't investigated why this is the case, but the test is a regression test for https://github.com/NixOS/nixpkgs/issues/35268, which actually didn't unmount the file system *at* *all*, so really all we need to take care here is whether the unmount has happened and not *how*. To make sure that checking the filesystem state is enough for this, I temporarily replaced the $machine->shutdown call with $machine->crash and verified that the file system state is "not clean". Signed-off-by: aszlig <aszlig@nix.build> Fixes: https://github.com/NixOS/nixpkgs/issues/67555
Diffstat (limited to 'pkgs')
0 files changed, 0 insertions, 0 deletions