From ba8bc46c467c17f35ecea9064c91829c5be87136 Mon Sep 17 00:00:00 2001 From: Christof Schmitt Date: Thu, 7 Aug 2014 14:31:42 -0700 Subject: torture: Use torture_fail macro in check_buffer for read requests Signed-off-by: Christof Schmitt Reviewed-by: Volker Lendecke --- source4/torture/raw/read.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/source4/torture/raw/read.c b/source4/torture/raw/read.c index f176e7faf6..8551c0b347 100644 --- a/source4/torture/raw/read.c +++ b/source4/torture/raw/read.c @@ -42,9 +42,9 @@ }} while (0) #define CHECK_BUFFER(buf, seed, len) do { \ - if (!check_buffer(buf, seed, len, __LINE__)) { \ + if (!check_buffer(tctx, buf, seed, len, __LINE__)) { \ ret = false; \ - goto done; \ + torture_fail_goto(tctx, done, "buffer check failed\n"); \ }} while (0) #define CHECK_READX_ALIGN(io) do { \ @@ -70,15 +70,17 @@ static void setup_buffer(uint8_t *buf, unsigned int seed, int len) /* check a random buffer based on a seed */ -static bool check_buffer(uint8_t *buf, unsigned int seed, int len, int line) +static bool check_buffer(struct torture_context *tctx, uint8_t *buf, + unsigned int seed, int len, int line) { int i; srandom(seed); for (i=0;i