libcgroup tests: Improve walk_test output Running walk test did not give proper failure reports. All the failure reports had the same text. Make these the failure reports more verbose in order to give a better description of where the test failed.
Signed-off-by: Dhaval Giani <[email protected]> --- tests/walk_test.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) Index: libcg/tests/walk_test.c =================================================================== --- libcg.orig/tests/walk_test.c +++ libcg/tests/walk_test.c @@ -37,7 +37,8 @@ int main(int argc, char *argv[]) ret = cgroup_walk_tree_begin(controller, "/", 0, &handle, &info, &lvl); if (ret != 0) { - fprintf(stderr, "Walk failed\n"); + fprintf(stderr, "Walk failed when we try reading the full " + "tree\n"); exit(EXIT_FAILURE); } strcpy(root, info.full_path); @@ -52,7 +53,8 @@ int main(int argc, char *argv[]) ret = cgroup_walk_tree_begin(controller, "/a", 2, &handle, &info, &lvl); if (ret != 0) { - fprintf(stderr, "Walk failed\n"); + fprintf(stderr, "Walk failed when we try to start reading from" + " /a\n"); exit(EXIT_FAILURE); } strcpy(root, info.full_path); @@ -72,7 +74,8 @@ int main(int argc, char *argv[]) ret = cgroup_walk_tree_begin(controller, "/", 0, &handle, &info, &lvl); if (ret != 0) { - fprintf(stderr, "Walk failed\n"); + fprintf(stderr, "Walk failed when we try walking the first five" + " nodes\n"); exit(EXIT_FAILURE); } strcpy(root, info.full_path); -- regards, Dhaval ------------------------------------------------------------------------------ Register Now & Save for Velocity, the Web Performance & Operations Conference from O'Reilly Media. Velocity features a full day of expert-led, hands-on workshops and two days of sessions from industry leaders in dedicated Performance & Operations tracks. Use code vel09scf and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf _______________________________________________ Libcg-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/libcg-devel
