[systemd-devel] [PATCH] tests: do not use systemctl status --failed

Lennart Poettering lennart at poettering.net
Tue Jun 10 10:04:46 PDT 2014


On Sat, 31.05.14 22:28, Ronny Chevalier (chevalier.ronny at gmail.com) wrote:

Thanks! Applied!

> since v212 calling systemctl status without arguments
> will show a overall system state
> ---
>  test/TEST-01-BASIC/test.sh      | 2 +-
>  test/TEST-02-CRYPTSETUP/test.sh | 2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/test/TEST-01-BASIC/test.sh b/test/TEST-01-BASIC/test.sh
> index 84ccf26..d97fbe2 100755
> --- a/test/TEST-01-BASIC/test.sh
> +++ b/test/TEST-01-BASIC/test.sh
> @@ -53,7 +53,7 @@ Description=Testsuite service
>  After=multi-user.target
>  
>  [Service]
> -ExecStart=/bin/bash -c 'set -x; ( systemctl --failed --no-legend --no-pager; systemctl status --failed ) > /failed ; echo OK > /testok; while : ;do echo "testsuite service waiting for journal to move to /var/log/journal" > /dev/console ; for i in /var/log/journal/*;do [ -d "\$i" ] && echo "\$i" && break 2; done; sleep 1; done; sleep 1; exit 0;'
> +ExecStart=/bin/bash -c 'set -x; systemctl --failed --no-legend --no-pager > /failed ; echo OK > /testok; while : ;do echo "testsuite service waiting for journal to move to /var/log/journal" > /dev/console ; for i in /var/log/journal/*;do [ -d "\$i" ] && echo "\$i" && break 2; done; sleep 1; done; sleep 1; exit 0;'
>  Type=oneshot
>  EOF
>  
> diff --git a/test/TEST-02-CRYPTSETUP/test.sh b/test/TEST-02-CRYPTSETUP/test.sh
> index b243254..4be2365 100755
> --- a/test/TEST-02-CRYPTSETUP/test.sh
> +++ b/test/TEST-02-CRYPTSETUP/test.sh
> @@ -59,7 +59,7 @@ Description=Testsuite service
>  After=multi-user.target
>  
>  [Service]
> -ExecStart=/bin/bash -c 'set -x; ( systemctl --failed --no-legend --no-pager; systemctl status --failed ) > /failed ; echo OK > /testok; while : ;do systemd-cat echo "testsuite service waiting for /var/log/journal" ; echo "testsuite service waiting for journal to move to /var/log/journal" > /dev/console ; for i in /var/log/journal/*;do [ -d "\$i" ] && echo "\$i" && break 2; done; sleep 1; done; sleep 1; exit 0;'
> +ExecStart=/bin/bash -c 'set -x; systemctl --failed --no-legend --no-pager > /failed ; echo OK > /testok; while : ;do systemd-cat echo "testsuite service waiting for /var/log/journal" ; echo "testsuite service waiting for journal to move to /var/log/journal" > /dev/console ; for i in /var/log/journal/*;do [ -d "\$i" ] && echo "\$i" && break 2; done; sleep 1; done; sleep 1; exit 0;'
>  Type=oneshot
>  EOF
>  


Lennart

-- 
Lennart Poettering, Red Hat


More information about the systemd-devel mailing list