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

nixos/tests/iftop: fix non-deterministic failure #41309

Merged
merged 1 commit into from Jun 1, 2018
Merged

Conversation

xeji
Copy link
Contributor

@xeji xeji commented May 31, 2018

Motivation for this change

Non-deterministic test failure: https://hydra.nixos.org/build/74650732 . The test needs to wait until machines are fully booted before sending commands. Also, iftop should be run as root.

/cc @Ma27

Things done
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)

@xeji xeji mentioned this pull request May 31, 2018
41 tasks
@Ma27
Copy link
Member

Ma27 commented May 31, 2018

the reason behind this module is that you don't need to run iftop as root anymore thanks to the setcap wrapper:

source = "${pkgs.iftop}/bin/iftop";
capabilities = "cap_net_raw+p";

@xeji
Copy link
Contributor Author

xeji commented May 31, 2018

Ah, I didn't know that. I'll change it back to alice.

@grahamc
Copy link
Member

grahamc commented May 31, 2018

@GrahamcOfBorg test iftop

@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Attempted: tests.iftop

Partial log (click to expand)

withIftop: running command: sync
withIftop: exit status 0
2 out of 2 tests succeeded
test script finished in 53.90s
cleaning up
killing withoutIftop (pid 668)
killing withIftop (pid 593)
vde_switch: EOF on stdin, cleaning up and exiting
vde_switch: Could not remove ctl dir '/build/vde1.ctl': Directory not empty
/nix/store/i4g74ylg505gy96axxmafhcqrylzbn0y-vm-test-run-iftop

@GrahamcOfBorg
Copy link

Success on aarch64-linux (full log)

Attempted: tests.iftop

Partial log (click to expand)

withoutIftop: running command: sync
withoutIftop: exit status 0
2 out of 2 tests succeeded
test script finished in 67.57s
cleaning up
killing withIftop (pid 627)
killing withoutIftop (pid 651)
vde_switch: EOF on stdin, cleaning up and exiting
vde_switch: Could not remove ctl dir '/build/vde1.ctl': Directory not empty
/nix/store/hba3f7ydq917b8ypk419946qp1wlnski-vm-test-run-iftop

@xeji
Copy link
Contributor Author

xeji commented May 31, 2018

@Ma27 so in the second test it would make more sense to install the package but not enable the module, so we can see the capability setting actually makes a difference. I'll give that a try.

- make sure machines are fully booted before sending commands
- test that capability setting in iftop module makes a difference
@xeji
Copy link
Contributor Author

xeji commented May 31, 2018

@GrahamcOfBorg test iftop

@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Attempted: tests.iftop

Partial log (click to expand)

withoutIftop: running command: sync
withoutIftop: exit status 0
2 out of 2 tests succeeded
test script finished in 76.05s
cleaning up
killing withIftop (pid 593)
killing withoutIftop (pid 657)
vde_switch: EOF on stdin, cleaning up and exiting
vde_switch: Could not remove ctl dir '/build/vde1.ctl': Directory not empty
/nix/store/2rdqdngr4pnackhag12w1vn92s4pp6vp-vm-test-run-iftop

@GrahamcOfBorg
Copy link

Success on aarch64-linux (full log)

Attempted: tests.iftop

Partial log (click to expand)

withoutIftop: running command: sync
withoutIftop: exit status 0
2 out of 2 tests succeeded
test script finished in 99.04s
cleaning up
killing withIftop (pid 627)
killing withoutIftop (pid 650)
vde_switch: EOF on stdin, cleaning up and exiting
vde_switch: Could not remove ctl dir '/build/vde1.ctl': Directory not empty
/nix/store/xdrbw2x0yxp340xpfcw32cqmil2k0snm-vm-test-run-iftop

@xeji xeji merged commit b17b442 into NixOS:master Jun 1, 2018
@xeji xeji deleted the tests/iftop branch September 11, 2018 16:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants