]> git.ipfire.org Git - thirdparty/chrony.git/commitdiff
test: redirect error messages in system tests
authorMiroslav Lichvar <mlichvar@redhat.com>
Thu, 25 Apr 2019 15:25:19 +0000 (17:25 +0200)
committerMiroslav Lichvar <mlichvar@redhat.com>
Thu, 25 Apr 2019 16:24:41 +0000 (18:24 +0200)
test/system/test.common

index d83d9b64381c33a4379d92fa09af9153983f94e7..9151e100c3250e9612698821cc3739b7c9e993e0 100644 (file)
@@ -227,7 +227,7 @@ start_chronyd() {
 
        trap stop_chronyd EXIT
 
-       $CHRONYD_WRAPPER "$chronyd" $(get_chronyd_options)
+       $CHRONYD_WRAPPER "$chronyd" $(get_chronyd_options) > "$TEST_DIR/chronyd.out" 2>&1
 
        [ $? -eq 0 ] && [ -f "$pidfile" ] && ps -p "$(cat "$pidfile")" > /dev/null && test_ok || test_error
 }
@@ -248,7 +248,7 @@ stop_chronyd() {
 
        test_message 1 0 "stopping chronyd"
 
-       if ! kill "$pid"; then
+       if ! kill "$pid" 2> /dev/null; then
                test_error
                return
        fi