All checks were successful
Source release / source-package (push) Successful in 46s
Route NCP 0x23/0x0f AFP 2.0 Get File Information through the existing read-only AFP file-information helper. The WebSDK and nwafp.h list both AFP Get File Information and AFP 2.0 Get File Information as path/file-information queries that return the AFP file-information record used by Mac namespace clients. The already implemented 0x05 path handles SYS:-style path requests and fills the safe read-only fields from Unix stat data plus the optional libatalk Finder Info and resource-fork helpers. Use the same conservative path-backed reply for 0x0f for now. This gives Linux smoke-test coverage for the AFP 2.0 subfunction without adding entry-id-only lookup, persistent CNID mapping, write-side metadata updates, or fuller resource-fork semantics. Extend afp_file_info_smoke with --afp20 so the same SYS:, SYS:PUBLIC, SYS:SYSTEM, and SYS:BURST cases can exercise the AFP 2.0 subfunction. Update the Linux test README and TODO tracking to record that AFP 2.0 file information is covered by the same temporary fallback model. This implements only the read-only path-based subset; richer AFP 2.0 behavior remains future Mac-namespace work.
106 lines
4.1 KiB
Markdown
106 lines
4.1 KiB
Markdown
# Linux NCP smoke tests
|
|
|
|
This directory contains optional Linux-side integration tests for endpoints that
|
|
are easier to exercise from a Unix host than from the DOS test utilities.
|
|
|
|
The tests use the ncpfs/libncp client library. They are not built by default
|
|
because they require the host ncpfs development headers/library and a running
|
|
NetWare-compatible server.
|
|
|
|
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
|
|
|
|
`afp_entry_id_smoke` sends the WebSDK-documented NetWare AFP request:
|
|
|
|
```text
|
|
NCP 0x2222/35/12 AFP Get Entry ID From Path Name
|
|
```
|
|
|
|
It uses libncp's `NWRequestSimple()` path, so it goes through the same client
|
|
transport stack as other Linux ncpfs utilities.
|
|
|
|
Example:
|
|
|
|
```sh
|
|
./tests/linux/afp_entry_id_smoke -S MARS -U SUPERVISOR -P secret SYS:PUBLIC
|
|
```
|
|
|
|
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:
|
|
|
|
```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 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
|
|
negative smoke test, use:
|
|
|
|
```sh
|
|
./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.
|
|
|
|
## AFP File Information smoke test
|
|
|
|
`afp_file_info_smoke` sends the WebSDK-documented NetWare AFP file
|
|
information requests:
|
|
|
|
```text
|
|
NCP 0x2222/35/05 AFP Get File Information
|
|
NCP 0x2222/35/15 AFP 2.0 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
|
|
|
|
# AFP 2.0 variant using the same path-backed read-only reply
|
|
./tests/linux/afp_file_info_smoke --afp20 -S MARS -U SUPERVISOR -P secret SYS:PUBLIC
|
|
```
|
|
|
|
The AFP 2.0 mode is selected with `--afp20` and currently exercises the same
|
|
path-backed read-only reply as the older call. 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.
|