From: Andreas Schneider Date: Tue, 11 Dec 2018 09:34:21 +0000 (+0100) Subject: s4:torture: Do not check if the alloc_size is 0 on empty files X-Git-Tag: tdb-1.3.17~356 X-Git-Url: http://git.samba.org/samba.git/?p=vlendec%2Fsamba-autobuild%2F.git;a=commitdiff_plain;h=55b2f247f9ba56516efba52481418966a777343e s4:torture: Do not check if the alloc_size is 0 on empty files The allocation size might not be zero. This depends on the file system behavior and also on the size of the extended attributes stored on the file. E.g. If a large user.DOSATTRIB xattr is stored on XFS/ext4 then 8 blocks are used and we will round up to several megabytes. Signed-off-by: Andreas Schneider Reviewed-by: David Disseldorp Reviewed-by: Ralph Boehme --- diff --git a/source4/torture/smb2/durable_open.c b/source4/torture/smb2/durable_open.c index 17b3b217b56..229c39dce67 100644 --- a/source4/torture/smb2/durable_open.c +++ b/source4/torture/smb2/durable_open.c @@ -60,7 +60,6 @@ #define CHECK_CREATED(__io, __created, __attribute) \ 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); \ diff --git a/source4/torture/smb2/durable_v2_open.c b/source4/torture/smb2/durable_v2_open.c index 25e6d27465a..7609987e31f 100644 --- a/source4/torture/smb2/durable_v2_open.c +++ b/source4/torture/smb2/durable_v2_open.c @@ -45,7 +45,6 @@ #define CHECK_CREATED(__io, __created, __attribute) \ 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); \ diff --git a/source4/torture/smb2/lease.c b/source4/torture/smb2/lease.c index bf45988222a..430fcd0a6e1 100644 --- a/source4/torture/smb2/lease.c +++ b/source4/torture/smb2/lease.c @@ -49,7 +49,6 @@ #define CHECK_CREATED(__io, __created, __attribute) \ 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); \ diff --git a/source4/torture/smb2/replay.c b/source4/torture/smb2/replay.c index 2ef40445aee..443d372a1d7 100644 --- a/source4/torture/smb2/replay.c +++ b/source4/torture/smb2/replay.c @@ -52,7 +52,6 @@ #define CHECK_CREATED(__io, __created, __attribute) \ 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); \ diff --git a/source4/torture/smb2/session.c b/source4/torture/smb2/session.c index 3917e0c09c4..6d5f7b8594e 100644 --- a/source4/torture/smb2/session.c +++ b/source4/torture/smb2/session.c @@ -38,8 +38,6 @@ torture_assert_int_equal(tctx, (__io)->out.create_action, \ NTCREATEX_ACTION_ ## __created, \ "out.create_action incorrect"); \ - torture_assert_int_equal(tctx, (__io)->out.alloc_size, 0, \ - "out.alloc_size incorrect"); \ torture_assert_int_equal(tctx, (__io)->out.size, 0, \ "out.size incorrect"); \ torture_assert_int_equal(tctx, (__io)->out.file_attr, \