This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
[Bug tapsets/18876] New: need to assert
- From: "fche at redhat dot com" <sourceware-bugzilla at sourceware dot org>
- To: systemtap at sourceware dot org
- Date: Wed, 26 Aug 2015 20:28:54 +0000
- Subject: [Bug tapsets/18876] New: need to assert
- Auto-submitted: auto-generated
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.