Skip to content

Commit 61da2a6

Browse files
kvapsclaude
andcommitted
test(e2e): two-volume-rd dedup grep before picking dev paths
The .res file lists every device once per on-block per volume, so grep extracted 6 paths (3 workers × 2 volumes) and head/sed picked two duplicates of vol-0 instead of vol-0 + vol-1. sort -u between grep and sed gives unique-per-volume. Co-Authored-By: Claude <noreply@anthropic.com> Signed-off-by: Andrei Kvapil <kvapss@gmail.com>
1 parent cea635c commit 61da2a6

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

tests/e2e/two-volume-rd.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,8 @@ if (( n_devs < 2 )); then
5858
fi
5959

6060
# Independent writes per volume — md5 of vol-0 must NOT match vol-1.
61-
DEV0=$(on_node "$N1" bash -c "grep -oE '/dev/drbd[0-9]+' /etc/drbd.d/${RD}.res | sed -n 1p")
62-
DEV1=$(on_node "$N1" bash -c "grep -oE '/dev/drbd[0-9]+' /etc/drbd.d/${RD}.res | sed -n 2p")
61+
DEV0=$(on_node "$N1" bash -c "grep -oE '/dev/drbd[0-9]+' /etc/drbd.d/${RD}.res | sort -u | sed -n 1p")
62+
DEV1=$(on_node "$N1" bash -c "grep -oE '/dev/drbd[0-9]+' /etc/drbd.d/${RD}.res | sort -u | sed -n 2p")
6363

6464
RD=$RD
6565
on_node "$N1" drbdadm primary "$RD" 2>/dev/null || true

0 commit comments

Comments
 (0)