test/sandbox: bypass fields

A field is bypassed if it contains a single null byte. This will never appear in the text format so is safe to use.

Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
2025-03-13 00:00:58 +09:00
parent d22145a392
commit f38ba7e923
2 changed files with 13 additions and 1 deletions

View File

@@ -60,7 +60,7 @@ func MustAssertMounts(name, hostMountsFile, wantFile string) {
if i == len(want) {
fatalf("got more than %d entries", i)
}
if *e != want[i] {
if !e.Is(&want[i]) {
fatalf("entry %d\n got: %s\nwant: %s", i,
e, &want[i])
}