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

xautolock: implement basic test to confirm functionality #36706

Merged
merged 1 commit into from Mar 13, 2018

Conversation

Ma27
Copy link
Member

@Ma27 Ma27 commented Mar 9, 2018

Motivation for this change
Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option build-use-sandbox in nix.conf on non-NixOS)
  • 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 nox --run "nox-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Fits CONTRIBUTING.md.

@Ma27
Copy link
Member Author

Ma27 commented Mar 9, 2018

/cc @grahamc

@Ma27
Copy link
Member Author

Ma27 commented Mar 13, 2018

ok, I'm confused. Did I screw something up or does this seem to be a bug of the bot?

@7c6f434c
Copy link
Member

@grahamc Have we used ofborg for any tests since evaluation checks have landed?

@grahamc
Copy link
Member

grahamc commented Mar 13, 2018

I don't think so... seems like a bug. Looking.

@grahamc
Copy link
Member

grahamc commented Mar 13, 2018

Nope, the problem is with the test:

$ HOME=/homeless-shelter NIX_PATH=nixpkgs=$(pwd) nix-instantiate ./nixos/release.nix -A tests.xautolock --option restrict-eval true --option build-timeout 1800 --arg supportedSystems '["x86_64-linux"]'
error: anonymous function at /home/grahamc/projects/nixpkgs/nixos/tests/xautolock.nix:1:25 called with unexpected argument 'system', at /home/grahamc/projects/nixpkgs/nixos/tests/make-test.nix:5:41

After:

