From 4419e6b61e4ca679e489bd9d5e5749c3146e776f Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Mon, 9 Jan 2023 23:39:43 +0000 Subject: [PATCH] adt-common: adt-full: Use a trap to try unmounting things Signed-off-by: Ian Jackson --- adt/acommon | 6 ++++++ adt/adt-full | 1 + 2 files changed, 7 insertions(+) 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. -- 2.30.2