[SCM] Samba Shared Repository - branch master updated
Andrew Bartlett
abartlet at samba.org
Sat Sep 8 09:38:02 UTC 2018
The branch, master has been updated
via 8c00c01 s4: torture: Ensure raw notify tests use different directories.
via 8ec7eb0 lib/replace: force to unset defines if check has failed
via 95ba6b9 wafsamba/samba_autoconf: when setting undefined result, use empty tuple
from b1bf9c5 spoolss-iremotewinspool-tests: Use more recent client OS version
https://git.samba.org/?p=samba.git;a=shortlog;h=master
- Log -----------------------------------------------------------------
commit 8c00c017cb5dc930b229a6fff8e541322a63494e
Author: Jeremy Allison <jra at samba.org>
Date: Fri Sep 7 15:14:37 2018 -0700
s4: torture: Ensure raw notify tests use different directories.
Should help track down flapping tests.
Signed-off-by: Jeremy Allison <jra at samba.org>
Reviewed-by: Andrew Bartlett <abartlet at samba.org>
Autobuild-User(master): Andrew Bartlett <abartlet at samba.org>
Autobuild-Date(master): Sat Sep 8 11:37:44 CEST 2018 on sn-devel-144
commit 8ec7eb0c0129518557d1f446191860a62ef3ff79
Author: Alexander Bokovoy <ab at samba.org>
Date: Thu Sep 6 09:07:28 2018 +0000
lib/replace: force to unset defines if check has failed
For HAVE_WORKING_STRPTIME and HAVE_INCOHERENT_MMAP we always want to
have their defines unset as the code is using '#ifdef' rather than just
'#if'. Setting them to 0 means #ifdef will succeed due to a difference
how '#ifdef' and '#if' are working.
Signed-off-by: Alexander Bokovoy <ab at samba.org>
Reviewed-by: Andrew Bartlett <abartlet at samba.org>
commit 95ba6b97441b75f28aef5ec1ee5a9442683f3763
Author: Alexander Bokovoy <ab at samba.org>
Date: Thu Sep 6 07:51:00 2018 +0000
wafsamba/samba_autoconf: when setting undefined result, use empty tuple
A difference between waf 1.x and 2.x is that we gained 0 as an undefined
variable in the cache file. This does not allow to differentiate unset
and set to 0 defines.
Force to use empty tuple () to signify unset defines.
Signed-off-by: Alexander Bokovoy <ab at samba.org>
Reviewed-by: Andrew Bartlett <abartlet at samba.org>
-----------------------------------------------------------------------
Summary of changes:
buildtools/wafsamba/samba_autoconf.py | 6 +-
lib/replace/wscript | 3 +-
source4/torture/raw/notify.c | 443 +++++++++++++++++++++-------------
3 files changed, 288 insertions(+), 164 deletions(-)
Changeset truncated at 500 lines:
diff --git a/buildtools/wafsamba/samba_autoconf.py b/buildtools/wafsamba/samba_autoconf.py
index 6b940e5..6bc34c0 100644
--- a/buildtools/wafsamba/samba_autoconf.py
+++ b/buildtools/wafsamba/samba_autoconf.py
@@ -445,8 +445,12 @@ def CHECK_CODE(conf, code, define,
exec_args=exec_args,
define_ret=define_ret)
except Exception:
+ # Even when exception happened, conf.check might have set the define
+ # already to int(ret). We want to undefine it in the case of 'always'.
+ # Otherwise, we'd get defines set to 0 when they should be undefined
+ # and it foils #ifdef check
if always:
- conf.DEFINE(define, 0)
+ conf.undefine(define)
conf.COMPOUND_END(False)
if mandatory:
raise
diff --git a/lib/replace/wscript b/lib/replace/wscript
index 3d47c37..cbb6fd5 100644
--- a/lib/replace/wscript
+++ b/lib/replace/wscript
@@ -616,6 +616,7 @@ def configure(conf):
define='HAVE_WORKING_STRPTIME',
execute=True,
addmain=False,
+ always=True,
msg='Checking for working strptime')
conf.CHECK_C_PROTOTYPE('gettimeofday',
@@ -646,7 +647,7 @@ def configure(conf):
# OpenBSD (and I've heard HPUX) doesn't sync between mmap and write.
# FIXME: Anything other than a 0 or 1 exit code should abort configure!
conf.CHECK_CODE('#include "test/incoherent_mmap.c"',
- addmain=False, add_headers=False, execute=True,
+ addmain=False, add_headers=False, execute=True, always=True,
define='HAVE_INCOHERENT_MMAP',
msg="Checking for HAVE_INCOHERENT_MMAP")
diff --git a/source4/torture/raw/notify.c b/source4/torture/raw/notify.c
index afb4a8e..9a993f5 100644
--- a/source4/torture/raw/notify.c
+++ b/source4/torture/raw/notify.c
@@ -35,6 +35,8 @@ do { \
"wire_bad_flags"); \
} while (0)
+#define BASEDIR_CN1_DIR BASEDIR "_CN1_DIR"
+
/*
basic testing of change notify on directories
*/
@@ -53,8 +55,8 @@ static bool test_notify_dir(struct torture_context *tctx,
torture_comment(tctx, "TESTING CHANGE NOTIFY ON DIRECTORIES\n");
- torture_assert(tctx, torture_setup_dir(cli, BASEDIR),
- "Failed to setup up test directory: " BASEDIR);
+ torture_assert(tctx, torture_setup_dir(cli, BASEDIR_CN1_DIR),
+ "Failed to setup up test directory: " BASEDIR_CN1_DIR);
/*
get a handle on the directory
@@ -70,7 +72,7 @@ static bool test_notify_dir(struct torture_context *tctx,
io.ntcreatex.in.open_disposition = NTCREATEX_DISP_OPEN;
io.ntcreatex.in.impersonation = NTCREATEX_IMPERSONATION_ANONYMOUS;
io.ntcreatex.in.security_flags = 0;
- io.ntcreatex.in.fname = BASEDIR;
+ io.ntcreatex.in.fname = BASEDIR_CN1_DIR;
status = smb_raw_open(cli->tree, tctx, &io);
torture_assert_ntstatus_ok_goto(tctx, status, ret, done,
@@ -102,7 +104,7 @@ static bool test_notify_dir(struct torture_context *tctx,
torture_comment(tctx, "Testing notify mkdir\n");
req = smb_raw_changenotify_send(cli->tree, ¬ify);
- smbcli_mkdir(cli2->tree, BASEDIR "\\subdir-name");
+ smbcli_mkdir(cli2->tree, BASEDIR_CN1_DIR "\\subdir-name");
status = smb_raw_changenotify_recv(req, tctx, ¬ify);
torture_assert_ntstatus_ok_goto(tctx, status, ret, done,
@@ -120,7 +122,7 @@ static bool test_notify_dir(struct torture_context *tctx,
torture_comment(tctx, "Testing notify rmdir\n");
req = smb_raw_changenotify_send(cli->tree, ¬ify);
- smbcli_rmdir(cli2->tree, BASEDIR "\\subdir-name");
+ smbcli_rmdir(cli2->tree, BASEDIR_CN1_DIR "\\subdir-name");
status = smb_raw_changenotify_recv(req, tctx, ¬ify);
torture_assert_ntstatus_ok_goto(tctx, status, ret, done,
@@ -136,10 +138,10 @@ static bool test_notify_dir(struct torture_context *tctx,
torture_comment(tctx, "Testing notify mkdir - rmdir - mkdir - rmdir\n");
- smbcli_mkdir(cli2->tree, BASEDIR "\\subdir-name");
- smbcli_rmdir(cli2->tree, BASEDIR "\\subdir-name");
- smbcli_mkdir(cli2->tree, BASEDIR "\\subdir-name");
- smbcli_rmdir(cli2->tree, BASEDIR "\\subdir-name");
+ smbcli_mkdir(cli2->tree, BASEDIR_CN1_DIR "\\subdir-name");
+ smbcli_rmdir(cli2->tree, BASEDIR_CN1_DIR "\\subdir-name");
+ smbcli_mkdir(cli2->tree, BASEDIR_CN1_DIR "\\subdir-name");
+ smbcli_rmdir(cli2->tree, BASEDIR_CN1_DIR "\\subdir-name");
smb_msleep(200);
req = smb_raw_changenotify_send(cli->tree, ¬ify);
status = smb_raw_changenotify_recv(req, tctx, ¬ify);
@@ -175,7 +177,9 @@ static bool test_notify_dir(struct torture_context *tctx,
count = torture_numops;
torture_comment(tctx, "Testing buffered notify on create of %d files\n", count);
for (i=0;i<count;i++) {
- char *fname = talloc_asprintf(cli, BASEDIR "\\test%d.txt", i);
+ char *fname = talloc_asprintf(cli,
+ BASEDIR_CN1_DIR "\\test%d.txt",
+ i);
int fnum3 = smbcli_open(cli->tree, fname, O_CREAT|O_RDWR, DENY_NONE);
torture_assert_int_not_equal_goto(tctx, fnum3, -1, ret, done,
talloc_asprintf(tctx, "Failed to create %s - %s",
@@ -194,7 +198,7 @@ static bool test_notify_dir(struct torture_context *tctx,
notify.nttrans.in.file.fnum = fnum;
req = smb_raw_changenotify_send(cli->tree, ¬ify);
- status = smbcli_unlink(cli->tree, BASEDIR "\\nonexistent.txt");
+ status = smbcli_unlink(cli->tree, BASEDIR_CN1_DIR "\\nonexistent.txt");
torture_assert_ntstatus_equal_goto(tctx, status,
NT_STATUS_OBJECT_NAME_NOT_FOUND,
ret, done,
@@ -204,7 +208,7 @@ static bool test_notify_dir(struct torture_context *tctx,
this unlink is only seen by the 1st notify and
the 3rd notify (later) */
torture_comment(tctx, "Testing notify on unlink for the first file\n");
- status = smbcli_unlink(cli2->tree, BASEDIR "\\test0.txt");
+ status = smbcli_unlink(cli2->tree, BASEDIR_CN1_DIR "\\test0.txt");
torture_assert_ntstatus_ok_goto(tctx, status, ret, done,
"smbcli_unlink");
@@ -241,7 +245,7 @@ static bool test_notify_dir(struct torture_context *tctx,
torture_comment(tctx, "(3rd notify) this notify will only see the 1st unlink\n");
req = smb_raw_changenotify_send(cli->tree, ¬ify);
- status = smbcli_unlink(cli->tree, BASEDIR "\\nonexistent.txt");
+ status = smbcli_unlink(cli->tree, BASEDIR_CN1_DIR "\\nonexistent.txt");
torture_assert_ntstatus_equal_goto(tctx, status,
NT_STATUS_OBJECT_NAME_NOT_FOUND,
ret, done,
@@ -249,7 +253,7 @@ static bool test_notify_dir(struct torture_context *tctx,
torture_comment(tctx, "Testing notify on wildcard unlink for %d files\n", count-1);
/* (2nd unlink) do a wildcard unlink */
- status = smbcli_unlink(cli2->tree, BASEDIR "\\test*.txt");
+ status = smbcli_unlink(cli2->tree, BASEDIR_CN1_DIR "\\test*.txt");
torture_assert_ntstatus_ok_goto(tctx, status, ret, done,
"smb_raw_changenotify_recv");
@@ -317,7 +321,7 @@ static bool test_notify_dir(struct torture_context *tctx,
done:
smb_raw_exit(cli->session);
- smbcli_deltree(cli->tree, BASEDIR);
+ smbcli_deltree(cli->tree, BASEDIR_CN1_DIR);
return ret;
}
@@ -352,6 +356,9 @@ static bool check_rename_reply(struct torture_context *tctx,
/*
testing of recursive change notify
*/
+
+#define BASEDIR_CN1_RECUR BASEDIR "_CN1_RECUR"
+
static bool test_notify_recursive(struct torture_context *tctx,
struct smbcli_state *cli,
struct smbcli_state *cli2)
@@ -365,8 +372,8 @@ static bool test_notify_recursive(struct torture_context *tctx,
torture_comment(tctx, "TESTING CHANGE NOTIFY WITH RECURSION\n");
- torture_assert(tctx, torture_setup_dir(cli, BASEDIR),
- "Failed to setup up test directory: " BASEDIR);
+ torture_assert(tctx, torture_setup_dir(cli, BASEDIR_CN1_RECUR),
+ "Failed to setup up test directory: " BASEDIR_CN1_RECUR);
/*
get a handle on the directory
@@ -382,7 +389,7 @@ static bool test_notify_recursive(struct torture_context *tctx,
io.ntcreatex.in.open_disposition = NTCREATEX_DISP_OPEN;
io.ntcreatex.in.impersonation = NTCREATEX_IMPERSONATION_ANONYMOUS;
io.ntcreatex.in.security_flags = 0;
- io.ntcreatex.in.fname = BASEDIR;
+ io.ntcreatex.in.fname = BASEDIR_CN1_RECUR;
status = smb_raw_open(cli->tree, tctx, &io);
torture_assert_ntstatus_ok_goto(tctx, status, ret, done,
@@ -421,24 +428,28 @@ static bool test_notify_recursive(struct torture_context *tctx,
* Make notifies a bit more interesting in a cluster by doing
* the changes against different nodes with --unclist
*/
- smbcli_mkdir(cli->tree, BASEDIR "\\subdir-name");
- smbcli_mkdir(cli2->tree, BASEDIR "\\subdir-name\\subname1");
+ smbcli_mkdir(cli->tree, BASEDIR_CN1_RECUR "\\subdir-name");
+ smbcli_mkdir(cli2->tree, BASEDIR_CN1_RECUR "\\subdir-name\\subname1");
smbcli_close(cli->tree,
- smbcli_open(cli->tree, BASEDIR "\\subdir-name\\subname2", O_CREAT, 0));
- smbcli_rename(cli2->tree, BASEDIR "\\subdir-name\\subname1",
- BASEDIR "\\subdir-name\\subname1-r");
- smbcli_rename(cli->tree, BASEDIR "\\subdir-name\\subname2", BASEDIR "\\subname2-r");
- smbcli_rename(cli2->tree, BASEDIR "\\subname2-r",
- BASEDIR "\\subname3-r");
+ smbcli_open(cli->tree,
+ BASEDIR_CN1_RECUR "\\subdir-name\\subname2",
+ O_CREAT, 0));
+ smbcli_rename(cli2->tree, BASEDIR_CN1_RECUR "\\subdir-name\\subname1",
+ BASEDIR_CN1_RECUR "\\subdir-name\\subname1-r");
+ smbcli_rename(cli->tree,
+ BASEDIR_CN1_RECUR "\\subdir-name\\subname2",
+ BASEDIR_CN1_RECUR "\\subname2-r");
+ smbcli_rename(cli2->tree, BASEDIR_CN1_RECUR "\\subname2-r",
+ BASEDIR_CN1_RECUR "\\subname3-r");
notify.nttrans.in.completion_filter = 0;
notify.nttrans.in.recursive = true;
smb_msleep(200);
req1 = smb_raw_changenotify_send(cli->tree, ¬ify);
- smbcli_rmdir(cli->tree, BASEDIR "\\subdir-name\\subname1-r");
- smbcli_rmdir(cli2->tree, BASEDIR "\\subdir-name");
- smbcli_unlink(cli->tree, BASEDIR "\\subname3-r");
+ smbcli_rmdir(cli->tree, BASEDIR_CN1_RECUR "\\subdir-name\\subname1-r");
+ smbcli_rmdir(cli2->tree, BASEDIR_CN1_RECUR "\\subdir-name");
+ smbcli_unlink(cli->tree, BASEDIR_CN1_RECUR "\\subname3-r");
smb_msleep(200);
notify.nttrans.in.recursive = false;
@@ -532,13 +543,16 @@ static bool test_notify_recursive(struct torture_context *tctx,
done:
smb_raw_exit(cli->session);
- smbcli_deltree(cli->tree, BASEDIR);
+ smbcli_deltree(cli->tree, BASEDIR_CN1_RECUR);
return ret;
}
/*
testing of change notify mask change
*/
+
+#define BASEDIR_CN1_CNMC BASEDIR "_CN1_CNMC"
+
static bool test_notify_mask_change(struct torture_context *tctx,
struct smbcli_state *cli)
{
@@ -551,8 +565,8 @@ static bool test_notify_mask_change(struct torture_context *tctx,
torture_comment(tctx, "TESTING CHANGE NOTIFY WITH MASK CHANGE\n");
- torture_assert(tctx, torture_setup_dir(cli, BASEDIR),
- "Failed to setup up test directory: " BASEDIR);
+ torture_assert(tctx, torture_setup_dir(cli, BASEDIR_CN1_CNMC),
+ "Failed to setup up test directory: " BASEDIR_CN1_CNMC);
/*
get a handle on the directory
@@ -568,7 +582,7 @@ static bool test_notify_mask_change(struct torture_context *tctx,
io.ntcreatex.in.open_disposition = NTCREATEX_DISP_OPEN;
io.ntcreatex.in.impersonation = NTCREATEX_IMPERSONATION_ANONYMOUS;
io.ntcreatex.in.security_flags = 0;
- io.ntcreatex.in.fname = BASEDIR;
+ io.ntcreatex.in.fname = BASEDIR_CN1_CNMC;
status = smb_raw_open(cli->tree, tctx, &io);
torture_assert_ntstatus_ok_goto(tctx, status, ret, done,
@@ -607,9 +621,11 @@ static bool test_notify_mask_change(struct torture_context *tctx,
req1 = smb_raw_changenotify_send(cli->tree, ¬ify);
/* Set to hidden then back again. */
- smbcli_close(cli->tree, smbcli_open(cli->tree, BASEDIR "\\tname1", O_CREAT, 0));
- smbcli_setatr(cli->tree, BASEDIR "\\tname1", FILE_ATTRIBUTE_HIDDEN, 0);
- smbcli_unlink(cli->tree, BASEDIR "\\tname1");
+ smbcli_close(cli->tree,
+ smbcli_open(cli->tree,BASEDIR_CN1_CNMC "\\tname1", O_CREAT, 0));
+ smbcli_setatr(cli->tree, BASEDIR_CN1_CNMC "\\tname1",
+ FILE_ATTRIBUTE_HIDDEN, 0);
+ smbcli_unlink(cli->tree, BASEDIR_CN1_CNMC "\\tname1");
status = smb_raw_changenotify_recv(req1, tctx, ¬ify);
torture_assert_ntstatus_ok_goto(tctx, status, ret, done,
@@ -635,17 +651,25 @@ static bool test_notify_mask_change(struct torture_context *tctx,
notify.nttrans.in.recursive = false;
req2 = smb_raw_changenotify_send(cli->tree, ¬ify);
- smbcli_mkdir(cli->tree, BASEDIR "\\subdir-name");
- smbcli_mkdir(cli->tree, BASEDIR "\\subdir-name\\subname1");
+ smbcli_mkdir(cli->tree, BASEDIR_CN1_CNMC "\\subdir-name");
+ smbcli_mkdir(cli->tree, BASEDIR_CN1_CNMC "\\subdir-name\\subname1");
smbcli_close(cli->tree,
- smbcli_open(cli->tree, BASEDIR "\\subdir-name\\subname2", O_CREAT, 0));
- smbcli_rename(cli->tree, BASEDIR "\\subdir-name\\subname1", BASEDIR "\\subdir-name\\subname1-r");
- smbcli_rename(cli->tree, BASEDIR "\\subdir-name\\subname2", BASEDIR "\\subname2-r");
- smbcli_rename(cli->tree, BASEDIR "\\subname2-r", BASEDIR "\\subname3-r");
-
- smbcli_rmdir(cli->tree, BASEDIR "\\subdir-name\\subname1-r");
- smbcli_rmdir(cli->tree, BASEDIR "\\subdir-name");
- smbcli_unlink(cli->tree, BASEDIR "\\subname3-r");
+ smbcli_open(cli->tree,
+ BASEDIR_CN1_CNMC "\\subdir-name\\subname2",
+ O_CREAT, 0));
+ smbcli_rename(cli->tree,
+ BASEDIR_CN1_CNMC "\\subdir-name\\subname1",
+ BASEDIR_CN1_CNMC "\\subdir-name\\subname1-r");
+ smbcli_rename(cli->tree,
+ BASEDIR_CN1_CNMC "\\subdir-name\\subname2",
+ BASEDIR_CN1_CNMC "\\subname2-r");
+ smbcli_rename(cli->tree,
+ BASEDIR_CN1_CNMC "\\subname2-r",
+ BASEDIR_CN1_CNMC "\\subname3-r");
+
+ smbcli_rmdir(cli->tree, BASEDIR_CN1_CNMC "\\subdir-name\\subname1-r");
+ smbcli_rmdir(cli->tree, BASEDIR_CN1_CNMC "\\subdir-name");
+ smbcli_unlink(cli->tree, BASEDIR_CN1_CNMC "\\subname3-r");
status = smb_raw_changenotify_recv(req1, tctx, ¬ify);
torture_assert_ntstatus_ok_goto(tctx, status, ret, done,
@@ -675,7 +699,7 @@ static bool test_notify_mask_change(struct torture_context *tctx,
done:
smb_raw_exit(cli->session);
- smbcli_deltree(cli->tree, BASEDIR);
+ smbcli_deltree(cli->tree, BASEDIR_CN1_CNMC);
return ret;
}
@@ -683,6 +707,9 @@ done:
/*
testing of mask bits for change notify
*/
+
+#define BASEDIR_CN1_NOTM BASEDIR "_CN1_NOTM"
+
static bool test_notify_mask(struct torture_context *tctx,
struct smbcli_state *cli,
struct smbcli_state *cli2)
@@ -701,8 +728,8 @@ static bool test_notify_mask(struct torture_context *tctx,
torture_comment(tctx, "TESTING CHANGE NOTIFY COMPLETION FILTERS\n");
- torture_assert(tctx, torture_setup_dir(cli, BASEDIR),
- "Failed to setup up test directory: " BASEDIR);
+ torture_assert(tctx, torture_setup_dir(cli, BASEDIR_CN1_NOTM),
+ "Failed to setup up test directory: " BASEDIR_CN1_NOTM);
tv = timeval_current_ofs(1000, 0);
t = timeval_to_nttime(&tv);
@@ -721,7 +748,7 @@ static bool test_notify_mask(struct torture_context *tctx,
io.ntcreatex.in.open_disposition = NTCREATEX_DISP_OPEN;
io.ntcreatex.in.impersonation = NTCREATEX_IMPERSONATION_ANONYMOUS;
io.ntcreatex.in.security_flags = 0;
- io.ntcreatex.in.fname = BASEDIR;
+ io.ntcreatex.in.fname = BASEDIR_CN1_NOTM;
notify.nttrans.level = RAW_NOTIFY_NTTRANS;
notify.nttrans.in.buffer_size = 1000;
@@ -801,71 +828,94 @@ static bool test_notify_mask(struct torture_context *tctx,
torture_comment(tctx, "Testing mkdir\n");
NOTIFY_MASK_TEST("Testing mkdir",;,
- smbcli_mkdir(cli->tree, BASEDIR "\\tname1");,
- smbcli_rmdir(cli2->tree, BASEDIR "\\tname1");,
+ smbcli_mkdir(cli->tree, BASEDIR_CN1_NOTM "\\tname1");,
+ smbcli_rmdir(cli2->tree, BASEDIR_CN1_NOTM "\\tname1");,
NOTIFY_ACTION_ADDED,
FILE_NOTIFY_CHANGE_DIR_NAME, 1);
torture_comment(tctx, "Testing create file\n");
NOTIFY_MASK_TEST("Testing create file",;,
- smbcli_close(cli->tree, smbcli_open(cli->tree, BASEDIR "\\tname1", O_CREAT, 0));,
- smbcli_unlink(cli2->tree, BASEDIR "\\tname1");,
+ smbcli_close(cli->tree,
+ smbcli_open(cli->tree,
+ BASEDIR_CN1_NOTM "\\tname1",
+ O_CREAT, 0));,
+ smbcli_unlink(cli2->tree,
+ BASEDIR_CN1_NOTM "\\tname1");,
NOTIFY_ACTION_ADDED,
FILE_NOTIFY_CHANGE_FILE_NAME, 1);
torture_comment(tctx, "Testing unlink\n");
NOTIFY_MASK_TEST("Testing unlink",
- smbcli_close(cli->tree, smbcli_open(cli->tree, BASEDIR "\\tname1", O_CREAT, 0));,
- smbcli_unlink(cli2->tree, BASEDIR "\\tname1");,
+ smbcli_close(cli->tree,
+ smbcli_open(cli->tree,
+ BASEDIR_CN1_NOTM "\\tname1",
+ O_CREAT, 0));,
+ smbcli_unlink(cli2->tree,
+ BASEDIR_CN1_NOTM "\\tname1");,
;,
NOTIFY_ACTION_REMOVED,
FILE_NOTIFY_CHANGE_FILE_NAME, 1);
torture_comment(tctx, "Testing rmdir\n");
NOTIFY_MASK_TEST("Testing rmdir",
- smbcli_mkdir(cli->tree, BASEDIR "\\tname1");,
- smbcli_rmdir(cli2->tree, BASEDIR "\\tname1");,
+ smbcli_mkdir(cli->tree, BASEDIR_CN1_NOTM "\\tname1");,
+ smbcli_rmdir(cli2->tree, BASEDIR_CN1_NOTM "\\tname1");,
;,
NOTIFY_ACTION_REMOVED,
FILE_NOTIFY_CHANGE_DIR_NAME, 1);
torture_comment(tctx, "Testing rename file\n");
NOTIFY_MASK_TEST("Testing rename file",
- smbcli_close(cli->tree, smbcli_open(cli->tree, BASEDIR "\\tname1", O_CREAT, 0));,
- smbcli_rename(cli2->tree, BASEDIR "\\tname1", BASEDIR "\\tname2");,
- smbcli_unlink(cli->tree, BASEDIR "\\tname2");,
+ smbcli_close(cli->tree,
+ smbcli_open(cli->tree,
+ BASEDIR_CN1_NOTM "\\tname1",
+ O_CREAT, 0));,
+ smbcli_rename(cli2->tree,
+ BASEDIR_CN1_NOTM "\\tname1",
+ BASEDIR_CN1_NOTM "\\tname2");,
+ smbcli_unlink(cli->tree, BASEDIR_CN1_NOTM "\\tname2");,
NOTIFY_ACTION_OLD_NAME,
FILE_NOTIFY_CHANGE_FILE_NAME|FILE_NOTIFY_CHANGE_ATTRIBUTES|FILE_NOTIFY_CHANGE_CREATION, 2);
torture_comment(tctx, "Testing rename dir\n");
NOTIFY_MASK_TEST("Testing rename dir",
- smbcli_mkdir(cli->tree, BASEDIR "\\tname1");,
- smbcli_rename(cli2->tree, BASEDIR "\\tname1", BASEDIR "\\tname2");,
- smbcli_rmdir(cli->tree, BASEDIR "\\tname2");,
+ smbcli_mkdir(cli->tree, BASEDIR_CN1_NOTM "\\tname1");,
+ smbcli_rename(cli2->tree,
+ BASEDIR_CN1_NOTM "\\tname1",
+ BASEDIR_CN1_NOTM "\\tname2");,
+ smbcli_rmdir(cli->tree, BASEDIR_CN1_NOTM "\\tname2");,
NOTIFY_ACTION_OLD_NAME,
FILE_NOTIFY_CHANGE_DIR_NAME, 2);
torture_comment(tctx, "Testing set path attribute\n");
NOTIFY_MASK_TEST("Testing set path attribute",
- smbcli_close(cli->tree, smbcli_open(cli->tree, BASEDIR "\\tname1", O_CREAT, 0));,
- smbcli_setatr(cli2->tree, BASEDIR "\\tname1", FILE_ATTRIBUTE_HIDDEN, 0);,
- smbcli_unlink(cli->tree, BASEDIR "\\tname1");,
+ smbcli_close(cli->tree,
+ smbcli_open(cli->tree,
+ BASEDIR_CN1_NOTM "\\tname1", O_CREAT, 0));,
+ smbcli_setatr(cli2->tree,
+ BASEDIR_CN1_NOTM "\\tname1", FILE_ATTRIBUTE_HIDDEN, 0);,
+ smbcli_unlink(cli->tree, BASEDIR_CN1_NOTM "\\tname1");,
NOTIFY_ACTION_MODIFIED,
FILE_NOTIFY_CHANGE_ATTRIBUTES, 1);
torture_comment(tctx, "Testing set path write time\n");
NOTIFY_MASK_TEST("Testing set path write time",
- smbcli_close(cli->tree, smbcli_open(cli->tree, BASEDIR "\\tname1", O_CREAT, 0));,
- smbcli_setatr(cli2->tree, BASEDIR "\\tname1", FILE_ATTRIBUTE_NORMAL, 1000);,
- smbcli_unlink(cli->tree, BASEDIR "\\tname1");,
+ smbcli_close(cli->tree, smbcli_open(cli->tree,
+ BASEDIR_CN1_NOTM "\\tname1", O_CREAT, 0));,
+ smbcli_setatr(cli2->tree,
+ BASEDIR_CN1_NOTM "\\tname1",
+ FILE_ATTRIBUTE_NORMAL, 1000);,
+ smbcli_unlink(cli->tree, BASEDIR_CN1_NOTM "\\tname1");,
NOTIFY_ACTION_MODIFIED,
FILE_NOTIFY_CHANGE_LAST_WRITE, 1);
torture_comment(tctx, "Testing set file attribute\n");
NOTIFY_MASK_TEST("Testing set file attribute",
- fnum2 = create_complex_file(cli2, tctx, BASEDIR "\\tname1");,
+ fnum2 = create_complex_file(cli2, tctx,
+ BASEDIR_CN1_NOTM "\\tname1");,
smbcli_fsetatr(cli2->tree, fnum2, FILE_ATTRIBUTE_HIDDEN, 0, 0, 0, 0);,
- (smbcli_close(cli2->tree, fnum2), smbcli_unlink(cli2->tree, BASEDIR "\\tname1"));,
+ (smbcli_close(cli2->tree, fnum2),
+ smbcli_unlink(cli2->tree, BASEDIR_CN1_NOTM "\\tname1"));,
NOTIFY_ACTION_MODIFIED,
FILE_NOTIFY_CHANGE_ATTRIBUTES, 1);
@@ -877,64 +927,78 @@ static bool test_notify_mask(struct torture_context *tctx,
torture_comment(tctx, "Testing set file create time\n");
NOTIFY_MASK_TEST("Testing set file create time",
fnum2 = create_complex_file(cli, tctx,
- BASEDIR "\\tname1");,
+ BASEDIR_CN1_NOTM "\\tname1");,
smbcli_fsetatr(cli->tree, fnum2, 0, t, 0, 0, 0);,
(smbcli_close(cli->tree, fnum2),
- smbcli_unlink(cli->tree, BASEDIR "\\tname1"));,
+ smbcli_unlink(cli->tree,
+ BASEDIR_CN1_NOTM "\\tname1"));,
NOTIFY_ACTION_MODIFIED,
FILE_NOTIFY_CHANGE_CREATION, 1);
}
torture_comment(tctx, "Testing set file access time\n");
NOTIFY_MASK_TEST("Testing set file access time",
- fnum2 = create_complex_file(cli, tctx, BASEDIR "\\tname1");,
+ fnum2 = create_complex_file(cli, tctx,
+ BASEDIR_CN1_NOTM "\\tname1");,
smbcli_fsetatr(cli->tree, fnum2, 0, 0, t, 0, 0);,
- (smbcli_close(cli->tree, fnum2), smbcli_unlink(cli->tree, BASEDIR "\\tname1"));,
+ (smbcli_close(cli->tree, fnum2),
+ smbcli_unlink(cli->tree, BASEDIR_CN1_NOTM "\\tname1"));,
--
Samba Shared Repository
More information about the samba-cvs
mailing list