mirror of
https://github.com/qilingframework/qiling.git
synced 2026-10-12 02:21:40 +00:00
Set x86 tests that use SSE to a CPU model that supports it
This commit is contained in:
@@ -14,6 +14,8 @@ import unittest
|
||||
|
||||
from typing import List
|
||||
|
||||
from qiling.arch.models import X86_CPU_MODEL
|
||||
|
||||
sys.path.append("..")
|
||||
from qiling import Qiling
|
||||
from qiling.const import *
|
||||
@@ -76,7 +78,7 @@ class ELFTest(unittest.TestCase):
|
||||
|
||||
logged.extend(content.decode().splitlines())
|
||||
|
||||
ql = Qiling([fr'{X86_LINUX_ROOTFS}/bin/x86_multithreading'], X86_LINUX_ROOTFS, multithread=True, verbose=QL_VERBOSE.DEBUG)
|
||||
ql = Qiling([fr'{X86_LINUX_ROOTFS}/bin/x86_multithreading'], X86_LINUX_ROOTFS, cputype=X86_CPU_MODEL.INTEL_HASWELL, multithread=True, verbose=QL_VERBOSE.DEBUG)
|
||||
|
||||
ql.os.stats = QlOsNullStats()
|
||||
ql.os.set_syscall("write", check_write, QL_INTERCEPT.ENTER)
|
||||
@@ -114,7 +116,7 @@ class ELFTest(unittest.TestCase):
|
||||
|
||||
logged.extend(content.decode().splitlines())
|
||||
|
||||
ql = Qiling([fr'{X64_LINUX_ROOTFS}/bin/x8664_multithreading'], X64_LINUX_ROOTFS, multithread=True, verbose=QL_VERBOSE.DEBUG)
|
||||
ql = Qiling([fr'{X64_LINUX_ROOTFS}/bin/x8664_multithreading'], X64_LINUX_ROOTFS, cputype=X86_CPU_MODEL.INTEL_HASWELL, multithread=True, verbose=QL_VERBOSE.DEBUG)
|
||||
|
||||
ql.os.stats = QlOsNullStats()
|
||||
ql.os.set_syscall("write", check_write, QL_INTERCEPT.ENTER)
|
||||
|
||||
+7
-2
@@ -6,19 +6,24 @@
|
||||
import unittest
|
||||
|
||||
import sys
|
||||
|
||||
sys.path.append("..")
|
||||
|
||||
from qiling import Qiling
|
||||
from qiling.arch.models import X86_CPU_MODEL
|
||||
from qiling.const import QL_VERBOSE
|
||||
|
||||
|
||||
ROOTFS = r'../examples/rootfs/x8664_macos'
|
||||
|
||||
|
||||
class MACHOTest(unittest.TestCase):
|
||||
def test_macho_macos_x8664(self):
|
||||
ql = Qiling(["../examples/rootfs/x8664_macos/bin/x8664_hello"], "../examples/rootfs/x8664_macos", verbose=QL_VERBOSE.DEBUG)
|
||||
ql = Qiling([fr'{ROOTFS}/bin/x8664_hello'], ROOTFS, cputype=X86_CPU_MODEL.INTEL_HASWELL, verbose=QL_VERBOSE.DEBUG)
|
||||
ql.run()
|
||||
|
||||
def test_usercorn_x8664(self):
|
||||
ql = Qiling(["../examples/rootfs/x8664_macos/bin/x8664_hello_usercorn"], "../examples/rootfs/x8664_macos", verbose=QL_VERBOSE.DEBUG)
|
||||
ql = Qiling([fr'{ROOTFS}/bin/x8664_hello_usercorn'], ROOTFS, cputype=X86_CPU_MODEL.INTEL_HASWELL, verbose=QL_VERBOSE.DEBUG)
|
||||
ql.run()
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user