From f6861ba3d624b2cf6fa4b1b68dc4ce8882763cc5 Mon Sep 17 00:00:00 2001 From: Mario Fetka Date: Sat, 30 May 2026 01:37:22 +0000 Subject: [PATCH] tests: document AFP entry id smoke coverage Document the Linux AFP Entry ID smoke-test coverage after the endpoint was verified against the standard SYS volume paths. The test exercises the WebSDK-documented NCP 0x23/0x0c AFP Get Entry ID From Path Name request by logging in through libncp, allocating a temporary directory handle for the volume root, and sending the relative path to the AFP endpoint. Record the verified SYS:, SYS:PUBLIC, SYS:SYSTEM, and SYS:BURST cases, and describe the current stat-derived fallback Entry ID diagnostics so the result is not confused with persistent CNID/AppleDouble storage. Keep the remaining AFP work tracked in TODO.md, including replacing the fallback with persistent CNID/directory-id mapping and extending tests when additional AFP subfunctions are implemented. This is documentation-only and does not change AFP protocol behavior. --- TODO.md | 6 ++++++ tests/linux/README.md | 27 +++++++++++++++++++++++++-- 2 files changed, 31 insertions(+), 2 deletions(-) diff --git a/TODO.md b/TODO.md index 8f0e7fb..ae7d919 100644 --- a/TODO.md +++ b/TODO.md @@ -192,6 +192,9 @@ 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. - 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. @@ -213,6 +216,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. ## Deferred / optional protocol work diff --git a/tests/linux/README.md b/tests/linux/README.md index eb4b547..fac49a6 100644 --- a/tests/linux/README.md +++ b/tests/linux/README.md @@ -28,13 +28,36 @@ transport stack as other Linux ncpfs utilities. Example: ```sh -./tests/linux/afp_entry_id_smoke -S MARS -U SUPERVISOR -P secret SYS:LOGIN +./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`. + +Useful smoke cases for a standard MARS-NWE `SYS` volume are: + +```sh +./tests/linux/afp_entry_id_smoke -S MARS -U SUPERVISOR -P secret SYS: +./tests/linux/afp_entry_id_smoke -S MARS -U SUPERVISOR -P secret SYS:PUBLIC +./tests/linux/afp_entry_id_smoke -S MARS -U SUPERVISOR -P secret SYS:SYSTEM +./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. + 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 negative smoke test, use: ```sh -./tests/linux/afp_entry_id_smoke --allow-invalid-namespace -S MARS SYS:LOGIN +./tests/linux/afp_entry_id_smoke --allow-invalid-namespace -S MARS -U SUPERVISOR -P secret SYS:PUBLIC ``` + +For path-resolution negative tests, use `--allow-invalid-path` to accept the +expected `0x9c` Invalid Path completion.