test code v1

This commit is contained in:
2026-08-13 10:44:59 +02:00
commit f3b1165f19
301 changed files with 37885 additions and 0 deletions
@@ -0,0 +1,183 @@
# repo22 G7 boundary and stress full manual regression report
## Scope and result
- Exact scope: TC120-TC130 inclusive.
- Count check: 11 requested, 11 executed, 0 duplicate, 0 omitted.
- Result: **PASS 11, KFAIL 0, SHELVED 0, ENV 0**.
- No repo22 kernel source was changed.
- No kernel failure occurred, so no G7 issue file was opened.
- No CI, runner, or test wrapper was used. Each test's Markdown commands were
issued manually in the dedicated FreeBSD guest.
## Baseline and source identity
- Requested initial `xdm/main`: `c566d8ac6bf8e801082bbccf108451f6ee46ad40`.
- G6 pushed first; G7 fetched and rebased onto
`f11fff5b8e8050e1017ed86f0bcf71042b2b45aa` before editing.
- Exact build commit:
`e44e24c2d7e4955498fb42b06bcf376d6c452190`.
- The equivalent G7 test/source commit after the final remote rebase is
`896683f14af2ba36705498f85d0d8af02b513d31`; its repo22 source tree is
byte-identical to the build input.
- Exact `repo-community/repo22/src` tree:
`34a56a583b3b43e7e103b26a30dea1d400c2bc6c`.
- G8 later advanced `xdm/main` to `6f336d0a7`; its repo22 source tree was the
same `34a56a58...`. G7 rebased before final push without force.
- Build configuration: `WITH_ZSTDIO=1`.
- Tracked FreeBSD sys source: `REVISION="15.0"`, `BRANCH="RELEASE-p9"`.
- repo22 source archive SHA256:
`e715e9d323be1448e0395add99cf017dea3c1bbb6579915cf3d07f7265ca2891`.
- FreeBSD sys archive SHA256:
`71f535ab5a9ef686c6adbe123a1d1e65fd9bfa9cd19724f9fcef222a8efbe9d8`.
## Isolated environment
- Worktree: `/work/build/repo22-manual-g7-20260809T125507Z`.
- Branch: `manual-g7-20260809T125507Z`.
- Artifact root: `/work/build/repo22-g7-20260809T125507Z`.
- Dedicated qcow2 overlay backed by `/work/build/vm-freebsd-dev-base.qcow2`.
- Dedicated SSH forward: `127.0.0.1:9227`.
- QEMU: TCG multi-thread, `qemu64`, 6144 MiB RAM, 4 vCPUs, virtio disk/network.
- Guest: FreeBSD `15.0-RELEASE-p8`, amd64,
`releng/15.0-n281036-53054229dcb3`, OSREL `1500068`.
- Guest kernel SHA256:
`b9abf7b58f9dd4d87f14d2fbc306cf255e6eadc47b8ae885a230f65e28be4562`.
- Host erofs-utils: 1.8.6.
- RACCT/RCTL was initially present but disabled. The dedicated overlay set
loader tunable `kern.racct.enable="1"`, rebooted, then reported enabled with
an empty initial rule set.
## Exact KLD and probe
The KLD built successfully from the archived commit with the tracked p9 sys
tree and loaded by full pathname. `kldstat -v` assigned file ID 5 and showed
module ID 507 for `erofs`.
| Artifact | SHA256 |
|---|---|
| `/root/repo22-g7/erofs.ko` | `06dfa530efb2d494950672d60453d86a6e70f06ca2ce7b4eff3396ca8018c76d` |
| `/root/repo22-g7/g7_probe` | `a0bca6ea596cec6063bc058aebee12929a1814e6d343283ffbe051551bf75c57` |
The KLD was an amd64 FreeBSD relocatable object with build ID
`d4fff529ae8e4c5395e1e867fd4ea5d57a9570b6`. The expected formal FreeBSD ZSTD
undefined symbols were present; no build or load error occurred.
## Reproducible fixture
Two fresh generations produced byte-identical source inventories, source
checksum lists, and image checksum lists. Each generation independently ran
the helper verification and erofs fsck checks.
```text
source file count = 24023
image count = 2
SOURCE-INVENTORY.tsv SHA256 = b9be1745900a8cf6755068b6a78b93bc294cf8857539159b7771e5170bc1b9ed
SOURCE-SHA256SUMS SHA256 = 445929465a3031e84de9887fc5b02d72cb797df7ca512ea1cc874d11f77747d3
SHA256SUMS SHA256 = f9cf45c1e3fe814290d9cd0b96d066509309cc3f764c545d5e7d7ddae4a9eac3
fixture-manifest.json SHA256 = 0ba86269962b00329b99177494cfb099c0f58fe5de77d2dc1f12da684dedf09d
guest image/source verification = 2 images and 24023 sources, all OK
```
| Image | Bytes | SHA256 |
|---|---:|---|
| `boundaries.erofs` | 37752832 | `ff7e804dc309039fa5dfa9b6e75416d16224137c8f6d6d96bf04cfa0ba8a1a8c` |
| `workloads.erofs` | 155111424 | `5f21a045114c5956b80752736c9833fe6a975a296cd28324734c9b9e423f3984` |
The sparse source was exactly 4294971393 bytes. It occupied 48 Linux
512-byte blocks before transfer and 512 FreeBSD blocks with a reported
32768-byte file-system block size after sparse-aware extraction. All five
markers and six boundary ranges passed the helper's source self-check.
## Per-TC results
| TC | Manual evidence | Result |
|---|---|---|
| TC120 | Exact size 0; source/mount empty SHA256 `e3b0c442...`; read returned 0; SET/END seeks returned 0 | PASS |
| TC121 | Exact 4294971393-byte size; six source-compared ranges across block, hole, 2 GiB, 4 GiB, and EOF boundaries; EOF read 0 | PASS |
| TC122 | Exactly 128 levels; deepest source/mount hash `ef151b18...`; full cmp and exact `pwd -P` | PASS |
| TC123 | Exact 255-byte name; one exact readdir row; size 4096; source/mount hash `0724316b...` | PASS |
| TC124 | Exactly 12000 one-KiB files and exact names; complete source/target hash-list digest `be93ef11...` | PASS |
| TC125 | Exactly 12000 direct entries and exact names/hashes; five boundary lookups matched; readdir timing recorded | PASS |
| TC126 | Exactly 16 saved PIDs, 16 waits, all rc 0; every expected/actual full-file hash matched; no PID remained | PASS |
| TC127 | Three RCTL-capped allocators reached ENOMEM, released all touched bytes, recovered allocation, and wait=0; pressure read hash/cmp matched | PASS |
| TC128 | 268435456-byte source/mount hash and full cmp matched; three complete sequential reads rc 0; metrics recording-only | PASS |
| TC129 | Three deterministic 16384-operation runs, all source-compared, zero mismatch, identical digest; metrics recording-only | PASS |
| TC130 | Seven saved PIDs and seven wait=0 results; sequential, hash, two random, 16-file, names, and stat workloads all matched; full cleanup | PASS |
TC121 range digests were `7775e9e82783e06f`, `c86358c1fb3fabf7`,
`b43a063055adc383`, `a1bd19f7b12c60b2`, `5a378d4efc494af4`, and
`1873eaea77354aa6`, in manifest order.
TC124's complete 12000-row source and mounted hash-list files both had SHA256
`be93ef11d2e4cd0cd42ef057397b89978b624e42674f9181e5dd151b30636171`.
TC125's complete 12000-row files both had SHA256
`8cde4ea887f9b21b265ac199bcbb447a656aa6d718a36424f4fa03a6c538ebe7`.
TC126 persisted each worker's PID, source hash, mounted hash, and wait status.
The PID table SHA256 was `fc67656d...`; the 16-row wait table SHA256 was
`888f026d...`. Every wait code was 0 and every hash pair was equal.
## Pressure evidence
TC127 used three synchronized `g7_probe` processes and valid FreeBSD RCTL
rules `process:<pid>:vmemoryuse:deny=640M`. The first process utilization
sample showed `memoryuse=532M` and `vmemoryuse=636M`.
| Worker | Allocated before ENOMEM | errno | Released | Recovery | wait rc |
|---|---:|---:|---:|---|---:|
| 1 | 553648128 | 12 | 553648128 | ok | 0 |
| 2 | 545259520 | 12 | 545259520 | ok | 0 |
| 3 | 553648128 | 12 | 553648128 | ok | 0 |
Free memory recorded by `vmstat -H` was about 4.01 GB before, 2.35 GB while
the allocations were held, and 3.89 GB after release. The 96 MiB source and
mounted file both hashed to
`e4baaad480721bfb69a0315f0092fcf1ad75426fda0b9242a750b5685ad75152`
and full `cmp` exited 0. RCTL rules and synchronization files were removed.
## Recording-only metrics
TC125's full 12000-entry sorted readdir scan under TCG recorded `real 11.48`,
`user 0.81`, and `sys 9.76` seconds. It would have failed the old invalid
10-second fixed threshold despite complete correctness, so timing was
correctly treated as recording-only.
TC128 sequential reads:
| Run | Bytes | Seconds | Bytes/s | wait rc |
|---|---:|---:|---:|---:|
| 1 | 268435456 | 6.764841 | 39680970 | 0 |
| 2 | 268435456 | 9.207558 | 29153816 | 0 |
| 3 | 268435456 | 10.603392 | 25315998 | 0 |
TC129 used seed `0x6a09e667f3bcc909`, 16384 operations, and 4096-byte
blocks. All runs produced digest `908bc2905f48695d` and zero mismatches.
| Run | Seconds | IOPS | Mean us |
|---|---:|---:|---:|
| 1 | 2.236047 | 7327.22 | 136.48 |
| 2 | 1.062087 | 15426.24 | 64.82 |
| 3 | 1.026698 | 15957.95 | 62.66 |
TC130 random workers ran concurrently with the other five workloads. Seed
`0xbb67ae8584caa73b` recorded 442.73 IOPS, 2258.72 us mean, digest
`78e9d2c7f86ed20e`; seed `0x3c6ef372fe94f82b` recorded 455.91 IOPS,
2193.42 us mean, digest `ee76a5d094a0c6f2`. Both had zero mismatches.
The exact names files shared SHA256 `8d1cf816...`; exact stat files shared
SHA256 `ca8937b1...`.
## Stability and cleanup
- Final dmesg delta was empty; its SHA256 was the empty-file hash. No panic,
trap, assertion, watchdog, OOM, or EROFS error appeared.
- Every test detached its exact md provider after unmounting.
- Final guest state had zero EROFS mounts, md providers, G7 child processes,
RCTL rules, synchronization files, and Python bytecode caches.
- KLD file ID 5 was unloaded with `kldunload -i 5`; no EROFS allocator row or
KLD remained.
- The guest remained responsive, powered off normally, QEMU PID 344535 exited,
port 9227 was released, and the dedicated overlay/log/PID files were deleted.
- Compressed evidence archive SHA256:
`f18246076e5ff93309187a1826afe9f2dfa4a0bcdf7a958419d2890d05727ccd`.
- No issues were created because all correctness gates passed.