All checks were successful
Source release / source-package (push) Successful in 46s
Add an optional Linux-side smoke test for the first implemented NetWare AFP endpoint. The WebSDK documents NCP 0x2222/35/12 AFP Get Entry ID From Path Name as taking a NetWare directory handle and path string and returning a 32-bit AFP entry id. MARS-NWE now has a guarded implementation of that probe when the optional Netatalk/libatalk backend is compiled in, but exercising it does not require a real AppleTalk workstation. Use the ncpfs/libncp client library as the test transport. ncpfs is commonly available on Linux mars_nwe test hosts and its NWRequestSimple() helper builds the same length-prefixed subfunction request format used by normal libncp callers. The test accepts standard ncpfs connection options such as -S, -U, -P, and -n, sends NCP 0x23/0x0c, and prints the returned entry id. Keep the test out of normal builds behind MARS_NWE_BUILD_LINUX_TESTS because it depends on host ncpfs development headers/library and on a running server. Add an --allow-invalid-namespace mode so builds without the Netatalk backend can still run a negative smoke test and verify that AFP remains unavailable. This adds test infrastructure only and does not change server protocol behavior.
24 lines
750 B
CMake
24 lines
750 B
CMake
# Optional Linux-side integration tests.
|
|
#
|
|
# These helpers are not built by default because they depend on the host
|
|
# ncpfs/libncp development files and on a running NetWare-compatible server.
|
|
|
|
find_path(NCPFS_INCLUDE_DIR
|
|
NAMES ncp/nwcalls.h ncp/ncplib.h
|
|
)
|
|
|
|
find_library(NCPFS_LIBRARY
|
|
NAMES ncp
|
|
)
|
|
|
|
if(NOT NCPFS_INCLUDE_DIR OR NOT NCPFS_LIBRARY)
|
|
message(FATAL_ERROR
|
|
"MARS_NWE_BUILD_LINUX_TESTS requires ncpfs/libncp headers and libncp. "
|
|
"Install the ncpfs development package or disable MARS_NWE_BUILD_LINUX_TESTS."
|
|
)
|
|
endif()
|
|
|
|
add_executable(afp_entry_id_smoke afp_entry_id_smoke.c)
|
|
target_include_directories(afp_entry_id_smoke PRIVATE ${NCPFS_INCLUDE_DIR})
|
|
target_link_libraries(afp_entry_id_smoke ${NCPFS_LIBRARY})
|