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

Boot test port fix #72947

Merged
merged 2 commits into from Nov 7, 2019

Conversation

@tfc
Copy link
Contributor

tfc commented Nov 6, 2019

Motivation for this change

I introduced a regression to the new python test driver: the boot test didn't work any longer as it creates a qemu script on the fly but the subprocess.Popen call didn't support that any longer with shell=False.

Fixed this. Was able to reproduce the fail on hydra and now they run through on my machine.

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 nix-review --run "nix-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.
Notify maintainers

cc @flokli, @worldofpeace

This crashed in the create-script case
@@ -597,7 +597,7 @@ def create_socket(path):

def process_serial_output():
for line in self.process.stdout:
line = line.decode().replace("\r", "").rstrip()
line = line.decode(errors="ignore").replace("\r", "").rstrip()

This comment has been minimized.

Copy link
@jonringer

jonringer Nov 6, 2019

Contributor

is this just to safe guard against binary output?

This comment has been minimized.

Copy link
@tfc

tfc Nov 7, 2019

Author Contributor

In the boot tests there comes colored output from the boot menu selection. The decoder didn't like it and dropping such characters solved the problem.

This comment has been minimized.

Copy link
@flokli

flokli Nov 7, 2019

Contributor

It's probably escape sequences in general, not just color codes.

We should try to decode('unicode_escape') instead of throwing them away - it might be useful to keep them, at least if we want to render colored text in the html output at some point…

This comment has been minimized.

Copy link
@tfc

tfc Nov 7, 2019

Author Contributor

Ok the boot menu messages are colored but the colors were not the actual problem. you see colors in the terminal when you run the boot tests with the current patch set.

But let me see what i can do with unicode_escape, i did not know about it.

This comment has been minimized.

Copy link
@tfc

tfc Nov 7, 2019

Author Contributor

ok looks good. There are more ugly characters that make no sense on the serial then, but it's of course of no harm.

This threw exceptions in boot menus
@tfc tfc force-pushed the tfc:boot-test-port-fix branch from cb240dc to 52ee102 Nov 7, 2019
@worldofpeace worldofpeace merged commit 6ed6d1a into NixOS:master Nov 7, 2019
12 checks passed
12 checks passed
Evaluation Performance Report Evaluator Performance Report
Details
grahamcofborg-eval ^.^!
Details
grahamcofborg-eval-check-meta config.nix: checkMeta = true
Details
grahamcofborg-eval-darwin nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="ofborg"; } ./pkgs/top-level/release.nix -A darwin-tested
Details
grahamcofborg-eval-nixos nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="ofborg"; } ./nixos/release-combined.nix -A tested
Details
grahamcofborg-eval-nixos-manual nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="ofborg"; } ./nixos/release.nix -A manual
Details
grahamcofborg-eval-nixos-options nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="ofborg"; } ./nixos/release.nix -A options
Details
grahamcofborg-eval-nixpkgs-manual nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="ofborg"; } ./pkgs/top-level/release.nix -A manual
Details
grahamcofborg-eval-nixpkgs-tarball nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="ofborg"; } ./pkgs/top-level/release.nix -A tarball
Details
grahamcofborg-eval-nixpkgs-unstable-jobset nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="ofborg"; } ./pkgs/top-level/release.nix -A unstable
Details
grahamcofborg-eval-package-list nix-env -qa --json --file .
Details
grahamcofborg-eval-package-list-no-aliases nix-env -qa --json --file . --arg config { allowAliases = false; }
Details
@tfc tfc deleted the tfc:boot-test-port-fix branch Nov 7, 2019
dtzWill added a commit to dtzWill/nixpkgs that referenced this pull request Nov 10, 2019
Boot test port fix

(cherry picked from commit 6ed6d1a)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants
You can’t perform that action at this time.