public inbox for systemtap@sourceware.org
 help / color / mirror / Atom feed
* [Bug testsuite/17864] New: alias_tapset.exp regressed
@ 2015-01-21 14:34 mcermak at redhat dot com
  2015-01-21 16:47 ` [Bug testsuite/17864] " dsmith at redhat dot com
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: mcermak at redhat dot com @ 2015-01-21 14:34 UTC (permalink / raw)
  To: systemtap

https://sourceware.org/bugzilla/show_bug.cgi?id=17864

            Bug ID: 17864
           Summary: alias_tapset.exp regressed
           Product: systemtap
           Version: unspecified
            Status: NEW
          Severity: normal
          Priority: P2
         Component: testsuite
          Assignee: systemtap at sourceware dot org
          Reporter: mcermak at redhat dot com

Compared to latest rhel7 systemtap-2.6-8.el7, the latest upstream version
d6fa7e4 of alias_tapset.exp now always fails on s390x (which has a clear
reason) and sometimes fails on other arches too (I'm not sure why yet). 

On s390 the failure is obviously caused by commit befbf100. The testcase needs
to be adapted to expect not only 'SyS_read', but also 'sys32_read'. This part
is easy.

Now first of all the output of `stap -p2` got significantly more verbose with
newer stap. The original output (expected by the testcase) was something like:

=======
# globals
_reads:long
# probes
never /* <- tapset_test.foo = never <- tapset_test.foo */
kernel.function("SyS_read@fs/read_write.c:492").call /* pc=_stext+0x17cb78 */
/* <- kernel.function("SyS_read@fs/read_write.c:492").call */
timer.s(5) /* <- timer.s(5) */
=======

Now, with stap based on d6fa7e4, the output has way more details, But the
expected pattern still seems to be at the end, which is good. 

Problem is, that during my testing I see the expected pattern only when running
`stap -p2 -I ./systemtap.base/alias_tapset ./systemtap.base/alias_tapset.stp`
by hand. But when this gets run within the dejagnu testcase, the expected
pattern is not there. When Investigating the problem I modified the testcase
like this:

=======
$ git diff 
diff --git a/testsuite/systemtap.base/alias_tapset.exp
b/testsuite/systemtap.base/alias_tapset.exp
index 82b1420..7be0153 100644
--- a/testsuite/systemtap.base/alias_tapset.exp
+++ b/testsuite/systemtap.base/alias_tapset.exp
@@ -8,7 +8,9 @@ set kernel_function_found 0
 set timer_found 0

 set cmd "stap -p2 -I $srcdir/$subdir/${test} $srcdir/$subdir/${test}.stp"
+set cmd1 "stap -p2 -I $srcdir/$subdir/${test} $srcdir/$subdir/${test}.stp >
/tmp/log"
 verbose -log "running $cmd"
+eval exec $cmd1
 eval spawn $cmd
 expect {
     -timeout 60
$
=======

Then tail of systemtap log is:

=======
/* (old) PTRACE requests with inverted arguments */
#ifndef PPC_PTRACE_GETREGS
#define PPC_PTRACE_GETREGS 0x99
#endif
#ifndef PPC_PTRACE_SETREGS
#define PPC_PTRACE_SETREGS 0x98
#endif
#ifndef PPC_PTRACE_GETFPREGFAIL: alias_tapset (0, 0, 0, 0)
testcase ./systemtap.base/alias_tapset.exp completed in 3 seconds

        === systemtap Summary ===

# of unexpected failures    1
runtest completed at Wed Jan 21 08:10:17 2015
=======

(the expected bits are missing here ^ ) whereas tail of /tmp/log is:

=======
/* (old) PTRACE requests with inverted arguments */
#ifndef PPC_PTRACE_GETREGS
#define PPC_PTRACE_GETREGS 0x99
#endif
#ifndef PPC_PTRACE_SETREGS
#define PPC_PTRACE_SETREGS 0x98
#endif
#ifndef PPC_PTRACE_GETFPREGS
#define PPC_PTRACE_GETFPREGS 0x97
#endif
#ifndef PPC_PTRACE_SETFPREGS
#define PPC_PTRACE_SETFPREGS 0x96
#endif
%}
# globals
_reads:long
# functions
error:unknown (msg:string)
# probes
never /* <- tapset_test.foo = never <- tapset_test.foo */
timer.s(900) /* <- timer.s(900) */
kernel.function("SyS_read@fs/read_write.c:492").call /* pc=_stext+0x2d6520 */
/* <- kernel.function("SyS_read@fs/read_write.c:492").call */
timer.s(5) /* <- timer.s(5) */
=======

(expected bits are in place). Something goes wrong when `stap -p2 -I
./systemtap.base/alias_tapset ./systemtap.base/alias_tapset.stp` gets called
within the dejagnu testcase. I can reproduce this reliably on el7.1 ppc64.

-- 
You are receiving this mail because:
You are the assignee for the bug.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug testsuite/17864] alias_tapset.exp regressed
  2015-01-21 14:34 [Bug testsuite/17864] New: alias_tapset.exp regressed mcermak at redhat dot com
@ 2015-01-21 16:47 ` dsmith at redhat dot com
  2015-01-21 16:55 ` fche at redhat dot com
  2015-01-21 18:04 ` mcermak at redhat dot com
  2 siblings, 0 replies; 4+ messages in thread
