summaryrefslogtreecommitdiff
path: root/debian/tests/regress
diff options
context:
space:
mode:
Diffstat (limited to 'debian/tests/regress')
-rwxr-xr-xdebian/tests/regress13
1 files changed, 13 insertions, 0 deletions
diff --git a/debian/tests/regress b/debian/tests/regress
index e89e1940a..1c7a756f0 100755
--- a/debian/tests/regress
+++ b/debian/tests/regress
@@ -3,6 +3,7 @@ set -ex
3 3
4if [ "$(id -un)" != openssh-tests ]; then 4if [ "$(id -un)" != openssh-tests ]; then
5 TMP="$ADTTMP/user" 5 TMP="$ADTTMP/user"
6 CREATED_RUN_SSHD=false
6 STARTED_HAVEGED=false 7 STARTED_HAVEGED=false
7 8
8 cleanup () { 9 cleanup () {
@@ -23,6 +24,10 @@ if [ "$(id -un)" != openssh-tests ]; then
23 if id openssh-tests >/dev/null 2>&1; then 24 if id openssh-tests >/dev/null 2>&1; then
24 deluser --remove-home openssh-tests 25 deluser --remove-home openssh-tests
25 fi 26 fi
27
28 if $CREATED_RUN_SSHD; then
29 rm -rf /run/sshd
30 fi
26 } 31 }
27 trap cleanup EXIT 32 trap cleanup EXIT
28 33
@@ -35,6 +40,14 @@ EOF
35 cp -a . "$TMP/tree" 40 cp -a . "$TMP/tree"
36 chown -R openssh-tests:openssh-tests "$TMP" 41 chown -R openssh-tests:openssh-tests "$TMP"
37 42
43 # Depending on how the environment is configured, our test
44 # dependency on openssh-server may not actually started sshd and
45 # thus may not have caused /run/sshd to be created.
46 if [ ! -d /run/sshd ]; then
47 mkdir -m755 /run/sshd
48 CREATED_RUN_SSHD=:
49 fi
50
38 # If we're running in a container, haveged may not have started 51 # If we're running in a container, haveged may not have started
39 # automatically. 52 # automatically.
40 if [ -d /run/systemd/system ] && which systemctl >/dev/null 2>&1; then 53 if [ -d /run/systemd/system ] && which systemctl >/dev/null 2>&1; then