summaryrefslogtreecommitdiff
path: root/source4/torture
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2004-10-25 07:58:47 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:04:41 -0500
commitee0c87b4c98e2d3878aa7ab7f8919aa16c4aa063 (patch)
tree522611b1e1b35ac0c5117c675e78391e79d2a08f /source4/torture
parente1c43f243a7dea8c8a7ae235252091d1e18c2fb4 (diff)
downloadsamba-ee0c87b4c98e2d3878aa7ab7f8919aa16c4aa063.tar.gz
samba-ee0c87b4c98e2d3878aa7ab7f8919aa16c4aa063.tar.bz2
samba-ee0c87b4c98e2d3878aa7ab7f8919aa16c4aa063.zip
r3207: - reformat error msgs in BASE-DIR* tests
- added support for mandatory attributes in old style directory search - we now pass BASE-DIR1 and BASE-DIR2 (This used to be commit efaa0eaec49e952aa515c3448246d9048a484c26)
Diffstat (limited to 'source4/torture')
-rw-r--r--source4/torture/basic/dir.c24
1 files changed, 14 insertions, 10 deletions
diff --git a/source4/torture/basic/dir.c b/source4/torture/basic/dir.c
index a5996ae5ab..de2944e7fe 100644
--- a/source4/torture/basic/dir.c
+++ b/source4/torture/basic/dir.c
@@ -53,7 +53,8 @@ BOOL torture_dirtest1(int dummy)
asprintf(&fname, "\\%x", (int)random());
fnum = smbcli_open(cli->tree, fname, O_RDWR|O_CREAT, DENY_NONE);
if (fnum == -1) {
- fprintf(stderr,"Failed to open %s\n", fname);
+ fprintf(stderr,"(%s) Failed to open %s\n",
+ __location__, fname);
return False;
}
smbcli_close(cli->tree, fnum);
@@ -117,7 +118,8 @@ BOOL torture_dirtest2(int dummy)
fnum = smbcli_nt_create_full(cli->tree, fname, 0, GENERIC_RIGHTS_FILE_ALL_ACCESS, FILE_ATTRIBUTE_ARCHIVE,
NTCREATEX_SHARE_ACCESS_READ|NTCREATEX_SHARE_ACCESS_WRITE, NTCREATEX_DISP_OVERWRITE_IF, 0, 0);
if (fnum == -1) {
- fprintf(stderr,"Failed to open %s, error=%s\n", fname, smbcli_errstr(cli->tree));
+ fprintf(stderr,"(%s) Failed to open %s, error=%s\n",
+ __location__, fname, smbcli_errstr(cli->tree));
return False;
}
free(fname);
@@ -127,7 +129,8 @@ BOOL torture_dirtest2(int dummy)
char *fname;
asprintf(&fname, "\\LISTDIR\\d%d", i);
if (NT_STATUS_IS_ERR(smbcli_mkdir(cli->tree, fname))) {
- fprintf(stderr,"Failed to open %s, error=%s\n", fname, smbcli_errstr(cli->tree));
+ fprintf(stderr,"(%s) Failed to open %s, error=%s\n",
+ __location__, fname, smbcli_errstr(cli->tree));
return False;
}
free(fname);
@@ -139,8 +142,8 @@ BOOL torture_dirtest2(int dummy)
/* We should see (torture_entries) each of files & directories + . and .. */
if (num_seen != (2*torture_entries)+2) {
correct = False;
- fprintf(stderr,"entry count mismatch, should be %d, was %d\n",
- (2*torture_entries)+2, num_seen);
+ fprintf(stderr,"(%s) entry count mismatch, should be %d, was %d\n",
+ __location__, (2*torture_entries)+2, num_seen);
}
@@ -151,21 +154,22 @@ BOOL torture_dirtest2(int dummy)
printf("num_seen = %d\n", num_seen );
if (num_seen != torture_entries+2) {
correct = False;
- fprintf(stderr,"entry count mismatch, should be %d, was %d\n",
- torture_entries+2, num_seen);
+ fprintf(stderr,"(%s) entry count mismatch, should be %d, was %d\n",
+ __location__, torture_entries+2, num_seen);
}
num_seen = smbcli_list_old(cli->tree, "\\LISTDIR\\*", (FILE_ATTRIBUTE_ARCHIVE<<8)|FILE_ATTRIBUTE_DIRECTORY, list_fn, NULL);
printf("num_seen = %d\n", num_seen );
if (num_seen != torture_entries) {
correct = False;
- fprintf(stderr,"entry count mismatch, should be %d, was %d\n",
- torture_entries, num_seen);
+ fprintf(stderr,"(%s) entry count mismatch, should be %d, was %d\n",
+ __location__, torture_entries, num_seen);
}
/* Delete everything. */
if (smbcli_deltree(cli->tree, "\\LISTDIR") == -1) {
- fprintf(stderr,"Failed to deltree %s, error=%s\n", "\\LISTDIR", smbcli_errstr(cli->tree));
+ fprintf(stderr,"(%s) Failed to deltree %s, error=%s\n", "\\LISTDIR",
+ __location__, smbcli_errstr(cli->tree));
return False;
}