From a33b3ec554120e018815d3a4c23509380fb34887 Mon Sep 17 00:00:00 2001 From: Matt Joiner Date: Sun, 28 May 2023 13:52:50 +1000 Subject: [PATCH] fs/test.sh: Handle torrentfs failures synchronously --- fs/test.sh | 29 ++++++++++++++++++++++------- 1 file changed, 22 insertions(+), 7 deletions(-) diff --git a/fs/test.sh b/fs/test.sh index 93bfbdc5..abae61a4 100755 --- a/fs/test.sh +++ b/fs/test.sh @@ -1,3 +1,5 @@ +#!/usr/bin/env bash +echo $BASH_VERSION set -eux repopath="$(cd "$(dirname "$0")/.."; pwd)" debian_file=debian-10.8.0-amd64-netinst.iso @@ -8,13 +10,26 @@ pushd torrents cp "$repopath/testdata/$debian_file.torrent" . godo -v -- "$repopath/cmd/torrent" metainfo "$repopath/testdata/sintel.torrent" magnet > sintel.magnet popd -GOPPROF=http godo -v -- "$repopath/fs/cmd/torrentfs" -mountDir=mnt -metainfoDir=torrents & -trap 'set +e; sudo umount -f mnt' EXIT #file="$debian_file" file=Sintel/Sintel.mp4 -while [ ! -e "mnt/$file" ]; do sleep 1; done -pv -f "mnt/$file" | md5sum -c <(cat <