Extra potential deadlock debugging
Peter Rabbitson committed
Apr 10, 2020 at 15:47 UTC
768c287f9b47730e97b59881bfe72b007f8c948f
1 file changed
+4
-7
test/sharness/t0054-dag-car-import-export.sh
+4
-7
@@ -29,14 +29,13 @@ reset_blockstore() {
29
do_import() {
30
node=$1; shift
31
32
- bash -c "while [[ -e spin.gc ]]; do ipfsi $node repo gc >>gc_out 2>&1; done" & gc1_pid=$!
33
- bash -c "while [[ -e spin.gc ]]; do ipfsi $node repo gc >>gc_out 2>&1; done" & gc2_pid=$!
32
+ touch spin.gc
33
+ timeout -s QUIT 15 bash -c "while [[ -e spin.gc ]]; do ipfsi $node repo gc &>>gc_out; done" & gc1_pid=$!
34
+ timeout -s QUIT 15 bash -c "while [[ -e spin.gc ]]; do ipfsi $node repo gc &>>gc_out; done" & gc2_pid=$!
35
35
- ipfsi $node dag import "$@"
36
+ timeout -s QUIT 10 bash -c "ipfsi $node dag import $* 2>&1"
37
38
rm -f spin.gc || true
38
- sleep 3
39
- kill $gc1_pid $gc2_pid || true
39
}
40
41
run_online_imp_exp_tests() {
@@ -56,7 +55,6 @@ EOE
55
EOE
56
57
59
- touch spin.gc
58
test_expect_success "basic import" '
59
do_import 0 \
60
../t0054-dag-car-import-export-data/combined_naked_roots_genesis_and_128.car \
@@ -118,7 +116,6 @@ EOE
116
bash -c "sleep 60; kill $cat1_pid $cat2_pid 2>/dev/null" &
117
' &
118
121
- touch spin.gc
119
test_expect_success "fifo import" '
120
do_import 0 \
121
pipe_testnet \