Fix: Tests: trace path wildcards not expanded
authorFrancis Deslauriers <francis.deslauriers@efficios.com>
Tue, 17 Mar 2020 21:48:40 +0000 (17:48 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Fri, 20 Mar 2020 05:29:06 +0000 (01:29 -0400)
commitc8e000ef6be08c492f79b51b9752e5d8b9b26d59
tree6904bdbba6df6041d342346dcf4c7ab8478bf4b5
parent86cf031ae8be7633ff8eee0cd0bf503b331cfc34
Fix: Tests: trace path wildcards not expanded

Issue
=====
Some testcases related to `--live` sessions in
`tools/clear/{test_ust,test_kernel}` fail with the following error:
  ls: cannot access '/tmp/tmp.gi1eVM3fZ9/tmp.dNL0WHRTQ3/ci-node-bionic-amd64-02-04/LUP49x7iV7xexehS*': No such file or directory
  not ok 61 - Failed to list content of directory "/tmp/tmp.gi1eVM3fZ9/tmp.dNL0WHRTQ3/ci-node-bionic-amd64-02-04/LUP49x7iV7xexehS*"
  FAIL: tools/clear/test_ust 61 - Failed to list content of directory "/tmp/tmp.gi1eVM3fZ9/tmp.dNL0WHRTQ3/ci-node-bionic-amd64-02-04/LUP49x7iV7xexehS*"
  #   Failed test 'Failed to list content of directory "/tmp/tmp.gi1eVM3fZ9/tmp.dNL0WHRTQ3/ci-node-bionic-amd64-02-04/LUP49x7iV7xexehS*"'
  #   in ./tools/clear//../../../utils/tap/tap.sh:fail() at line 159.

They fail because the wildcard character `*` is used in a path and is
not expanded when comes the time to list the content of the expanded
path.

In `--live` related tests, we use a wildcard in those paths because we
can't know the full name of the output directory as it's named by the
sessiond.

This bug was introduced (or rather not fixed) by the following commit:
  commit 94360c17201a28466af49058735166c73f9ae130
  Author: Francis Deslauriers <francis.deslauriers@efficios.com>
  Date:   Fri Mar 6 18:18:14 2020 -0500

      Fix: Tests: utils.sh: merge `validate_{directory,folder_is}_empty` functions

Solution
========
Remove the double quotes around the path variable so that wildcards can
be expanded as expected.

Signed-off-by: Francis Deslauriers <francis.deslauriers@efficios.com>
Change-Id: If4a72fab0d487cf6e6b021dfad9eca6d0d60d5f4
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
tests/utils/utils.sh
This page took 0.027251 seconds and 4 git commands to generate.