]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
tests: add create_strace_wrapper
authorEvgeny Vereshchagin <evvers@ya.ru>
Fri, 4 Mar 2016 01:55:46 +0000 (01:55 +0000)
committerEvgeny Vereshchagin <evvers@ya.ru>
Fri, 4 Mar 2016 01:55:46 +0000 (01:55 +0000)
Very handy for early-boot debugging
See https://github.com/systemd/systemd/pull/2781#discussion_r54782628

test/test-functions

index 6667e0524fa29d14f645b5f456db4b0c558046de..b3ca4c31717bfdabcfd7faeccd75644c96510b40 100644 (file)
@@ -194,6 +194,17 @@ EOF
     chmod 0755 $_valgrind_wrapper
 }
 
+create_strace_wrapper() {
+    local _strace_wrapper=$initdir/$ROOTLIBDIR/systemd-under-strace
+    ddebug "Create $_strace_wrapper"
+    cat >$_strace_wrapper <<EOF
+#!/bin/bash
+
+exec strace -D -o /strace.out $ROOTLIBDIR/systemd "\$@"
+EOF
+    chmod 0755 $_strace_wrapper
+}
+
 install_fsck() {
     dracut_install /sbin/fsck*
     dracut_install -o /bin/fsck*