Files
ARTEX/server
BaaRai f483ecec83 test(server): cover the Norma temp directory rules in a private temp directory
TestCheckNormaTaskDir runs every rule of checkNormaTaskDir on stat facts
alone, without root and without a file system.

On a real directory, with and without root:
- TestPrepareNormaTaskDirAlreadyThere: a directory the executor uid owns, one
  its gid can write in and an other-writable one fail the start, and the error
  names the path, the owner and group, the mode, the executor and the remedy;
  one of another user or of root that the executor cannot write in is used as
  found. Owners, modes, times and contents of the directory and of what it
  holds are hashed before and after: nothing changes in either case.
- TestPrepareNormaTaskDirParent: a parent the executor can write in and that
  is not sticky fails the start; the same parent with the sticky bit passes.
- TestPrepareNormaTaskDirNotADirectory: a symlink, a dangling symlink and a
  regular file fail the start, and nothing is created through the link.
- TestPrepareNormaTaskDirDropDisabled: with the drop disabled nothing is
  checked or created.

As root, TestNormaTaskDirPlantedByExecutorAsRoot lets an executor process
create <temp>/norma with a symlink in it, as it could before a start:
PrepareExecPrivilege fails and leaves the directory as it is.

The root fixture now gives each test its own temp directory, 1777 like /tmp.
PrepareExecPrivilege and Norma's Bash tool reach <temp>/norma, and before
this every root test went to the one of the host. The new tests set TMPDIR to
t.TempDir() for the same reason.
2026-11-20 06:36:48 +01:00
..
2026-07-26 04:27:45 -04:00
2026-07-26 04:27:45 -04:00
2026-08-24 14:14:15 +08:00
2026-10-23 18:12:38 -03:00
2026-08-25 12:05:26 +08:00
2026-08-25 12:05:26 +08:00