public inbox for systemtap@sourceware.org
 help / color / mirror / Atom feed
* [Bug translator/15542] New: %( CONFIG_NO_SUCH_VAR == "n" ... %) doesn't evaluate to true
@ 2013-05-28 15:55 dsmith at redhat dot com
  2013-05-28 18:54 ` [Bug translator/15542] " jistone at redhat dot com
  2016-05-26 17:39 ` fche at redhat dot com
  0 siblings, 2 replies; 3+ messages in thread
From: dsmith at redhat dot com @ 2013-05-28 15:55 UTC (permalink / raw)
  To: systemtap

http://sourceware.org/bugzilla/show_bug.cgi?id=15542

            Bug ID: 15542
           Summary: %( CONFIG_NO_SUCH_VAR == "n" ... %) doesn't evaluate
                    to true
           Product: systemtap
           Version: unspecified
            Status: NEW
          Severity: normal
          Priority: P2
         Component: translator
          Assignee: systemtap at sourceware dot org
          Reporter: dsmith at redhat dot com

If you use the '%( CONFIG_FOO ' preprocessor conditional on a CONFIG variable
that doesn't exist, its value doesn't equal to 'n'.

====
# stap -ve '%( CONFIG_NO_SUCH_VAR == "n" %? probe begin { exit() } %)'
Input file '<input>' is empty after preprocessing.
Pass 1: parsed user script and 92 library script(s) using
29176virt/16168res/2556shr/14148data kb, in 200usr/30sys/229real ms.
Pass 1: parse failed.  [man error::pass1]
====

Strangely enough, using ' != "y" ' works:

====
# stap -ve '%( CONFIG_NO_SUCH_VAR != "y" %? probe begin { exit() } %)'
Pass 1: parsed user script and 92 library script(s) using
29172virt/16160res/2544shr/14144data kb, in 190usr/50sys/240real ms.
Pass 2: analyzed script: 1 probe(s), 1 function(s), 0 embed(s), 0 global(s)
using 29436virt/16684res/2800shr/14408data kb, in 10usr/0sys/5real ms.
Pass 3: translated to C into
"/tmp/stapY2PUI0/stap_e5865cf2f29bdb61e8371744a0339c71_959_src.c" using
29436virt/17000res/3096shr/14408data kb, in 0usr/0sys/1real ms.
Pass 4: compiled C into "stap_e5865cf2f29bdb61e8371744a0339c71_959.ko" in
2110usr/1080sys/3553real ms.
Pass 5: starting run.
Pass 5: run completed in 20usr/150sys/468real ms.
====

If the CONFIG variable doesn't exist, its value should evaluate to "n".

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

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

* [Bug translator/15542] %( CONFIG_NO_SUCH_VAR == "n" ... %) doesn't evaluate to true
  2013-05-28 15:55 [Bug translator/15542] New: %( CONFIG_NO_SUCH_VAR == "n" ... %) doesn't evaluate to true dsmith at redhat dot com
@ 2013-05-28 18:54 ` jistone at redhat dot com
  2016-05-26 17:39 ` fche at redhat dot com
  1 sibling, 0 replies; 3+ messages in thread
From: jistone at redhat dot com @ 2013-05-28 18:54 UTC (permalink / raw)
  To: systemtap

http://sourceware.org/bugzilla/show_bug.cgi?id=15542

Josh Stone <jistone at redhat dot com> changed:

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

--- Comment #1 from Josh Stone <jistone at redhat dot com> ---
CONFIG_NO_SUCH_VAR == "" works.  In fact, this is also true for variables that
exist but are not enabled, like CONFIG_PREEMPT_RCU on F18.  Are there any names
which are actually true for == "n"?

CONFIG values are either "y" for built-in, "m" for module, or else absent
altogether leading to the default std::string "".

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

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

* [Bug translator/15542] %( CONFIG_NO_SUCH_VAR == "n" ... %) doesn't evaluate to true
  2013-05-28 15:55 [Bug translator/15542] New: %( CONFIG_NO_SUCH_VAR == "n" ... %) doesn't evaluate to true dsmith at redhat dot com
  2013-05-28 18:54 ` [Bug translator/15542] " jistone at redhat dot com
@ 2016-05-26 17:39 ` fche at redhat dot com
  1 sibling, 0 replies; 3+ messages in thread
From: fche at redhat dot com @ 2016-05-26 17:39 UTC (permalink / raw)
  To: systemtap

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |fche at redhat dot com
         Resolution|---                         |INVALID

--- Comment #2 from Frank Ch. Eigler <fche at redhat dot com> ---
The == "n" behavior seems like notabug; even stap.1 only mentions "y" and "m"
as right hand operands to try.

-- 
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:[~2016-05-26 17:39 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-05-28 15:55 [Bug translator/15542] New: %( CONFIG_NO_SUCH_VAR == "n" ... %) doesn't evaluate to true dsmith at redhat dot com
2013-05-28 18:54 ` [Bug translator/15542] " jistone at redhat dot com
2016-05-26 17:39 ` fche 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).