zdtm: Fix unlink_multiple_largefiles compilation on ppc64

Submitted by Vitaly Ostrosablin on April 6, 2018, 2:19 p.m.

Details

Message ID 20180406141920.26369-1-vostrosablin@virtuozzo.com
State Accepted
Series "zdtm: Fix unlink_multiple_largefiles compilation on ppc64"
Headers show

Commit Message

Vitaly Ostrosablin April 6, 2018, 2:19 p.m.
Compiler wants arguments, explicitly casted to (long long) for %llx
specifier.

Signed-off-by: Vitaly Ostrosablin <vostrosablin@virtuozzo.com>
---
 test/zdtm/static/unlink_multiple_largefiles.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

Patch hide | download patch | download mbox

diff --git a/test/zdtm/static/unlink_multiple_largefiles.c b/test/zdtm/static/unlink_multiple_largefiles.c
index 0db50b0b..e0c53d1d 100644
--- a/test/zdtm/static/unlink_multiple_largefiles.c
+++ b/test/zdtm/static/unlink_multiple_largefiles.c
@@ -83,21 +83,21 @@  void check_extent_map(struct fiemap *map)
 	for (i = 0; i < map->fm_mapped_extents; i++) {
 		test_msg("Extent %d, start %llx, length %llx\n",
 			i,
-			map->fm_extents[i].fe_logical,
-			map->fm_extents[i].fe_length);
+			(long long) map->fm_extents[i].fe_logical,
+			(long long) map->fm_extents[i].fe_length);
 
 		if (i == 0)
 			holesize = map->fm_extents[i].fe_logical;
 		datasize += map->fm_extents[i].fe_length;
 	}
 	if (holesize != FSIZE) {
-		pr_perror("Unexpected hole size %llx != %llx\n", holesize,
-				(unsigned long long) FSIZE);
+		pr_perror("Unexpected hole size %llx != %llx\n",
+			  (long long) holesize, (unsigned long long) FSIZE);
 		exit(1);
 	}
 	if (datasize != BUFSIZE) {
-		pr_perror("Unexpected data size %llx != %llx\n", datasize,
-				(unsigned long long) BUFSIZE);
+		pr_perror("Unexpected data size %llx != %llx\n",
+			  (long long) datasize, (unsigned long long) BUFSIZE);
 		exit(1);
 	}
 }

Comments

Cyrill Gorcunov April 6, 2018, 2:28 p.m.
On Fri, Apr 06, 2018 at 05:19:20PM +0300, Vitaly Ostrosablin wrote:
> Compiler wants arguments, explicitly casted to (long long) for %llx
> specifier.
> 
> Signed-off-by: Vitaly Ostrosablin <vostrosablin@virtuozzo.com>
Acked-by: Cyrill Gorcunov <gorcunov@openvz.org>

This should fix problem with running tests on ppc64
https://travis-ci.org/checkpoint-restore/criu/builds/362941485