* Fixed build in --with-libiberty=yes mode.
* Fixed potential NULL dereference during printing of line continuation
for syscalls that haven't been decoded.
+ * Fixed strace-log-merge error diagnostics.
Noteworthy changes in release 4.26 (2018-12-26)
===============================================
# This script processes strace -ff -tt output. It merges the contents of all
# STRACE_LOG.PID files and sorts them, printing result on the standard output.
#
-# Copyright (c) 2012-2018 The strace developers.
+# Copyright (c) 2012-2019 The strace developers.
#
# SPDX-License-Identifier: LGPL-2.1-or-later
# grep -v '^$' removes empty lines which may result.
sed -n "s/^\($dd:\)\?\($dd:\)\?\($ds\.\)\?$ds /\2\4\6\7 $pid \0/p" < "$file"
echo
-done \
-| sort -s -n -k1,1 | sed -n 's/^[0-9][0-9]* //p'
+done |
+ sort -s -n -k1,1 |
+ sed -n 's/^[0-9][0-9]* //p' |
+ grep -v '^$'
rc=$?
[ $rc -eq 1 ] &&
strace-T.test \
strace-V.test \
strace-ff.test \
+ strace-log-merge-error.test \
strace-r.test \
strace-t.test \
strace-tt.test \
--- /dev/null
+#!/bin/sh
+#
+# Check strace-log-merge error diagnostics.
+#
+# Copyright (c) 2019 The strace developers.
+# All rights reserved.
+#
+# SPDX-License-Identifier: GPL-2.0-or-later
+
+. "${srcdir=.}/init.sh"
+
+rm -f -- "$LOG".[0-9]*
+echo "strace-log-merge: $LOG: strace output not found" > "$EXP"
+
+check_strace_log_merge()
+{
+ "$srcdir"/../strace-log-merge "$LOG" > "$OUT" 2> "$LOG"
+ rc=$?
+
+ [ $rc -gt 0 ] ||
+ dump_log_and_fail_with 'strace-log-merge unexpectedly succeeded'
+
+ [ ! -s "$OUT" ] ||
+ dump_log_and_fail_with 'strace-log-merge unexpectedly produced output'
+
+ match_diff "$LOG" "$EXP" 'strace-log-merge error diagnostics mismatch'
+}
+
+check_strace_log_merge
+
+echo '1234567890.123456 +++ exited with 0 +++' > "$LOG".0
+check_strace_log_merge
+
+echo > "$LOG".1
+check_strace_log_merge
+
+rm -f -- "$LOG".[0-9]*