From: Ian Jackson Date: Mon, 9 Jan 2023 23:39:43 +0000 (+0000) Subject: adt-common: adt-full: Use a trap to try unmounting things X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ian/git?a=commitdiff_plain;h=4419e6b61e4ca679e489bd9d5e5749c3146e776f;p=hippotat.git adt-common: adt-full: Use a trap to try unmounting things Signed-off-by: Ian Jackson --- diff --git a/adt/acommon b/adt/acommon index 7d4c1cf..3d3712c 100644 --- a/adt/acommon +++ b/adt/acommon @@ -181,6 +181,12 @@ in- () { setup-pair () { test-prep + trap ' + rc=$/ + host-cleanup client + host-cleanup server + exit $rc + ' 0 $test/netns-setup $tname setup-host client setup-host server diff --git a/adt/adt-full b/adt/adt-full index 764c1e7..e1654b8 100755 --- a/adt/adt-full +++ b/adt/adt-full @@ -33,4 +33,5 @@ echo tests passed, cleaning up. $src/adt/acleanup +trap '' 0 echo ok.