Ejemplo n.º 1
0
    def test_config_PPC_RTAS(self):
        # This function checks for a kernel configuration option named
        # CONFIG_PPC_RTAS. If set then checks for files namely sockets,
        # chips.
        self._check_kernel_config('CONFIG_PPC_RTAS')
        sysfs_file = "/sys/devices/hv_24x7/interface/"
        files = os.listdir(sysfs_file)
        if not ('sockets' in files and 'chipspersocket' in files and
                'coresperchip' in files):
            self.fail('Required sysfs files "sockets, coresperchip,\
                      chipspersocket" not found.')

        self._verify_lscpu_sysfs('%ssockets' % sysfs_file, self.psockets)
        self._verify_lscpu_sysfs('%schipspersocket' % sysfs_file, self.pchips)
        self._verify_lscpu_sysfs('%scoresperchip' % sysfs_file, self.pcorechips)

        self._create_temp_user()
        user_cmd = "su - test_pmu -c"
        self._verify_lscpu_sysfs_test("%s 'cat %ssockets'"
                                      % (user_cmd, sysfs_file), self.psockets)
        self._verify_lscpu_sysfs_test("%s 'cat %schipspersocket'"
                                      % (user_cmd, sysfs_file), self.pchips)
        self._verify_lscpu_sysfs_test("%s 'cat %scoresperchip'"
                                      % (user_cmd, sysfs_file), self.pcorechips)
        self._remove_temp_user()

        if self.pchips == "1" and self.psockets == "1" and self.pcorechips == "1":
            output = dmesg.collect_errors_dmesg('rtas error: Error calling get-system-parameter')
            if len(output):
                self.fail("RTAS error occured")
Ejemplo n.º 2
0
 def test_TPM_register(self):
     output = dmesg.collect_errors_dmesg(
         'tpm_ibmvtpm 30000003: CRQ initialization completed')
     if not len(output):
         self.skip(
             "TPM initialized message not found, dmesg got cleared(?)")
     else:
         self.log.info("TPM intialized successfully.")
Ejemplo n.º 3
0
 def test_PMU_register(self):
     # This function tests whether performance monitor hardware support
     # registered or not. If not found any registered messages in dmesg
     # output this test will fail.
     output = dmesg.collect_errors_dmesg('performance monitor hardware support registered')
     if not len(output):
         self.fail("No registered PMUs found.")
     else:
         for line in output:
             matchFound = re.search(r"\] (.*) performance", line)
             if matchFound:
                 self.pmu_list.append(matchFound.group(1))
         self.log.info("Found PMUs %s" % self.pmu_list)
Ejemplo n.º 4
0
 def test_pmu_register_dmesg(self):
     # This function tests whether performance monitor hardware support
     # registered or not. If not found any registered messages in dmesg
     # output this test will fail.
     output = dmesg.collect_errors_dmesg('NVDIMM performance monitor support registered')
     if not output:
         self.fail("NVDIMM PMUs not found in dmesg.")
     else:
         for line in output:
             # Looking for
             #nvdimm_pmu: nmem0 NVDIMM performance monitor support registered
             matchFound = re.search(r"nvdimm_pmu: (.*) NVDIMM", line)
             if matchFound:
                 pmu = matchFound.group(1)
                 if pmu not in self.pmu_list:
                     self.pmu_list.append(pmu)
         if self.pmu_list:
             self.log.info("Found PMUs: %s" % self.pmu_list)
         else:
             self.fail("dmesg: nmem PMUs not found")