Skip to content

Commit b97d4d6

Browse files
committed
Maybe final polishing
1 parent 3372195 commit b97d4d6

6 files changed

+42
-42
lines changed

tools/hammer_loop.sh

+7-7
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@ ROOT=$(cd "$(dirname "$0")/.." && pwd)
1313
cd "$ROOT" || (echo failed to cd "$ROOT"; exit 1)
1414

1515
export BINDIR=${BINDIR:-$ROOT/target/debug}
16-
hammer="$BINDIR/crucible-hammer"
17-
cds="$BINDIR/crucible-downstairs"
18-
dsc="$BINDIR/dsc"
16+
hammer="${BINDIR}/crucible-hammer"
17+
cds="${BINDIR}/crucible-downstairs"
18+
dsc="${BINDIR}/dsc"
1919
for bin in $hammer $cds $dsc; do
2020
if [[ ! -f "$bin" ]]; then
2121
echo "Can't find crucible binary at $bin" >&2
@@ -30,7 +30,7 @@ if pgrep -fl -U "$(id -u)" "$cds"; then
3030
fi
3131

3232
WORK_ROOT=${WORK_ROOT:-/tmp}
33-
TEST_ROOT="$WORK_ROOT/hammer_loop"
33+
TEST_ROOT="${WORK_ROOT}/hammer_loop"
3434
if [[ -d "$TEST_ROOT" ]]; then
3535
# Delete previous test data
3636
rm -r "$TEST_ROOT"
@@ -52,9 +52,9 @@ if [[ $? -ne 0 ]]; then
5252
exit 1
5353
fi
5454

55-
loop_log="$TEST_ROOT/hammer_loop.log"
56-
test_log="$TEST_ROOT/hammer_loop_test.log"
57-
dsc_ds_log="$TEST_ROOT/hammer_loop_dsc.log"
55+
loop_log="${TEST_ROOT}/hammer_loop.log"
56+
test_log="${TEST_ROOT}/hammer_loop_test.log"
57+
dsc_ds_log="${TEST_ROOT}/hammer_loop_dsc.log"
5858

5959
loops=20
6060

tools/test_live_repair.sh

+7-7
Original file line numberDiff line numberDiff line change
@@ -45,17 +45,17 @@ if [[ $? -ne 0 ]]; then
4545
exit 1
4646
fi
4747

48-
loop_log="$TEST_ROOT"/test_live_repair_summary.log
49-
test_log="$TEST_ROOT"/test_live_repair.log
50-
verify_log="$TEST_ROOT/test_live_repair_verify.log"
51-
dsc_ds_log="$TEST_ROOT/test_live_repair_dsc.log"
48+
loop_log="${TEST_ROOT}/test_live_repair_summary.log"
49+
test_log="${TEST_ROOT}/test_live_repair.log"
50+
verify_log="${TEST_ROOT}/test_live_repair_verify.log"
51+
dsc_ds_log="${TEST_ROOT}/test_live_repair_dsc.log"
5252

5353
ROOT=$(cd "$(dirname "$0")/.." && pwd)
5454
cd "$ROOT" || (echo failed to cd "$ROOT"; exit 1)
5555
export BINDIR=${BINDIR:-$ROOT/target/debug}
56-
crucible_test="$BINDIR/crutest"
57-
dsc="$BINDIR/dsc"
58-
downstairs="$BINDIR/crucible-downstairs"
56+
crucible_test="${BINDIR}/crutest"
57+
dsc="${BINDIR}/dsc"
58+
downstairs="${BINDIR}/crucible-downstairs"
5959
if [[ ! -f "$crucible_test" ]] || [[ ! -f "$dsc" ]] || [[ ! -f "$downstairs" ]]; then
6060
echo "Can't find required binaries"
6161
echo "Missing $crucible_test or $dsc or $downstairs"

tools/test_repair.sh

+7-7
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,9 @@ ROOT=$(cd "$(dirname "$0")/.." && pwd)
2828
cd "$ROOT" || (echo failed to cd "$ROOT"; exit 1)
2929
export BINDIR=${BINDIR:-$ROOT/target/debug}
3030

31-
cds="$BINDIR/crucible-downstairs"
32-
ct="$BINDIR/crutest"
33-
dsc="$BINDIR/dsc"
31+
cds="${BINDIR}/crucible-downstairs"
32+
ct="${BINDIR}/crutest"
33+
dsc="${BINDIR}/dsc"
3434

3535
for bin in $cds $ct $dsc; do
3636
if [[ ! -f "$bin" ]]; then
@@ -65,10 +65,10 @@ if [[ $? -ne 0 ]]; then
6565
exit 1
6666
fi
6767

68-
verify_file="$TEST_ROOT/test_repair_verify.data"
69-
test_log="$TEST_ROOT/test_repair_out.txt"
70-
ds_log_prefix="$TEST_ROOT/test_repair_ds"
71-
dsc_output_dir="$TEST_ROOT/test_repair_dsc"
68+
verify_file="${TEST_ROOT}/test_repair_verify.data"
69+
test_log="${TEST_ROOT}/test_repair_out.txt"
70+
ds_log_prefix="${TEST_ROOT}/test_repair_ds"
71+
dsc_output_dir="${TEST_ROOT}/test_repair_dsc"
7272
loops=100
7373

