Replace mid-sentence dashes in comments with commas/semicolons
Swapped " - " for a semicolon where it joined two independent clauses, or a comma where the following text was an appositive/dependent phrase with no subject of its own. Markdown-style list bullets in tests/live_test.sh's header (leading "- Item") are unaffected - those are structural, not sentence punctuation. Also dropped a "Spec §5.4:" citation in edit.rs missed by the earlier spec-citation cleanup (case-sensitive grep at the time didn't match the capitalized "Spec"). Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
@@ -5,7 +5,7 @@
|
||||
# auth (success and failure), a real two-hop ProxyJump, a real SOCKS proxy
|
||||
# carrying real traffic. Deliberately NOT part of `cargo test` (same reason
|
||||
# as vmic's tests/live_test.sh: this needs a real remote server, not a CI
|
||||
# sandbox) - live-only, opt-in, run by hand.
|
||||
# sandbox), live-only, opt-in, run by hand.
|
||||
#
|
||||
# Usage:
|
||||
# tests/live_test.sh [options]
|
||||
@@ -22,21 +22,21 @@
|
||||
# -h, --help
|
||||
#
|
||||
# Known limitation: only one real server is available, so multi-hop (`-J`)
|
||||
# is tested by chaining the server through itself (--via user@host,user@host)
|
||||
# - a real two-hop ProxyJump handshake, just with both hops the same box.
|
||||
# is tested by chaining the server through itself (--via user@host,user@host),
|
||||
# a real two-hop ProxyJump handshake, just with both hops the same box.
|
||||
# There is no way to test a genuine distinct-host chain without a second
|
||||
# server.
|
||||
#
|
||||
# Safety:
|
||||
# - Profiles/instances/locks/logs are sandboxed for the whole run under
|
||||
# one `PORTHOLE_STATE_DIR_OVERRIDE` temp dir (profile.rs/instance.rs
|
||||
# both honor it) - this suite NEVER touches the real
|
||||
# both honor it); this suite NEVER touches the real
|
||||
# ~/.config/porthole or ~/.local/state/porthole.
|
||||
# - Every profile created is named "$NAME_..." (default prefix
|
||||
# porttestsuite); no operation targets anything outside that prefix.
|
||||
# - `wipe` (src/commands/wipe.rs) kills ANY process on the
|
||||
# whole system whose cmdline contains "__supervise", regardless of
|
||||
# which state dir it belongs to - it is NOT scoped by the sandboxing
|
||||
# which state dir it belongs to; it is NOT scoped by the sandboxing
|
||||
# above. Before running it, this script scans the real process table
|
||||
# and skips the wipe phase entirely (not "wipe only the safe parts")
|
||||
# if it finds a live __supervise process that isn't one of this run's
|
||||
@@ -48,10 +48,10 @@
|
||||
# never writes to your real ~/.ssh/known_hosts (only porthole's own
|
||||
# spawned ssh does, against the real file, using the accept-new policy
|
||||
# already forced in src/ssh.rs).
|
||||
# - An EXIT trap always attempts full cleanup - closes/removes every
|
||||
# - An EXIT trap always attempts full cleanup, closes/removes every
|
||||
# test-prefixed profile in every sandbox dir used, force-kills any
|
||||
# stray matching __supervise process, deletes the throwaway bad-auth
|
||||
# key - even on failure or Ctrl-C.
|
||||
# key, even on failure or Ctrl-C.
|
||||
|
||||
set -uo pipefail
|
||||
cd "$(dirname "${BASH_SOURCE[0]}")/.."
|
||||
@@ -117,7 +117,7 @@ p_run() { LAST_OUT="$(PORTHOLE_STATE_DIR_OVERRIDE="$1" "$BIN" "${@:2}" 2>&1)"; L
|
||||
|
||||
# status --json's "state" field is always one of closed/up/reconnecting/error
|
||||
# (print_json normalizes a dead-supervisor instance file to "error" too, see
|
||||
# status.rs) - polling that key is far more robust than scraping the padded
|
||||
# status.rs); polling that key is far more robust than scraping the padded
|
||||
# human-readable field.
|
||||
json_field() { # json_field <state-dir> <name> <field> -> value, empty if absent/no instance
|
||||
p "$1" status "$2" --json 2>/dev/null | sed -n "s/.*\"$3\": \"\\{0,1\\}\\([^\",]*\\)\"\\{0,1\\},\\{0,1\\}\$/\\1/p" | head -1
|
||||
@@ -140,7 +140,7 @@ wait_port_closed() { # wait_port_closed <port> [tries, x0.5s]
|
||||
}
|
||||
SSH_PROBE_OPTS=(-o BatchMode=yes -o ConnectTimeout=5 -o StrictHostKeyChecking=accept-new -o UserKnownHostsFile=/dev/null)
|
||||
|
||||
# mktemp's output is captured via $(...), which forks a subshell - any
|
||||
# mktemp's output is captured via $(...), which forks a subshell; any
|
||||
# array append done *inside* a function called that way would be lost when
|
||||
# the subshell exits, so state dirs are appended here at the call site
|
||||
# instead of through a helper function.
|
||||
@@ -408,7 +408,7 @@ expect_contains "warns it's left running untracked" "left running untracked"
|
||||
p_run "$STATE_DIR" status "${NAME}_keep"; assert_eq "profile is gone from tracking" "$LAST_CODE" "1"
|
||||
assert_true "the untracked process is still actually alive" pgrep -f "__supervise ${NAME}_keep\$"
|
||||
assert_true "port $KEEP_PORT is still live, untracked" port_open "$KEEP_PORT"
|
||||
# left running on purpose - phase 15's wipe is what's being tested against it
|
||||
# left running on purpose; phase 15's wipe is what's being tested against it
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
section "Phase 14: transfer round trip against a live profile"
|
||||
|
||||
Reference in New Issue
Block a user