tests: record WebSDK AFP set file information smoke success

This commit is contained in:
Mario Fetka
2026-05-30 20:47:59 +00:00
parent e08ce594b5
commit b1a5f9a0b3
2 changed files with 77 additions and 58 deletions

View File

@@ -723,16 +723,23 @@ NCP 0x2222/35/09 AFP Set File Information
NCP 0x2222/35/16 AFP 2.0 Set File Information
```
The helper exercises two deliberately narrow write-safe AFP metadata subsets:
the file FinderInfo bitmap (`0x0020`), the file Attributes bitmap (`0x0001`)
restricted to metadata-only file flags: AFP Hidden, System, and Archive,
and the file modification timestamp bitmap (`0x0010`). It sends path-backed
raw `VOL:`-style requests, writes the 32-byte FinderInfo block to mars_nwe's
private `org.mars-nwe.afp.finder-info` metadata key, writes the narrow AFP
attribute word to `org.mars-nwe.afp.attributes`, routes modification timestamp
writes through the existing NetWare timestamp helper, and immediately verifies
the updates through AFP 2.0 Get File Information. On Linux the source-level `org.mars-nwe.afp.*` name is stored via the
portable `user.` xattr namespace by mars_nwe's local xattr wrapper, the same
The helper now always sends the fixed WebSDK/NWAFP Set File Information packet
layout; the earlier compact smoke-test layout is intentionally gone. Legacy
`0x09` requests put `path_len` at offset 54. AFP 2.0 `0x10` requests include
ProDOSInfo at offsets 54..59 and put `path_len` at offset 60. The smoke covers
the deliberately narrow write-safe metadata subsets currently implemented by
mars_nwe: FinderInfo (`0x4000`), Attributes (`0x0100`) for Hidden/System/Archive,
Access Date/Time (`0x0400`), Create Date/Time (`0x0800`), Modify Date/Time
(`0x1000`), and Backup Date/Time (`0x2000`). It sends path-backed raw
`VOL:`-style requests, writes the 32-byte FinderInfo block to mars_nwe's private
`org.mars-nwe.afp.finder-info` metadata key, writes AFP-only Hidden/System bits
to `org.mars-nwe.afp.attributes`, maps Archive through the existing NetWare
attribute store, routes Create and Backup Date/Time through the existing
mars_nwe NetWare metadata helpers, routes Access through the normal file
`atime` path, routes modification timestamp writes through the existing NetWare
timestamp helper, and immediately verifies the updates through AFP 2.0 Get File
Information. On Linux the source-level `org.mars-nwe.afp.*` name is stored via
the portable `user.` xattr namespace by mars_nwe's local xattr wrapper, the same
pattern Netatalk uses for its `org.netatalk.*` metadata names.
Example:
@@ -756,19 +763,21 @@ subfunction:
SYS:PUBLIC/pmdflts.ini
```
Verified runtime output:
Verified runtime output from the WebSDK-layout-only smoke run:
```text
AFP Set File Info subfunction=0x10 path=SYS:PUBLIC/pmdflts.ini bitmap=0x4000 attrs=0x2000 create=0x5cbe access=0x5cbe modify=0x5cbea1ee backup=0x00000000 finder_type=TEXT finder_creator=MARS entry_id=0x00000004 verified
AFP Set File Info subfunction=0x10 layout=websdk path=SYS:PUBLIC/pmdflts.ini bitmap=0x4000 attrs=0x2000 create=0x5cbe access=0x5cbe modify=0x5cbeb52a backup=0x00000000 finder_type=TEXT finder_creator=MARS entry_id=0x42ede1c8 verified
AFP Set File Info subfunction=0x09 layout=websdk path=SYS:PUBLIC/pmdflts.ini bitmap=0x4000 attrs=0x2000 create=0x5cbe access=0x5cbe modify=0x5cbeb52a backup=0x00000000 finder_type=TEXT finder_creator=MARS entry_id=0x42ede1c8 verified
```
Server diagnostics show the effective resolved volume, the request volume byte,
the FinderInfo bitmap, and follow-up Get File Information verification with the
same namespace-derived Entry ID:
the WebSDK layout, the FinderInfo bitmap, and follow-up Get File Information
verification with the same AFP file Entry ID:
```text
AFP 2.0 Set File Information: vol=0 request_vol=0 entry=0x00000000 mask=0x4000 path='SYS:PUBLIC/pmdflts.ini' ...
AFP 2.0 Get File Information: vol=0 entry=0x00000000 mask=0xffff path='SYS:PUBLIC/pmdflts.ini' reply_entry=0x00000004
AFP 2.0 Set File Information: vol=0 request_vol=0 entry=0x00000000 mask=0x4000 path='SYS:PUBLIC/pmdflts.ini' layout=websdk finder_info attrs=0x0000 atime=-1 mtime=-1
AFP Set File Information: vol=0 request_vol=0 entry=0x00000000 mask=0x4000 path='SYS:PUBLIC/pmdflts.ini' layout=websdk finder_info attrs=0x0000 atime=-1 mtime=-1
AFP 2.0 Get File Information: vol=0 entry=0x00000000 mask=0xffff path='SYS:PUBLIC/pmdflts.ini' reply_entry=0x42ede1c8
```
Linux xattr checks for the FinderInfo and cached Entry ID look like this:
@@ -825,6 +834,14 @@ For System the AFP metadata xattr stores `0x01000004`. Archive is verified
through AFP Get File Information after updating the NetWare attribute store; it
no longer lives in `user.org.mars-nwe.afp.attributes`. Use `--clear-system`
and `--clear-archive` to remove those bits.
Runtime status: the latest full AFP smoke suite verified that every Set File
Information probe uses `layout=websdk` and that the compact mars_nwe-only packet
shape is no longer accepted by the helper. The verified run covered AFP 2.0
and legacy FinderInfo, Hidden set/clear, System set/clear, Archive set/clear,
Access Date/Time, Create Date/Time, Modify Date/Time, Backup Date/Time, and the
NOPASSUSER Modify-rights negative probes, then ended with `failures=0`.
The older helper spellings `--backup` and `--clear-backup` remain accepted
as compatibility aliases, but the suite and documentation use Archive because
this bit is the AFP file attribute, not the separate AFP backup date/time field.