summaryrefslogtreecommitdiff
path: root/test/system/helpers.bash
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2020-07-15 10:27:09 -0400
committerGitHub <noreply@github.com>2020-07-15 10:27:09 -0400
commit8704b78a6fbb953acb6b74d1671d5ad6456bf81f (patch)
tree7ad7b6effec13409798fa2d6f96bd9de4d4462c9 /test/system/helpers.bash
parent60127cf5e88ef53748cb601d7c27f082d284e7f4 (diff)
parentfea3eea68bf483e33bae56d77071d5cb8ded91db (diff)
downloadpodman-8704b78a6fbb953acb6b74d1671d5ad6456bf81f.tar.gz
podman-8704b78a6fbb953acb6b74d1671d5ad6456bf81f.tar.bz2
podman-8704b78a6fbb953acb6b74d1671d5ad6456bf81f.zip
Merge pull request #6958 from edsantiago/bats
system tests: new tests for run, exec
Diffstat (limited to 'test/system/helpers.bash')
-rw-r--r--test/system/helpers.bash32
1 files changed, 32 insertions, 0 deletions
diff --git a/test/system/helpers.bash b/test/system/helpers.bash
index 5301644d6..4239ef876 100644
--- a/test/system/helpers.bash
+++ b/test/system/helpers.bash
@@ -392,5 +392,37 @@ function find_exec_pid_files() {
find $storage_path -type f -iname 'exec_pid_*'
fi
}
+
+
+#############################
+# remove_same_dev_warning # Filter out useless warning from output
+#############################
+#
+# On some CI systems, 'podman run --privileged' emits a useless warning:
+#
+# WARNING: The same type, major and minor should not be used for multiple devices.
+#
+# This obviously screws us up when we look at output results.
+#
+# This function removes the warning from $output and $lines
+#
+function remove_same_dev_warning() {
+ # No input arguments. We operate in-place on $output and $lines
+
+ local i=0
+ local -a new_lines=()
+ while [[ $i -lt ${#lines[@]} ]]; do
+ if expr "${lines[$i]}" : 'WARNING: .* same type, major.* multiple' >/dev/null; then
+ :
+ else
+ new_lines+=("${lines[$i]}")
+ fi
+ i=$(( i + 1 ))
+ done
+
+ lines=("${new_lines[@]}")
+ output=$(printf '%s\n' "${lines[@]}")
+}
+
# END miscellaneous tools
###############################################################################