From: Frank Ch. Eigler Date: Mon, 14 Aug 2023 18:13:38 +0000 (-0400) Subject: testsuite/stap_merge.tcl: update for magic word in transport stream X-Git-Tag: release-5.0a~67 X-Git-Url: https://sourceware.org/git/?a=commitdiff_plain;h=dd7530083f3023f2d53263abe4b677ed9d2085a0;p=systemtap.git testsuite/stap_merge.tcl: update for magic word in transport stream This fixes a small regression in the testsuite. --- diff --git a/testsuite/systemtap.printf/stap_merge.tcl b/testsuite/systemtap.printf/stap_merge.tcl index 0c7d7b694..591e9b400 100755 --- a/testsuite/systemtap.printf/stap_merge.tcl +++ b/testsuite/systemtap.printf/stap_merge.tcl @@ -15,7 +15,7 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . # -# Copyright (C) Red Hat Inc, 2007 +# Copyright (C) Red Hat Inc, 2007-2023 # # @@ -51,6 +51,8 @@ foreach file $files { exit 1 } fconfigure $fd($n) -translation binary + # read & ignore magic + read $fd($n) 4 if {![binary scan [read $fd($n) 4] $int_format timestamp($n)]} { continue } @@ -90,6 +92,9 @@ while {1} { set data [read $fd($mincpu) $len] puts -nonewline $outfile $data + # read & ignore magic + read $fd($mincpu) 4 + set data [read $fd($mincpu) 4] if {$data == ""} { unset fd($mincpu)