aboutsummaryrefslogtreecommitdiff
path: root/test/system/helpers.bash
diff options
context:
space:
mode:
authorAlex Jia <chuanchang.jia@gmail.com>2019-10-18 12:43:23 +0800
committerAlex Jia <chuanchang.jia@gmail.com>2019-10-18 15:04:09 +0800
commit774a36d1771b083825fcf4c89385e90499537cb1 (patch)
treedc7568cc2f6256a937cea6fe03708608906761c3 /test/system/helpers.bash
parentb6fdfa041a3e0f0a754c1f3a6edd8bc0be6f6ed8 (diff)
downloadpodman-774a36d1771b083825fcf4c89385e90499537cb1.tar.gz
podman-774a36d1771b083825fcf4c89385e90499537cb1.tar.bz2
podman-774a36d1771b083825fcf4c89385e90499537cb1.zip
System tests: make sure exec pid hash w/o leaking
podman exec leaks an exec_pid_<hash> file for every exec in tmpfs, it's known rhbz#1731117, this case makes sure leakage issue has been fixed. rhbz: https://bugzilla.redhat.com/show_bug.cgi?id=1731117 Signed-off-by: Alex Jia <chuanchang.jia@gmail.com>
Diffstat (limited to 'test/system/helpers.bash')
-rw-r--r--test/system/helpers.bash14
1 files changed, 14 insertions, 0 deletions
diff --git a/test/system/helpers.bash b/test/system/helpers.bash
index 3d607f4bd..8c061d2c9 100644
--- a/test/system/helpers.bash
+++ b/test/system/helpers.bash
@@ -373,5 +373,19 @@ function random_string() {
head /dev/urandom | tr -dc a-zA-Z0-9 | head -c$length
}
+
+#########################
+# find_exec_pid_files # Returns nothing or exec_pid hash files
+#########################
+#
+# Return exec_pid hash files if exists, otherwise, return nothing
+#
+function find_exec_pid_files() {
+ run_podman info --format '{{.store.RunRoot}}'
+ local storage_path="$output"
+ if [ -d $storage_path ]; then
+ find $storage_path -type f -iname 'exec_pid_*'
+ fi
+}
# END miscellaneous tools
###############################################################################