- Switched to the ubuntu-24.04-arm runner - Bumped Windows runner to windows-2022 and Visual Studio 17 2022 GENERATORS - Minor changes about checks in workflow jobs - Fixed the pagefile job (even though should not be really needed) - Refreshed the TO BE CHECKED regress tests to either update or remove the skip conditions - Added a test to check if the created sdist archive is ok
33 lines
942 B
Python
Executable File
33 lines
942 B
Python
Executable File
import regress
|
|
from unicorn import *
|
|
from unicorn.arm_const import *
|
|
|
|
|
|
class MovHang(regress.RegressTest):
|
|
|
|
# NOTE: This test was failing when workflow was using ubuntu-latest + qemu. Fixed once switched to native arm runner
|
|
def runTest(self):
|
|
uc = Uc(UC_ARCH_ARM, UC_MODE_ARM)
|
|
uc.mem_map(0x1000, 0x1000)
|
|
uc.mem_write(0x1000, b'\x00\xc0\x00\xe3') # movw r12, #0
|
|
|
|
def hook_block(uc, addr, *args):
|
|
regress.logger.debug('enter block 0x%#06x', addr)
|
|
uc.count += 1
|
|
|
|
uc.reg_write(UC_ARM_REG_R12, 0x123)
|
|
self.assertEqual(0x123, uc.reg_read(UC_ARM_REG_R12))
|
|
|
|
uc.hook_add(UC_HOOK_BLOCK, hook_block)
|
|
uc.count = 0
|
|
|
|
# print 'block should only run once'
|
|
uc.emu_start(0x1000, 0x1004, timeout=500)
|
|
|
|
self.assertEqual(0x0, uc.reg_read(UC_ARM_REG_R12))
|
|
self.assertEqual(uc.count, 1)
|
|
|
|
|
|
if __name__ == '__main__':
|
|
regress.main()
|