Files
mars-nwe/tests/linux
Mario Fetka 04e098efef
All checks were successful
Source release / source-package (push) Successful in 47s
tests: require login for AFP smoke test
Open the libncp connection with login_necessary set to true.

ncpfs/libncp does not block individual NCP endpoints here. The problem was that ncp_initialize(..., 0, ...) deliberately clears the user name even when -S/-U/-P were supplied, leaving the connection unauthenticated. mars_nwe then rejects directory-handle allocation for non-login paths with Invalid Path before the AFP NCP 0x23/0x0c request is ever sent.

The AFP Entry ID smoke test needs normal file-service path access in order to allocate or use a directory handle before issuing the AFP request. Require a logged-in connection, while still allowing no-password test users via libncp's existing -n option.

This changes only the Linux smoke test; server AFP protocol behavior is unchanged.
2026-05-30 03:31:34 +02:00
..

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:

cmake -DMARS_NWE_BUILD_LINUX_TESTS=ON ...
cmake --build . --target afp_entry_id_smoke

AFP Entry ID smoke test

afp_entry_id_smoke sends the WebSDK-documented NetWare AFP request:

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:

./tests/linux/afp_entry_id_smoke -S MARS -U SUPERVISOR -P secret SYS:LOGIN

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:

./tests/linux/afp_entry_id_smoke --allow-invalid-namespace -S MARS SYS:LOGIN