summaryrefslogtreecommitdiff
path: root/source4/torture/raw/setfileinfo.c
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2005-08-04 04:20:26 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:31:10 -0500
commit8a0b044d20ae49819f26d68499bef0d869bcf143 (patch)
tree428a93bcdd6413906eb96aaf70f5e4b16960320c /source4/torture/raw/setfileinfo.c
parentdf9b8edff5c4015a06a12e13d14dd08c05ceb25c (diff)
downloadsamba-8a0b044d20ae49819f26d68499bef0d869bcf143.tar.gz
samba-8a0b044d20ae49819f26d68499bef0d869bcf143.tar.bz2
samba-8a0b044d20ae49819f26d68499bef0d869bcf143.zip
r9042: fixed the valgrind error in the RAW-SFILEINFO test
(This used to be commit eaf079e33f3e2d933b7310cf076d572b6988cbb4)
Diffstat (limited to 'source4/torture/raw/setfileinfo.c')
-rw-r--r--source4/torture/raw/setfileinfo.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/source4/torture/raw/setfileinfo.c b/source4/torture/raw/setfileinfo.c
index d34921806a..c18a607f11 100644
--- a/source4/torture/raw/setfileinfo.c
+++ b/source4/torture/raw/setfileinfo.c
@@ -174,6 +174,14 @@ BOOL torture_raw_sfileinfo(void)
dump_all_info(mem_ctx, &finfo1); \
}} while (0)
+#define CHECK_STATUS(status, correct) do { \
+ if (!NT_STATUS_EQUAL(status, correct)) { \
+ printf("(%s) Incorrect status %s - should be %s\n", \
+ __location__, nt_errstr(status), nt_errstr(correct)); \
+ ret = False; \
+ goto done; \
+ }} while (0)
+
printf("test setattr\n");
sfinfo.setattr.in.attrib = FILE_ATTRIBUTE_READONLY;
@@ -485,6 +493,7 @@ BOOL torture_raw_sfileinfo(void)
printf("Trying rename with a root fid\n");
status = create_directory_handle(cli->tree, BASEDIR, &d_fnum);
+ CHECK_STATUS(status, NT_STATUS_OK);
sfinfo.rename_information.in.new_name = fnum_fname_new+strlen(BASEDIR)+1;
sfinfo.rename_information.in.root_fid = d_fnum;
CHECK_CALL_FNUM(RENAME_INFORMATION, NT_STATUS_INVALID_PARAMETER);