The branch, master has been updated via 137fd79... s4:winsrepl.idl: add random interface uuid via 601642d... s4:smbtorture: add BASE-BENCH-HOLDOPEN from a0c31ec... mount.cifs: don't allow it to be run as setuid root program
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log ----------------------------------------------------------------- commit 137fd79f445c30b04d443288c03db2b1cc5dcba3 Author: Stefan Metzmacher <me...@samba.org> Date: Tue Jan 26 15:22:09 2010 +0100 s4:winsrepl.idl: add random interface uuid This is needed to include the wrepl interface into ndrdump. metze commit 601642d92369ca9c572e40aa32b5b3b53eeb8dbf Author: Stefan Metzmacher <me...@samba.org> Date: Tue Jan 26 15:20:57 2010 +0100 s4:smbtorture: add BASE-BENCH-HOLDOPEN This is useful for manual performance testing with a large number of share mode entries. metze ----------------------------------------------------------------------- Summary of changes: source4/librpc/idl/winsrepl.idl | 5 ++- source4/torture/basic/base.c | 1 + source4/torture/basic/misc.c | 63 +++++++++++++++++++++++++++++++++++++++ 3 files changed, 68 insertions(+), 1 deletions(-) Changeset truncated at 500 lines: diff --git a/source4/librpc/idl/winsrepl.idl b/source4/librpc/idl/winsrepl.idl index 0ec05e8..cedc70b 100644 --- a/source4/librpc/idl/winsrepl.idl +++ b/source4/librpc/idl/winsrepl.idl @@ -11,7 +11,10 @@ import "nbt.idl"; -interface wrepl +[ + uuid("915f5653-bac1-431c-97ee-9ffb34526921"), + helpstring("WINS Replication PDUs") +] interface wrepl { const int WINS_REPLICATION_PORT = 42; diff --git a/source4/torture/basic/base.c b/source4/torture/basic/base.c index 2c72257..ed389fb 100644 --- a/source4/torture/basic/base.c +++ b/source4/torture/basic/base.c @@ -1771,6 +1771,7 @@ NTSTATUS torture_base_init(void) torture_suite_add_1smb_test(suite, "MAXIMUM_ALLOWED", torture_maximum_allowed); torture_suite_add_simple_test(suite, "BENCH-HOLDCON", torture_holdcon); + torture_suite_add_1smb_test(suite, "BENCH-HOLDOPEN", torture_holdopen); torture_suite_add_simple_test(suite, "BENCH-READWRITE", run_benchrw); torture_suite_add_smb_multi_test(suite, "BENCH-TORTURE", run_torture); torture_suite_add_1smb_test(suite, "SCAN-PIPE_NUMBER", run_pipe_number); diff --git a/source4/torture/basic/misc.c b/source4/torture/basic/misc.c index a8ea88f..ab79d79 100644 --- a/source4/torture/basic/misc.c +++ b/source4/torture/basic/misc.c @@ -231,6 +231,69 @@ bool torture_holdcon(struct torture_context *tctx) } /* + open a file N times on the server and just hold them open + used for testing performance when there are N file handles + alopenn + */ +bool torture_holdopen(struct torture_context *tctx, + struct smbcli_state *cli) +{ + int i, fnum; + const char *fname = "\\holdopen.dat"; + NTSTATUS status; + + smbcli_unlink(cli->tree, fname); + + fnum = smbcli_open(cli->tree, fname, O_RDWR|O_CREAT|O_EXCL, DENY_NONE); + if (fnum == -1) { + torture_comment(tctx, "open of %s failed (%s)\n", fname, smbcli_errstr(cli->tree)); + return false; + } + + smbcli_close(cli->tree, fnum); + + for (i=0;i<torture_numops;i++) { + union smb_open op; + + op.generic.level = RAW_OPEN_NTCREATEX; + op.ntcreatex.in.root_fid.fnum = 0; + op.ntcreatex.in.flags = 0; + op.ntcreatex.in.access_mask = SEC_FILE_WRITE_DATA; + op.ntcreatex.in.create_options = 0; + op.ntcreatex.in.file_attr = FILE_ATTRIBUTE_NORMAL; + op.ntcreatex.in.share_access = NTCREATEX_SHARE_ACCESS_MASK; + op.ntcreatex.in.alloc_size = 0; + op.ntcreatex.in.open_disposition = NTCREATEX_DISP_OPEN; + op.ntcreatex.in.impersonation = NTCREATEX_IMPERSONATION_ANONYMOUS; + op.ntcreatex.in.security_flags = 0; + op.ntcreatex.in.fname = fname; + status = smb_raw_open(cli->tree, tctx, &op); + if (!NT_STATUS_IS_OK(status)) { + torture_warning(tctx, "open %d failed\n", i); + continue; + } + + if (torture_setting_bool(tctx, "progress", true)) { + torture_comment(tctx, "opened %d file\r", i); + fflush(stdout); + } + } + + torture_comment(tctx, "\nStarting pings\n"); + + while (1) { + struct smb_echo ec; + + status = smb_raw_echo(cli->transport, &ec); + torture_comment(tctx, "."); + fflush(stdout); + sleep(15); + } + + return true; +} + +/* test how many open files this server supports on the one socket */ bool run_maxfidtest(struct torture_context *tctx, struct smbcli_state *cli, int dummy) -- Samba Shared Repository