This is the mail archive of the systemtap@sourceware.org mailing list for the systemtap project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug tapsets/18876] New: need to assert


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

            Bug ID: 18876
           Summary: need to assert
           Product: systemtap
           Version: unspecified
            Status: NEW
          Severity: normal
          Priority: P2
         Component: tapsets
          Assignee: systemtap at sourceware dot org
          Reporter: fche at redhat dot com
  Target Milestone: ---

We have several bits of code in the tapset (and perhaps also in the
samples) looking like this:

   if (condition) {
      error("foo")
      return 0
   }

(Note first that any statements after an error() call are already
dead.)

Let's have a new tapset function like assert(), so all that type of
code can look like this instead:

   assert(condition, "foo")

It could be implemented simply as:

   function assert(cond,msg) { if (!cond) error(msg) }

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]