From 7ec987e626823053ed36134fc540cd220d562bfc Mon Sep 17 00:00:00 2001 From: mio Date: Sat, 15 Feb 2025 20:17:18 +0800 Subject: [PATCH] Basic test for previous regression --- tests/regress/test_old_ctl.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 tests/regress/test_old_ctl.py diff --git a/tests/regress/test_old_ctl.py b/tests/regress/test_old_ctl.py new file mode 100644 index 00000000..5d84aa42 --- /dev/null +++ b/tests/regress/test_old_ctl.py @@ -0,0 +1,14 @@ +import regress +from unicorn import * +from unicorn.x86_const import * + +# Very basic testing to ensure the old api exists +# and we correctly implement __deprecated +class OldCtl(regress.RegressTest): + def runTest(self): + mu = Uc(UC_ARCH_X86, UC_MODE_32) + mu.ctl_tlb_mode(UC_TLB_CPU) + mu.ctl_set_tlb_mode(UC_TLB_VIRTUAL) + +if __name__ == '__main__': + regress.main()