summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
1d471d9)
After discussions, we concluded that the enable a non existing marker is a valid case, so we
move it to the working case section.
While being there, check that the re-enable a marker set the right errno
Signed-off-by: Yannick Brosseau <yannick.brosseau@gmail.com>
Signed-off-by: Nils Carlson <nils.carlson@ericsson.com>
#include <unistd.h>
#include <sys/types.h>
#include <sys/wait.h>
#include <unistd.h>
#include <sys/types.h>
#include <sys/wait.h>
#include <ust/marker.h>
#include <ust/ustctl.h>
#include <ust/marker.h>
#include <ust/ustctl.h>
tap_ok(!ustctl_destroy_trace(trace, pid), "ustctl_destroy_trace - without ever starting");
tap_ok(!ustctl_destroy_trace(trace, pid), "ustctl_destroy_trace - without ever starting");
+ tap_ok(ustctl_set_marker_state(trace, "ustl", "blar", 1, pid) == 0,
+ "Enable non-existent marker ustl blar");
printf("##### Tests that definetly should work are completed #####\n");
printf("############## Start expected failure cases ##############\n");
tap_ok(ustctl_set_marker_state(trace, "ust","bar", 1, pid),
"Enable already enabled marker ust/bar");
printf("##### Tests that definetly should work are completed #####\n");
printf("############## Start expected failure cases ##############\n");
tap_ok(ustctl_set_marker_state(trace, "ust","bar", 1, pid),
"Enable already enabled marker ust/bar");
-
- tap_ok(ustctl_set_marker_state(trace, "ustl", "blar", 1, pid),
- "Enable non-existent marker ustl blar");
+ tap_ok(EEXIST == errno,
+ "Right error code for enabling an already enabled marker");
tap_ok(ustctl_start_trace(trace, pid),
"Start a non-existent trace");
tap_ok(ustctl_start_trace(trace, pid),
"Start a non-existent trace");
int i, status;
pid_t parent_pid, child_pid;
int i, status;
pid_t parent_pid, child_pid;
printf("Function tests for ustctl\n");
printf("Function tests for ustctl\n");