From 1270c7bfc1f9a51b62fd9e9d94e4ad3e35edcb09 Mon Sep 17 00:00:00 2001 From: OpenAI Date: Sat, 30 May 2026 11:19:52 +0000 Subject: [PATCH] tests: exercise legacy AFP attribute writes in smoke suite Extend the Linux AFP smoke-suite helper so the legacy AFP Set File Information subfunction 0x09 is covered for the narrow metadata attribute write path as well as FinderInfo. The server now routes both WebSDK/NWAFP Set File Information entry points, 0x09 and AFP 2.0 0x10, through the same conservative path-backed implementation. The helper already supports selecting 0x09, but the suite only executed the legacy FinderInfo probe. Add legacy Invisible set/clear probes so the suite verifies that 0x09 also preserves the SETCLR bit semantics used by the AFP attribute xattr store. Keep the coverage deliberately small: FinderInfo plus Invisible/System/Backup remain metadata-only xattr writes, while enforcement-sensitive attributes, timestamps, resource forks, create/delete/rename, and entry-id-only write lookup stay unsupported. Tests: bash -n tests/linux/afp_smoke_suite.sh Tests: git diff --check --- TODO.md | 4 ++-- tests/linux/README.md | 7 +++++-- tests/linux/afp_smoke_suite.sh | 12 ++++++++++++ 3 files changed, 19 insertions(+), 4 deletions(-) diff --git a/TODO.md b/TODO.md index 0756af0..2858dce 100644 --- a/TODO.md +++ b/TODO.md @@ -256,8 +256,8 @@ Current status: `TEXT` and creator `MARS`. The helper writes 32 bytes of FinderInfo to `org.mars-nwe.afp.finder-info`, stores the narrow attribute word in `org.mars-nwe.afp.attributes`, and verifies the result through AFP 2.0 Get - File Information. The smoke-suite report helper now includes AFP 2.0 FinderInfo, legacy AFP `0x09` FinderInfo, plus Invisible/System/Backup set/clear probes - and has a green + File Information. The smoke-suite report helper now includes AFP 2.0 FinderInfo, legacy AFP `0x09` FinderInfo, AFP 2.0 Invisible/System/Backup set/clear probes, + and legacy AFP `0x09` Invisible set/clear probes, and has a green `failures=0` run for `SYS:PUBLIC/pmdflts.ini`; that run confirms the corrected FinderInfo payload alignment by reading `user.org.mars-nwe.afp.finder-info=0x544558544d415253...` (`TEXTMARS` with no diff --git a/tests/linux/README.md b/tests/linux/README.md index fbf0aff..0734fbb 100644 --- a/tests/linux/README.md +++ b/tests/linux/README.md @@ -57,8 +57,9 @@ Example from the build `tests/linux` directory: The report includes AFP Entry ID, Entry ID From NetWare Handle, Get File Information, Scan File Information, Alloc Temporary Directory Handle, Open File Fork, FinderInfo Set File Information for both AFP 2.0 (`0x10`) and the legacy AFP -Set File Information (`0x09`), Invisible/System/Backup Set/Clear File -Information, and the Linux xattr checks for: +Set File Information (`0x09`), AFP 2.0 Invisible/System/Backup Set/Clear File +Information, legacy AFP `0x09` Invisible Set/Clear coverage, and the Linux xattr +checks for: ```text user.org.mars-nwe.afp.finder-info @@ -69,6 +70,8 @@ user.org.mars-nwe.afp.entry-id The suite now also exercises the additional metadata-only AFP attribute bits that `afp_set_file_info_smoke` supports: System (`0x0004`) and Backup (`0x0040`). +It additionally runs the legacy AFP `0x09` path for the Invisible attribute so +both Set File Information entry points cover FinderInfo and attribute writes. It clears both again before the final xattr dump so repeated runs leave the attribute payload in the clean `0x01000000` state unless a previous command fails. diff --git a/tests/linux/afp_smoke_suite.sh b/tests/linux/afp_smoke_suite.sh index 0dd80a4..b2a9499 100755 --- a/tests/linux/afp_smoke_suite.sh +++ b/tests/linux/afp_smoke_suite.sh @@ -253,6 +253,18 @@ run_cmd \ "$SCRIPT_DIR/afp_set_file_info_smoke" -S "$SERVER" -U "$USER_NAME" -P "$PASSWORD" \ --attributes-only --clear-invisible "$NETWARE_PATH" +run_cmd \ + "AFP Set File Information Invisible legacy" \ + "./afp_set_file_info_smoke $COMMON_PRINT --afp09 --attributes-only --invisible '$NETWARE_PATH'" \ + "$SCRIPT_DIR/afp_set_file_info_smoke" -S "$SERVER" -U "$USER_NAME" -P "$PASSWORD" \ + --afp09 --attributes-only --invisible "$NETWARE_PATH" + +run_cmd \ + "AFP Set File Information Clear Invisible legacy" \ + "./afp_set_file_info_smoke $COMMON_PRINT --afp09 --attributes-only --clear-invisible '$NETWARE_PATH'" \ + "$SCRIPT_DIR/afp_set_file_info_smoke" -S "$SERVER" -U "$USER_NAME" -P "$PASSWORD" \ + --afp09 --attributes-only --clear-invisible "$NETWARE_PATH" + run_cmd \ "AFP Set File Information System" \ "./afp_set_file_info_smoke $COMMON_PRINT --attributes-only --system '$NETWARE_PATH'" \