Skip to content

nixos/test-driver: Allow xwininfo to fail intermittently #402032

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

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

OPNA2608
Copy link
Contributor

Untestable for me, as my hardware doesn't run into this issue. Will pull into #398413 and check if it fixes flakiness there.

wait_for_window can fail due to xwininfo running into an X error:

error: builder for '/nix/store/lf1nfgxj05919z944gvz39rn68ls3n7y-vm-test-run-lomiri-calculator-app-standalone.drv' failed with exit code 1;
       last 25 log lines:
       > subtest: lomiri calculator launches
       > machine: waiting for a window to appear
       > machine: must succeed: xwininfo -root -tree | sed 's/.*0x[0-9a-f]* \"\([^\"]*\)\".*/\1/; t; d'
       > (finished: must succeed: xwininfo -root -tree | sed 's/.*0x[0-9a-f]* \"\([^\"]*\)\".*/\1/; t; d', in 4.64 seconds)
       > machine: must succeed: xwininfo -root -tree | sed 's/.*0x[0-9a-f]* \"\([^\"]*\)\".*/\1/; t; d'
       > machine # X Error: 9: Bad Drawable
       > machine #   Request Major code: 14
       > machine #   ResourceID in failed request: 0x60005b
       > machine #   Serial number of failed request: 38
       > machine # X Error: 3: Bad Window
       > machine #   Request Major code: 15
       > machine #   ResourceID in failed request: 0x60005b
       > machine #   Serial number of failed request: 40
       > machine # xwininfo: error: Can't query window tree.
       > machine: output: IceDock
       > IceBottom
       > IceTopWin
       > IceWM 3.7.3 (Linux/aarch64)
       >
       > Test "lomiri calculator launches" failed with error: "command `xwininfo -root -tree | sed 's/.*0x[0-9a-f]* \"\([^\"]*\)\".*/\1/; t; d'` failed (exit code 1)"
       > cleanup
       > kill machine (pid 11)
       > qemu-system-aarch64: terminating on signal 15 from pid 8 (/nix/store/ic0fd07z8wg57idmw7q7iy7dc7md6x72-python3-3.12.9/bin/python3.12)
       > kill vlan (pid 9)
       > (finished: cleanup, in 0.01 seconds)
       For full logs, run 'nix log /nix/store/lf1nfgxj05919z944gvz39rn68ls3n7y-vm-test-run-lomiri-calculator-app-standalone.drv'.

Under the assumption that this is a temporary failure, rewrite get_window_names to not require the xwininfo | sed command to succeed at all times.

Things done

  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)
    • sandbox = relaxed
    • sandbox = true
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 25.05 Release Notes (or backporting 24.11 and 25.05 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md.

Add a 👍 reaction to pull requests you find important.

@github-actions github-actions bot added 6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS 6.topic: testing Tooling for automated testing of packages and modules labels Apr 26, 2025
@OPNA2608 OPNA2608 force-pushed the fix/test-driver-xwininfo-flaky branch from 13e2dce to ddab2f6 Compare April 26, 2025 13:41
@OPNA2608 OPNA2608 changed the title nixos/test-driver: Allow xwininfo to fail intermittenly nixos/test-driver: Allow xwininfo to fail intermittently Apr 26, 2025
@OPNA2608 OPNA2608 mentioned this pull request Apr 26, 2025
13 tasks
@github-actions github-actions bot added 10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. labels Apr 26, 2025
@nixpkgs-ci nixpkgs-ci bot added the 2.status: merge conflict This PR has merge conflicts with the target branch label Jul 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2.status: merge conflict This PR has merge conflicts with the target branch 6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS 6.topic: testing Tooling for automated testing of packages and modules 10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant