From mboxrd@z Thu Jan 1 00:00:00 1970 From: nils.carlson@ericsson.com (Nils Carlson) Date: Thu, 24 Feb 2011 09:56:30 +0100 Subject: [ltt-dev] [UST PATCH] Fix libustctl_function_tests In-Reply-To: <1298483182-18994-1-git-send-email-yannick.brosseau@gmail.com> References: <1298483182-18994-1-git-send-email-yannick.brosseau@gmail.com> Message-ID: merged, added another patch explaning why this should work. /Nils On Wed, 23 Feb 2011, Yannick Brosseau wrote: > 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 > --- > .../libustctl_function_tests.c | 10 ++++++---- > 1 files changed, 6 insertions(+), 4 deletions(-) > > diff --git a/tests/libustctl_function_tests/libustctl_function_tests.c b/tests/libustctl_function_tests/libustctl_function_tests.c > index 947028f..7c12695 100644 > --- a/tests/libustctl_function_tests/libustctl_function_tests.c > +++ b/tests/libustctl_function_tests/libustctl_function_tests.c > @@ -21,6 +21,7 @@ > #include > #include > #include > +#include > > #include > #include > @@ -136,15 +137,16 @@ static void ustctl_function_tests(pid_t pid) > > 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"); > - > - 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"); > @@ -161,7 +163,7 @@ int main(int argc, char **argv) > int i, status; > pid_t parent_pid, child_pid; > > - tap_plan(27); > + tap_plan(28); > > printf("Function tests for ustctl\n"); > > -- > 1.7.2.3 > > > _______________________________________________ > ltt-dev mailing list > ltt-dev at lists.casi.polymtl.ca > http://lists.casi.polymtl.ca/cgi-bin/mailman/listinfo/ltt-dev >