Skip to contentSkip to conversation

erofs-utils: tests: add test for file-backed mount

PATCH In review Hongzhen Luo 2 participants 3 messages Oct 14, 2024 – Oct 15, 2024

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 erofs-utils: tests: add test for file-backed mount

Test for the file-backed mount feature.

---
 tests/Makefile.am   |  3 +++
 tests/erofs/026     | 54 +++++++++++++++++++++++++++++++++++++++++++++
 tests/erofs/026.out |  2 ++
 3 files changed, 59 insertions(+)
 create mode 100755 tests/erofs/026
 create mode 100644 tests/erofs/026.out
tests/Makefile.am +3 -0
index 93016e5..70044a3 100644
@@ -110,6 +110,9 @@ TESTS += erofs/024
 # 025 - regression test for corrupted directories with hardlinks
 TESTS += erofs/025
 
+# 026 - test for file-backed mount
+TESTS += erofs/026
+
 EXTRA_DIST = common/rc erofs
 
 clean-local: clean-local-check
tests/erofs/026 new file +54 -0

54 lines not on this page · raw message

tests/erofs/026.out new file +2 -0
new file mode 100644
index 0000000..e45c6a3
@@ -0,0 +1,2 @@
+QA output created by 026
+Silence is golden
Signature · 1 line
2.43.5
#1 lore raw
Quoted 3 lines · Hongzhen Luo

Test for the file-backed mount feature.

I think we need to run all previous tests for file-backed mounts, and it's my previous mount helper for testing.

#include <sys/mount.h>

int main(int argc, char *argv[])

{
        return mount(argv[1], argv[2], "erofs", MS_RDONLY, argc >= 3 ? argv[3] : NULL);

}

Thanks,
Gao Xiang

#2 lore raw
Quoted 12 lines · Gao Xiang
Quoted 3 lines · Hongzhen Luo

Test for the file-backed mount feature.

I think we need to run all previous tests for file-backed mounts, and it's my previous mount helper for testing.

#include <sys/mount.h>

Quoted 8 lines

int main(int argc, char *argv[])
{
        return mount(argv[1], argv[2], "erofs", MS_RDONLY, argc >= 3 ? argv[3] : NULL);

}

Thanks,
Gao Xiang

Sure.

---

Thanks,

Hongzhen