Add cleanup hook to kbdumb smoke test...
source $(dirname "${BASH_SOURCE[0]}")/smoke.subr
-trap kvdb_drop EXIT
+kbid="doesnotexist"
+
+cleanup() {
+ rm -f "$home/K000.${kbid}.gz"
+ kvdb_drop
+}
+
+trap cleanup EXIT
+
kvdb_create
keys=1000
@@ -17,4 +25,3 @@ cmd simple_client "$home" $kvs -c $keys -v
kbid=$(cn_metrics "$home" $kvs | awk '$1 == "k" {print $16}')
cmd cn_kbdump -w "$home" "$home/capacity" ${kbid} ${kbid}
cmd cn_kbdump -r "$home/K000.${kbid}.gz"
-cmd rm -f "$home/K000.${kbid}.gz"
