summaryrefslogtreecommitdiff
path: root/source4/torture/raw/rename.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/rename.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/rename.c')
-rw-r--r--source4/torture/raw/rename.c16
1 files changed, 4 insertions, 12 deletions
diff --git a/source4/torture/raw/rename.c b/source4/torture/raw/rename.c
index b9f2039ff2..63e13c0546 100644
--- a/source4/torture/raw/rename.c
+++ b/source4/torture/raw/rename.c
@@ -59,9 +59,7 @@ static bool test_mv(struct torture_context *tctx,
torture_comment(tctx, "Testing SMBmv\n");
- if (!torture_setup_dir(cli, BASEDIR)) {
- return false;
- }
+ torture_assert(tctx, torture_setup_dir(cli, BASEDIR), "Failed to setup up test directory: " BASEDIR);
torture_comment(tctx, "Trying simple rename\n");
@@ -203,9 +201,7 @@ static bool test_osxrename(struct torture_context *tctx,
union smb_open op;
torture_comment(tctx, "\nTesting OSX Rename\n");
- if (!torture_setup_dir(cli, BASEDIR)) {
- return false;
- }
+ torture_assert(tctx, torture_setup_dir(cli, BASEDIR), "Failed to setup up test directory: " BASEDIR);
op.generic.level = RAW_OPEN_NTCREATEX;
op.ntcreatex.in.root_fid.fnum = 0;
op.ntcreatex.in.flags = 0;
@@ -288,9 +284,7 @@ static bool test_ntrename(struct torture_context *tctx,
torture_comment(tctx, "Testing SMBntrename\n");
- if (!torture_setup_dir(cli, BASEDIR)) {
- return false;
- }
+ torture_assert(tctx, torture_setup_dir(cli, BASEDIR), "Failed to setup up test directory: " BASEDIR);
torture_comment(tctx, "Trying simple rename\n");
@@ -557,9 +551,7 @@ static bool test_dir_rename(struct torture_context *tctx, struct smbcli_state *c
torture_comment(tctx, "Checking rename on a directory containing an open file.\n");
- if (!torture_setup_dir(cli, BASEDIR)) {
- return false;
- }
+ torture_assert(tctx, torture_setup_dir(cli, BASEDIR), "Failed to setup up test directory: " BASEDIR);
/* create a directory */
smbcli_rmdir(cli->tree, dname1);