From 969fa094f73acc16cee86f5bad569b72306a78f9 Mon Sep 17 00:00:00 2001 From: Tim Crawford Date: Mon, 30 Jan 2017 12:07:20 -0500 Subject: [PATCH] Match on word for excluding pools from tests Running tests locally were failing on cleanup scripts due to having a pool named "pool". Match on word so the cleanup logic will cleanup "testpool.*" while ignoring "pool". Signed-off-by: Tim Crawford --- tests/zfs-tests/include/libtest.shlib | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/zfs-tests/include/libtest.shlib b/tests/zfs-tests/include/libtest.shlib index 199a93503f9e..b5f8b129151b 100644 --- a/tests/zfs-tests/include/libtest.shlib +++ b/tests/zfs-tests/include/libtest.shlib @@ -450,7 +450,7 @@ function default_cleanup_noexit [[ -z "$KEEP" ]] && KEEP="rpool" exclude=`eval $ECHO \"'(${KEEP})'\"` ALL_POOLS=$($ZPOOL list -H -o name \ - | $GREP -v "$NO_POOLS" | $EGREP -v "$exclude") + | $GREP -v "$NO_POOLS" | $EGREP -vw "$exclude") # Here, we loop through the pools we're allowed to # destroy, only destroying them if it's safe to do # so.