summaryrefslogtreecommitdiff
path: root/source4/torture/raw/notify.c
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2007-12-03 00:28:22 +0100
committerStefan Metzmacher <metze@samba.org>2007-12-21 05:47:20 +0100
commitbbdfbf8d9d486aee51117976b8f825759a4c4a37 (patch)
treec0f97e145aae09c3e7e5387471fb3fb0ab839596 /source4/torture/raw/notify.c
parent291ddf433685ee5c25e172885045a4b60d7bb1ee (diff)
downloadsamba-bbdfbf8d9d486aee51117976b8f825759a4c4a37.tar.gz
samba-bbdfbf8d9d486aee51117976b8f825759a4c4a37.tar.bz2
samba-bbdfbf8d9d486aee51117976b8f825759a4c4a37.zip
r26238: Add a loadparm context parameter to torture_context, remove more uses of global_loadparm.
(This used to be commit a33a5530545086b81a3b205aa109dff11c546926)
Diffstat (limited to 'source4/torture/raw/notify.c')
-rw-r--r--source4/torture/raw/notify.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/source4/torture/raw/notify.c b/source4/torture/raw/notify.c
index 96c7e4f947..8687e8e952 100644
--- a/source4/torture/raw/notify.c
+++ b/source4/torture/raw/notify.c
@@ -544,7 +544,7 @@ done:
/*
testing of mask bits for change notify
*/
-static bool test_notify_mask(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
+static bool test_notify_mask(struct smbcli_state *cli, struct torture_context *tctx)
{
bool ret = true;
NTSTATUS status;
@@ -585,7 +585,7 @@ static bool test_notify_mask(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
#define NOTIFY_MASK_TEST(setup, op, cleanup, Action, expected, nchanges) \
do { for (mask=i=0;i<32;i++) { \
struct smbcli_request *req; \
- status = smb_raw_open(cli->tree, mem_ctx, &io); \
+ status = smb_raw_open(cli->tree, tctx, &io); \
CHECK_STATUS(status, NT_STATUS_OK); \
fnum = io.ntcreatex.out.file.fnum; \
setup \
@@ -594,7 +594,7 @@ static bool test_notify_mask(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
req = smb_raw_changenotify_send(cli->tree, &notify); \
op \
msleep(200); smb_raw_ntcancel(req); \
- status = smb_raw_changenotify_recv(req, mem_ctx, &notify); \
+ status = smb_raw_changenotify_recv(req, tctx, &notify); \
cleanup \
smbcli_close(cli->tree, fnum); \
if (NT_STATUS_EQUAL(status, NT_STATUS_CANCELLED)) continue; \
@@ -705,20 +705,20 @@ static bool test_notify_mask(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
printf("testing set file attribute\n");
NOTIFY_MASK_TEST(
- fnum2 = create_complex_file(cli, mem_ctx, BASEDIR "\\tname1");,
+ fnum2 = create_complex_file(cli, tctx, BASEDIR "\\tname1");,
smbcli_fsetatr(cli->tree, fnum2, FILE_ATTRIBUTE_HIDDEN, 0, 0, 0, 0);,
(smbcli_close(cli->tree, fnum2), smbcli_unlink(cli->tree, BASEDIR "\\tname1"));,
NOTIFY_ACTION_MODIFIED,
FILE_NOTIFY_CHANGE_ATTRIBUTES, 1);
- if (lp_parm_bool(global_loadparm, NULL, "torture", "samba3", false)) {
+ if (torture_setting_bool(tctx, "samba3", false)) {
printf("Samba3 does not yet support create times "
"everywhere\n");
}
else {
printf("testing set file create time\n");
NOTIFY_MASK_TEST(
- fnum2 = create_complex_file(cli, mem_ctx,
+ fnum2 = create_complex_file(cli, tctx,
BASEDIR "\\tname1");,
smbcli_fsetatr(cli->tree, fnum2, 0, t, 0, 0, 0);,
(smbcli_close(cli->tree, fnum2),
@@ -729,7 +729,7 @@ static bool test_notify_mask(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
printf("testing set file access time\n");
NOTIFY_MASK_TEST(
- fnum2 = create_complex_file(cli, mem_ctx, BASEDIR "\\tname1");,
+ fnum2 = create_complex_file(cli, tctx, BASEDIR "\\tname1");,
smbcli_fsetatr(cli->tree, fnum2, 0, 0, t, 0, 0);,
(smbcli_close(cli->tree, fnum2), smbcli_unlink(cli->tree, BASEDIR "\\tname1"));,
NOTIFY_ACTION_MODIFIED,
@@ -737,7 +737,7 @@ static bool test_notify_mask(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
printf("testing set file write time\n");
NOTIFY_MASK_TEST(
- fnum2 = create_complex_file(cli, mem_ctx, BASEDIR "\\tname1");,
+ fnum2 = create_complex_file(cli, tctx, BASEDIR "\\tname1");,
smbcli_fsetatr(cli->tree, fnum2, 0, 0, 0, t, 0);,
(smbcli_close(cli->tree, fnum2), smbcli_unlink(cli->tree, BASEDIR "\\tname1"));,
NOTIFY_ACTION_MODIFIED,
@@ -745,7 +745,7 @@ static bool test_notify_mask(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
printf("testing set file change time\n");
NOTIFY_MASK_TEST(
- fnum2 = create_complex_file(cli, mem_ctx, BASEDIR "\\tname1");,
+ fnum2 = create_complex_file(cli, tctx, BASEDIR "\\tname1");,
smbcli_fsetatr(cli->tree, fnum2, 0, 0, 0, 0, t);,
(smbcli_close(cli->tree, fnum2), smbcli_unlink(cli->tree, BASEDIR "\\tname1"));,
NOTIFY_ACTION_MODIFIED,
@@ -754,7 +754,7 @@ static bool test_notify_mask(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
printf("testing write\n");
NOTIFY_MASK_TEST(
- fnum2 = create_complex_file(cli, mem_ctx, BASEDIR "\\tname1");,
+ fnum2 = create_complex_file(cli, tctx, BASEDIR "\\tname1");,
smbcli_write(cli->tree, fnum2, 1, &c, 10000, 1);,
(smbcli_close(cli->tree, fnum2), smbcli_unlink(cli->tree, BASEDIR "\\tname1"));,
NOTIFY_ACTION_MODIFIED,
@@ -762,7 +762,7 @@ static bool test_notify_mask(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
printf("testing truncate\n");
NOTIFY_MASK_TEST(
- fnum2 = create_complex_file(cli, mem_ctx, BASEDIR "\\tname1");,
+ fnum2 = create_complex_file(cli, tctx, BASEDIR "\\tname1");,
smbcli_ftruncate(cli->tree, fnum2, 10000);,
(smbcli_close(cli->tree, fnum2), smbcli_unlink(cli->tree, BASEDIR "\\tname1"));,
NOTIFY_ACTION_MODIFIED,