CI: portable in-place sed and date format in shell suites
macOS build / macOS arm64 (macos-15) (push) Waiting to run
macOS build / macOS x86_64 (macos-15-intel) (push) Waiting to run

tests/run_hyper_tests.sh used GNU-style sed -i, which BSD/macOS sed
rejects (its -i takes a mandatory backup-extension argument, so it ate
the script as the extension and read stdin). The ro-stripe test then
failed on macOS because cfg.txt was never flipped to ro. Use a temp
file + mv, which works on GNU and BSD sed alike.

tests/run_deep_repair_tests.sh passed %T and UTC as extra operands to
date; quote the whole format as one argument (works on GNU and BSD
date alike).
This commit is contained in:
cnmcdee committed 2026-12-03 22:02:14 -05:00
1 parent da291f0f9a
commit cd338d4fc0
2 files changed
+2 -2

No files matched your search

+1 -1
View File
@@ -281,7 +281,7 @@ run_cell() {
: > "$WORK/matrix-results.txt"
: > "$WORK/matrix-notes.txt"
echo "Corruption matrix (hot_newyork, $(date -u +%F %T UTC))" >> "$WORK/matrix-results.txt"
echo "Corruption matrix (hot_newyork, $(date -u "+%F %T UTC"))" >> "$WORK/matrix-results.txt"
echo "Tool: lzply_deep_repair -l 3; t=8 (-e 4) unless noted; scattered = corrupt_bits over the whole blob, burst = corrupt_run" >> "$WORK/matrix-results.txt"
# r512 -e 4: single block, m=13, nbits 4200. data offset 16+80+8=104, blob end = size-2.
+1 -1
View File
@@ -120,7 +120,7 @@ mkcfg "$T/badpoly" 1 00ff 4
mkvol "$T/rotest" 1 >/dev/null 2>&1
echo "ro test content" > "$T/rotest/f.txt"
"$HYPER" -c "$T/rotest/cfg.txt" write "$T/rotest/f.txt" f.txt >/dev/null 2>&1
sed -i 's|/vol/s0.bin:rw:|/vol/s0.bin:ro:|' "$T/rotest/cfg.txt"
sed 's|/vol/s0.bin:rw:|/vol/s0.bin:ro:|' "$T/rotest/cfg.txt" > "$T/rotest/cfg.txt.tmp" && mv "$T/rotest/cfg.txt.tmp" "$T/rotest/cfg.txt"
"$HYPER" -c "$T/rotest/cfg.txt" write "$T/rotest/f.txt" f2.txt >/dev/null 2>&1 && \
bad "config: write with an ro stripe rejected" || ok "config: write with an ro stripe rejected"
"$HYPER" -c "$T/rotest/cfg.txt" read f.txt "$T/rotest/f.out" >/dev/null 2>&1 && \