mirror of
https://github.com/checkpoint-restore/criu
synced 2025-09-02 23:35:21 +00:00
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: Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
This commit is contained in:
committed by
Pavel Emelyanov
parent
55b51d8f74
commit
781cf5d31b
@@ -107,6 +107,9 @@ static int make_map(struct map *map)
|
|||||||
datagen(map->ptr, ONE_MAP_SIZE, &crc);
|
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;
|
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 (datachk(map->ptr, ONE_MAP_SIZE, &crc)) /* perform read access */
|
||||||
if (!(map->flag & MAP_ANONYMOUS) ||
|
if (!(map->flag & MAP_ANONYMOUS) ||
|
||||||
(map->prot & PROT_WRITE)) { /* anon maps could only be filled when r/w */
|
(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;
|
return -1;
|
||||||
}
|
}
|
||||||
/* prot |= PROT_READ// need barrier before this line,
|
/* prot |= PROT_READ// need barrier before this line,
|
||||||
|
Reference in New Issue
Block a user