summaryrefslogtreecommitdiff
path: root/test/system
diff options
context:
space:
mode:
Diffstat (limited to 'test/system')
-rw-r--r--test/system/005-info.bats2
-rw-r--r--test/system/030-run.bats21
-rw-r--r--test/system/055-rm.bats2
-rw-r--r--test/system/065-cp.bats15
-rw-r--r--test/system/400-unprivileged-access.bats2
5 files changed, 26 insertions, 16 deletions
diff --git a/test/system/005-info.bats b/test/system/005-info.bats
index 7fccc75af..5df6033fc 100644
--- a/test/system/005-info.bats
+++ b/test/system/005-info.bats
@@ -33,7 +33,7 @@ RunRoot:
run_podman info --format=json
expr_nvr="[a-z0-9-]\\\+-[a-z0-9.]\\\+-[a-z0-9]\\\+\."
- expr_path="/[a-z0-9\\\-\\\/.]\\\+\\\$"
+ expr_path="/[a-z0-9\\\/.-]\\\+\\\$"
tests="
host.BuildahVersion | [0-9.]
diff --git a/test/system/030-run.bats b/test/system/030-run.bats
index 65e13d559..7cbb60501 100644
--- a/test/system/030-run.bats
+++ b/test/system/030-run.bats
@@ -3,7 +3,6 @@
load helpers
@test "podman run - basic tests" {
- skip "Temporarily disabled during investigation into github issue 4044"
rand=$(random_string 30)
# 2019-09 Fedora 31 and rawhide (32) are switching from runc to crun
@@ -28,6 +27,7 @@ echo $rand | 0 | $rand
/etc | 126 | $err_no_exec_dir
"
+ tests_run=0
while read cmd expected_rc expected_output; do
if [ "$expected_output" = "''" ]; then expected_output=""; fi
@@ -41,9 +41,24 @@ echo $rand | 0 | $rand
# a way to do so.
eval set "$cmd"
- run_podman $expected_rc run $IMAGE "$@"
- is "$output" "$expected_output" "podman run $cmd - output"
+ # FIXME: The </dev/null is a hack, necessary because as of 2019-09
+ # podman-remote has a bug in which it silently slurps up stdin,
+ # including the output of parse_table (i.e. tests to be run).
+ run_podman $expected_rc run $IMAGE "$@" </dev/null
+
+ # FIXME: remove conditional once podman-remote issue #4096 is fixed
+ if ! is_remote; then
+ is "$output" "$expected_output" "podman run $cmd - output"
+ fi
+
+ tests_run=$(expr $tests_run + 1)
done < <(parse_table "$tests")
+
+ # Make sure we ran the expected number of tests! Until 2019-09-24
+ # podman-remote was only running one test (the "true" one); all
+ # the rest were being silently ignored because of podman-remote
+ # bug #4095, in which it slurps up stdin.
+ is "$tests_run" "$(grep . <<<$tests | wc -l)" "Ran the full set of tests"
}
@test "podman run - uidmapping has no /sys/kernel mounts" {
diff --git a/test/system/055-rm.bats b/test/system/055-rm.bats
index c13c8c52e..8ef8a119e 100644
--- a/test/system/055-rm.bats
+++ b/test/system/055-rm.bats
@@ -32,8 +32,6 @@ load helpers
#
# See https://github.com/containers/libpod/issues/3795
@test "podman rm -f" {
- skip_if_remote "podman-remote does not handle exit codes"
-
rand=$(random_string 30)
( sleep 3; run_podman rm -f $rand ) &
run_podman 137 run --name $rand $IMAGE sleep 30
diff --git a/test/system/065-cp.bats b/test/system/065-cp.bats
index 0ca730a50..0701055f9 100644
--- a/test/system/065-cp.bats
+++ b/test/system/065-cp.bats
@@ -38,7 +38,6 @@ load helpers
# into host-only space. Try to podman-cp that symlink. It should fail.
@test "podman cp - will not recognize symlink pointing into host space" {
skip_if_remote "podman-remote does not yet handle cp"
- skip "BROKEN: PLEASE ENABLE ONCE #3829 GETS FIXED"
srcdir=$PODMAN_TMPDIR/cp-test-in
dstdir=$PODMAN_TMPDIR/cp-test-out
@@ -69,7 +68,6 @@ load helpers
# this invalid double symlink. It must fail.
@test "podman cp - will not expand globs in host space (#3829)" {
skip_if_remote "podman-remote does not yet handle cp"
- skip "BROKEN: PLEASE ENABLE ONCE #3829 GETS FIXED"
srcdir=$PODMAN_TMPDIR/cp-test-in
dstdir=$PODMAN_TMPDIR/cp-test-out
@@ -144,12 +142,13 @@ load helpers
trap 'exit 0' 15;while :;do sleep 0.5;done"
# Copy file from host into container, into a file named 'x'
- # Note that the second has a trailing slash; this will trigger mkdir
+ # Note that the second has a trailing slash, implying a directory.
+ # Since that destination directory doesn't exist, the cp will fail
run_podman cp --pause=false $srcdir/$rand_filename1 cpcontainer:/tmp/d1/x
is "$output" "" "output from podman cp 1"
- run_podman cp --pause=false $srcdir/$rand_filename2 cpcontainer:/tmp/d2/x/
- is "$output" "" "output from podman cp 3"
+ run_podman 125 cp --pause=false $srcdir/$rand_filename2 cpcontainer:/tmp/d2/x/
+ is "$output" "Error: failed to get stat of dest path .*stat.* no such file or directory" "cp will not create nonexistent destination directory"
run_podman cp --pause=false $srcdir/$rand_filename3 cpcontainer:/tmp/d3/x
is "$output" "" "output from podman cp 3"
@@ -161,10 +160,8 @@ load helpers
run_podman exec cpcontainer cat /tmp/nonesuch1
is "$output" "$rand_content1" "cp creates destination file"
- # In the second case, podman creates a directory nonesuch2, then
- # creates a file with the same name as the input file. THIS IS WEIRD!
- run_podman exec cpcontainer cat /tmp/nonesuch2/$rand_filename2
- is "$output" "$rand_content2" "cp creates destination dir and file"
+ # cp into nonexistent directory should not mkdir nonesuch2 directory
+ run_podman 1 exec cpcontainer test -e /tmp/nonesuch2
# In the third case, podman (correctly imo) creates a file named 'x'
run_podman exec cpcontainer cat /tmp/d3/x
diff --git a/test/system/400-unprivileged-access.bats b/test/system/400-unprivileged-access.bats
index 738d8d87b..56c40e9c8 100644
--- a/test/system/400-unprivileged-access.bats
+++ b/test/system/400-unprivileged-access.bats
@@ -22,7 +22,7 @@ load helpers
# as a user, the parent directory must be world-readable.
test_script=$PODMAN_TMPDIR/fail-if-writable
cat >$test_script <<"EOF"
-#!/bin/sh
+#!/bin/bash
path="$1"