From 544b8053dbb03de69950c232d1f1970bc36535b6 Mon Sep 17 00:00:00 2001 From: Tim Crawford Date: Tue, 31 Jan 2017 17:47:32 -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". Reviewed-by: loli10K Reviewed-by: Brian Behlendorf Reviewed-by: Giuseppe Di Natale Reviewed-by: George Melikov Signed-off-by: Tim Crawford Closes #5703 --- 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 199a93503f..b5f8b12915 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.