Skip to contentSkip to conversation

erofs-utils: tests: add test for rebuild fulldata

PATCH Superseded Lucas Karpinski 2 participants 3 messages Apr 17 – Apr 21

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 erofs-utils: tests: add test for rebuild fulldata

Add a regression test for building a self-contained image out of two other erofs images.

1. Create img1 & img2 with various file types and sizes.
2. Rebuild a new self-contained image of img1 & img2.
3. Delete img1 & img2 to prove that this isn't use the blob based rebuild path.
4. Mount the new self-contained image and compare the checksum to the original folders.

---
 tests/Makefile.am   |  3 ++
 tests/erofs/030     | 88 +++++++++++++++++++++++++++++++++++++++++++++++++++++
 tests/erofs/030.out |  2 ++
 3 files changed, 93 insertions(+)
tests/Makefile.am +3 -0
index d8ac0678..125aa8f6 100644
@@ -126,6 +126,9 @@ TESTS += erofs/028
 # 029 - test FUSE daemon and kernel error handling on corrupted inodes
 TESTS += erofs/029
 
+# 030 - verify multi-source fulldata rebuild
+TESTS += erofs/030
+
 # NEW TEST CASE HERE
 # TESTS += erofs/999
 
tests/erofs/030 new file +88 -0

88 lines not on this page · raw message

tests/erofs/030.out new file +2 -0
new file mode 100644
index 00000000..06a1c8fe
@@ -0,0 +1,2 @@
+QA output created by 030
+Silence is golden

---
base-commit: feadb09fcfa1b05ca930cfce871d0e56f6bd3a95
change-id: 20260417-b4-fulldata-test-b8e15272bc59

Best regards,

Signature · 1 line
Lucas Karpinski <[email protected]>
#1 lore raw

Hi Lucas,

Quoted 9 lines · Lucas Karpinski

Add a regression test for building a self-contained image out of two other erofs images.

1. Create img1 & img2 with various file types and sizes.
2. Rebuild a new self-contained image of img1 & img2.
3. Delete img1 & img2 to prove that this isn't use the blob based rebuild path.
4. Mount the new self-contained image and compare the checksum to the original folders.

Thanks for the patch. I wonder if it's possible to:
1) Use a common dataset as the base layer (see other existing tests);
2) Mount two overlayfs to get the incremental layers;
- one to generate some artifacial dirs, files;
- the other to change/delete some files, or delete dirs, new another dirs;
3) Test typical metadata (whiteout, opaque), and data with:

    a) fsmerged erofs;
    b) overlayfs mount;
    fssum those two mounts.

Thanks,
Gao Xiang

#2 lore raw

PATCH v2 1/1 erofs-utils: tests: add test for rebuild fulldata

In reply to Lucas Karpinski

Add a regression test for building a self-contained image out of two other erofs images. Validate that image against a live overlayfs mount.

1. Build a base erofs image with deterministic fixtures.
2. Produce two overlayfs upperdirs; generating whitouts and opaque markers.
3. Build an erofs image per layer, then merge all three.
4. Delete the source layers to validate the merged image is self-contained.
5. Mount the merged image and a read-only stacked overlayfs and assert both have identical checksums.

Assisted-by Claude:claude-opus-4-7
---
 tests/Makefile.am   |   3 +
 tests/erofs/030     | 179 ++++++++++++++++++++++++++++++++++++++++++++
 tests/erofs/030.out |   2 +
 3 files changed, 184 insertions(+)
 create mode 100755 tests/erofs/030
 create mode 100644 tests/erofs/030.out
tests/Makefile.am +3 -0
index d8ac0678..125aa8f6 100644
@@ -126,6 +126,9 @@ TESTS += erofs/028
 # 029 - test FUSE daemon and kernel error handling on corrupted inodes
 TESTS += erofs/029
 
+# 030 - verify multi-source fulldata rebuild
+TESTS += erofs/030
+
 # NEW TEST CASE HERE
 # TESTS += erofs/999
 
tests/erofs/030 new file +179 -0

179 lines not on this page · raw message

tests/erofs/030.out new file +2 -0
new file mode 100644
index 00000000..06a1c8fe
@@ -0,0 +1,2 @@
+QA output created by 030
+Silence is golden