aboutsummaryrefslogtreecommitdiffstats
path: root/resources/libraries/python/DUTSetup.py
diff options
context:
space:
mode:
authorVratko Polak <vrpolak@cisco.com>2019-12-05 17:07:24 +0100
committerPeter Mikus <pmikus@cisco.com>2019-12-05 17:14:51 +0000
commit1ae2fdf1c6bb14fc3db34cba00271916a1d7c527 (patch)
tree2065131e5c2e6f082165b055b83a345f9930e9b4 /resources/libraries/python/DUTSetup.py
parenta78df8f22fa6293718cc1053aea12662a911e785 (diff)
Improve quoting of asterisks
When quoted, the asterisks are understood as literal characters. When unquoted, so they act as globs patterns. When used to match files already present in the filesystem, the asterisks should be unquoted. When used to match a package name (not a file), the asterisks should be quoted to prevent the bash expansion, as programs such as apt-get and yum do their own expasion afterwards. Unquoted asterisks for matching package names may happen to work when there are no files to match the bash expansion, but quoted asterisks are sure to avoid accidents. Also, we want an asterisk both before and after "vpp", due to package names such as libvppinfra-dev and python3-vpp-api. Change-Id: I657a24c24a71d865915aba201bd0d3276cb33281 Signed-off-by: Vratko Polak <vrpolak@cisco.com>
Diffstat (limited to 'resources/libraries/python/DUTSetup.py')
-rw-r--r--resources/libraries/python/DUTSetup.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/resources/libraries/python/DUTSetup.py b/resources/libraries/python/DUTSetup.py
index 1cca974893..3544997e55 100644
--- a/resources/libraries/python/DUTSetup.py
+++ b/resources/libraries/python/DUTSetup.py
@@ -661,7 +661,7 @@ class DUTSetup:
node, f"rpm -ivh {vpp_pkg_dir}*.rpm",
timeout=120, sudo=True, message=message
)
- exec_cmd_no_error(node, u"rpm -qai *vpp*", sudo=True)
+ exec_cmd_no_error(node, u"rpm -qai '*vpp*'", sudo=True)
DUTSetup.restart_service(node, Constants.VPP_UNIT)
@staticmethod