From: dsmith at redhat dot com @ 2015-01-21 16:47 UTC (permalink / raw)
  To: systemtap

https://sourceware.org/bugzilla/show_bug.cgi?id=17864

David Smith <dsmith at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |dsmith at redhat dot com

--- Comment #1 from David Smith <dsmith at redhat dot com> ---
I think what is going on here is that expect by default will only match up to
the first 2000 characters of the output. When I redirect the output of the
"stap -p2" command I get around 32K.

I upped the expect limit, but the test still didn't pass. We may need to
rewrite the test a bit to put the output in a file and search the file using
grep.

-- 
You are receiving this mail because:
You are the assignee for the bug.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug testsuite/17864] alias_tapset.exp regressed
  2015-01-21 14:34 [Bug testsuite/17864] New: alias_tapset.exp regressed mcermak at redhat dot com
  2015-01-21 16:47 ` [Bug testsuite/17864] " dsmith at redhat dot com
@ 2015-01-21 16:55 ` fche at redhat dot com
  2015-01-21 18:04 ` mcermak at redhat dot com
  2 siblings, 0 replies; 4+ messages in thread
From: fche at redhat dot com @ 2015-01-21 16:55 UTC (permalink / raw)
  To: systemtap

https://sourceware.org/bugzilla/show_bug.cgi?id=17864

Frank Ch. Eigler <fche at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |fche at redhat dot com

--- Comment #2 from Frank Ch. Eigler <fche at redhat dot com> ---
See also [exp_match_max NNNN].
Or change the test to use  stap -L tapset_test.foo -I alias_tapset

-- 
You are receiving this mail because:
You are the assignee for the bug.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug testsuite/17864] alias_tapset.exp regressed
  2015-01-21 14:34 [Bug testsuite/17864] New: alias_tapset.exp regressed mcermak at redhat dot com
  2015-01-21 16:47 ` [Bug testsuite/17864] " dsmith at redhat dot com
  2015-01-21 16:55 ` fche at redhat dot com
@ 2015-01-21 18:04 ` mcermak at redhat dot com
  2 siblings, 0 replies; 4+ messages in thread
From: mcermak at redhat dot com @ 2015-01-21 18:04 UTC (permalink / raw)
  To: systemtap

https://sourceware.org/bugzilla/show_bug.cgi?id=17864

Martin Cermak <mcermak at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED

--- Comment #3 from Martin Cermak <mcermak at redhat dot com> ---
Fixed in commit 9be08711fe5eef7f54611729fce5ff159f17a230.

-- 
You are receiving this mail because:
You are the assignee for the bug.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2015-01-21 18:04 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-01-21 14:34 [Bug testsuite/17864] New: alias_tapset.exp regressed mcermak at redhat dot com
2015-01-21 16:47 ` [Bug testsuite/17864] " dsmith at redhat dot com
2015-01-21 16:55 ` fche at redhat dot com
2015-01-21 18:04 ` mcermak at redhat dot com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).