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 tests: fix globbing in qemu configuration #65214

Closed
wants to merge 1 commit into from

Conversation

thefloweringash
Copy link
Member

Before the refactoring for IPXE the configuration was literal perl
code and included a call to glob. After refactoring it became a map
of strings, where those strings contained the old perl
code. Ultimately this was passing perl fragements to the shell
interpreting the qemu command line. To restore the globbing behaviour,
we can inject the equivalent shell glob.

Motivation for this change

Fix boot tests. Note that these tests won't pass without #65212.

For the record, I think injecting shell into the qemu command line through perl is a terrible idea, but it seems like the smallest change to restore the tests.

Tested:

  • tests.boot.biosCdrom.x86_64-linux
  • tests.boot.biosUsb.x86_64-linux
  • tests.boot.uefiCdrom.x86_64-linux
  • tests.boot.uefiUsb.x86_64-linux
Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option 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 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.

Before the refactoring for IPXE the configuration was literal perl
code and included a call to `glob`. After refactoring it became a map
of strings, where those strings contained the old perl
code. Ultimately this was passing perl fragements to the shell
interpreting the qemu command line. To restore the globbing behaviour,
we can inject the equivalent shell glob.
@abbradar
Copy link
Member

Argh. My initial intention was precisely to save Perl code injection behavior but because I somehow forgot to run non-netboot tests this happened.

I propose to restore the old behavior instead, see #65259.

@abbradar
Copy link
Member

In the end I removed all globbing and use an attribute instead, which seems the best solution to me. Closing this, thanks!

@abbradar abbradar closed this Jul 22, 2019
@thefloweringash thefloweringash deleted the boot-tests branch July 22, 2019 13:26
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

2 participants