From 259d6778efd865ccd3b5fbf4f3a29002a7d58d93 Mon Sep 17 00:00:00 2001 From: regnat Date: Mon, 9 Nov 2020 16:04:18 +0100 Subject: Move the CA tests to a sub-directory Requires a slight update to the test infra to work properly, but having the possibility to group tests that way makes the whole thing quite cleaner imho --- tests/local.mk | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'tests/local.mk') diff --git a/tests/local.mk b/tests/local.mk index 7deea9ac1..07cfd7a50 100644 --- a/tests/local.mk +++ b/tests/local.mk @@ -38,10 +38,10 @@ nix_tests = \ recursive.sh \ describe-stores.sh \ flakes.sh \ - content-addressed.sh \ - nix-copy-content-addressed.sh \ build.sh \ - compute-levels.sh + compute-levels.sh \ + ca/build.sh \ + ca/nix-copy.sh # parallel.sh install-tests += $(foreach x, $(nix_tests), tests/$(x)) -- cgit v1.2.3 From 93b5a59b674c0a29846828c7d14b434cc954f8ee Mon Sep 17 00:00:00 2001 From: regnat Date: Mon, 9 Nov 2020 16:04:43 +0100 Subject: Add a test for the remote caching of CA derivations --- tests/local.mk | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'tests/local.mk') diff --git a/tests/local.mk b/tests/local.mk index 07cfd7a50..e17555051 100644 --- a/tests/local.mk +++ b/tests/local.mk @@ -41,7 +41,8 @@ nix_tests = \ build.sh \ compute-levels.sh \ ca/build.sh \ - ca/nix-copy.sh + ca/nix-copy.sh \ + ca/substitute.sh # parallel.sh install-tests += $(foreach x, $(nix_tests), tests/$(x)) -- cgit v1.2.3 From 54ced9072b94515a756e1e8e76c92a42f0ccf366 Mon Sep 17 00:00:00 2001 From: regnat Date: Mon, 8 Mar 2021 16:43:11 +0100 Subject: Check the signatures when copying store paths around Broken atm --- tests/local.mk | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'tests/local.mk') diff --git a/tests/local.mk b/tests/local.mk index e17555051..9a227bec5 100644 --- a/tests/local.mk +++ b/tests/local.mk @@ -41,8 +41,9 @@ nix_tests = \ build.sh \ compute-levels.sh \ ca/build.sh \ - ca/nix-copy.sh \ ca/substitute.sh + ca/signatures.sh \ + ca/nix-copy.sh # parallel.sh install-tests += $(foreach x, $(nix_tests), tests/$(x)) -- cgit v1.2.3 From 5869b3025d8ed2b99a8dca61f335789ce6dc83e1 Mon Sep 17 00:00:00 2001 From: sternenseemann <0rpkxez4ksa01gb3typccl0i@systemli.org> Date: Tue, 16 Mar 2021 02:42:14 +0100 Subject: tests/local.mk: fix missing newline escape Fixes syntax error introduced in 54ced9072b94515a756e1e8e76c92a42f0ccf366. --- tests/local.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tests/local.mk') diff --git a/tests/local.mk b/tests/local.mk index 1ca363091..de095c117 100644 --- a/tests/local.mk +++ b/tests/local.mk @@ -42,7 +42,7 @@ nix_tests = \ build.sh \ compute-levels.sh \ ca/build.sh \ - ca/substitute.sh + ca/substitute.sh \ ca/signatures.sh \ ca/nix-copy.sh # parallel.sh -- cgit v1.2.3 From 5716345adf2e794fd62229ea52352e74e92e8e63 Mon Sep 17 00:00:00 2001 From: regnat Date: Tue, 10 Nov 2020 10:43:33 +0100 Subject: Add a test ensuring compatibility with an old daemon This requires adding `nix` to its own closure which is a bit unfortunate, but as it is optional (the test will be disabled if `OUTER_NIX` is unset) it shouldn't be too much of an issue. (Ideally this should go in another derivation so that we can build Nix and run the test independently, but as the tests are running in the same derivation as the build it's a bit complicated to do so). --- tests/local.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tests/local.mk') diff --git a/tests/local.mk b/tests/local.mk index de095c117..dd9a0ad56 100644 --- a/tests/local.mk +++ b/tests/local.mk @@ -6,7 +6,7 @@ nix_tests = \ gc-auto.sh \ referrers.sh user-envs.sh logging.sh nix-build.sh misc.sh fixed.sh \ gc-runtime.sh check-refs.sh filter-source.sh \ - local-store.sh remote-store.sh export.sh export-graph.sh \ + local-store.sh remote-store.sh remote-store-old-daemon.sh export.sh export-graph.sh \ timeout.sh secure-drv-outputs.sh nix-channel.sh \ multiple-outputs.sh import-derivation.sh fetchurl.sh optimise-store.sh \ binary-cache.sh \ -- cgit v1.2.3 From eab9cdbd75e739be33f9433cfba9ab354d084440 Mon Sep 17 00:00:00 2001 From: regnat Date: Tue, 17 Nov 2020 14:33:09 +0100 Subject: Add a test for the migration of the db between versions --- tests/local.mk | 1 + 1 file changed, 1 insertion(+) (limited to 'tests/local.mk') diff --git a/tests/local.mk b/tests/local.mk index dd9a0ad56..01c35551f 100644 --- a/tests/local.mk +++ b/tests/local.mk @@ -7,6 +7,7 @@ nix_tests = \ referrers.sh user-envs.sh logging.sh nix-build.sh misc.sh fixed.sh \ gc-runtime.sh check-refs.sh filter-source.sh \ local-store.sh remote-store.sh remote-store-old-daemon.sh export.sh export-graph.sh \ + db-migration.sh \ timeout.sh secure-drv-outputs.sh nix-channel.sh \ multiple-outputs.sh import-derivation.sh fetchurl.sh optimise-store.sh \ binary-cache.sh \ -- cgit v1.2.3 From 81df1b5c687b7606f0159485c33bf5f7e2614eba Mon Sep 17 00:00:00 2001 From: regnat Date: Tue, 16 Mar 2021 14:15:57 +0100 Subject: Remove the `remote-store-old-daemon` test Doesn't make sense anymore with the new setup --- tests/local.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tests/local.mk') diff --git a/tests/local.mk b/tests/local.mk index 01c35551f..e7e85f97e 100644 --- a/tests/local.mk +++ b/tests/local.mk @@ -6,7 +6,7 @@ nix_tests = \ gc-auto.sh \ referrers.sh user-envs.sh logging.sh nix-build.sh misc.sh fixed.sh \ gc-runtime.sh check-refs.sh filter-source.sh \ - local-store.sh remote-store.sh remote-store-old-daemon.sh export.sh export-graph.sh \ + local-store.sh remote-store.sh export.sh export-graph.sh \ db-migration.sh \ timeout.sh secure-drv-outputs.sh nix-channel.sh \ multiple-outputs.sh import-derivation.sh fetchurl.sh optimise-store.sh \ -- cgit v1.2.3 From c2dfda007e777a33cd487a5631f0d143f915dd43 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Domen=20Ko=C5=BEar?= Date: Fri, 9 Apr 2021 23:13:08 +0200 Subject: add tests for zstd compression --- tests/local.mk | 1 + 1 file changed, 1 insertion(+) (limited to 'tests/local.mk') diff --git a/tests/local.mk b/tests/local.mk index aa8b4f9bf..82894af78 100644 --- a/tests/local.mk +++ b/tests/local.mk @@ -27,6 +27,7 @@ nix_tests = \ signing.sh \ shell.sh \ brotli.sh \ + zstd.sh \ pure-eval.sh \ check.sh \ plugins.sh \ -- cgit v1.2.3 From f46adb783c939c61a087cdfd8af964f4ad6f9816 Mon Sep 17 00:00:00 2001 From: regnat Date: Tue, 11 May 2021 10:52:17 +0200 Subject: Add a test for `nix run` with CA derivations --- tests/local.mk | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'tests/local.mk') diff --git a/tests/local.mk b/tests/local.mk index e2c94dde6..542be6b7e 100644 --- a/tests/local.mk +++ b/tests/local.mk @@ -46,6 +46,7 @@ nix_tests = \ ca/build.sh \ ca/substitute.sh \ ca/signatures.sh \ + ca/nix-run.sh \ ca/nix-copy.sh # parallel.sh @@ -53,6 +54,6 @@ install-tests += $(foreach x, $(nix_tests), tests/$(x)) tests-environment = NIX_REMOTE= $(bash) -e -clean-files += $(d)/common.sh $(d)/config.nix +clean-files += $(d)/common.sh $(d)/config.nix $(d)/ca/config.nix -test-deps += tests/common.sh tests/config.nix tests/plugins/libplugintest.$(SO_EXT) +test-deps += tests/common.sh tests/config.nix tests/ca/config.nix tests/plugins/libplugintest.$(SO_EXT) -- cgit v1.2.3 From 5985b8b5275605ddd5e92e2f0a7a9f494ac6e35d Mon Sep 17 00:00:00 2001 From: regnat Date: Thu, 27 May 2021 13:25:25 +0200 Subject: Check the CA hash when importing stuff in the local store MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When adding a path to the local store (via `LocalStore::addToStore`), ensure that the `ca` field of the provided `ValidPathInfo` does indeed correspond to the content of the path. Otherwise any untrusted user (or any binary cache) can add arbitrary content-addressed paths to the store (as content-addressed paths don’t need a signature). --- tests/local.mk | 1 + 1 file changed, 1 insertion(+) (limited to 'tests/local.mk') diff --git a/tests/local.mk b/tests/local.mk index 542be6b7e..59eb4eb0f 100644 --- a/tests/local.mk +++ b/tests/local.mk @@ -11,6 +11,7 @@ nix_tests = \ timeout.sh secure-drv-outputs.sh nix-channel.sh \ multiple-outputs.sh import-derivation.sh fetchurl.sh optimise-store.sh \ binary-cache.sh \ + substitute-with-invalid-ca.sh \ binary-cache-build-remote.sh \ nix-profile.sh repair.sh dump-db.sh case-hack.sh \ check-reqs.sh pass-as-file.sh tarball.sh restricted.sh \ -- cgit v1.2.3 From 56605b468868b834e44a9700907b734428cb120a Mon Sep 17 00:00:00 2001 From: regnat Date: Thu, 20 May 2021 13:55:00 +0200 Subject: Make `nix-shell` support content-addressed derivations MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Resolve the derivation before trying to load its environment − essentially reproducing what the build loop does − so that we can effectively access our dependencies (and not just their placeholders). Fix #4821 --- tests/local.mk | 1 + 1 file changed, 1 insertion(+) (limited to 'tests/local.mk') diff --git a/tests/local.mk b/tests/local.mk index 59eb4eb0f..d640bdd3c 100644 --- a/tests/local.mk +++ b/tests/local.mk @@ -47,6 +47,7 @@ nix_tests = \ ca/build.sh \ ca/substitute.sh \ ca/signatures.sh \ + ca/nix-shell.sh \ ca/nix-run.sh \ ca/nix-copy.sh # parallel.sh -- cgit v1.2.3 From a3ce88725b44a30184cbe8706fc3a53a8610cc47 Mon Sep 17 00:00:00 2001 From: regnat Date: Tue, 15 Jun 2021 12:11:31 +0200 Subject: Add a test for the gc with CA derivations Also add a small architecture to easily run CA-enabled tests --- tests/local.mk | 1 + 1 file changed, 1 insertion(+) (limited to 'tests/local.mk') diff --git a/tests/local.mk b/tests/local.mk index 59eb4eb0f..e40178b80 100644 --- a/tests/local.mk +++ b/tests/local.mk @@ -2,6 +2,7 @@ nix_tests = \ hash.sh lang.sh add.sh simple.sh dependencies.sh \ config.sh \ gc.sh \ + ca/gc.sh \ gc-concurrent.sh \ gc-auto.sh \ referrers.sh user-envs.sh logging.sh nix-build.sh misc.sh fixed.sh \ -- cgit v1.2.3 From 3784c66a46aea2cc3e26b8cff94b3a1f477888f1 Mon Sep 17 00:00:00 2001 From: regnat Date: Mon, 21 Jun 2021 15:17:31 +0200 Subject: Remove a possible existing store path when building CA derivations In case a previous interrupted build left a garbage path laying around, remove it before trying to move the path to its final location. Fix #4858 --- tests/local.mk | 1 + 1 file changed, 1 insertion(+) (limited to 'tests/local.mk') diff --git a/tests/local.mk b/tests/local.mk index 59eb4eb0f..663b8c8bc 100644 --- a/tests/local.mk +++ b/tests/local.mk @@ -45,6 +45,7 @@ nix_tests = \ build.sh \ compute-levels.sh \ ca/build.sh \ + ca/build-with-garbage-path.sh \ ca/substitute.sh \ ca/signatures.sh \ ca/nix-run.sh \ -- cgit v1.2.3 From a5df669bc685834b16de0ab57723ff734c10d2f7 Mon Sep 17 00:00:00 2001 From: regnat Date: Wed, 19 May 2021 13:35:46 +0200 Subject: =?UTF-8?q?Add=20a=20test=20for=20the=20=E2=80=9Ctwo=20glibc?= =?UTF-8?q?=E2=80=9D=20issue?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tests/local.mk | 1 + 1 file changed, 1 insertion(+) (limited to 'tests/local.mk') diff --git a/tests/local.mk b/tests/local.mk index 0d594cda0..e7161d298 100644 --- a/tests/local.mk +++ b/tests/local.mk @@ -47,6 +47,7 @@ nix_tests = \ compute-levels.sh \ ca/build.sh \ ca/build-with-garbage-path.sh \ + ca/duplicate-realisation-in-closure.sh \ ca/substitute.sh \ ca/signatures.sh \ ca/nix-run.sh \ -- cgit v1.2.3 From be7a4a6a1303ddbd1f8942f02c04f69016c51da0 Mon Sep 17 00:00:00 2001 From: regnat Date: Thu, 24 Jun 2021 11:41:51 +0200 Subject: Make the post-build-hook also run for unresolved CA derivations Fix #4837 --- tests/local.mk | 1 + 1 file changed, 1 insertion(+) (limited to 'tests/local.mk') diff --git a/tests/local.mk b/tests/local.mk index 82cec1df3..35ee9e271 100644 --- a/tests/local.mk +++ b/tests/local.mk @@ -39,6 +39,7 @@ nix_tests = \ search.sh \ nix-copy-ssh.sh \ post-hook.sh \ + ca/post-hook.sh \ function-trace.sh \ recursive.sh \ describe-stores.sh \ -- cgit v1.2.3 From 7746cb13dc4e644c9792b3e3666cd49635d694e0 Mon Sep 17 00:00:00 2001 From: regnat Date: Wed, 23 Jun 2021 17:27:18 +0200 Subject: Make CA derivations compatible with recursive Nix Add an access-control list to the realisations in recursive-nix (similar to the already existing one for store paths), so that we can build content-addressed derivations in the restricted store. Fix #4353 --- tests/local.mk | 1 + 1 file changed, 1 insertion(+) (limited to 'tests/local.mk') diff --git a/tests/local.mk b/tests/local.mk index 82cec1df3..4d9d314cc 100644 --- a/tests/local.mk +++ b/tests/local.mk @@ -52,6 +52,7 @@ nix_tests = \ ca/signatures.sh \ ca/nix-shell.sh \ ca/nix-run.sh \ + ca/recursive.sh \ ca/nix-copy.sh # parallel.sh -- cgit v1.2.3 From c05bdef020d99da1204629bba7b775553c5d6005 Mon Sep 17 00:00:00 2001 From: regnat Date: Thu, 15 Jul 2021 18:17:18 +0200 Subject: Forward the whole Nix config to the repl subprocesses Fill `NIX_CONFIG` with the value of the current Nix configuration before calling the nix subprocesses in the repl That way the whole configuration (including the possible `experimental-features`, a possibly `--store` option or whatever) will be made available. This is required for example to make `nix repl` work with a custom `--store` --- tests/local.mk | 1 + 1 file changed, 1 insertion(+) (limited to 'tests/local.mk') diff --git a/tests/local.mk b/tests/local.mk index cbdf4efdb..ce9725543 100644 --- a/tests/local.mk +++ b/tests/local.mk @@ -46,6 +46,7 @@ nix_tests = \ flakes.sh \ build.sh \ compute-levels.sh \ + repl.sh \ ca/build.sh \ ca/build-with-garbage-path.sh \ ca/duplicate-realisation-in-closure.sh \ -- cgit v1.2.3 From 87077739658b35863fb56131fd7099294c181ee5 Mon Sep 17 00:00:00 2001 From: regnat Date: Tue, 20 Jul 2021 06:57:56 +0200 Subject: Properly lock the builds of CA derivations MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Make sure that we can’t build the same derivation twice at the same time. Fix https://github.com/NixOS/nix/issues/5029 --- tests/local.mk | 1 + 1 file changed, 1 insertion(+) (limited to 'tests/local.mk') diff --git a/tests/local.mk b/tests/local.mk index ce9725543..e16c5a9b7 100644 --- a/tests/local.mk +++ b/tests/local.mk @@ -55,6 +55,7 @@ nix_tests = \ ca/nix-shell.sh \ ca/nix-run.sh \ ca/recursive.sh \ + ca/concurrent-builds.sh \ ca/nix-copy.sh # parallel.sh -- cgit v1.2.3 From 29e4913f7947730c468c1d96f150648ec59f572d Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Tue, 27 Jul 2021 11:17:56 +0200 Subject: Add --eval-store test --- tests/local.mk | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'tests/local.mk') diff --git a/tests/local.mk b/tests/local.mk index e16c5a9b7..b100e7f15 100644 --- a/tests/local.mk +++ b/tests/local.mk @@ -56,7 +56,8 @@ nix_tests = \ ca/nix-run.sh \ ca/recursive.sh \ ca/concurrent-builds.sh \ - ca/nix-copy.sh + ca/nix-copy.sh \ + eval-store.sh # parallel.sh install-tests += $(foreach x, $(nix_tests), tests/$(x)) -- cgit v1.2.3 From 03bb8f84e0f54d9980b160785f98da8ae07196fe Mon Sep 17 00:00:00 2001 From: Tom Bereknyei Date: Tue, 12 Oct 2021 02:14:36 -0400 Subject: Add compression level for NARs Based off on @dtzWill's #2276 --- tests/local.mk | 1 + 1 file changed, 1 insertion(+) (limited to 'tests/local.mk') diff --git a/tests/local.mk b/tests/local.mk index b100e7f15..d88c3a875 100644 --- a/tests/local.mk +++ b/tests/local.mk @@ -33,6 +33,7 @@ nix_tests = \ shell.sh \ brotli.sh \ zstd.sh \ + compression-levels.sh \ pure-eval.sh \ check.sh \ plugins.sh \ -- cgit v1.2.3