tools: group scripts by what runs them
tools/windows/ .ps1 (pwsh, so usable from Linux and macOS too)
tools/posix/ .sh
tools/python/ .py
tools/ .c and .pl
The .c and .pl files stay at the top level because they are not
host-specific: the build compiles or invokes them on every platform.
Call sites updated in the Makefile, ports/mk/port.mk, docs and the
project memory. The one thing that does not survive a move on its own is
a script deriving the repo root from its own location -- all nine
PowerShell tools used Split-Path $PSScriptRoot -Parent, and memory-sync.sh
used dirname/.., both of which quietly become tools/ one level deeper.
Two levels now.
Two pre-existing Windows failures surfaced while verifying, both real and
neither caused by the move:
- schfs_fsck.c did not compile under mingw at all: --extract uses
POSIX mkdir(path,mode), symlink() and link(), none of which mingw
has. That took the whole tool with it, and `make schfs-check` with
it. mkdir maps to _mkdir; symlink and link fail loudly rather than
writing a regular file in their place, because an extracted tree
that differs from the image while reporting success defeats the
point of --extract.
- the round-trip test then failed at `ln -s`, since Git Bash cannot
create symlinks without developer mode. It skips with a message now.
Not a fudge: mkschfs's mingw build cannot see a symlink either, so
the test would have compared a tree with none against an image with
none and called it a pass -- coverage reporting itself as present
while being absent.
Verified on Windows: build clean, all seven bootcheck suites green,
make schfs-check passes.
This commit is contained in:
parent
531ef120ef
commit
754d96ebc5
26 changed files with 127 additions and 39 deletions
|
|
@ -483,7 +483,7 @@ the user is looking at. That single fact is most of what separates a hobby
|
|||
project from a product; every shipping system puts that behind a flag.
|
||||
|
||||
`cons_serial_only` already existed for panic, so the fix was to start it *set*.
|
||||
Everything still goes out the UART — which is where `tools/bootcheck.ps1` reads
|
||||
Everything still goes out the UART — which is where `tools/windows/bootcheck.ps1` reads
|
||||
it from, so all five suites kept passing untouched — and `console_takeover()`
|
||||
clears it on the first `exec()`, the moment userspace genuinely starts.
|
||||
`vga_init` no longer clears the screen, so the splash survives the whole of
|
||||
|
|
|
|||
|
|
@ -324,9 +324,9 @@ tools/mkschfs.c build an image from a directory tree
|
|||
tools/schfs_fsck.c verify, list, extract
|
||||
tools/schfs_test.c B-tree torture harness
|
||||
tools/schfs_objtest.c object layer: files, directories, space accounting
|
||||
tools/schfs_roundtrip.sh end-to-end filesystem test
|
||||
tools/mutate.sh mutation-tests the suites themselves
|
||||
tools/bootcheck.ps1 boots under QEMU and drives the shell
|
||||
tools/posix/schfs_roundtrip.sh end-to-end filesystem test
|
||||
tools/posix/mutate.sh mutation-tests the suites themselves
|
||||
tools/windows/bootcheck.ps1 boots under QEMU and drives the shell
|
||||
```
|
||||
|
||||
Everything except `kmount.c` is compiled *both* into the kernel and into the
|
||||
|
|
@ -357,7 +357,7 @@ is the least glamorous: after deleting everything, free space must be back to
|
|||
exactly what it was on an empty volume. Every other test in the suite still
|
||||
passes on a filesystem that leaks a block on every delete.
|
||||
|
||||
`tools/mutate.sh` injects six deliberate bugs and fails if any of them goes
|
||||
`tools/posix/mutate.sh` injects six deliberate bugs and fails if any of them goes
|
||||
undetected. It is how the suites are kept honest; see the note in §9.
|
||||
|
||||
### Verifying on real hardware
|
||||
|
|
|
|||
Loading…
Reference in a new issue