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

[20.03] nixos/test-driver: Specify /bin/sh shell when running a bourne shell script as the user #87618

Conversation

@chkno
Copy link
Member

@chkno chkno commented May 11, 2020

Motivation for this change

Backport #87414 , which allows tests to run when a user has changed their login shell.

(cherry picked from commit 751a270)

Reason: Back-porting this straight-forward fix is the best way to
allow tests affected by this user-shell problem to run in 20.03.
There isn't a great override point to apply just this fix. Copy/pasting
testing-python.nix just to specify a new test-driver.py isn't great --
it would cut off receiving any other fixes in the testing infrastructure
until 20.09. A 20.03 system using testing-python.nix from the unstable
branch and then passing 20.03's pkgs in to avoid getting unstable's
pkgs is quite a bit of configuration to expect from clients and seems
fragile against future changes in the unstable branch that expect pkgs
to be mostly in-sync with the test driver. Both of these not-great
options leave a bunch of "TODO: Remove after 20.09" junk in clients'
configs & make that upgrade harder.

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 nixpkgs-review --run "nixpkgs-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.
…script as the user

(cherry picked from commit 751a270)

Reason: Back-porting this straight-forward fix is the best way to
allow tests affected by this user-shell problem to run in 20.03.
There isn't a great override point to apply just this fix.  Copy/pasting
testing-python.nix just to specify a new test-driver.py isn't great --
it would cut off receiving any other fixes in the testing infrastructure
until 20.09.  A 20.03 system using testing-python.nix from the unstable
branch and then passing 20.03's pkgs in to avoid getting unstable's
pkgs is quite a bit of configuration to expect from clients and seems
fragile against future changes in the unstable branch that expect pkgs
to be mostly in-sync with the test driver.  Both of these not-great
options leave a bunch of "TODO: Remove after 20.09" junk in clients'
configs & make that upgrade harder.
@nixos-discourse
Copy link

@nixos-discourse nixos-discourse commented Jul 3, 2020

This pull request has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/prs-ready-for-review/3032/214

@jonringer
Copy link
Contributor

@jonringer jonringer commented Jul 3, 2020

@GrahamcOfBorg test grafana

@jonringer
Copy link
Contributor

@jonringer jonringer commented Jul 3, 2020

based upon discussion on master PR, I think this is good to go

@jonringer jonringer merged commit f761c14 into NixOS:release-20.03 Jul 3, 2020
16 checks passed
16 checks passed
Evaluation Performance Report Evaluator Performance Report
Details
grahamcofborg-eval ^.^!
Details
grahamcofborg-eval-check-maintainers matching changed paths to changed attrs...
Details
grahamcofborg-eval-check-meta config.nix: checkMeta = true
Details
grahamcofborg-eval-darwin nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="dce712e"; rev="dce712ea3c1138829631fac92d6257f19c3ee09d"; } ./pkgs/t
Details
grahamcofborg-eval-lib-tests nix-build --arg pkgs import ./. {} ./lib/tests/release.nix
Details
grahamcofborg-eval-nixos nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="dce712e"; rev="dce712ea3c1138829631fac92d6257f19c3ee09d"; } ./nixos/
Details
grahamcofborg-eval-nixos-manual nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="dce712e"; rev="dce712ea3c1138829631fac92d6257f19c3ee09d"; } ./nixos/
Details
grahamcofborg-eval-nixos-options nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="dce712e"; rev="dce712ea3c1138829631fac92d6257f19c3ee09d"; } ./nixos/
Details
grahamcofborg-eval-nixpkgs-manual nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="dce712e"; rev="dce712ea3c1138829631fac92d6257f19c3ee09d"; } ./pkgs/t
Details
grahamcofborg-eval-nixpkgs-tarball nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="dce712e"; rev="dce712ea3c1138829631fac92d6257f19c3ee09d"; } ./pkgs/t
Details
grahamcofborg-eval-nixpkgs-unstable-jobset nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="dce712e"; rev="dce712ea3c1138829631fac92d6257f19c3ee09d"; } ./pkgs/t
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
tests.grafana on aarch64-linux Success
Details
tests.grafana on x86_64-linux Success
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

4 participants
You can’t perform that action at this time.