]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
test: run strace with -f and copy log out 17228/head
authorLuca Boccassi <luca.boccassi@microsoft.com>
Thu, 14 Jan 2021 22:11:14 +0000 (22:11 +0000)
committerLuca Boccassi <luca.boccassi@microsoft.com>
Mon, 18 Jan 2021 17:24:05 +0000 (17:24 +0000)
test/test-functions

index efa2989bff9e22a5ed4e0453f9f0ec3498ac65d7..7012e8a8f3dd2e81927b36c22c987c280273ed9b 100644 (file)
@@ -629,7 +629,7 @@ create_strace_wrapper() {
     cat >$_strace_wrapper <<EOF
 #!/usr/bin/env bash
 
-exec strace -D -o /strace.out $ROOTLIBDIR/systemd "\$@"
+exec strace -f -D -o /strace.out $ROOTLIBDIR/systemd "\$@"
 EOF
     chmod 0755 $_strace_wrapper
 }
@@ -875,6 +875,9 @@ check_result_nspawn() {
     test -s $TESTDIR/failed && ret=$(($ret+1))
     [ -n "$TIMED_OUT" ] && ret=$(($ret+1))
     check_asan_reports "$1" || ret=$(($ret+1))
+    if [ -d "${ARTIFACT_DIRECTORY}" ] && [ -f $1/strace.out ]; then
+        cp $1/strace.out "${ARTIFACT_DIRECTORY}/"
+    fi
     _umount_dir $initdir
     return $ret
 }
@@ -887,6 +890,9 @@ check_result_qemu() {
     [[ -f $initdir/failed ]] && cp -a $initdir/failed $TESTDIR
     save_journal $initdir/var/log/journal
     check_asan_reports "$initdir" || ret=$(($ret+1))
+    if [ -d "${ARTIFACT_DIRECTORY}" ] && [ -f $initdir/strace.out ]; then
+        cp $initdir/strace.out "${ARTIFACT_DIRECTORY}/"
+    fi
     _umount_dir $initdir
     [[ -f $TESTDIR/failed ]] && cat $TESTDIR/failed
     echo $JOURNAL_LIST