-
-
Notifications
You must be signed in to change notification settings - Fork 15.3k
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
Boot test port fix #72947
Conversation
This crashed in the create-script case
nixos/lib/test-driver/test-driver.py
Outdated
@@ -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() |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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…
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
cb240dc
to
52ee102
Compare
Boot test port fix (cherry picked from commit 6ed6d1a)
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 withshell=False
.Fixed this. Was able to reproduce the fail on hydra and now they run through on my machine.
Things done
sandbox
innix.conf
on non-NixOS linux)nix-shell -p nix-review --run "nix-review wip"
./result/bin/
)nix path-info -S
before and after)Notify maintainers
cc @flokli, @worldofpeace