7474
usage () {

tools/test_replace_special.sh

+7-7
Original file line numberDiff line numberDiff line change
@@ -41,17 +41,17 @@ if [[ $? -ne 0 ]]; then
4141
exit 1
4242
fi
4343

44-
loop_log="$TEST_ROOT/test_replace_special_summary.log"
45-
test_log="$TEST_ROOT/test_replace_special.log"
46-
verify_log="$TEST_ROOT/test_replace_special_verify.log"
47-
dsc_ds_log="$TEST_ROOT/test_replace_special_dsc.log"
44+
loop_log="${TEST_ROOT}/test_replace_special_summary.log"
45+
test_log="${TEST_ROOT}/test_replace_special.log"
46+
verify_log="${TEST_ROOT}/test_replace_special_verify.log"
47+
dsc_ds_log="${TEST_ROOT}/test_replace_special_dsc.log"
4848

4949
ROOT=$(cd "$(dirname "$0")/.." && pwd)
5050
cd "$ROOT" || (echo failed to cd "$ROOT"; exit 1)
5151
export BINDIR=${BINDIR:-$ROOT/target/debug}
52-
crucible_test="$BINDIR/crutest"
53-
dsc="$BINDIR/dsc"
54-
downstairs="$BINDIR/crucible-downstairs"
52+
crucible_test="${BINDIR}/crutest"
53+
dsc="${BINDIR}/dsc"
54+
downstairs="${BINDIR}/crucible-downstairs"
5555
if [[ ! -f "$crucible_test" ]] || [[ ! -f "$dsc" ]] || [[ ! -f "$downstairs" ]]; then
5656
echo "Can't find required binaries"
5757
echo "Missing $crucible_test or $dsc or $downstairs"

tools/test_replay.sh

+6-6
Original file line numberDiff line numberDiff line change
@@ -38,16 +38,16 @@ if [[ $? -ne 0 ]]; then
3838
exit 1
3939
fi
4040

41-
test_log="$TEST_ROOT/test_replay.log"
42-
verify_log="$TEST_ROOT/test_replay_verify.log"
43-
dsc_ds_log="$TEST_ROOT/test_replay_dsc.log"
41+
test_log="${TEST_ROOT}/test_replay.log"
42+
verify_log="${TEST_ROOT}/test_replay_verify.log"
43+
dsc_ds_log="${TEST_ROOT}/test_replay_dsc.log"
4444

4545
ROOT=$(cd "$(dirname "$0")/.." && pwd)
4646
cd "$ROOT" || (echo failed to cd "$ROOT"; exit 1)
4747
export BINDIR=${BINDIR:-$ROOT/target/debug}
48-
crucible_test="$BINDIR/crutest"
49-
dsc="$BINDIR/dsc"
50-
downstairs="$BINDIR/crucible-downstairs"
48+
crucible_test="${BINDIR}/crutest"
49+
dsc="${BINDIR}/dsc"
50+
downstairs="${BINDIR}/crucible-downstairs"
5151
if [[ ! -f "$crucible_test" ]] || [[ ! -f "$dsc" ]] || [[ ! -f "$downstairs" ]]; then
5252
echo "Can't find required binaries"
5353
echo "Missing $crucible_test or $dsc or $downstairs"

tools/test_restart_repair.sh

+8-8
Original file line numberDiff line numberDiff line change
@@ -63,9 +63,9 @@ ROOT=$(cd "$(dirname "$0")/.." && pwd)
6363
cd "$ROOT" || (echo failed to cd "$ROOT"; exit 1)
6464
export BINDIR=${BINDIR:-$ROOT/target/debug}
6565

66-
cds="$BINDIR/crucible-downstairs"
67-
ct="$BINDIR/crutest"
68-
dsc="$BINDIR/dsc"
66+
cds="${BINDIR}/crucible-downstairs"
67+
ct="${BINDIR}/crutest"
68+
dsc="${BINDIR}/dsc"
6969
for bin in $cds $ct $dsc; do
7070
if [[ ! -f "$bin" ]]; then
7171
echo "Can't find crucible binary at $bin" >&2
@@ -120,11 +120,11 @@ if [[ $? -ne 0 ]]; then
120120
exit 1
121121
fi
122122

123-
export loop_log="$TEST_ROOT/test_restart_repair.log"
124-
export test_log="$TEST_ROOT/test_restart_repair_test.log"
125-
export verify_log="$TEST_ROOT/test_restart_repair_verify.log"
126-
export dsc_log="$TEST_ROOT/test_restart_repair_dsc.log"
127-
export dsc_ds_log="$TEST_ROOT/dsc"
123+
export loop_log="${TEST_ROOT}/test_restart_repair.log"
124+
export test_log="${TEST_ROOT}/test_restart_repair_test.log"
125+
export verify_log="${TEST_ROOT}/test_restart_repair_verify.log"
126+
export dsc_log="${TEST_ROOT}/test_restart_repair_dsc.log"
127+
export dsc_ds_log="${TEST_ROOT}/dsc"
128128

129129
touch "$loop_log"
130130
echo "starting $(date)" | tee "$loop_log"

0 commit comments

Comments
 (0)