Commit Graph
75303 Commits
Author SHA1 Message Date
Daan De Meyer 4dee4e0039 repart: Create disk image file with copy-on-write disabled on btrfs
COW on btrfs generally does not play well lots of random writes so
let's make the disk images generated by repart NOCOW by default on
btrfs like we do elsewhere across the codebase.
2024-07-24 18:58:41 +02:00
Daan De Meyer b9c0b6c011 repart: Make partition files NOCOW if the disk image is NOCOW
On btrfs, reflinks into a disk image that has copy-on-write disabled
only work if the source has copy-on-write disabled as well so let's
make sure that's the case if the disk image has copy-on-write disabled.
2024-07-24 18:58:41 +02:00
Daan De Meyer 1b05ac946a fs-util: Add XO_NOCOW flag
Let's add a flag for xopenat() that immediately makes a file NOCOW
after opening it if it's supported.
2024-07-24 18:58:41 +02:00
Daan De Meyer 32dfe3b63e fs-util: Clean up properly in xopenat_full() on labelling error
If we fail to relabel the file, we should unlink the file or directory
again, so let's make sure we do that.
2024-07-24 18:58:41 +02:00
Daan De Meyer 0dd82dab91 fs-util: Handle dangling symlinks in openat_report_new()
openat() will always resolve symlinks, except if O_NOFOLLOW is passed
or O_CREAT|O_EXCL is passed. This means that if a dangling symlink is
passed to openat_report_new(), the first call to openat() will always
fail with ENOENT and the second call to openat() will always fail with
EEXIST.

