lint/cubic
authorShane Jaroch <chown_tee@proton.me>
Sat, 17 Jan 2026 13:18:10 +0000 (08:18 -0500)
committerShane Jaroch <chown_tee@proton.me>
Sat, 17 Jan 2026 13:18:10 +0000 (08:18 -0500)
tests/system-test-multikey.sh
tests/system-test-privacy-leaks.sh
tests/system-test-repack.sh
tests/system-test.sh

index 06e6ef32b4b278d2a9a07c361403399dc6847092..ccba68c3e8276550417348b31126c9d959516c6d 100755 (executable)
@@ -82,7 +82,14 @@ trap 'rm -Rf -- "${tempdir}"' EXIT
 export HOME="${tempdir}"
 
 # Setup PATH to use local git-remote-gcrypt
-PATH=${PWD}:${PATH}
+SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
+repo_root="$(dirname "$SCRIPT_DIR")"
+test_version=$(git describe --tags --always --dirty 2>/dev/null || echo "test")
+cp "$repo_root/git-remote-gcrypt" "$tempdir/git-remote-gcrypt"
+sed "s/@@DEV_VERSION@@/$test_version/" "$tempdir/git-remote-gcrypt" >"$tempdir/git-remote-gcrypt.tmp"
+mv "$tempdir/git-remote-gcrypt.tmp" "$tempdir/git-remote-gcrypt"
+chmod +x "$tempdir/git-remote-gcrypt"
+PATH=$tempdir:${PATH}
 readonly PATH
 export PATH
 
@@ -139,16 +146,6 @@ key_fps=()
 ) 2>&1 | indent
 
 # Capture fingerprints
-# Integrated fix: use mapfile
-#
-# CRITICAL FIX:
-# Previously, `grep fpr` captured both the Primary Key (EDDSA) and the Subkey (ECDH) fingerprints.
-# This caused the `key_fps` array to double in size (36 entries for 18 keys).
-# As a result, `key_fps[17]` (intended to be the last Primary Key) actually pointed to the
-# Subkey of the 9th key (`key_fps[8*2 + 1]`).
-# We configured `gcrypt.participants` with this Subkey, but GPG always signs with the Primary Key.
-# This caused a signature mismatch ("Participant A vs Signer B") and verification failure.
-# Using `awk` to filter `pub:` ensures we only capture the Primary Key.
 mapfile -t key_fps < <(gpg --list-keys --with-colons | awk -F: '/^pub:/ {f=1;next} /^fpr:/ && f {print $10;f=0}')
 echo "Generated keys: ${key_fps[*]}" | indent
 
index 8b277bc6057630bb3ef204aae856dd1e99d05cac..5df0d8f1ae885ca15d27a65a2ec1bdb25168c391 100755 (executable)
@@ -15,7 +15,8 @@ trap 'rm -Rf -- "$tempdir"' EXIT
 export HOME="${tempdir}"
 
 # Ensure git-remote-gcrypt is in PATH
-repo_root="${PWD}"
+SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
+repo_root="$(dirname "$SCRIPT_DIR")"
 test_version=$(git describe --tags --always --dirty 2>/dev/null || echo "test")
 cp "$repo_root/git-remote-gcrypt" "$tempdir/git-remote-gcrypt"
 sed "s/@@DEV_VERSION@@/$test_version/" "$tempdir/git-remote-gcrypt" >"$tempdir/git-remote-gcrypt.tmp"
index 58ffb842733132e968a925115057a6ce70077e39..db176a60669d1f844791451a9ba6d9f5336800c3 100755 (executable)
@@ -47,7 +47,8 @@ trap "rm -Rf -- '${tempdir}'" EXIT
 export HOME="${tempdir}"
 
 # Set up the PATH
-repo_root="${PWD}"
+SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
+repo_root="$(dirname "$SCRIPT_DIR")"
 test_version=$(git describe --tags --always --dirty 2>/dev/null || echo "test")
 cp "$repo_root/git-remote-gcrypt" "$tempdir/git-remote-gcrypt"
 sed -i "s/@@DEV_VERSION@@/$test_version/" "$tempdir/git-remote-gcrypt"
index 9d398f39012cf7ea11c75085556dc051cd3343f8..d5471d74b2826a9240f55e56f6d654a0e0ca4445 100755 (executable)
@@ -74,7 +74,8 @@ export HOME="${tempdir}"
 # Set up the PATH to favor the version of git-remote-gcrypt from the repository
 # rather than a version that might already be installed on the user's system.
 # We also copy it to tempdir to inject a version number for testing.
-repo_root="${PWD}"
+SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
+repo_root="$(dirname "$SCRIPT_DIR")"
 test_version=$(git describe --tags --always --dirty 2>/dev/null || echo "test")
 cp "$repo_root/git-remote-gcrypt" "$tempdir/git-remote-gcrypt"
 sed "s/@@DEV_VERSION@@/$test_version/" "$tempdir/git-remote-gcrypt" > "$tempdir/git-remote-gcrypt.tmp"