public inbox for systemtap@sourceware.org
 help / color / mirror / Atom feed
* [Bug translator/17906] New: The test to restrict  nearest probes  to ABSOLUTE and RELATIVE causing  unprivileged_probes.exp tests with wildcards to fail
@ 2015-01-30  1:55 wcohen at redhat dot com
  2015-02-05 23:05 ` [Bug translator/17906] " jlebon at redhat dot com
  2015-02-27 15:40 ` jlebon at redhat dot com
  0 siblings, 2 replies; 3+ messages in thread
From: wcohen at redhat dot com @ 2015-01-30  1:55 UTC (permalink / raw)
  To: systemtap

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

            Bug ID: 17906
           Summary: The test to restrict  nearest probes  to ABSOLUTE and
                    RELATIVE causing  unprivileged_probes.exp tests with
                    wildcards to fail
           Product: systemtap
           Version: unspecified
            Status: NEW
          Severity: normal
          Priority: P2
         Component: translator
          Assignee: systemtap at sourceware dot org
          Reporter: wcohen at redhat dot com

When reviewing tests I found that a number of the tests (about 60) in
unprivileged_probes.exp were failing in:

 make installcheck RUNTESTFLAGS="--debug
systemtap.unprivileged/unprivileged_probes.exp"

The tests were working in the systemtap-2.6 release.  The tests are now failing
like the following expert from systemtap.log:

eval exec stap -p2 --unprivileged -e {probe
process.library("libfoo.so").statement("libfoofunc@libfoo.c:*").nearest {
println ("Hello"); exit (); }} -c ./foo
semantic error: while resolving probe point: identifier 'process' at
<input>:1:7
        source: probe
process.library("libfoo.so").statement("libfoofunc@libfoo.c:*").nearest {
println ("Hello"); exit (); }
                      ^

semantic error: .nearest is only valid with absolute or relative line numbers

Pass 2: analysis failed.  [man error::pass2]
FAIL: unprivileged probes: --unprivileged
process.library(string).statement(string).nearest

A git bisect tracked the problem down to:

$ git bisect bad
2ff2868418227fcce0319020b02c9f4dc5ef6274 is the first bad commit
commit 2ff2868418227fcce0319020b02c9f4dc5ef6274
Author: Jonathan Lebon <jlebon@redhat.com>
Date:   Tue Sep 2 12:00:42 2014 -0400

    nearest probes: restrict to ABSOLUTE and RELATIVE

:100644 100644 eda0e3c937da791270a68daf6976362da5e248ef
fc45b76e84f556355d52c4c4027f2d978b84bd88 M    tapsets.cxx

It looks like this doesn't accept wildcards and will cause them to be flagged
as errors.

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

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

* [Bug translator/17906] The test to restrict  nearest probes  to ABSOLUTE and RELATIVE causing  unprivileged_probes.exp tests with wildcards to fail
  2015-01-30  1:55 [Bug translator/17906] New: The test to restrict nearest probes to ABSOLUTE and RELATIVE causing unprivileged_probes.exp tests with wildcards to fail wcohen at redhat dot com
@ 2015-02-05 23:05 ` jlebon at redhat dot com
  2015-02-27 15:40 ` jlebon at redhat dot com
  1 sibling, 0 replies; 3+ messages in thread
From: jlebon at redhat dot com @ 2015-02-05 23:05 UTC (permalink / raw)
  To: systemtap

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

Jonathan Lebon <jlebon at redhat dot com> changed:

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

--- Comment #1 from Jonathan Lebon <jlebon at redhat dot com> ---
Hey Will,

Thanks for reporting this, looks like I didn't catch it when I made the change.
If I remember correctly, the reasoning was that it didn't make sense to have
wildcards with .nearest. E.g. .statement("foo@file.c:15").nearest and
.statement("foo@file.c+3").nearest have clear meanings (use the nearest
probe-able addrs to these linenos).

On the other hand, with .statement("foo@file.c:*").nearest, since "*" already
means "expand to all possible probe-able linenos", adding a .nearest makes no
difference since they will all already be valid linenos. In that sense, I guess
we could allow the syntax without really changing behaviour. At the time, I
leaned on the stricter interpretation of "this is redundant so the user
probably meant something else".

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

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

* [Bug translator/17906] The test to restrict  nearest probes  to ABSOLUTE and RELATIVE causing  unprivileged_probes.exp tests with wildcards to fail
  2015-01-30  1:55 [Bug translator/17906] New: The test to restrict nearest probes to ABSOLUTE and RELATIVE causing unprivileged_probes.exp tests with wildcards to fail wcohen at redhat dot com
  2015-02-05 23:05 ` [Bug translator/17906] " jlebon at redhat dot com
@ 2015-02-27 15:40 ` jlebon at redhat dot com
  1 sibling, 0 replies; 3+ messages in thread
From: jlebon at redhat dot com @ 2015-02-27 15:40 UTC (permalink / raw)
  To: systemtap

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

Jonathan Lebon <jlebon at redhat dot com> changed:

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

--- Comment #2 from Jonathan Lebon <jlebon at redhat dot com> ---
This should be fixed now with commit 3a5c85b. The remaining failures in
unprivileged_probes.exp seem to all be from the same error relating to
process(number) probes, e.g.:

eval exec stap -p2 --privilege=stapsys -e {probe
process(10).statement(0x00000000004007f0) { println ("Hello"); exit (); }} -c
./foo
semantic error: while resolving probe point: identifier 'process' at
<input>:1:7
        source: probe process(10).statement(0x00000000004007f0) { println
("Hello"); exit (); }
                      ^

semantic error: no match

Pass 2: analysis failed.  [man error::pass2]
FAIL: unprivileged probes: --privilege=stapsys
process(number).statement(number)

I'll close this bug since we already have bug 17986 to track those.

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

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

end of thread, other threads:[~2015-02-27 15:40 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-01-30  1:55 [Bug translator/17906] New: The test to restrict nearest probes to ABSOLUTE and RELATIVE causing unprivileged_probes.exp tests with wildcards to fail wcohen at redhat dot com
2015-02-05 23:05 ` [Bug translator/17906] " jlebon at redhat dot com
2015-02-27 15:40 ` jlebon 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).