summaryrefslogtreecommitdiff
path: root/source4/torture/raw/unlink.c
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2012-05-18 15:43:31 +1000
committerAndrew Bartlett <abartlet@samba.org>2012-05-18 09:35:13 +0200
commit45082a88c7aaaa928ca36003ade071aafe4de54d (patch)
tree2800e5aaff2da77f5156e12a8bba5e765e794e35 /source4/torture/raw/unlink.c
parent8c52d1b8ac7d56eb728e4cc4ed2a560365d374b5 (diff)
downloadsamba-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/unlink.c')
-rw-r--r--source4/torture/raw/unlink.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/source4/torture/raw/unlink.c b/source4/torture/raw/unlink.c
index ee8f7c8ba3..4ca5406793 100644
--- a/source4/torture/raw/unlink.c
+++ b/source4/torture/raw/unlink.c
@@ -46,9 +46,7 @@ static bool test_unlink(struct torture_context *tctx, struct smbcli_state *cli)
bool ret = true;
const char *fname = BASEDIR "\\test.txt";
- if (!torture_setup_dir(cli, BASEDIR)) {
- return false;
- }
+ torture_assert(tctx, torture_setup_dir(cli, BASEDIR), "Failed to setup up test directory: " BASEDIR);
printf("Trying non-existant file\n");
io.unlink.in.pattern = fname;
@@ -215,9 +213,7 @@ static bool test_delete_on_close(struct torture_context *tctx,
const char *inside = BASEDIR "\\test.dir\\test.txt";
union smb_setfileinfo sfinfo;
- if (!torture_setup_dir(cli, BASEDIR)) {
- return false;
- }
+ torture_assert(tctx, torture_setup_dir(cli, BASEDIR), "Failed to setup up test directory: " BASEDIR);
dio.in.path = dname;