Commit 781cf5d3 authored by Cyrill Gorcunov's avatar Cyrill Gorcunov Committed by Pavel Emelyanov

zdtm: maps00 -- Add more detailed output

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: 's avatarCyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
parent 55b51d8f
......@@ -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,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment