예제 #1
0
    def _check_jvmci_server_enabled(self):
        """Runs fake benchmark crashing if the Graal JVMCI JIT is disabled"""

        ep = EntryPoint("JavaCheckJVMCIServerEnabled",
                        subdir=VM_SANITY_CHECKS_DIR)
        spawn_sanity_check(self.platform, ep, self,
                           "JavaCheckJVMCIServerEnabled")
예제 #2
0
    def test_sync_disks0002(self, monkeypatch):
        """We throw away the results from sanity checks, so there's no need to
        sync disks (and wait)."""

        stdout = json.dumps({
            "wallclock_times": [123.4],
            "core_cycle_counts": [[1], [2], [3], [4]],
            "aperf_counts": [[5], [6], [7], [8]],
            "mperf_counts": [[9], [10], [11], [12]],
        })

        config = Config()
        platform = MockPlatform(None, config)
        ep = EntryPoint("test")
        vm_def = PythonVMDef('/dummy/bin/python')

        sync_called = [False]

        def fake_sync_disks():
            sync_called[0] = True

        monkeypatch.setattr(platform, "sync_disks", fake_sync_disks)

        def fake_run_exec_popen(args, stderr_file=None):
            return stdout, "", 0, False  # stdout, stderr, exit_code, timed_out

        monkeypatch.setattr(vm_def, "_run_exec_popen", fake_run_exec_popen)

        util.spawn_sanity_check(platform, ep, vm_def, "test")
        assert sync_called == [False]
예제 #3
0
    def test_sync_disks0002(self, monkeypatch):
        """We throw away the results from sanity checks, so there's no need to
        sync disks (and wait)."""

        stdout = json.dumps({
            "wallclock_times": [123.4],
            "core_cycle_counts": [[1], [2], [3], [4]],
            "aperf_counts": [[5], [6], [7], [8]],
            "mperf_counts": [[9], [10], [11], [12]],
        })

        config = Config()
        platform = MockPlatform(None, config)
        ep = EntryPoint("test")
        vm_def = PythonVMDef('/dummy/bin/python')

        sync_called = [False]
        def fake_sync_disks():
            sync_called[0] = True
        monkeypatch.setattr(platform, "sync_disks", fake_sync_disks)

        def fake_run_exec_popen(args, stderr_file=None):
            return stdout, "", 0  # stdout, stderr, exit_code

        monkeypatch.setattr(vm_def, "_run_exec_popen", fake_run_exec_popen)

        util.spawn_sanity_check(platform, ep, vm_def, "test")
        assert sync_called == [False]
예제 #4
0
파일: vm_defs.py 프로젝트: bennn/krun
    def _check_truffle_enabled(self):
        """Runs fake benchmark crashing if the Truffle is disabled in JRuby"""

        debug("Running jruby_check_truffle_enabled sanity check")
        ep = EntryPoint("jruby_check_graal_enabled.rb")
        spawn_sanity_check(self.platform, ep, self,
                           "jruby_check_graal_enabled.rb", force_dir=VM_SANITY_CHECKS_DIR)
예제 #5
0
    def _sanity_check_scheduler(self):
        from krun.vm_defs import NativeCodeVMDef
        from krun import EntryPoint

        ep = EntryPoint("check_linux_scheduler.so")
        vd = NativeCodeVMDef()
        util.spawn_sanity_check(self, ep, vd, "Scheduler",
                                force_dir=PLATFORM_SANITY_CHECK_DIR)
예제 #6
0
    def _sanity_check_cpu_affinity(self):
        from krun.vm_defs import NativeCodeVMDef
        from krun import EntryPoint

        ep = EntryPoint("check_linux_cpu_affinity.so")
        vd = NativeCodeVMDef()
        util.spawn_sanity_check(self, ep, vd, "CPU affinity",
                                force_dir=PLATFORM_SANITY_CHECK_DIR)
예제 #7
0
    def _sanity_check_nice_priority(self):
        from krun.vm_defs import NativeCodeVMDef
        from krun import EntryPoint

        ep = EntryPoint("check_nice_priority.so")
        vd = NativeCodeVMDef()
        util.spawn_sanity_check(self, ep, vd, "Process priority",
                                force_dir=PLATFORM_SANITY_CHECK_DIR)
예제 #8
0
    def _sanity_check_user_change(self):
        from krun.vm_defs import PythonVMDef
        from krun import EntryPoint

        ep = EntryPoint("check_user_change.py")
        vd = PythonVMDef(sys.executable)  # run under the VM that runs *this*
        util.spawn_sanity_check(self, ep, vd, "UNIX user change",
                                force_dir=PLATFORM_SANITY_CHECK_DIR)
예제 #9
0
파일: vm_defs.py 프로젝트: softdevteam/krun
    def _check_truffle_enabled(self):
        """Runs fake benchmark crashing if the Truffle is disabled in
        TruffleRuby"""

        debug("Running truffleruby_check_truffle_enabled sanity check")
        ep = EntryPoint("truffleruby_check_graal_enabled.rb")
        spawn_sanity_check(self.platform, ep, self,
                           "truffleruby_check_graal_enabled.rb",
                           force_dir=VM_SANITY_CHECKS_DIR)
예제 #10
0
    def _malloc_options_sanity_check(self):
        """Checks MALLOC_OPTIONS are set"""

        from krun import EntryPoint
        ep = EntryPoint("check_openbsd_malloc_options.so")

        from krun.vm_defs import NativeCodeVMDef, SANITY_CHECK_HEAP_KB
        vd = NativeCodeVMDef()

        util.spawn_sanity_check(self, ep, vd, "OpenBSD malloc options",
                                force_dir=PLATFORM_SANITY_CHECK_DIR)
예제 #11
0
    def test_sync_disks0002(self, monkeypatch):
        """We throw away the results from sanity checks, so there's no need to
        sync disks (and wait)."""

        platform = MockPlatform(None)
        ep = EntryPoint("test")
        vm_def = PythonVMDef('/dummy/bin//python')

        sync_called = [False]
        def fake_sync_disks():
            sync_called[0] = True
        monkeypatch.setattr(platform, "sync_disks", fake_sync_disks)

        def fake_run_exec_popen(args):
            return "[1]", "", 0  # stdout, stderr, exit_code
        monkeypatch.setattr(vm_def, "_run_exec_popen", fake_run_exec_popen)

        util.spawn_sanity_check(platform, ep, vm_def, "test")
        assert sync_called == [False]
예제 #12
0
파일: vm_defs.py 프로젝트: softdevteam/krun
    def _check_jvmci_server_enabled(self):
        """Runs fake benchmark crashing if the Graal JVMCI JIT is disabled"""

        ep = EntryPoint("JavaCheckJVMCIServerEnabled", subdir=VM_SANITY_CHECKS_DIR)
        spawn_sanity_check(self.platform, ep, self, "JavaCheckJVMCIServerEnabled")