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
Merged

Boot test port fix #72947

merged 2 commits into from
Nov 7, 2019

Conversation

tfc
Copy link
Contributor

@tfc 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

Sorry, something went wrong.

This crashed in the create-script case
@ofborg ofborg bot added 6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux labels Nov 6, 2019
@@ -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()
Copy link
Contributor

Choose a reason for hiding this comment

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

is this just to safe guard against binary output?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

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.

Copy link
Contributor

Choose a reason for hiding this comment

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

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…

Copy link
Contributor Author

Choose a reason for hiding this comment

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

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

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 boot-test-port-fix branch from cb240dc to 52ee102 Compare November 7, 2019 09:05
@worldofpeace worldofpeace merged commit 6ed6d1a into NixOS:master Nov 7, 2019
@tfc tfc deleted the boot-test-port-fix branch November 7, 2019 20:42
dtzWill pushed 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
Labels
6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants