diff options
author | Volker Lendecke <vl@samba.org> | 2018-10-07 14:47:26 +0200 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2018-10-08 22:17:11 +0200 |
commit | e7d3678ddb5916416193d553f3cc562627e7d8ab (patch) | |
tree | 138339786b7dd4faf211bb3d85ab418aef010f80 /lib/tevent | |
parent | f36a538cbd46e1652bfbd80862f2f03fa3e2f2d0 (diff) | |
download | samba-e7d3678ddb5916416193d553f3cc562627e7d8ab.tar.gz |
lib: Avoid the use of open_memstream in tevent_req_profile_string
Solaris does not have it.
Bug: https://bugzilla.samba.org/show_bug.cgi?id=13629
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Diffstat (limited to 'lib/tevent')
-rw-r--r-- | lib/tevent/test_req.c | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/lib/tevent/test_req.c b/lib/tevent/test_req.c index 565ef31024f..2274a8cadc8 100644 --- a/lib/tevent/test_req.c +++ b/lib/tevent/test_req.c @@ -170,6 +170,7 @@ static bool test_tevent_req_profile2(struct torture_context *tctx, pid_t pid1, pid2; enum tevent_req_state state1, state2; uint64_t err1, err2; + char *printstring; ssize_t pack_len; int err; bool ok; @@ -189,7 +190,12 @@ static bool test_tevent_req_profile2(struct torture_context *tctx, TALLOC_FREE(req); TALLOC_FREE(ev); - tevent_req_profile_print(p1, stdout, 0, UINT_MAX); + printstring = tevent_req_profile_string(tctx, p1, 0, UINT_MAX); + torture_assert_not_null( + tctx, + printstring, + "tevent_req_profile_string failed\n"); + printf("%s\n", printstring); pack_len = tevent_req_profile_pack(p1, NULL, 0); torture_assert(tctx, pack_len>0, "profile_pack failed\n"); @@ -212,7 +218,12 @@ static bool test_tevent_req_profile2(struct torture_context *tctx, "profile_unpack failed\n"); } - tevent_req_profile_print(p2, stdout, 0, UINT_MAX); + printstring = tevent_req_profile_string(tctx, p2, 0, UINT_MAX); + torture_assert_not_null( + tctx, + printstring, + "tevent_req_profile_string failed\n"); + printf("%s\n", printstring); tevent_req_profile_get_name(p1, &str1); tevent_req_profile_get_name(p2, &str2); |