mars_nwe test helpers
The test tree contains small smoke helpers for protocol areas that are easier to exercise outside the normal install flow.
NWFS/NCPFS quota and metadata smokes
tests/nwfs contains manual NCPFS-based smoke helpers for the NetWare filesystem
metadata and quota paths. They are not generic unit tests: they expect a running
MARS_NWE server, mounted NCPFS volumes, and the helper programs configured by
CMake when ncpfs/libncp are available.
The main quota regression entry point is
nwfs_ncpfs_userquota_dual_smoke.sh. It runs the same NetWare-style
deny-before-data userquota fill test against two volumes:
- a Linuxquota-backed volume, such as
QUOTA, where enforcement comes from the host quota path; - a metadata/NWQUOTA-backed volume, such as
SYS, where the server stores and updates used 4K blocks in the volume-rootnetware.userquotaxattr.
The expected result is that both volumes allow 11 one-block files after setting a
12-block headroom limit, then deny the next 4K file before data is written. For
a SYS/NWQUOTA run with a pre-existing baseline, the smoke rebases the limit to
baseline + 12x4K and expects the final used count to be baseline + 11x4K.
The helper writes per-volume logs under /tmp/nwfs-quota-dual.* and makes them
world-readable so they can be collected after root-run tests.
AFP
tests/afp contains the current AFP endpoint smoke suite and its single AFP
README. AFP deleted-file endpoint 0x13 is implemented as a thin adapter over
the shared salvage backend and is covered by the AFP smoke suite.
Salvage
tests/salvage contains the shared NetWare salvage coverage. These tests are
kept outside tests/afp because AFP 0x13 must become a thin adapter over the
same backend that serves the NetWare NCP salvage calls.
The current salvage tests cover:
- local layout contract for
.recyclepayloads and.salvageJSON metadata, - NCP create/delete capture through the normal server delete path,
- Samba-compatible, non-localized history naming with
Copy #1 of NAME, - NCP
87/16scan,87/17recover, and87/18purge through the officialncpfshelper API, - stale
.salvagesidecars are ignored and cleaned when their.recyclepayload is externally removed, - report-file generation with
--out FILE.
tests/salvage/salvage_smoke_suite.sh is the single NCP integration entry
point. It creates multiple versions of the same file through NCP, deletes them
through NCP, scans salvageable entries, recovers the oldest sequence, and checks
the restored payload through NCP read. The scan check expects duplicate
sequence entries for the original deleted name; backend history paths stay
hidden behind the salvage endpoints.
The NCP smoke suite is intended to run as the same Unix user that normally runs
the test client, not necessarily as root. Pre-clean of old .recycle or
.salvage artifacts is therefore best-effort: permission failures are reported
as warnings and do not by themselves fail the smoke. The actual pass/fail check
is based on artifacts created by the NCP delete path.
NCP path visibility
Normal mars_nwe NCP path resolution does not expose Unix dot directories as
ordinary user-visible NetWare paths. In the classic path resolver, leading-dot
components are handled as special ./.. syntax, so names such as .recycle
or .salvage return invalid path (0x899c) through normal file open/read
requests. Directory scans also skip names beginning with ..
Tests must therefore not validate salvage payloads by opening
SYS:.recycle/... or SYS:.salvage/... through normal NCP file calls. Use the
salvage scan/recover/purge endpoints for repository state and verify payload
content by reading the restored live file through NCP.