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.gnome3: enable debug mode #93089

Merged
merged 1 commit into from Jul 14, 2020

Conversation

jtojnar
Copy link
Contributor

@jtojnar jtojnar commented Jul 14, 2020

Motivation for this change

The tests fail too often on Hydra without much of a hint what went wrong. Hopefully, this will provide some clue.

cc @cole-h @worldofpeace @hedning

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.

The tests fail too often on Hydra without much of a hint what went wrong. Hopefully, this will provide some clue.
@ofborg ofborg bot added 6.topic: GNOME GNOME desktop environment and its underlying platform 6.topic: nixos 10.rebuild-darwin: 0 10.rebuild-linux: 0 labels Jul 14, 2020
Copy link
Member

@cole-h cole-h left a comment

Choose a reason for hiding this comment

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

If this helps debug test failures, I'm greatly in favor of this (at least until we figure out why they can be so flaky).

These tests failing is annoying because: 1) I can never reproduce them locally (even by checking out the same revision and/or using Hydra's "reproduce failure" script); and 2) it appears to be one flaky test ("Open Gnome Terminal"; see: https://hydra.nixos.org/build/123782525) that ends up blocking the entire nixos-unstable channel (at the very least).

@cole-h
Copy link
Member

cole-h commented Jul 14, 2020

@ofborg test gnome3

@worldofpeace
Copy link
Contributor

One of the recent failures might be interesting to look at

Open Gnome Terminal
machine: must succeed: su - alice -c 'DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus gnome-terminal'
machine # [   58.855004] su[1280]: pam_unix(su:session): session closed for user alice
machine # [   58.861547] .gnome-shell-ca[984]: e_cal_client_set_default_timezone: assertion 'zone != NULL' failed
machine # [   58.963999] su[1319]: Successful su for alice by root
machine # [   58.984921] su[1319]: pam_unix(su:session): session opened for user alice by (uid=0)
machine # No protocol specified
machine # # Failed to parse arguments: Cannot open display:
machine # [   59.548724] su[1319]: pam_unix(su:session): session closed for user alice
machine: output: 
Test "Open Gnome Terminal" failed with error: "command `su - alice -c 'DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus gnome-terminal'` failed (exit code 1)"
error: 

Cannot open display. Does DISPLAY need to be set in the command?
Diff these environments as it's intentional
https://github.com/NixOS/nixpkgs/blob/master/nixos/tests/gnome3-xorg.nix#L30
https://github.com/NixOS/nixpkgs/blob/master/nixos/tests/gnome3.nix#L29

The real way to make this better is for the python testing driver to have capability to do these things like:

  • start a graphical program
  • assert the program is started on the screen
  • dbus api stuff plz

@jtojnar
Copy link
Contributor Author

jtojnar commented Jul 14, 2020

machine # # Failed to parse arguments: Cannot open display:

I would expect this to be just a symptom, we would need to wade through these logs to see if we can find a cause:

failure: https://hydra.nixos.org/build/123927417/nixlog/1
success: https://hydra.nixos.org/build/123782525/nixlog/13

@worldofpeace worldofpeace merged commit 97054ce into NixOS:master Jul 14, 2020
@worldofpeace worldofpeace deleted the debug-gnome-tests branch July 14, 2020 16:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
6.topic: GNOME GNOME desktop environment and its underlying platform 6.topic: nixos 10.rebuild-darwin: 0 10.rebuild-linux: 0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants