summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source4/torture/smb2/getinfo.c9
-rw-r--r--source4/torture/smb2/setinfo.c9
2 files changed, 16 insertions, 2 deletions
diff --git a/source4/torture/smb2/getinfo.c b/source4/torture/smb2/getinfo.c
index dac6225381..865f85a8ff 100644
--- a/source4/torture/smb2/getinfo.c
+++ b/source4/torture/smb2/getinfo.c
@@ -113,13 +113,17 @@ static BOOL torture_smb2_fileinfo(struct smb2_tree *tree)
file_levels[i].finfo.generic.in.file.handle = hfile;
file_levels[i].fstatus = smb2_getinfo_file(tree, tree, &file_levels[i].finfo);
if (!NT_STATUS_IS_OK(file_levels[i].fstatus)) {
- printf("%s failed on file - %s\n", file_levels[i].name, nt_errstr(file_levels[i].fstatus));
+ printf("(%s) %s failed on file - %s\n", __location__,
+ file_levels[i].name, nt_errstr(file_levels[i].fstatus));
+ goto failed;
}
file_levels[i].dinfo.generic.level = file_levels[i].level;
file_levels[i].dinfo.generic.in.file.handle = hdir;
file_levels[i].dstatus = smb2_getinfo_file(tree, tree, &file_levels[i].dinfo);
if (!NT_STATUS_IS_OK(file_levels[i].dstatus)) {
- printf("%s failed on dir - %s\n", file_levels[i].name, nt_errstr(file_levels[i].dstatus));
+ printf("(%s) %s failed on dir - %s\n", __location__,
+ file_levels[i].name, nt_errstr(file_levels[i].dstatus));
+ goto failed;
}
}
@@ -152,6 +156,7 @@ static BOOL torture_smb2_fsinfo(struct smb2_tree *tree)
fs_levels[i].status = smb2_getinfo_fs(tree, tree, &fs_levels[i].info);
if (!NT_STATUS_IS_OK(fs_levels[i].status)) {
printf("%s failed - %s\n", fs_levels[i].name, nt_errstr(fs_levels[i].status));
+ return False;
}
}
diff --git a/source4/torture/smb2/setinfo.c b/source4/torture/smb2/setinfo.c
index 6db50eae99..00b4fb47d0 100644
--- a/source4/torture/smb2/setinfo.c
+++ b/source4/torture/smb2/setinfo.c
@@ -89,6 +89,7 @@ BOOL torture_smb2_setinfo(struct torture_context *torture)
printf("(%s) %s - %s (should be %s)\n", __location__, #call, \
nt_errstr(status), nt_errstr(rightstatus)); \
ret = False; \
+ goto done; \
} \
} while (0)
@@ -99,6 +100,8 @@ BOOL torture_smb2_setinfo(struct torture_context *torture)
status2 = smb2_getinfo_file(tree, mem_ctx, &finfo2); \
if (!NT_STATUS_IS_OK(status2)) { \
printf("(%s) %s - %s\n", __location__, #call, nt_errstr(status2)); \
+ ret = False; \
+ goto done; \
} \
}} while (0)
@@ -109,6 +112,8 @@ BOOL torture_smb2_setinfo(struct torture_context *torture)
call_name, #stype, #field, \
(uint_t)value, (uint_t)finfo2.stype.out.field); \
torture_smb2_all_info(tree, handle); \
+ ret = False; \
+ goto done; \
}} while (0)
#define CHECK_TIME(call, stype, field, value) do { \
@@ -121,6 +126,8 @@ BOOL torture_smb2_setinfo(struct torture_context *torture)
printf("\t%s", timestring(mem_ctx, value)); \
printf("\t%s\n", nt_time_string(mem_ctx, finfo2.stype.out.field)); \
torture_smb2_all_info(tree, handle); \
+ ret = False; \
+ goto done; \
}} while (0)
#define CHECK_STR(call, stype, field, value) do { \
@@ -131,6 +138,8 @@ BOOL torture_smb2_setinfo(struct torture_context *torture)
value, \
finfo2.stype.out.field); \
torture_smb2_all_info(tree, handle); \
+ ret = False; \
+ goto done; \
}} while (0)
#define CHECK_STATUS(status, correct) do { \