[SCM] Samba Shared Repository - branch master updated

Andrew Bartlett abartlet at samba.org
Thu Nov 30 08:48:02 UTC 2017


The branch, master has been updated
       via  27bb881 selftest: mark samba3.smb2.kernel-oplocks as flapping
       via  3e4286e torture: Use torture_assert{,_int_equal}_goto() in smb2.kernel-oplocks
      from  5c8032b s3: libsmb: Fix valgrind read-after-free error in cli_smb2_close_fnum_recv().

https://git.samba.org/?p=samba.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit 27bb8814a526adbd22452ce58754d18e1b00d426
Author: Andrew Bartlett <abartlet at samba.org>
Date:   Thu Nov 30 09:38:13 2017 +1300

    selftest: mark samba3.smb2.kernel-oplocks as flapping
    
    This flaps on sn-devel occaionally, and more often elsewhere
    
    Signed-off-by: Andrew Bartlett <abartlet at samba.org>
    Reviewed-by: Gary Lockyer <gary at catalyst.net.nz>
    
    Autobuild-User(master): Andrew Bartlett <abartlet at samba.org>
    Autobuild-Date(master): Thu Nov 30 09:47:22 CET 2017 on sn-devel-144

commit 3e4286ec4f3b434c69f124714bb99015dfd8cf08
Author: Andrew Bartlett <abartlet at samba.org>
Date:   Thu Nov 30 09:35:20 2017 +1300

    torture: Use torture_assert{,_int_equal}_goto() in smb2.kernel-oplocks
    
    This allows this test to be added as flapping.
    
    Signed-off-by: Andrew Bartlett <abartlet at samba.org>
    Reviewed-by: Gary Lockyer <gary at catalyst.net.nz>

-----------------------------------------------------------------------

Summary of changes:
 selftest/flapping.d/kernel-oplocks |  4 ++++
 source4/torture/smb2/oplock.c      | 16 ++++++++--------
 2 files changed, 12 insertions(+), 8 deletions(-)
 create mode 100644 selftest/flapping.d/kernel-oplocks


Changeset truncated at 500 lines:

diff --git a/selftest/flapping.d/kernel-oplocks b/selftest/flapping.d/kernel-oplocks
new file mode 100644
index 0000000..2102e2b
--- /dev/null
+++ b/selftest/flapping.d/kernel-oplocks
@@ -0,0 +1,4 @@
+# The smb2.kernel-oplocks tests fails often on Ubuntu 14.04 on the
+# Catalyst Cloud but failures have been seen on normal workstations
+# and sn-devel.
+^samba3.smb2.kernel-oplocks.kernel_oplocks8
diff --git a/source4/torture/smb2/oplock.c b/source4/torture/smb2/oplock.c
index b6d9f84..6d749f9 100644
--- a/source4/torture/smb2/oplock.c
+++ b/source4/torture/smb2/oplock.c
@@ -5040,7 +5040,8 @@ static bool test_smb2_kernel_oplocks8(struct torture_context *tctx,
 	io.in.fname = fname;
 
 	req = smb2_create_send(tree, &io);
-	torture_assert(tctx, req != NULL, "smb2_create_send");
+	torture_assert_goto(tctx, req != NULL,
+			    ret, done, "smb2_create_send");
 
 	/* Ensure while the open is blocked the smbd is
 	   still serving other requests. */
@@ -5058,7 +5059,8 @@ static bool test_smb2_kernel_oplocks8(struct torture_context *tctx,
 	h1 = io.out.file.handle;
 
 	/* in less than 2 seconds. Otherwise the server blocks. */
-	torture_assert(tctx, end - start < 2, "server was blocked !");
+	torture_assert_goto(tctx, end - start < 2,
+			    ret, done, "server was blocked !");
 
 	/* Pick up the return for the initial blocking open. */
 	status = smb2_create_recv(req, tctx, &io);
@@ -5071,14 +5073,12 @@ static bool test_smb2_kernel_oplocks8(struct torture_context *tctx,
 	/* Wait for the exit code from the child. */
 	while (child_exit_code == -1) {
 		int rval = tevent_loop_once(tctx->ev);
-		torture_assert(tctx, rval == 0, "tevent_loop_once error\n");
+		torture_assert_goto(tctx, rval == 0, ret,
+				    done, "tevent_loop_once error\n");
 	}
 
-	if (child_exit_code != 0) {
-		torture_comment(tctx, "Bad child exit code %d\n",
-			child_exit_code);
-		ret = false;
-	}
+	torture_assert_int_equal_goto(tctx, child_exit_code, 0,
+				      ret, done, "Bad child exit code");
 
 done:
 	if (!smb2_util_handle_empty(h1)) {


-- 
Samba Shared Repository



More information about the samba-cvs mailing list