diff options
author | Andrew Bartlett <abartlet@samba.org> | 2012-05-18 15:06:28 +1000 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2012-05-18 15:44:43 +1000 |
commit | 8c52d1b8ac7d56eb728e4cc4ed2a560365d374b5 (patch) | |
tree | 0b9e5f8bfca6bd2187c00ddcca034542797afeef | |
parent | e919cadcca063a4cb1a76a3c30b15f056a51e16d (diff) | |
download | samba-8c52d1b8ac7d56eb728e4cc4ed2a560365d374b5.tar.gz samba-8c52d1b8ac7d56eb728e4cc4ed2a560365d374b5.tar.bz2 samba-8c52d1b8ac7d56eb728e4cc4ed2a560365d374b5.zip |
s4-torture: Always use torture_assert() to handle failures
-rw-r--r-- | source4/torture/basic/locking.c | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/source4/torture/basic/locking.c b/source4/torture/basic/locking.c index 5cd6937b77..1c0a94e591 100644 --- a/source4/torture/basic/locking.c +++ b/source4/torture/basic/locking.c @@ -45,9 +45,8 @@ static bool torture_locktest1(struct torture_context *tctx, time_t t1, t2; unsigned int lock_timeout; - if (!torture_setup_dir(cli1, BASEDIR)) { - return false; - } + torture_assert(tctx, torture_setup_dir(cli1, BASEDIR), + talloc_asprintf(tctx, "Unable to set up %s", BASEDIR)); fnum1 = smbcli_open(cli1->tree, fname, O_RDWR|O_CREAT|O_EXCL, DENY_NONE); torture_assert(tctx, fnum1 != -1, @@ -163,9 +162,8 @@ static bool torture_locktest2(struct torture_context *tctx, const char *fname = BASEDIR "\\lockt2.lck"; int fnum1, fnum2, fnum3; - if (!torture_setup_dir(cli, BASEDIR)) { - return false; - } + torture_assert(tctx, torture_setup_dir(cli, BASEDIR), + talloc_asprintf(tctx, "Unable to set up %s", BASEDIR)); torture_comment(tctx, "Testing pid context\n"); @@ -282,9 +280,8 @@ static bool torture_locktest3(struct torture_context *tctx, torture_comment(tctx, "Testing 32 bit offset ranges"); - if (!torture_setup_dir(cli1, BASEDIR)) { - return false; - } + torture_assert(tctx, torture_setup_dir(cli1, BASEDIR), + talloc_asprintf(tctx, "Unable to set up %s", BASEDIR)); fnum1 = smbcli_open(cli1->tree, fname, O_RDWR|O_CREAT|O_EXCL, DENY_NONE); torture_assert(tctx, fnum1 != -1, |