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 bpf/23580] New: error() does not abort the execution flow nor return a nonzero exit code


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

            Bug ID: 23580
           Summary: error() does not abort the execution flow nor return a
                    nonzero exit code
           Product: systemtap
           Version: unspecified
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: bpf
          Assignee: systemtap at sourceware dot org
          Reporter: agentzh at gmail dot com
  Target Milestone: ---

Tested with the current master (commit 92bed7d5e9) on Fedora 27 (kernel
4.16.16-200.fc27.x86_64):

```
$ /opt/stap/bin/stap --runtime=bpf -e 'probe oneshot { println("before");
error("ERROR"); println("after") }'; echo $?
before
ERROR: ERROR
after
0
```

For comparison, using the kernel runtime yields the following instead:

```
$ /opt/stap/bin/stap -e 'probe oneshot { println("before"); error("ERROR");
println("after") }'; echo $?
ERROR: ERROR
before
WARNING: Number of errors: 1, skipped probes: 0
WARNING: /opt/stap/bin/staprun exited with status: 1
Pass 5: run failed.  [man error::pass5]
1
```

-- 
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]