[PATCH] torture4: Fix systems with a 32-bit "long"
Volker Lendecke
Volker.Lendecke at SerNet.DE
Tue Mar 10 04:53:44 MDT 2015
Hi!
Review&push appreciated!
Thanks,
Volker
--
SerNet GmbH, Bahnhofsallee 1b, 37081 Göttingen
phone: +49-551-370000-0, fax: +49-551-370000-9
AG Göttingen, HRB 2816, GF: Dr. Johannes Loxen
http://www.sernet.de, mailto:kontakt at sernet.de
-------------- next part --------------
From 9472d8ac053a33cc10dfd9f093caccb408578086 Mon Sep 17 00:00:00 2001
From: Volker Lendecke <vl at samba.org>
Date: Tue, 10 Mar 2015 11:52:36 +0100
Subject: [PATCH] torture4: Fix systems with a 32-bit "long"
Signed-off-by: Volker Lendecke <vl at samba.org>
---
source4/torture/smb2/ioctl.c | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/source4/torture/smb2/ioctl.c b/source4/torture/smb2/ioctl.c
index 43f98be..78bbdd9 100644
--- a/source4/torture/smb2/ioctl.c
+++ b/source4/torture/smb2/ioctl.c
@@ -3435,9 +3435,10 @@ static bool test_ioctl_sparse_hole_dealloc(struct torture_context *torture,
* deallocation on this FS...
*/
dealloc_chunk_len = hlen;
- torture_comment(torture, "hole punch %lu at 0 resulted in "
- "deallocation of %lu at 0\n", hlen,
- far_rsp[0].file_off);
+ torture_comment(torture, "hole punch %ju at 0 resulted in "
+ "deallocation of %ju at 0\n",
+ (uintmax_t)hlen,
+ (uintmax_t)far_rsp[0].file_off);
torture_assert_u64_equal(torture,
file_size - far_rsp[0].len,
far_rsp[0].file_off,
@@ -3509,7 +3510,7 @@ static bool test_ioctl_sparse_hole_dealloc(struct torture_context *torture,
"unexpected response len");
if (far_rsp[0].file_off == dealloc_chunk_len) {
torture_comment(torture, "holes merged for deallocation of "
- "%lu chunk\n", dealloc_chunk_len);
+ "%ju chunk\n", (uintmax_t)dealloc_chunk_len);
torture_assert_u64_equal(torture,
file_size - far_rsp[0].len,
far_rsp[0].file_off,
@@ -4630,7 +4631,7 @@ static bool test_ioctl_sparse_qar_overflow(struct torture_context *torture,
/* off + length wraps around to 511 */
far_buf.file_off = 512;
- far_buf.len = (uint64_t)0xffffffffffffffff;
+ far_buf.len = 0xffffffffffffffffLL;
ndr_ret = ndr_push_struct_blob(&ioctl.smb2.in.out, tmp_ctx,
&far_buf,
(ndr_push_flags_fn_t)ndr_push_file_alloced_range_buf);
--
1.8.5.3
More information about the samba-technical
mailing list