• Cyrill Gorcunov's avatar
    fault-injection: Add FI_HUGE_ANON_SHMEM_ID type · c94fb7d0
    Cyrill Gorcunov authored
    To test if we can survive with shmid more than 4 bytes
    long in image formats.
    
    Without the fix for shmid
    
     | [root@uranus criu] test/zdtm.py run -t zdtm/static/maps01 --fault 132 -f h -k always
     | === Run 1/1 ================ zdtm/static/maps01
     |
     | ========================= Run zdtm/static/maps01 in h ==========================
     | Start test
     | Test is SUID
     | ./maps01 --pidfile=maps01.pid --outfile=maps01.out
     | Run criu dump
     | Forcing 132 fault
     | Run criu restore
     | Forcing 132 fault
     | =[log]=> dump/zdtm/static/maps01/36/1/restore.log
     | ------------------------ grep Error ------------------------
     | (00.016464)     37: Opening 0x007f39c04b5000-0x007f3a004b5000 0000000000000000 (101) vma
     | (00.016465)     37: Search for 0x007f39c04b5000 shmem 0x10118e915 0x7f97f7ae4ae8/36
     | (00.016470)     37: Waiting for the 10118e915 shmem to appear
     | (00.016479)     36: No pagemap-shmem-18409749.img image
     | (00.016481)     36: Error (criu/shmem.c:559): Can't restore shmem content
     | (00.016501)     36: Error (criu/mem.c:1208): `- Can't open vma
     | (00.016552) Error (criu/cr-restore.c:2449): Restoring FAILED.
     | ------------------------ ERROR OVER ------------------------
    
    And with the fix
    
     | [root@uranus criu] test/zdtm.py run -t zdtm/static/maps01 --fault 132 -f h -k always
     | === Run 1/1 ================ zdtm/static/maps01
     |
     | ========================= Run zdtm/static/maps01 in h ==========================
     | Start test
     | Test is SUID
     | ./maps01 --pidfile=maps01.pid --outfile=maps01.out
     | Run criu dump
     | Forcing 132 fault
     | Run criu restore
     | Forcing 132 fault
     | Send the 15 signal to  36
     | Wait for zdtm/static/maps01(36) to die for 0.100000
     | ========================= Test zdtm/static/maps01 PASS =========================
    Signed-off-by: 's avatarCyrill Gorcunov <gorcunov@openvz.org>
    Signed-off-by: 's avatarAndrei Vagin <avagin@virtuozzo.com>
    c94fb7d0
fault-injection.h 1019 Bytes