Files
mars-dosutils/test/creator/README.md
Mario Fetka 4a952b4c4c dosutils: align Novell-compatible tests and stage NCOPY work
Update the DOS utilities and test suite with the current Novell comparison
state.

Validated/updated tool behavior:
- improve CREATOR output by showing Novell-style attribute and rights masks
- extend FLAGDIR handling with old NCP22 directory attribute read/write
  fallback paths
- expand NDIR Novell-style formatting, filtering, /SUB handling, date output,
  DI/RI attribute display and richer metadata collection
- adjust REVOKE output/grammar, recursive /SUBDIRECTORIES behavior and trustee
  update/delete paths to better match Novell tools
- adjust SLIST header/output behavior for logged-in and logged-out cases
- update README status to reflect the currently green/tested tools

Test-suite changes:
- add/refresh Novell comparison tests for CREATOR, NDIR, REVOKE and SLIST
- update NCOPY tests and collection scripts for the current investigation state
- refresh per-tool README files and top-level test documentation
- keep MAP documented as still separately open

NCOPY:
- add the current NCOPY implementation and experimental NCP74/server-side-copy
  scaffolding
- build ncopy.c so it stays compile-tested
- keep NCOPY disabled in the NET multicall dispatch for now because the
  server-side-copy/open-handle path is still unsafe and needs further analysis

Build:
- include ncopy.c in the DOS utility build
- drop the temporary MARS_DOSUTILS_VERSION define wiring from CMake
2026-05-29 07:40:04 +02:00

180 lines
3.8 KiB
Markdown

# CREATOR / xattr automated test
This test validates `PUBLIC\CREATOR.EXE` against the MARS-NWE file metadata
stored in Linux extended attributes. It also performs an optional readback as
`NOPASSUSER`, so the generated metadata and effective rights can be checked from
a normal-user context.
## Requirements
Install the current DOS tools into the normal test locations:
```text
SYS:PUBLIC\CREATOR.EXE
SYS:PUBLIC\RIGHTS.EXE
SYS:PUBLIC\DLYSTRT.EXE
SYS:NPUBLIC\NDIR.EXE
SYS:NPUBLIC\RIGHTS.EXE
SYS:NPUBLIC\FLAG.EXE
SYS:NPUBLIC\GRANT.EXE
```
For the Linux collector install the `attr` package, so `getfattr` is available.
The optional user-context phase expects these accounts to exist:
```text
SUPERVISOR
NOPASSUSER
MARIO
```
`MARIO` is used as the creator/modifier/archiver object name in the test data.
## Files used by the test
All DOS scripts are expected at the root of `F:`:
```text
F:\CIXSTA.BAT
F:\CIXC.BAT
F:\CIXZIP.BAT
```
`CIXC.BAT` and `DLYSTRT.EXE` are copied to `C:\CIXTMP` before the delayed
logout/login helper is started. `CIXSTA.BAT` stays on `F:` and is run again as
`F:\CIXSTA.BAT PART2` after the helper has logged `SUPERVISOR` back in.
Generated directories:
```text
F:\CIXTEST test tree
F:\CIXCMP result tree
C:\CIXTMP temporary local helper/output directory
```
## DOS flow
Run as `SUPERVISOR`.
For the full test, including the `NOPASSUSER` readback, set the Supervisor
password first:
```text
SET LGNTPWD=your-supervisor-password
F:\CIXSTA
```
Without `LGNTPWD`, the Supervisor-only CREATOR/xattr part can still be run, but
the delayed user-context phase is skipped.
When the delayed helper finishes, it starts:
```text
F:\CIXSTA PART2
```
Wait until the screen shows:
```text
CIXSTA PART2 fertig.
```
Then run the Linux-side collector:
```sh
sudo ./cix_collect_xattr.sh
```
Finally package the DOS-side result tree:
```text
F:\CIXZIP
```
Result ZIP:
```text
F:\CIXCMP\CIXSTA.ZIP
```
Linux package with server log:
```sh
sudo ./mars_packtest_v3.sh cixsta 5 mario
```
## What CIXSTA does
```text
S_SUP.TXT:
PUBLIC\CREATOR ... /CREATOR MARIO
PUBLIC\CREATOR ... /MODIFIER MARIO
Expected xattr: user.mars_nwe.fileinfo
S_ARCH.TXT:
PUBLIC\CREATOR ... /ARCHIVE MARIO
Expected xattr: user.mars_nwe.archive
S_ALL.TXT:
PUBLIC\CREATOR ... /ALL MARIO 2026-05-25 16:12:00
Expected xattrs: user.mars_nwe.fileinfo and user.mars_nwe.archive
```
The scripts also grant `NOPASSUSER` read/file-scan rights and collect readback
output as that user:
```text
UNOV\*.OUT NPUBLIC\RIGHTS readback as NOPASSUSER
UPUB\*.OUT PUBLIC\RIGHTS readback as NOPASSUSER
UCREATOR\*.OUT PUBLIC\CREATOR /SHOW readback as NOPASSUSER
UCOMP.LOG FC comparison of UNOV vs UPUB
HELPER.TXT delayed helper phase log
```
## Important DOS outputs
```text
F:\CIXCMP\RUN.LOG
F:\CIXCMP\SUMMARY.TXT
F:\CIXCMP\PRE\*.OUT
F:\CIXCMP\POST\*.OUT
F:\CIXCMP\UNOV\*.OUT
F:\CIXCMP\UPUB\*.OUT
F:\CIXCMP\UCREATOR\*.OUT
F:\CIXCMP\UCOMP.LOG
F:\CIXCMP\HELPER.TXT
```
## Important Linux outputs
The collector writes DOS/ZIP-safe 8.3 file names under `F:\CIXCMP\LINUX`
(`/var/mars_nwe/SYS/CIXCMP/LINUX` on Linux):
```text
collecto.txt collector metadata
files.txt enumerated files/directories
stat.txt Linux stat information
xattr_na.txt xattr names only
getfattr.txt full xattr dump with hex values
xattr_fo.txt filtered mars/nwe/netware/creator/archive-related xattrs
```
The expected interesting xattrs are:
```text
user.mars_nwe.fileinfo
user.mars_nwe.archive
```
## Expected good result
A good run has:
```text
UCOMP.LOG: all FC comparisons report no differences
UCREATOR\*.OUT: CREATOR /SHOW prints readable Attributes and Rights mask
LINUX\getfattr.txt: S_SUP.TXT has fileinfo, S_ARCH.TXT has archive,
S_ALL.TXT has both fileinfo and archive
```