tests: extend AFP smoke suite for metadata attributes
All checks were successful
Source release / source-package (push) Successful in 46s

The AFP Set File Information smoke coverage now includes the additional metadata-only file attribute bits implemented after the original FinderInfo and Invisible checks.  Extend the collectable Linux smoke-suite helper so a single report covers FinderInfo, Invisible set/clear, System set/clear, and Backup set/clear before dumping the mars_nwe AFP xattrs.

This keeps the helper aligned with the WebSDK/NWAFP attribute bitmap semantics exercised by afp_set_file_info_smoke: the Attributes request bitmap remains 0x0001, while the request attribute word uses SETCLR when setting System or Backup and the plain bit when clearing.  The suite clears each tested bit again so repeated runs normally leave org.mars-nwe.afp.attributes in the clean versioned zero state.

Document the runtime probes reported from SYS:PUBLIC/pmdflts.ini, including the AFP-visible attrs values and the server diagnostics that show the encoded SETCLR forms.  Also update TODO so the current smoke status states that the report helper now follows the supported FinderInfo plus Invisible/System/Backup metadata subset.

Tests:\n- bash -n tests/linux/afp_smoke_suite.sh\n- git diff --check\n\nTODO:\n- Keep rejecting the rest of AFP Set File Information until timestamp, enforcement, DOS/NetWare mapping, resource-fork, and entry-id-only write semantics are designed.
This commit is contained in:
OpenAI
2026-05-30 11:02:23 +00:00
committed by Mario Fetka
parent cfd036e54c
commit 2f71b73fca
3 changed files with 50 additions and 5 deletions

View File

@@ -255,7 +255,7 @@ 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 has a green
File Information. The smoke-suite report helper now includes FinderInfo plus Invisible/System/Backup 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
@@ -267,7 +267,9 @@ Current status:
describes the entry-id origin, not the FinderInfo write result. Follow-up
probes should read the cached mars_nwe entry id and omit the fallback marker.
System and Backup are now supported by the same narrow xattr-only attribute
path. All other Set File Information bits and AFP attribute bits remain
path; runtime probes verified System set/clear and Backup set with AFP-visible
attrs `0x0004`, `0x0000`, and `0x0040`, with server diagnostics showing the
matching WebSDK SETCLR forms `0x8004`, `0x0004`, and `0x8040`. All other Set File Information bits and AFP attribute bits remain
rejected until their write/enforcement semantics are explicitly designed.
- The AFP dispatcher now decodes the WebSDK/NWAFP subfunction number in
diagnostics so real client probes can be mapped to the corresponding AFP

View File

@@ -56,8 +56,8 @@ 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, Invisible Set/Clear File Information,
and the Linux xattr checks for:
Fork, FinderInfo Set File Information, Invisible/System/Backup Set/Clear File
Information, and the Linux xattr checks for:
```text
user.org.mars-nwe.afp.finder-info
@@ -65,6 +65,13 @@ user.org.mars-nwe.afp.attributes
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 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.
Use `--no-log` when the log file is unavailable or when the server log is being
collected separately. Use `--stop-on-failure` for strict bisect-style runs; by
default the script keeps going so one failing endpoint does not hide later AFP
@@ -87,7 +94,7 @@ The FinderInfo value starts with `TEXTMARS` without a leading padding byte, so
the smoke helper and server now agree on the WebSDK/NWAFP Set File Information
payload alignment. The server log excerpt for the same run showed all AFP
operations returning successfully, including `mask=0x0020` for FinderInfo and
`mask=0x0001` for the Invisible set/clear probes.
`mask=0x0001` for the Invisible/System/Backup attribute probes.
## AFP Entry ID smoke test
@@ -542,6 +549,18 @@ attribute mutation:
For System the xattr value stores `0x01000004`; for Backup it stores
`0x01000040`. Use `--clear-system` and `--clear-backup` to remove those bits.
Verified runtime probes for the additional bits showed the expected AFP-visible
attribute words and server diagnostics:
```text
AFP Set File Info path=SYS:PUBLIC/pmdflts.ini bitmap=0x0001 attrs=0x0004 finder_type=TEXT finder_creator=MARS entry_id=0x62ecb463 verified
AFP Set File Info path=SYS:PUBLIC/pmdflts.ini bitmap=0x0001 attrs=0x0000 finder_type=TEXT finder_creator=MARS entry_id=0x62ecb463 verified
AFP Set File Info path=SYS:PUBLIC/pmdflts.ini bitmap=0x0001 attrs=0x0040 finder_type=TEXT finder_creator=MARS entry_id=0x62ecb463 verified
AFP 2.0 Set File Information: vol=0 request_vol=0 entry=0x00000000 mask=0x0001 path='SYS:PUBLIC/pmdflts.ini' attributes attrs=0x8004
AFP 2.0 Set File Information: vol=0 request_vol=0 entry=0x00000000 mask=0x0001 path='SYS:PUBLIC/pmdflts.ini' attributes attrs=0x0004
AFP 2.0 Set File Information: vol=0 request_vol=0 entry=0x00000000 mask=0x0001 path='SYS:PUBLIC/pmdflts.ini' attributes attrs=0x8040
```
All other Set File Information bitmap bits and AFP attribute bits, including
NoWrite, NoRename, NoDelete, NoCopy, and the computed data/resource-fork-open
flags, are intentionally rejected for now. That keeps timestamp,

View File

@@ -247,6 +247,30 @@ 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 System" \
"./afp_set_file_info_smoke $COMMON_PRINT --attributes-only --system '$NETWARE_PATH'" \
"$SCRIPT_DIR/afp_set_file_info_smoke" -S "$SERVER" -U "$USER_NAME" -P "$PASSWORD" \
--attributes-only --system "$NETWARE_PATH"
run_cmd \
"AFP Set File Information Clear System" \
"./afp_set_file_info_smoke $COMMON_PRINT --attributes-only --clear-system '$NETWARE_PATH'" \
"$SCRIPT_DIR/afp_set_file_info_smoke" -S "$SERVER" -U "$USER_NAME" -P "$PASSWORD" \
--attributes-only --clear-system "$NETWARE_PATH"
run_cmd \
"AFP Set File Information Backup" \
"./afp_set_file_info_smoke $COMMON_PRINT --attributes-only --backup '$NETWARE_PATH'" \
"$SCRIPT_DIR/afp_set_file_info_smoke" -S "$SERVER" -U "$USER_NAME" -P "$PASSWORD" \
--attributes-only --backup "$NETWARE_PATH"
run_cmd \
"AFP Set File Information Clear Backup" \
"./afp_set_file_info_smoke $COMMON_PRINT --attributes-only --clear-backup '$NETWARE_PATH'" \
"$SCRIPT_DIR/afp_set_file_info_smoke" -S "$SERVER" -U "$USER_NAME" -P "$PASSWORD" \
--attributes-only --clear-backup "$NETWARE_PATH"
if command -v getfattr >/dev/null 2>&1; then
run_cmd \
"Linux xattr: AFP FinderInfo" \