diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2020-07-21 05:52:09 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-07-21 05:52:09 -0400 |
commit | 1682e60dac14d9f32ae02c5f3286b3309cd9b128 (patch) | |
tree | 897b1e8d739babee529c39a6738923099b51cbf2 /test/system/helpers.bash | |
parent | 0d26a573e3cf8cc5baea84206a86cb83b433b6d5 (diff) | |
parent | 1405c3a20524134fed8371b4e9f5e9900a050cce (diff) | |
download | podman-1682e60dac14d9f32ae02c5f3286b3309cd9b128.tar.gz podman-1682e60dac14d9f32ae02c5f3286b3309cd9b128.tar.bz2 podman-1682e60dac14d9f32ae02c5f3286b3309cd9b128.zip |
Merge pull request #7026 from edsantiago/bats_majorminor_warning_fix
BATS tests: more resilient remove_same_dev_warning
Diffstat (limited to 'test/system/helpers.bash')
-rw-r--r-- | test/system/helpers.bash | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/test/system/helpers.bash b/test/system/helpers.bash index 4239ef876..abca91739 100644 --- a/test/system/helpers.bash +++ b/test/system/helpers.bash @@ -404,7 +404,13 @@ function find_exec_pid_files() { # # This obviously screws us up when we look at output results. # -# This function removes the warning from $output and $lines +# This function removes the warning from $output and $lines. We don't +# do a full string match because there's another variant of that message: +# +# WARNING: Creating device "/dev/null" with same type, major and minor as existing "/dev/foodevdir/null". +# +# (We should never again see that precise error ever again, but we could +# see variants of it). # function remove_same_dev_warning() { # No input arguments. We operate in-place on $output and $lines @@ -412,7 +418,7 @@ function remove_same_dev_warning() { local i=0 local -a new_lines=() while [[ $i -lt ${#lines[@]} ]]; do - if expr "${lines[$i]}" : 'WARNING: .* same type, major.* multiple' >/dev/null; then + if expr "${lines[$i]}" : 'WARNING: .* same type, major' >/dev/null; then : else new_lines+=("${lines[$i]}") |