Skip to content

Add an integration test suite using the file tape backend#611

Open
matejk wants to merge 3 commits into
LinearTapeFileSystem:mainfrom
matejk:tests/integration-suite
Open

Add an integration test suite using the file tape backend#611
matejk wants to merge 3 commits into
LinearTapeFileSystem:mainfrom
matejk:tests/integration-suite

Conversation

@matejk

@matejk matejk commented Jun 12, 2026

Copy link
Copy Markdown

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/fuse and are skipped elsewhere; tests/run-in-docker.sh runs 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) and ftruncate via a small C helper, inode stability across remounts (verifies use_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

Verification

All 14 tests pass on Ubuntu against both fuse2 and fuse3 builds (with #603 merged alongside), via make check and ctest.

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.
@matejk matejk force-pushed the tests/integration-suite branch 2 times, most recently from e229da0 to 453f49f Compare June 12, 2026 12:30
matejk added 2 commits June 12, 2026 14:37
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.
@matejk matejk force-pushed the tests/integration-suite branch from 453f49f to d5f14f3 Compare June 12, 2026 12:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant