(self, magic_key)
| 99 | self.features_flags = self.get_cpuinfo_item(magic_key) |
| 100 | |
| 101 | def get_cpuinfo_item(self, magic_key): |
| 102 | values = set() |
| 103 | with open('/proc/cpuinfo') as fd: |
| 104 | for line in fd: |
| 105 | if not line.startswith(magic_key): |
| 106 | continue |
| 107 | flags_value = [s.strip() for s in line.split(':', 1)] |
| 108 | if len(flags_value) == 2: |
| 109 | values = values.union(flags_value[1].upper().split()) |
| 110 | return values |
| 111 | |
| 112 | def load_flags_auxv(self): |
| 113 | auxv = subprocess.check_output(['/bin/true'], env={"LD_SHOW_AUXV": "1"}) |
no test coverage detected