diff options
author | Andrew Bartlett <abartlet@samba.org> | 2012-05-18 15:43:31 +1000 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2012-05-18 09:35:13 +0200 |
commit | 45082a88c7aaaa928ca36003ade071aafe4de54d (patch) | |
tree | 2800e5aaff2da77f5156e12a8bba5e765e794e35 /source4/torture/raw/oplock.c | |
parent | 8c52d1b8ac7d56eb728e4cc4ed2a560365d374b5 (diff) | |
download | samba-45082a88c7aaaa928ca36003ade071aafe4de54d.tar.gz samba-45082a88c7aaaa928ca36003ade071aafe4de54d.tar.bz2 samba-45082a88c7aaaa928ca36003ade071aafe4de54d.zip |
s4-torture: Improve torture test boilerplate, use torture_assert()
This ensures that if this fails, it is reported as a subunit error correctly.
Andrew Bartlett
Autobuild-User: Andrew Bartlett <abartlet@samba.org>
Autobuild-Date: Fri May 18 09:35:13 CEST 2012 on sn-devel-104
Diffstat (limited to 'source4/torture/raw/oplock.c')
-rw-r--r-- | source4/torture/raw/oplock.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/source4/torture/raw/oplock.c b/source4/torture/raw/oplock.c index 7b67c528a7..7eb88a4abe 100644 --- a/source4/torture/raw/oplock.c +++ b/source4/torture/raw/oplock.c @@ -3493,9 +3493,7 @@ static bool test_raw_oplock_doc(struct torture_context *tctx, union smb_open io; uint16_t fnum=0; - if (!torture_setup_dir(cli, BASEDIR)) { - return false; - } + torture_assert(tctx, torture_setup_dir(cli, BASEDIR), "Failed to setup up test directory: " BASEDIR); /* cleanup */ smbcli_unlink(cli->tree, fname); @@ -4138,9 +4136,7 @@ bool torture_hold_oplock(struct torture_context *torture, printf("Setting up open files with oplocks in %s\n", BASEDIR); - if (!torture_setup_dir(cli, BASEDIR)) { - return false; - } + torture_assert(torture, torture_setup_dir(cli, BASEDIR), "Failed to setup up test directory: " BASEDIR); smbcli_oplock_handler(cli->transport, oplock_handler_hold, cli->tree); |