All checks were successful
Source release / source-package (push) Successful in 46s
Implement the WebSDK/nwafp.h NCP 0x2222/35 AFP subfunction 0x08, Open File Fork, for the same conservative path-backed subset that the current AFP smoke endpoints use. The request is decoded as volume number, AFP Entry ID, fork selector, access mode, path length, and AFP path. Until persistent CNID/base-ID lookup exists, empty path / Entry-ID-only opens continue to fail with Invalid Path rather than pretending that the temporary stat-derived AFP Entry IDs are a durable namespace. The handler also keeps resource forks and write access negative for now, because those require AppleDouble/resource-fork and write-safe Finder metadata semantics that are not implemented yet. For the supported data-fork read-only case, delegate to the existing NetWare open-file path via nw_creat_open_file(). The reply returns the normal six-byte NetWare file handle shape used by the AFP handle APIs followed by the current data-fork length. That lets follow-up smoke tests verify handle interoperability with AFP Get Entry ID From NetWare Handle and with the ordinary NetWare close path while keeping write/resource semantics conservative. Add afp_open_file_fork_smoke so Linux ncpfs/libncp tests can exercise the endpoint through the same requester path as the other AFP probes. The helper closes the returned handle in the same connection and documents the expected data-fork-only coverage in tests/linux/README.md and TODO.md. Tests: git diff --check Tests: cmake --build build-off --target nwconn with ENABLE_NETATALK_LIBATALK=OFF Tests: cmake --build build-on --target nwconn with ENABLE_NETATALK_LIBATALK=ON requested; local environment lacks libatalk headers/library so CMake reports the metadata backend disabled, but the target still builds and the new handler has no direct libatalk symbol references Tests: gcc -fsyntax-only tests/linux/afp_open_file_fork_smoke.c with local ncpfs header stubs TODO: add persistent CNID/base-ID lookup, AppleDouble/resource-fork open support, and write-safe AFP fork semantics before accepting resource-fork or write-mode opens.
41 lines
1.5 KiB
CMake
41 lines
1.5 KiB
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})
|
|
|
|
add_executable(afp_file_info_smoke afp_file_info_smoke.c)
|
|
target_include_directories(afp_file_info_smoke PRIVATE ${NCPFS_INCLUDE_DIR})
|
|
target_link_libraries(afp_file_info_smoke ${NCPFS_LIBRARY})
|
|
|
|
add_executable(afp_scan_info_smoke afp_scan_info_smoke.c)
|
|
target_include_directories(afp_scan_info_smoke PRIVATE ${NCPFS_INCLUDE_DIR})
|
|
target_link_libraries(afp_scan_info_smoke ${NCPFS_LIBRARY})
|
|
|
|
|
|
add_executable(afp_open_file_fork_smoke afp_open_file_fork_smoke.c)
|
|
target_include_directories(afp_open_file_fork_smoke PRIVATE ${NCPFS_INCLUDE_DIR})
|
|
target_link_libraries(afp_open_file_fork_smoke ${NCPFS_LIBRARY})
|
|
|
|
add_executable(afp_temp_dir_handle_smoke afp_temp_dir_handle_smoke.c)
|
|
target_include_directories(afp_temp_dir_handle_smoke PRIVATE ${NCPFS_INCLUDE_DIR})
|
|
target_link_libraries(afp_temp_dir_handle_smoke ${NCPFS_LIBRARY})
|