Ben Radford
6a8de4c9dc
Avoid enumerating entire overlay store dir upfront.
...
As an optimisation for LocalStore, we read all the store directory entries into
a set. Checking for membership of this set is much faster than a stat syscall.
However for LocalOverlayStore, the lower store directory is expected to contain
a vast number of entries and reading them all can take a very long time.
So instead of enumerating them all upfront, we call pathExists as needed. This
means making stat syscalls for each store path, but the upper layer is expected
to be relatively small compared to the lower store so that should be okay.
2023-08-01 12:48:02 +01:00
John Ericson
621bdbdb31
Merge branch 'overlayfs-store' into delete
2023-07-26 12:01:08 -04:00
Ben Radford
ca1a108dad
Update tests/overlay-local-store/remount.sh
...
Co-authored-by: John Ericson <git@JohnEricson.me>
2023-07-26 16:01:20 +01:00
Ben Radford
6da05c0a11
Rename test to delete-duplicate.
2023-07-26 16:01:20 +01:00
Ben Radford
ed14286924
Invoke remount-hook program when necessary.
2023-07-26 16:01:20 +01:00
Ben Radford
11c493f8fa
Avoid creating whiteout for duplicate store paths.
2023-07-26 16:01:20 +01:00
Ben Radford
cc6f8aa91a
Test that delete works for duplicate file edge case.
2023-07-26 16:01:20 +01:00
John Ericson
b0877ad3c9
Give test a more specific name
2023-07-26 09:50:31 -04:00
John Ericson
19c43c5d78
Write test for deleting objects referenced from below
...
Currently fails, as expected.
2023-07-25 18:09:02 -04:00
John Ericson
73a55e4005
Merge remote-tracking branch 'layered-store/overlayfs-store' into gc
2023-07-25 09:48:06 -04:00
Ben Radford
497464f494
Extend verify test to check that repair is supported.
2023-07-25 13:33:37 +01:00
John Ericson
3731208dc1
Adopt GC test for local-overlay store
...
Doesn't yet pass. Fixes are needed.
2023-07-24 18:14:12 -04:00
Ben Radford
2fc00ec19f
Fix unbound variable error in optimise test.
2023-07-20 11:27:41 +01:00
Ben Radford
2c66a093e0
Define storeBRoot variable distinct from storeB URI.
2023-07-20 11:03:41 +01:00
Ben Radford
878c84d5ee
Fix errors about NIX_STORE_DIR being unset.
2023-07-20 10:42:40 +01:00
Ben Radford
9769a0ae7d
Ensure all overlay tests use new tmpfs store paths.
2023-07-20 10:42:40 +01:00
Ben Radford
7fda19e2f1
Mount tmpfs first to ensure overlayfs works consistently.
2023-07-20 10:42:40 +01:00
Ben Radford
44f855d14e
Missing addTextToStore function.
2023-07-20 10:42:39 +01:00
Ben Radford
d1c77b201a
Explicitly exec shell to fix ENOENT errors.
2023-07-20 10:42:39 +01:00
Ben Radford
8ddbcb736a
Implement overlay store deduplication.
2023-07-20 10:42:39 +01:00
Ben Radford
a9510f9502
Implement test for store path deduplication.
2023-07-20 10:42:39 +01:00
Ben Radford
614efc1240
Add test for store optimise path deduplication.
2023-07-20 10:42:39 +01:00
Ben Radford
d5cd74a401
Override verifyStore to always pass NoRepair for LocalOverlayStore.
2023-07-20 10:42:39 +01:00
Ben Radford
58085e4eff
Have verify test exercise check-contents too.
2023-07-20 10:42:38 +01:00
Ben Radford
0ccf6382af
Add test for verifying overlay store.
2023-07-20 10:42:38 +01:00
Ben Radford
a33ee5c843
Paths added to lower store are accessible via overlay.
2023-07-20 10:42:38 +01:00
cidkidnix
83cfa82e52
Add unset to NIX_STORE_DIR for local-overlay tests
2023-07-13 14:39:46 -05:00
John Ericson
0ec7f2fb3f
Create local.mk
for local-overlay-store tests
2023-05-15 23:11:29 -04:00
John Ericson
5d18120ba8
Split tests some more
...
Good for parallelism and easier reading.
2023-05-15 23:11:17 -04:00
cidkidnix
0979a374c5
Begin to split up overlay-local-store tests
...
The bad-uris tests are now in their own file.
"Outer" is a bad name, but it will be split up next.
2023-05-15 15:31:57 -05:00
cidkidnix
b7e5aaf90d
Add test for checking that we reject bad local overlay store uris
2023-05-15 13:41:38 -05:00
John Ericson
4173743a3c
Implement more queries
2023-05-09 17:20:58 -04:00
John Ericson
8339c170d7
More tests
2023-05-09 16:49:44 -04:00
John Ericson
5059be53b1
Fix recursive ingestion from lower store
2023-05-09 16:42:28 -04:00
John Ericson
e7c3399ed2
Specialize LocalOverlayStore::queryPathFromHashPart
...
With test
2023-05-09 10:40:10 -04:00
John Ericson
ddaf2750b5
Specialize more methods, fix tests
2023-05-09 10:22:38 -04:00
John Ericson
b3d320c594
Convert more methods
...
Fixed one test, broke another
2023-05-08 18:50:16 -04:00
John Ericson
59a8099038
Fix LocalOverlayStore::queryPathInfoUncached
, FIXME in test
2023-05-08 17:37:40 -04:00
John Ericson
0193c2abcd
Improve tests slightly
2023-05-08 16:03:32 -04:00
John Ericson
d80fc2ac1b
First round of testing, with todos
2023-05-08 16:01:36 -04:00
John Ericson
f08754a97a
Progress on tests
2023-05-08 14:47:39 -04:00
John Ericson
111aeb9e92
Testing overlayfs stores
2023-03-21 10:53:23 -04:00