-
Notifications
You must be signed in to change notification settings - Fork 19
Redesign sidecar using byte-exact guest filenames without a sidecar index #256
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
henrybear327
wants to merge
11
commits into
sysprog21:main
Choose a base branch
from
henrybear327:sysroot/casefold-redesign
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
60c9ba0
Add the case-escape name codec
henrybear327 fd7a122
Add the case-exact path resolver
henrybear327 0ff34bd
Resolve sysroot paths through one case-exact walk
henrybear327 b253dc1
Cover the sysroot naming contracts
henrybear327 9271b52
Document how a guest filename reaches the disk
henrybear327 caa7396
Follow symlink targets through the guest namespace
henrybear327 7e43568
Translate inotify watches and event names
henrybear327 1099b6e
Translate exec pathnames and reported identity
henrybear327 727d59b
Resolve PT_INTERP through the guest path walk
henrybear327 15c1de3
Translate pathname AF_UNIX socket addresses
henrybear327 479545c
Harden the check suite for names and paths
henrybear327 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,71 @@ | ||
| #!/usr/bin/env bash | ||
|
|
||
| # Keep the test-matrix skip lists honest. | ||
| # | ||
| # tests/test-matrix.sh runs each test under two runners and carries a skip list | ||
| # per runner: QEMU_SKIP for tests the reference kernel cannot adjudicate, | ||
| # ELFUSE_SKIP for tests that need a writable byte-exact root the elfuse lane | ||
| # does not have. Both lists are matched against a test's label by string, and a | ||
| # string that matches nothing fails silently: the suite still reports success, | ||
| # having run one test fewer than the reader believes. | ||
| # | ||
| # Two ways that goes wrong, both of which cost coverage without costing a red | ||
| # build, and neither of which the suite itself can notice: | ||
| # | ||
| # 1. A label in a skip list that no longer names a registered test. Dead | ||
| # config: it reads as deliberate coverage policy while guarding nothing, | ||
| # and it hides the rename that orphaned it. | ||
| # 2. A label in both lists at once. The test is then skipped under every | ||
| # runner the matrix has, so it never executes anywhere while still looking | ||
| # registered. | ||
| # | ||
| # The pass counts themselves are not checked here. test-matrix.sh already holds | ||
| # each lane to its EXPECTED_BASELINES floor at runtime, which is a stronger | ||
| # check than anything static, and duplicating it would only add a second number | ||
| # to keep in step. | ||
|
|
||
| set -e -u -o pipefail | ||
|
|
||
| MATRIX="${1:-$(dirname "$0")/../tests/test-matrix.sh}" | ||
|
|
||
| if [ ! -r "$MATRIX" ]; then | ||
| echo "check-matrix-lists: cannot read $MATRIX" >&2 | ||
| exit 2 | ||
| fi | ||
|
|
||
| # Body of a NAME="..." block spanning lines, one entry per line. | ||
| list_entries() | ||
| { | ||
| sed -n "/^$1=\"/,/^\"\$/p" "$MATRIX" | sed '1d;$d' | tr -s ' \t' '\n' \ | ||
| | grep -v '^$' || true | ||
| } | ||
|
|
||
| # Labels registered with the test_* wrappers: the argument after "$runner". | ||
| registered_labels() | ||
| { | ||
| grep -oE '\btest_(check|rc|pipe) +"\$runner" +"[^"]+"' "$MATRIX" \ | ||
| | sed -E 's/.*"\$runner" +"([^"]+)"$/\1/' | sort -u | ||
| } | ||
|
|
||
| ret=0 | ||
| registered="$(registered_labels)" | ||
|
|
||
| for list in QEMU_SKIP ELFUSE_SKIP; do | ||
| while IFS= read -r label; do | ||
| [ -n "$label" ] || continue | ||
| if ! printf '%s\n' "$registered" | grep -qxF "$label"; then | ||
| echo "Error: $list names '$label', which no test_* call registers" >&2 | ||
| ret=1 | ||
| fi | ||
| done < <(list_entries "$list") | ||
| done | ||
|
|
||
| while IFS= read -r label; do | ||
| [ -n "$label" ] || continue | ||
| if list_entries QEMU_SKIP | grep -qxF "$label"; then | ||
| echo "Error: '$label' is in both QEMU_SKIP and ELFUSE_SKIP, so it never runs" >&2 | ||
| ret=1 | ||
| fi | ||
| done < <(list_entries ELFUSE_SKIP) | ||
|
|
||
| exit $ret | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.