def METHOD_NAME(self):
    """
    This script picks a random core and then offlines all its threads
    in a random order and onlines all its threads in a random order.
    """
    self.clear_dmesg()
    for val in range(1, self.loop):
        self.log.info("================= TEST %s ==================" % val)
        core_list = self.random_gen_cores()
        for core in core_list:
            cpu_list = self.random_gen_cpu(core)
            self.log.info("Offlining the threads : %s for "
                          "the core : %s" % (cpu_list, core))
            for cpu_num in cpu_list:
                # If only one core then don't disable cpu 0 - busy
                if core != 0 or (core == 0 and cpu_num != 0):
                    self.cpu_on_off("offline", cpu_num)
            cpu_list = self.random_gen_cpu(core)
            if core == 0:
                cpu_list.remove(0)
            self.log.info("Onlining the threads : %s for "
                          "the core : %s" % (cpu_list, core))
            for cpu_num in cpu_list:
                self.cpu_on_off("online", cpu_num)
    if self.nfail > 0:
        self.fail(" Unable to online/offline few cpus")
    self.verify_dmesg()