torture4: Fix systems with a 32-bit "long"
authorVolker Lendecke <vl@samba.org>
Tue, 10 Mar 2015 10:52:36 +0000 (11:52 +0100)
committerVolker Lendecke <vl@samba.org>
Tue, 10 Mar 2015 17:05:13 +0000 (18:05 +0100)
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan (metze) Metzmacher <metze@samba.org>
Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Tue Mar 10 18:05:13 CET 2015 on sn-devel-104

source4/torture/smb2/ioctl.c

index 43f98be1950d4cce4dd220c6273330b60b267290..78bbdd9276b5cfbfc7f7ff69065934070887196e 100644 (file)
@@ -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@0 resulted in "
-                                       "deallocation of %lu@0\n", hlen,
-                                       far_rsp[0].file_off);
+                       torture_comment(torture, "hole punch %ju@0 resulted in "
+                                       "deallocation of %ju@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);