Let's catch this case explicitly and fallback to creating the file with
just O_CREAT and assume we're the ones that created the file. We can't
resolve the symlink with chase() because this function is itself called
by chase() so we could end up in weird recursive calls if we'd try to do
so.
2024-07-24 18:58:41 +02:00
Daan De Meyer b91ad56228 test-fs-util: Modernize openat_report_new() test 2024-07-24 18:58:41 +02:00
Daan De Meyer 372e96a5a1 test-id128: Use new assertion macros 2024-07-24 18:58:40 +02:00
Daan De Meyer 60a4505da4 test: Add ASSERT_EQ_ID128() and ASSERT_NE_ID128() 2024-07-24 18:58:40 +02:00
Daan De Meyer 8eb06fd162 test: Add ASSERT_FAIL() 2024-07-24 18:58:40 +02:00
Daan De Meyer 3d6c6f9b9e mkosi: Update to latest
Includes the required fix to make mkosi copy NOCOW disk images properly.
2024-07-24 18:58:38 +02:00
Luca Boccassi 8da8d6ce30 Merge pull request #33535 from neighbourhoodie/tests/dns-cache
Tests for DnsCache functions
2024-07-23 19:01:23 +01:00
Luca Boccassi 5aaf33ec96 Merge pull request #33534 from neighbourhoodie/tests/dns-query
Tests for DnsQuery functions
2024-07-23 18:47:14 +01:00
Mike Yuan 7973f33e81 core: clean up Set/LoadCredential= parsers
Make logging consistent, plus introduce helper function
for adding creds to ExecContext.set_credential too.
2024-07-23 15:53:38 +01:00
Daan De Meyer fffbfb4ed1 mkosi: Bump device timeout even more
I still manage to hit it in some cases so let's bump again.
2024-07-23 15:49:37 +01:00
Luca Boccassi d111d76844 Merge pull request #33533 from neighbourhoodie/tests/dns-synthesize 2024-07-23 15:44:40 +01:00
James Coglan 5301548fbb resolved: tests for dns_synthesize_family() and dns_synthesize_protocol() 2024-07-23 15:44:07 +01:00
James Coglan 6fd7fc92cf resolved: tests for dns_synthesize_answer() 2024-07-23 15:44:07 +01:00
Mary Strodl c73883143a sd-dhcp-server: persist hardware addresses in leases 2024-07-23 14:55:48 +01:00
James Coglan 538a3dc298 resolved: tests for dns_query_string() 2024-07-23 14:17:23 +01:00
James Coglan c080825f14 resolved: tests for dns_query_go(); multiple search domains for dns_query_candidate_notify() 2024-07-23 14:17:23 +01:00
James Coglan 0a547aea96 resolved: refactor environment management in dns_query_go() tests 2024-07-23 14:17:23 +01:00
James Coglan 8501f44563 resolved: tests for dns_query_go() when configured with search domains 2024-07-23 14:17:23 +01:00
James Coglan cc3bad9d70 resolved: tests for dns_query_go() when no scopes are available 2024-07-23 14:17:23 +01:00
James Coglan 5d5f86431f resolved: tests for dns_query_go() using a bypass query 2024-07-23 14:17:23 +01:00
James Coglan 16078b8172 resolved: tests for dns_query_go() -- with and without network link 2024-07-23 14:17:23 +01:00
James Coglan 7d5ad4f88e resolved: tests for dns_query_process_cname_one(); no match, DNAME, utf-8 handling 2024-07-23 14:17:23 +01:00
James Coglan 9add77fafb resolved: tests for dns_query_process_cname_many() 2024-07-23 14:17:23 +01:00
James Coglan 47eb7e0bf2 resolved: tests for common usage of dns_query_process_cname_one() 2024-07-23 14:17:23 +01:00
James Coglan e5d246b488 resolved: tests for dns_query_make_auxiliary() 2024-07-23 14:17:22 +01:00
James Coglan 792a738625 resolved: tests for dns_query_new() 2024-07-23 14:17:21 +01:00
James Coglan f5dd610978 resolved: tests for dns_cache_lookup() clamping the TTL 2024-07-23 14:08:31 +01:00
James Coglan 1074c9001d resolved: tests for dns_cache_put() for NXDOMAIN with no SOA 2024-07-23 14:08:31 +01:00
James Coglan 6b864ea813 resolved: test that pseudo classes and types are not cached 2024-07-23 14:08:31 +01:00
James Coglan 7137086fa0 resolves: tests for dns_cache_prune() 2024-07-23 14:08:31 +01:00
James Coglan 3f6ae4a062 resolved: tests for dns_cache_check_conflicts() 2024-07-23 14:08:31 +01:00
James Coglan 42547022fd resolved: tests for dns_cache_export_shared_to_packet() 2024-07-23 14:08:31 +01:00
James Coglan 5b61b34ad0 resolved: tests for dns_cache_lookup(); mDNS and multiple matching entries 2024-07-23 14:08:31 +01:00
James Coglan 043a29b139 resolved: tests for dns_cache_lookup() returning the most recent input 2024-07-23 14:08:31 +01:00
James Coglan 6dd377ad70 resolved: tests for dns_cache_dump() 2024-07-23 14:08:31 +01:00
James Coglan e936ec5e4f resolved: test cache misses 2024-07-23 14:08:31 +01:00
James Coglan 25ef0fc7c8 resolved: tests for dns_cache_lookup() for NXDOMAIN 2024-07-23 14:08:31 +01:00
James Coglan 76f832a4f6 resolved: first test for dns_cache_lookup() 2024-07-23 14:08:31 +01:00
James Coglan f8da0642f3 resolved: tests for dns_cache_dump_to_json() 2024-07-23 14:08:31 +01:00
James Coglan 2bec28864a resolved: check that adding an expired response removes cache entry 2024-07-23 14:08:31 +01:00
James Coglan 186184ad14 resolved: tests for dns_cache_put(); CNAME success and name error 2024-07-23 14:08:31 +01:00
James Coglan f44ed739f1 resolved: tests for dns_cache_put() with non-matching class, type, name 2024-07-23 14:08:31 +01:00
James Coglan bbcd3bc381 resolved: refactor DNS answer construction for cache tests 2024-07-23 14:08:31 +01:00
James Coglan 4f4c06f02d resolved: test for dns_cache_put() with empty answer 2024-07-23 14:08:31 +01:00
James Coglan c5df8d53a9 resolved: tests for dns_cache_put() with different RCODEs 2024-07-23 14:08:31 +01:00
James Coglanand 29c15d9d7b resolved: tests for dns_cache_put(); successful A query
Co-Authored-By: jan@neighbourhood.ie
2024-07-23 14:08:29 +01:00