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

nixosTests.ipv6: port to python #74758

Merged
merged 2 commits into from
Dec 9, 2019
Merged

Conversation

mmilata
Copy link
Member

@mmilata mmilata commented Dec 1, 2019

Motivation for this change

#72828

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • Built on platform(s)
    • NixOS
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Fits CONTRIBUTING.md.

@ofborg ofborg bot added 6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux labels Dec 1, 2019
f"[ `ip -o -6 addr show dev {iface} scope {scope} | grep -v tentative | wc -l` -ge 1 ]"
)
output = machine.succeed(f"ip -o -6 addr show dev {iface} scope {scope}")
ip = re.split(r"[ /]+", output)[3]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wouldn't it be more direct and stable to match out the group of the subtext that looks like an ip (four numbers separated by dots)?

@mmilata
Copy link
Member Author

mmilata commented Dec 1, 2019

I've changed the test according to suggestions but noticed it randomly failing. It's possible that I broke it during the conversion, looking into this ...

wait_for_address sometimes returned tentative address.
@mmilata
Copy link
Member Author

mmilata commented Dec 8, 2019

The problem was in the original test which sometimes ended up using tentative address. Should be fixed now, PTAL.

cc @tfc @flokli @lheckemann

@lheckemann
Copy link
Member

@ofborg test ipv6

@flokli flokli merged commit a29e850 into NixOS:master Dec 9, 2019
@mmilata mmilata deleted the ipv6-python-test branch December 9, 2019 21:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants