mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 02:01:24 +01:00
tools/tests: Fix paging-mempool xen_pfn_t format strings
xen_pfn_t is not an unsigned long on all architectures. In particular,
Arm32 builds see it as a 64-bit type, so printing it with %lx triggers
a -Werror=format build failure.
Use PRI_xen_pfn for the GFN diagnostics instead.
Fixes: 66c982a5d3 ("tests/paging-mempool: Extend to test P2M relocation")
Signed-off-by: Luca Fancellu <luca.fancellu@arm.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
This commit is contained in:
1 parent
bcbef3bdbd
commit
71f8fd5a64
1 file changed
+2
-2
@@ -208,7 +208,7 @@ static int check_guest_marks(xen_pfn_t gfn, uint32_t mark_start, size_t count)
|
||||
if ( errs[i] )
|
||||
{
|
||||
rc = -1;
|
||||
fail(" Fail: check mark unable to map gfn %05lx: %d\n",
|
||||
fail(" Fail: check mark unable to map gfn %05"PRI_xen_pfn": %d\n",
|
||||
gfns[i], errs[i]);
|
||||
continue;
|
||||
}
|
||||
@@ -216,7 +216,7 @@ static int check_guest_marks(xen_pfn_t gfn, uint32_t mark_start, size_t count)
|
||||
if ( *mark == exp )
|
||||
continue;
|
||||
|
||||
fail(" Fail: check mark: gfn %05lx expecting %08x (%u), got %08x (%u)\n",
|
||||
fail(" Fail: check mark: gfn %05"PRI_xen_pfn" expecting %08x (%u), got %08x (%u)\n",
|
||||
gfns[i], exp, ~exp, *mark, ~*mark);
|
||||
rc = -1;
|
||||
}
|
||||
|
||||