Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test-driver.py: Share the shared dir between VMs #77587

Closed
wants to merge 2 commits into from

Conversation

@singron
Copy link
Contributor

@singron singron commented Jan 12, 2020

This changes the python test driver to match the behavior of the perl
test driver. I.e. the directory mounted into /tmp/shared should be the
same for all machines.

This probably fixes many tests, but I found this while investigating
failures in nixos/tests/ceph-multi-node.nix.

Motivation for this change
Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.
This changes the python test driver to match the behavior of the perl
test driver.  I.e. the directory mounted into /tmp/shared should be the
same for all machines.

This probably fixes many tests, but I found this while investigating
failures in nixos/tests/ceph-multi-node.nix.
@flokli
Copy link
Contributor

@flokli flokli commented Jan 19, 2020

@singron confirmed this fixes #77378, thanks a lot!

However, nixosTests.systemd-analyze now fails. Can you add a fix for it in here, too?

@flokli
Copy link
Contributor

@flokli flokli commented Jan 19, 2020

Also cc @B4dM4n, @7c6f434c.

@flokli
Copy link
Contributor

@flokli flokli commented Jan 19, 2020

In fact, it's the copy_from_vm method in test-driver.py (which is invoked from that test) that needs to be updated.

The docstring says it uses a directory shared among all vms, although
that doesn't seem necessary for the functionality. However, it does need
to be consistent between the guest and host.
@singron
Copy link
Contributor Author

@singron singron commented Jan 19, 2020

I updated copy_from_vm. I think that's the only other method that needs to be updated because it uses self.shared_dir.

@flokli
Copy link
Contributor

@flokli flokli commented Jan 19, 2020

@GrahamcOfBorg build nixosTests.systemd-analyze

@flokli
Copy link
Contributor

@flokli flokli commented Jan 19, 2020

For some reason github decides this PR is still open, even though it merged it in.

@flokli flokli closed this Jan 19, 2020
pull bot pushed a commit to avitex/nixpkgs that referenced this pull request Jan 19, 2020
test-driver.py: Share the shared dir between VMs
dtzWill added a commit to dtzWill/nixpkgs that referenced this pull request Jan 20, 2020
test-driver.py: Share the shared dir between VMs

(cherry picked from commit 764aba4)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants
You can’t perform that action at this time.