diff --git a/nixos/tests/xautolock.nix b/nixos/tests/xautolock.nix
index 38ba668e00e..ee46d9e05b0 100644
--- a/nixos/tests/xautolock.nix
+++ b/nixos/tests/xautolock.nix
@@ -1,4 +1,4 @@
-import ./make-test.nix ({ pkgs, lib }:
+import ./make-test.nix ({ pkgs, lib, ... }:
 
 with lib;

it works:

[nix-shell:~/projects/nixpkgs]$ HOME=/homeless-shelter NIX_PATH=nixpkgs=$(pwd) nix-instantiate ./nixos/release.nix -A tests.xautolock --option restrict-eval true --option build-timeout 1800 --arg supportedSystems '["x86_64-linux"]'
warning: you did not specify '--add-root'; the result might be removed by the garbage collector
/nix/store/qp2j5p486avf4m55d1mdgpbx8nv7l0gm-vm-test-run-xautolock.drv

@grahamc
Copy link
Member

grahamc commented Mar 13, 2018

TODO: Publish the logs from a failed evaluation :D

@Ma27
Copy link
Member Author

Ma27 commented Mar 13, 2018

ahh thx, sorry for this (tested it with nix-build ./nixos/tests/xautolock.nix and it successfully built)

@Ma27
Copy link
Member Author

Ma27 commented Mar 13, 2018

just to confirm, the command you used worked perfectly fine for me:

→ HOME=/homeless-shelter NIX_PATH=nixpkgs=$(pwd) nix-instantiate ./nixos/release.nix -A tests.xautolock --option restrict-eval true --option build-timeout 1800 --arg supportedSystems '["x86_64-linux"]' 
warning: you did not specify '--add-root'; the result might be removed by the garbage collector
/nix/store/vdgqdgb3m4c7gqgls38nn3d9ki4ldnr3-vm-test-run-xautolock.drv

I unfortunately lack some inside knowledge of our testing bot, but please let me know if there's anything I can do to resolve this issue.

@grahamc
Copy link
Member

grahamc commented Mar 13, 2018

OK I've identified the problem:

[root@builder-0-gustav:/var/lib/ofborg/checkout/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/builder-0-gustav.ewr1.nix.ci]# HOME=/homeless-shelter NIX_PATH=nixpkgs=$(pwd) nix-instantiate ./nixos/release.nix -A tests.xautolock --option restrict-eval true --option build-timeout 1800 --arg supportedSystems '["x86_64-linux"]'
error: assertion failed at /var/lib/ofborg/checkout/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/builder-0-gustav.ewr1.nix.ci/pkgs/build-support/closure-info.nix:11:1
(use ‘--show-trace’ to show detailed location information)

In other words, I forgot to use Nix 2 on these boxes. Please hold.

@grahamc
Copy link
Member

grahamc commented Mar 13, 2018

@grahamc
Copy link
Member

grahamc commented Mar 13, 2018

Changed the nix package in a new place ...

@GrahamcOfBorg test xautolock

@grahamc
Copy link
Member

grahamc commented Mar 13, 2018

Mar 13 20:26:49 builder-0-gustav.ewr1.nix.ci ofborg-builder-start[22293]: Can build: tests.xautolock, Cannot build:

Progress!

@NixOS NixOS deleted a comment from GrahamcOfBorg Mar 13, 2018
@NixOS NixOS deleted a comment from GrahamcOfBorg Mar 13, 2018
@NixOS NixOS deleted a comment from GrahamcOfBorg Mar 13, 2018
@NixOS NixOS deleted a comment from GrahamcOfBorg Mar 13, 2018
@NixOS NixOS deleted a comment from GrahamcOfBorg Mar 13, 2018
@NixOS NixOS deleted a comment from GrahamcOfBorg Mar 13, 2018
@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Attempted: tests.xautolock

Partial log (click to expand)

machine: exit status 1
syncing
machine: running command: sync
machine: exit status 0
test script finished in 143.10s
cleaning up
killing machine (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/8adqvwp3m5vlxj5va78g2rgdsw814isp-vm-test-run-xautolock

@NixOS NixOS deleted a comment from GrahamcOfBorg Mar 13, 2018
@GrahamcOfBorg
Copy link

Failure on aarch64-linux (full log)

Attempted: tests.xautolock

Partial log (click to expand)

machine: running command: journalctl -b SYSLOG_IDENTIFIER=systemd | grep 'session opened'
machine: exit status 1
error: action timed out after -1 seconds at /nix/store/vhy2am16zcdlav555dbdf7rjdb8786l9-nixos-test-driver/lib/perl5/site_perl/Machine.pm line 227, <__ANONIO__> line 901.
action timed out after -1 seconds at /nix/store/vhy2am16zcdlav555dbdf7rjdb8786l9-nixos-test-driver/lib/perl5/site_perl/Machine.pm line 227, <__ANONIO__> line 901.
cleaning up
killing machine (pid 627)
vde_switch: EOF on stdin, cleaning up and exiting
vde_switch: Could not remove ctl dir '/build/vde1.ctl': Directory not empty
builder for '/nix/store/738paar0hwyyyk9rh8hi2y894f4vwj4n-vm-test-run-xautolock.drv' failed with exit code 255
�[31;1merror:�[0m build of '/nix/store/738paar0hwyyyk9rh8hi2y894f4vwj4n-vm-test-run-xautolock.drv' failed

@grahamc
Copy link
Member

grahamc commented Mar 13, 2018

OK So this seems good. It is failing on aarch64, but no need to block this PR on it I think.

@NixOS NixOS deleted a comment from GrahamcOfBorg Mar 13, 2018
@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Attempted: tests.xautolock

Partial log (click to expand)

machine: exit status 1
syncing
machine: running command: sync
machine: exit status 0
test script finished in 142.89s
cleaning up
killing machine (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/jdpcb4rlh8lhlif2rp250y53nw0ns9j4-vm-test-run-xautolock

@Ma27
Copy link
Member Author

Ma27 commented Mar 13, 2018

well, as it breaks at journalctl -b SYSLOG_IDENTIFIER=systemd | grep 'session opened' it's likely that the actual issue on aarch64 is related to $machine->waitForX;.

And thanks a lot for your support <3

@NixOS NixOS deleted a comment from GrahamcOfBorg Mar 13, 2018
@NixOS NixOS deleted a comment from GrahamcOfBorg Mar 13, 2018
@grahamc
Copy link
Member

grahamc commented Mar 13, 2018

Indeed:

machine# [   18.543456] display-manager[642]: (WW) Falling back to old probe method for modesetting
machine# [   18.550807] display-manager[642]: (EE) open /dev/dri/card0: No such file or directory
machine# [   18.558055] display-manager[642]: (EE) No devices detected.
machine# [   18.563576] display-manager[642]: (EE)
machine# [   18.567755] display-manager[642]: Fatal server error:
machine# [   18.572923] display-manager[642]: (EE) no screens found(EE)
machine# [   18.578363] display-manager[642]: (EE)
machine# [   18.582023] display-manager[642]: Please consult the The X.Org Foundation support
machine# [   18.587597] display-manager[642]:    at http://wiki.x.org
machine# [   18.591699] display-manager[642]:  for help.
machine# [   18.595072] display-manager[642]: (EE) Please also check the log file at "/dev/null" for additional information.
machine# [   18.602529] display-manager[642]: (EE)
machine# [   18.605539] display-manager[642]: (EE) Server terminated with error (1). Closing log file.
machine# [   18.966152] display-manager[642]: Giving up.
machine# [   18.971057] display-manager[642]: slim: unable to connect to X server

@GrahamcOfBorg
Copy link

Failure on aarch64-linux (full log)

Attempted: tests.xautolock

Partial log (click to expand)

machine: running command: journalctl -b SYSLOG_IDENTIFIER=systemd | grep 'session opened'
machine: exit status 1
error: action timed out after -1 seconds at /nix/store/vhy2am16zcdlav555dbdf7rjdb8786l9-nixos-test-driver/lib/perl5/site_perl/Machine.pm line 227, <__ANONIO__> line 901.
action timed out after -1 seconds at /nix/store/vhy2am16zcdlav555dbdf7rjdb8786l9-nixos-test-driver/lib/perl5/site_perl/Machine.pm line 227, <__ANONIO__> line 901.
cleaning up
killing machine (pid 627)
vde_switch: EOF on stdin, cleaning up and exiting
vde_switch: Could not remove ctl dir '/build/vde1.ctl': Directory not empty
builder for '/nix/store/ggz1x8m35clpzws32lvj4xs308fcr786-vm-test-run-xautolock.drv' failed with exit code 255
�[31;1merror:�[0m build of '/nix/store/ggz1x8m35clpzws32lvj4xs308fcr786-vm-test-run-xautolock.drv' failed

@NixOS NixOS deleted a comment from GrahamcOfBorg Mar 13, 2018
@NixOS NixOS deleted a comment from GrahamcOfBorg Mar 13, 2018
@NixOS NixOS deleted a comment from GrahamcOfBorg Mar 13, 2018
@grahamc
Copy link
Member

grahamc commented Mar 13, 2018

I think deleting my comments asking for the bot to run triggered the bot :')

@NixOS NixOS deleted a comment from GrahamcOfBorg Mar 13, 2018
@grahamc grahamc merged commit 1a1abb3 into NixOS:master Mar 13, 2018
@Ma27 Ma27 deleted the xautolock-testcase branch March 13, 2018 22:55
@Ma27
Copy link
Member Author

Ma27 commented Mar 13, 2018

thx! and thanks again for your help :)

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