From: Matt Joiner Date: Sun, 28 May 2023 03:52:50 +0000 (+1000) Subject: fs/test.sh: Handle torrentfs failures synchronously X-Git-Url: http://www.git.stargrave.org/?p=btrtrc.git;a=commitdiff_plain;h=a33b3ec554120e018815d3a4c23509380fb34887 fs/test.sh: Handle torrentfs failures synchronously --- 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 <