From 032776e8b068b7a02b22736f900eb5962b7f8770 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Fri, 24 Apr 2015 15:01:23 +0200 Subject: test_uuidd: make objdump more robust Signed-off-by: Karel Zak --- tests/helpers/test_uuidd.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'tests/helpers') diff --git a/tests/helpers/test_uuidd.c b/tests/helpers/test_uuidd.c index 52b050324..7a4f8eb97 100644 --- a/tests/helpers/test_uuidd.c +++ b/tests/helpers/test_uuidd.c @@ -228,10 +228,11 @@ static void object_dump(size_t idx, object_t *obj) p = uuid_string; object_uuid_to_string(obj, &p); - fprintf(stderr, "object[%zu]: {uuid=<%s>,pid=%d,tid=%d}\n", - idx, p, - obj->thread->proc->pid, - (int) obj->thread->tid); + fprintf(stderr, "object[%zu]: {\n", idx); + fprintf(stderr, " uuid: <%s>\n", p); + fprintf(stderr, " process: %d\n", obj->thread && obj->thread->proc ? (int) obj->thread->proc->pid : 0); + fprintf(stderr, " thread: %d\n", obj->thread ? (int) obj->thread->tid : 0); + fprintf(stderr, "}\n"); } int main(int argc, char *argv[]) -- cgit v1.2.3-55-g7522