mirror of
https://github.com/samba-team/samba.git
synced 2024-12-22 13:34:15 +03:00
s4:torture: remove remaining checks if alloc_size is 0 on empty files
commit 55b2f247f9
already remove a few of these,
but a few remained.
Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
This commit is contained in:
parent
043ce404ca
commit
fba4b29085
@ -840,7 +840,6 @@ static bool test_ntcreatex(struct torture_context *tctx, struct smbcli_state *cl
|
||||
CHECK_ALL_INFO(io.ntcreatex.out.is_directory, directory);
|
||||
CHECK_VAL(io.ntcreatex.out.is_directory, 1);
|
||||
CHECK_VAL(io.ntcreatex.out.size, 0);
|
||||
CHECK_VAL(io.ntcreatex.out.alloc_size, 0);
|
||||
CHECK_VAL(io.ntcreatex.out.file_type, FILE_TYPE_DISK);
|
||||
smbcli_unlink(cli->tree, fname);
|
||||
|
||||
@ -1113,7 +1112,6 @@ static bool test_nttrans_create(struct torture_context *tctx, struct smbcli_stat
|
||||
CHECK_ALL_INFO(io.ntcreatex.out.is_directory, directory);
|
||||
CHECK_VAL(io.ntcreatex.out.is_directory, 1);
|
||||
CHECK_VAL(io.ntcreatex.out.size, 0);
|
||||
CHECK_VAL(io.ntcreatex.out.alloc_size, 0);
|
||||
CHECK_VAL(io.ntcreatex.out.file_type, FILE_TYPE_DISK);
|
||||
smbcli_unlink(cli->tree, fname);
|
||||
|
||||
|
@ -1193,7 +1193,6 @@ static bool test_smb2_open(struct torture_context *tctx,
|
||||
CHECK_ALL_INFO(io.smb2.out.alloc_size, alloc_size);
|
||||
CHECK_ALL_INFO(io.smb2.out.size, size);
|
||||
CHECK_VAL(io.smb2.out.size, 0);
|
||||
CHECK_VAL(io.smb2.out.alloc_size, 0);
|
||||
smb2_util_unlink(tree, fname);
|
||||
|
||||
done:
|
||||
|
@ -68,7 +68,9 @@
|
||||
#define CHECK_CREATED_SIZE(__io, __created, __attribute, __alloc_size, __size) \
|
||||
do { \
|
||||
CHECK_VAL((__io)->out.create_action, NTCREATEX_ACTION_ ## __created); \
|
||||
CHECK_VAL((__io)->out.alloc_size, (__alloc_size)); \
|
||||
if (__alloc_size != 0) { \
|
||||
CHECK_VAL((__io)->out.alloc_size, (__alloc_size)); \
|
||||
} \
|
||||
CHECK_VAL((__io)->out.size, (__size)); \
|
||||
CHECK_VAL((__io)->out.file_attr, (__attribute)); \
|
||||
CHECK_VAL((__io)->out.reserved2, 0); \
|
||||
@ -1879,7 +1881,6 @@ static bool test_durable_open_file_position(struct torture_context *tctx,
|
||||
CHECK_VAL(io.out.oplock_level, SMB2_OPLOCK_LEVEL_BATCH);
|
||||
CHECK_VAL(io.out.reserved, 0x00);
|
||||
CHECK_VAL(io.out.create_action, NTCREATEX_ACTION_EXISTED);
|
||||
CHECK_VAL(io.out.alloc_size, 0);
|
||||
CHECK_VAL(io.out.size, 0);
|
||||
CHECK_VAL(io.out.file_attr, FILE_ATTRIBUTE_ARCHIVE);
|
||||
CHECK_VAL(io.out.reserved2, 0);
|
||||
|
@ -66,7 +66,6 @@
|
||||
do { \
|
||||
CHECK_VAL((__io)->out.create_action, \
|
||||
NTCREATEX_ACTION_ ## __created); \
|
||||
CHECK_VAL((__io)->out.alloc_size, 0); \
|
||||
CHECK_VAL((__io)->out.size, 0); \
|
||||
CHECK_VAL((__io)->out.file_attr, (__attribute)); \
|
||||
CHECK_VAL((__io)->out.reserved2, 0); \
|
||||
|
@ -78,8 +78,6 @@ static bool test_close_no_attrib(struct torture_context *tctx,
|
||||
ret, done, "Unexpected write time\n");
|
||||
torture_assert_u64_equal_goto(tctx, c.out.change_time, NTTIME_OMIT,
|
||||
ret, done, "Unexpected change time\n");
|
||||
torture_assert_u64_equal_goto(tctx, c.out.alloc_size, 0,
|
||||
ret, done, "Unexpected allocation size\n");
|
||||
torture_assert_u64_equal_goto(tctx, c.out.size, 0,
|
||||
ret, done, "Unexpected size\n");
|
||||
torture_assert_u64_equal_goto(tctx, c.out.file_attr, 0,
|
||||
|
Loading…
Reference in New Issue
Block a user