Files
mars-dosutils/test/quota

DOS quota write-deny smoke

This test proves the client-visible quota boundary with DOS board tools while keeping the authority split explicit. It now tests both quota backends in one DOS handoff:

  • QUOTA is mapped as Q: and uses the Linux quota backend.
  • SYS stays mapped as F: and uses the NWQUOTA metadata backend.

DQTSTA prepares both Q:\DQTQUOTA\NCPQFILL and F:\DQTSYS\NCPQFILL, then starts DQTC.BAT via DLYSTRT. The helper waits for J/j/Y/y before it logs out and logs in as NOPASSUSER, so the Linux quota setup can happen in between.

DOS part 1

Login as SUPERVISOR on SYS and run:

SET LGNTPWD=zefuqUVe
F:
DQTSTA

DQTSTA maps Q:=QUOTA: and creates:

  • Q:\DQTQUOTA\NCPQFILL for the Linuxquota volume test files
  • F:\DQTSYS\NCPQFILL for the NWQUOTA metadata volume test files
  • F:\DQTCMP for network-side logs
  • C:\DQTTMP for the delayed helper and local logs

Linux handoff

When DOS prints that DQTC is waiting, set quotas for NOPASSUSER. QUOTA can usually be set to 12 directly after the prepared directory was purged:

./nwfs_ncpfs_userquota -S MARS -U SUPERVISOR -P 'zefuqUVe' \
  --volume QUOTA --object NOPASSUSER --type 1 --limit-4k 12

For SYS, read the current usage and set the limit to inuse4k + 12, because NOPASSUSER may already own files on SYS:

./nwfs_ncpfs_userquota -S MARS -U SUPERVISOR -P 'zefuqUVe' \
  --volume SYS --object NOPASSUSER --type 1 --get

./nwfs_ncpfs_userquota -S MARS -U SUPERVISOR -P 'zefuqUVe' \
  --volume SYS --object NOPASSUSER --type 1 --limit-4k <inuse4k+12>

Then return to DOS and press J, j, Y, or y.

DOS part 2

The helper logs in as NOPASSUSER, maps Q:=QUOTA:, writes 12 4K files on both volumes, and expects the 13th 4K file to fail on both volumes. If LGNTPWD is set, it logs back in as SUPERVISOR and queues:

F:\DQTSTA.BAT PART2

Finally, optionally pack the logs:

F:
DQTZIP

Expected summary:

PASS: DOS quota deny observed on QUOTA and SYS.