From 7f52d1b4b8e5d953a2b1a55c1b7a9fb68e558203 Mon Sep 17 00:00:00 2001 From: Peter Rabbitson Date: Fri, 10 Apr 2020 15:47:41 +0200 Subject: [PATCH] Extra potential deadlock debugging --- test/sharness/t0054-dag-car-import-export.sh | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/test/sharness/t0054-dag-car-import-export.sh b/test/sharness/t0054-dag-car-import-export.sh index 38df0d47557f..94c643db6b84 100755 --- a/test/sharness/t0054-dag-car-import-export.sh +++ b/test/sharness/t0054-dag-car-import-export.sh @@ -29,14 +29,13 @@ reset_blockstore() { do_import() { node=$1; shift - bash -c "while [[ -e spin.gc ]]; do ipfsi $node repo gc >>gc_out 2>&1; done" & gc1_pid=$! - bash -c "while [[ -e spin.gc ]]; do ipfsi $node repo gc >>gc_out 2>&1; done" & gc2_pid=$! + touch spin.gc + timeout -s QUIT 15 bash -c "while [[ -e spin.gc ]]; do ipfsi $node repo gc 2>&1 >>gc_out; done" & gc1_pid=$! + timeout -s QUIT 15 bash -c "while [[ -e spin.gc ]]; do ipfsi $node repo gc 2>&1 >>gc_out; done" & gc2_pid=$! - ipfsi $node dag import "$@" + timeout -s QUIT 10 bash -c "ipfsi $node dag import $*" rm -f spin.gc || true - sleep 3 - kill $gc1_pid $gc2_pid || true } run_online_imp_exp_tests() { @@ -56,7 +55,6 @@ EOE EOE - touch spin.gc test_expect_success "basic import" ' do_import 0 \ ../t0054-dag-car-import-export-data/combined_naked_roots_genesis_and_128.car \ @@ -118,7 +116,6 @@ EOE bash -c "sleep 60; kill $cat1_pid $cat2_pid 2>/dev/null" & ' & - touch spin.gc test_expect_success "fifo import" ' do_import 0 \ pipe_testnet \