tests: document AFP file information smoke coverage
All checks were successful
Source release / source-package (push) Successful in 47s

Document the Linux smoke-test coverage for the newly implemented AFP Get File Information endpoint.\n\nThe WebSDK-documented NCP 0x2222/35/05 path now has a Linux libncp smoke test alongside the existing AFP Entry ID probe. Record the verified SYS:, SYS:PUBLIC, SYS:SYSTEM, and SYS:BURST cases and describe the read-only reply fields currently populated from Unix stat data and the optional libatalk helper wrappers.\n\nAlso update the AFP Entry ID smoke-test documentation to match the current default raw-path mode, where SYS:-style paths are sent with directory handle 0 and handle allocation is kept behind --alloc-handle for separate debugging.\n\nKeep the remaining AFP/Mac namespace work in TODO.md, including persistent CNID/AppleDouble entry IDs, Parent ID mapping, Finder Info/resource-fork semantics, AFP 2.0 file information, and Scan File Information coverage.\n\nThis is documentation-only and does not change AFP protocol behavior.
This commit is contained in:
Mario Fetka
2026-05-30 05:54:21 +00:00
parent 8190673f27
commit b3d06fbf3f
2 changed files with 57 additions and 16 deletions

20
TODO.md
View File

@@ -191,10 +191,16 @@ Follow-up:
Current status:
- `NCP 0x23` still returns invalid namespace for AFP calls that are not implemented yet.
- `AFP Get Entry ID From Path Name` is the first implemented AFP subfunction when the optional Netatalk/libatalk backend is available.
Linux smoke coverage exists in `tests/linux/afp_entry_id_smoke` and has been
verified against `SYS:`, `SYS:PUBLIC`, `SYS:SYSTEM`, and `SYS:BURST` with
stat-derived fallback entry IDs.
- `AFP Get Entry ID From Path Name` is implemented when the optional
Netatalk/libatalk backend is available. Linux smoke coverage exists in
`tests/linux/afp_entry_id_smoke` and has been verified against `SYS:`,
`SYS:PUBLIC`, `SYS:SYSTEM`, and `SYS:BURST` with stat-derived fallback
entry IDs.
- `AFP Get File Information` is implemented for read-only path-based requests.
Linux smoke coverage exists in `tests/linux/afp_file_info_smoke` and has
been verified against `SYS:`, `SYS:PUBLIC`, `SYS:SYSTEM`, and `SYS:BURST`.
The current reply fills stat/libatalk-derived fields and leaves persistent
CNID Parent ID / fuller Mac namespace metadata as future work.
- The AFP dispatcher now decodes the WebSDK/NWAFP subfunction number in
diagnostics so real client probes can be mapped to the corresponding AFP
call before implementation work starts.
@@ -216,9 +222,9 @@ Follow-up:
data/resource fork and Finder Info semantics.
- Replace the temporary stat-derived AFP entry-id fallback with a persistent
CNID/directory-id mapping once the libatalk/CNID backend is integrated.
- Extend `afp_entry_id_smoke` or add follow-up tests once additional AFP
subfunctions are implemented, especially file information, Finder Info, and
resource-fork handling.
- Extend the Linux AFP smoke tests once additional AFP subfunctions are
implemented, especially AFP 2.0 file information, Scan File Information,
Finder Info updates, fork open/read/write paths, and resource-fork handling.
## Deferred / optional protocol work

View File

@@ -12,6 +12,7 @@ Build with:
```sh
cmake -DMARS_NWE_BUILD_LINUX_TESTS=ON ...
cmake --build . --target afp_entry_id_smoke
cmake --build . --target afp_file_info_smoke
```
## AFP Entry ID smoke test
@@ -31,10 +32,11 @@ Example:
./tests/linux/afp_entry_id_smoke -S MARS -U SUPERVISOR -P secret SYS:PUBLIC
```
The test accepts NetWare-style `VOL:PATH` arguments. It logs in through
libncp, allocates a temporary directory handle for the volume root, and sends
only the relative path to `AFP Get Entry ID From Path Name`, matching the
WebSDK request layout of `DirectoryHandle + Path String`.
The test accepts NetWare-style `VOL:PATH` arguments. By default it sends the
supplied `SYS:`-style path directly with directory handle 0, matching the
verified mars_nwe smoke-test path. `--alloc-handle` is available only for
follow-up debugging of the separate directory-handle allocation path, and
`--dir-handle N` expects a handle that is valid in the current connection.
Useful smoke cases for a standard MARS-NWE `SYS` volume are:
@@ -45,11 +47,11 @@ Useful smoke cases for a standard MARS-NWE `SYS` volume are:
./tests/linux/afp_entry_id_smoke -S MARS -U SUPERVISOR -P secret SYS:BURST
```
A successful reply prints the temporary directory handle, the relative request
path, and the returned 32-bit AFP Entry ID. Server-side diagnostics currently
mark stat-derived temporary IDs with `fallback`; that means the endpoint is
reachable, but persistent CNID/AppleDouble entry-id storage is still future
Mac-namespace work.
A successful reply prints the request path, directory handle, and returned
32-bit AFP Entry ID. Server-side diagnostics currently mark stat-derived
temporary IDs with `fallback`; that means the endpoint is reachable, but
persistent CNID/AppleDouble entry-id storage is still future Mac-namespace
work.
If the server was built without the optional Netatalk/libatalk backend, the
endpoint is expected to return invalid namespace. To treat that as a successful
@@ -61,3 +63,36 @@ negative smoke test, use:
For path-resolution negative tests, use `--allow-invalid-path` to accept the
expected `0x9c` Invalid Path completion.
## AFP File Information smoke test
`afp_file_info_smoke` sends the WebSDK-documented NetWare AFP request:
```text
NCP 0x2222/35/05 AFP Get File Information
```
It uses the same libncp `NWRequestSimple()` transport path as the Entry ID
smoke test and sends raw `SYS:`-style path requests with directory handle 0.
The server replies with the read-only AFP file information record currently
implemented by mars_nwe: Entry ID, Parent ID, attributes, data/resource fork
lengths, offspring count, fixed long/short names, and access rights.
Useful smoke cases for a standard MARS-NWE `SYS` volume are:
```sh
./tests/linux/afp_file_info_smoke -S MARS -U SUPERVISOR -P secret SYS:
./tests/linux/afp_file_info_smoke -S MARS -U SUPERVISOR -P secret SYS:PUBLIC
./tests/linux/afp_file_info_smoke -S MARS -U SUPERVISOR -P secret SYS:SYSTEM
./tests/linux/afp_file_info_smoke -S MARS -U SUPERVISOR -P secret SYS:BURST
```
The current implementation fills fields that can be derived from Unix `stat(2)`
and the optional libatalk helper wrappers. Server-side diagnostics mark
stat-derived temporary Entry IDs with `fallback`; Parent ID, persistent
CNID/AppleDouble IDs, and fuller Finder Info/resource-fork semantics remain
future Mac-namespace work.
If the server was built without the optional Netatalk/libatalk backend, use
`--allow-invalid-namespace` for the expected negative test. Use
`--allow-invalid-path` for path-resolution negative tests.