[CRIU] [PATCH] zdtm: maps00 -- Add more detailed output
Cyrill Gorcunov
gorcunov at openvz.org
Wed Jun 26 03:07:33 EDT 2013
For easier detection where exactly test fails.
| 665: map: ptr 0x7fa96bbe4000 flag 2 prot 0
| 665: map: ptr 0x7fa96bbe2000 flag 1 prot 0
| 665: map: ptr 0x7fa96bbe0000 flag 22 prot 0
| 665: map: ptr 0x7fa96bbdb000 flag 21 prot 0
...
| 665: Read: 0, Expected: 553e7b06
| 665: Read: 0, Expected: 553e7b06
| 665: Read: 0, Expected: 553e7b06
| 665: FAIL: maps00.c:145: CRC mismatch: ptr 0x7fa96bbcb000 flag 21 prot 3
Signed-off-by: Cyrill Gorcunov <gorcunov at openvz.org>
---
test/zdtm/live/static/maps00.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/test/zdtm/live/static/maps00.c b/test/zdtm/live/static/maps00.c
index cedb868..35b55a7 100644
--- a/test/zdtm/live/static/maps00.c
+++ b/test/zdtm/live/static/maps00.c
@@ -107,6 +107,9 @@ static int make_map(struct map *map)
datagen(map->ptr, ONE_MAP_SIZE, &crc);
}
+ test_msg("map: ptr %p flag %8x prot %8x\n",
+ map->ptr, map->flag, map->prot);
+
return 0;
}
@@ -139,7 +142,8 @@ static int check_map(struct map *map)
if (datachk(map->ptr, ONE_MAP_SIZE, &crc)) /* perform read access */
if (!(map->flag & MAP_ANONYMOUS) ||
(map->prot & PROT_WRITE)) { /* anon maps could only be filled when r/w */
- fail("CRC mismatch\n");
+ fail("CRC mismatch: ptr %p flag %8x prot %8x\n",
+ map->ptr, map->flag, map->prot);
return -1;
}
/* prot |= PROT_READ// need barrier before this line,
--
1.8.1.4
More information about the CRIU
mailing list