Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: NixOS/nixpkgs
base: 5a581c420c33
Choose a base ref
...
head repository: NixOS/nixpkgs
compare: d7c7fc460300
Choose a head ref
  • 1 commit
  • 1 file changed
  • 1 contributor

Commits on Aug 31, 2019

  1. 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 (88530e0),
    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 #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: #67555
    aszlig authored and disassembler committed Aug 31, 2019
    Copy the full SHA
    d7c7fc4 View commit details
    Browse the repository at this point in the history