diff options
Diffstat (limited to 'meta/lib/oeqa/runtime/cases/ltp.py')
-rw-r--r-- | meta/lib/oeqa/runtime/cases/ltp.py | 28 |
1 files changed, 19 insertions, 9 deletions
diff --git a/meta/lib/oeqa/runtime/cases/ltp.py b/meta/lib/oeqa/runtime/cases/ltp.py index a66d5d13d7..f588a93200 100644 --- a/meta/lib/oeqa/runtime/cases/ltp.py +++ b/meta/lib/oeqa/runtime/cases/ltp.py @@ -57,37 +57,47 @@ class LtpTestBase(OERuntimeTestCase): class LtpTest(LtpTestBase): - ltp_groups = ["math", "syscalls", "dio", "io", "mm", "ipc", "sched", "nptl", "pty", "containers", "controllers", "filecaps", "cap_bounds", "fcntl-locktests", "connectors", "commands", "net.ipv6_lib", "input","fs_perms_simple"] + ltp_groups = ["math", "syscalls", "dio", "io", "mm", "ipc", "sched", "nptl", "pty", "containers", "controllers", "filecaps", "cap_bounds", "fcntl-locktests", "commands", "net.ipv6_lib", "input","fs_perms_simple", "cve", "crypto", "ima", "net.nfs", "net_stress.ipsec_icmp", "net.ipv6", "numa", "uevent", "ltp-aiodio.part1", "ltp-aiodio.part2", "ltp-aiodio.part3", "ltp-aiodio.part4"] - ltp_fs = ["fs", "fsx", "fs_bind"] + ltp_fs = ["fs", "fs_bind"] # skip kernel cpuhotplug ltp_kernel = ["power_management_tests", "hyperthreading ", "kernel_misc", "hugetlb"] ltp_groups += ltp_fs def runltp(self, ltp_group): - cmd = '/opt/ltp/runltp -f %s -p -q -r /opt/ltp -l /opt/ltp/results/%s -I 1 -d /opt/ltp' % (ltp_group, ltp_group) + # LTP appends to log files, so ensure we start with a clean log + self.target.deleteFiles("/opt/ltp/results/", ltp_group) + + cmd = '/opt/ltp/runltp -f %s -q -r /opt/ltp -l /opt/ltp/results/%s -I 1 -d /opt/ltp' % (ltp_group, ltp_group) + starttime = time.time() - (status, output) = self.target.run(cmd) + (status, output) = self.target.run(cmd, timeout=1200) endtime = time.time() + # status of 1 is 'just' tests failing. 255 likely was a command output timeout + if status and status != 1: + msg = 'Command %s returned exit code %s' % (cmd, status) + self.target.logger.warning(msg) + + # Write the console log to disk for convenience with open(os.path.join(self.ltptest_log_dir, "%s-raw.log" % ltp_group), 'w') as f: f.write(output) + # Also put the console log into the test result JSON self.extras['ltpresult.rawlogs']['log'] = self.extras['ltpresult.rawlogs']['log'] + output - # copy nice log from DUT - dst = os.path.join(self.ltptest_log_dir, "%s" % ltp_group ) + # Copy the machine-readable test results locally so we can parse it + dst = os.path.join(self.ltptest_log_dir, ltp_group) remote_src = "/opt/ltp/results/%s" % ltp_group (status, output) = self.target.copyFrom(remote_src, dst, True) - msg = 'File could not be copied. Output: %s' % output if status: + msg = 'File could not be copied. Output: %s' % output self.target.logger.warning(msg) parser = LtpParser() results, sections = parser.parse(dst) - runtime = int(endtime-starttime) - sections['duration'] = runtime + sections['duration'] = int(endtime-starttime) self.sections[ltp_group] = sections failed_tests = {} |