Add an integration test suite using the file tape backend#611
Open
matejk wants to merge 3 commits into
Open
Conversation
This was referenced Jun 12, 2026
The POSIX arch_open macro passed the Windows-style share flag as the mode argument of open(2) and ignored the actual permission argument. Files created by the file tape backend got mode 0200 (write-only), so a non-root user could not reopen records it had just written; mounting a freshly formatted file-backend volume failed with EDEV_RW_PERM. Running as root masked the problem.
e229da0 to
453f49f
Compare
Shell-based tests driven by automake (make check) covering mount and unmount, data roundtrips, truncate, rename, directory operations, xattrs, symlinks, large directories, and a tar roundtrip, plus a regression test for the unified scheduler data loss (LinearTapeFileSystem#591): single multi-block writes of random data, content-compared while mounted and after a remount. Tests mount a file-backend volume from the build tree, so no installation or tape hardware is needed; they are skipped on hosts without /dev/fuse. tests/run-in-docker.sh builds and runs the suite in an Ubuntu container for development on non-Linux hosts. A small C helper drives renameat2() with RENAME_NOREPLACE and RENAME_EXCHANGE and ftruncate() on an open descriptor; renameat2 is Linux-only, so the helper reports the commands as unsupported elsewhere. Inode numbers must survive a remount, which verifies that the LTFS index UIDs are passed through (use_ino) on both FUSE versions. Three tests cover the FUSE request size, -o direct_io, and readdirplus. Their assertions are FUSE-version aware: on libfuse 2 the request-size test expects the big_writes limit and the readdirplus prefill is not asserted (it needs libfuse >= 3.17); the strict expectations activate with the FUSE 3 port. All pass on both APIs. The harness locates build artifacts in both the autotools and CMake layouts, so the same scripts run under make check and ctest, and the test list is computed from tests/t/ so other branches can add scripts without editing the registration.
Single job building with autotools and running make check; the suite needs /dev/fuse, which the hosted runners provide.
453f49f to
d5f14f3
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
A shell-based integration test suite (14 tests) driven by
make check, mounting a file-backend volume from the build tree — no installation or tape hardware needed. Tests need a Linux host with/dev/fuseand are skipped elsewhere;tests/run-in-docker.shruns the suite in an Ubuntu container for development on non-Linux hosts. A CI workflow runs the suite on every push.Coverage: mount/unmount, data roundtrips, truncate, rename, directory operations, xattrs, symlinks, large directories, a tar roundtrip, rename flags (
RENAME_NOREPLACE/RENAME_EXCHANGE) andftruncatevia a small C helper, inode stability across remounts (verifiesuse_ino/index-UID passthrough), FUSE request sizes,direct_io, readdirplus, and content verification of writes larger than the tape block size.Relationship to the other PRs
The first commit duplicates the
arch_openpermissions fix from Fix file permissions passed to open(2) by the POSIX arch_open #612: the file tape backend created files with mode 0200, so formatting and mounting as a regular user — which this suite and its CI do — failed withEDEV_RW_PERM. The duplicate keeps this PR's CI green standalone; git drops it whichever merges first.t/13-large-write-integrity.shis the regression test for the scheduler data loss (silent data corruption on ARM64? #591): single multi-block writes of random data, content-compared while mounted and after a remount. It passes once Fix data loss on writes larger than the tape block size #607 (or Add libfuse 3 support with libfuse 2 fallback #603, which carries the same fix) is merged.t/10–t/12are FUSE-version aware: on libfuse 2 the request-size test expects thebig_writeslimit and the readdirplus prefill is not asserted; the strict expectations activate with the FUSE 3 port (Add libfuse 3 support with libfuse 2 fallback #603). All three pass on both APIs. Add libfuse 3 support with libfuse 2 fallback #603 ships the same three scripts with its feature commits; the contents are identical, so the merge is clean in either order.The test list is computed from
tests/t/(wildcard in automake), and the harness locates build artifacts in both the autotools and CMake layouts, so the same scripts run undermake checkand the ctest registration of Add a CMake build alongside autotools #606 — no registration conflicts in any merge order.Verification
All 14 tests pass on Ubuntu against both fuse2 and fuse3 builds (with #603 merged alongside), via
make checkandctest.