Skip to content

Removal of Machine.nested from test-driver broke several tests (chromium, dhparams, initrd-network-ssh, taskserver, virtualbox) #96699

@andersk

Description

@andersk

Describe the bug
Commit 392415c (#96254) removed the Machine.nested API that is still in use by several tests, including the channel-blocking chromium test, causing them to fail with AttributeError: 'Machine' object has no attribute 'nested'.

$ git grep '\.nested' nixos/tests
nixos/tests/chromium.nix:        with machine.nested("Creating a new Chromium window"):
nixos/tests/chromium.nix:        with machine.nested("Waiting for new Chromium window to appear"):
nixos/tests/chromium.nix:        with machine.nested(description):
nixos/tests/dhparams.nix:      with machine.nested("switch to generation ${toString gen}"):
nixos/tests/dhparams.nix:        with machine.nested(f"check bit size of {path}"):
nixos/tests/initrd-network-ssh/default.nix:    with client.nested("waiting for SSH server to come up"):
nixos/tests/taskserver.nix:            with client.nested(f"initialize client for user {user}"):
nixos/tests/taskserver.nix:                with client.nested("importing taskwarrior configuration"):
nixos/tests/taskserver.nix:        with server.nested("(re-)add imperative user bar"):
nixos/tests/virtualbox.nix:      with machine.nested("Checking for privilege escalation"):
nixos/tests/virtualbox.nix:    with machine.nested("Checking for privilege escalation"):

To Reproduce

nix build -f . nixosTests.chromium
nix build -f . nixosTests.dhparams
nix build -f . nixosTests.initrd-network-ssh
#nix build -f . nixosTests.taskserver  # taskserver has other issues
#nix build -f . nixosTests.virtualbox.simple-cli  # virtualbox seems to have other issues

Notify maintainers
@Mic92 @tfc @aszlig @WilliButz @emilazy @cdepillabout

Metadata

  • system: "x86_64-linux"
  • host os: Linux 5.4.59, NixOS, 20.09pre239318.c59ea8b8a0e (Nightingale)
  • multi-user?: yes
  • sandbox: yes
  • version: nix-env (Nix) 2.3.7
  • channels(anders): ""
  • channels(root): "nixos-20.09pre239318.c59ea8b8a0e"
  • nixpkgs: /nix/var/nix/profiles/per-user/root/channels/nixos

Maintainer information:

# a list of nixpkgs attributes affected by the problem
attribute: [nixosTests.chromium, nixosTests.dhparams, nixosTests.initrd-network-ssh, nixosTests.taskserver, nixosTests.virtualbox.simple-cli]
# a list of nixos modules affected by the problem
module: []

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions