1 # Copyright (c) 2009 The Chromium OS Authors. All rights reserved. 2 # Use of this source code is governed by a BSD-style license that can be 3 # found in the LICENSE file. 4 5 from autotest_lib.client.bin.site_sysinfo import purgeable_logdir 6 7 AUTHOR = "Chrome OS Team" 8 NAME = "KernelCrashServer" 9 TIME = "SHORT" 10 TEST_CATEGORY = "Benchmark" 11 TEST_CLASS = "platform" 12 TEST_TYPE = "server" 13 14 DOC = """ 15 This test crashes the client and verifies the kernel crash was collected. 16 17 Fails if any of the following conditions occur: 18 - kernel does not support crash dumping 19 - kernel crash dump doesn't appear after crash 20 - crash dump does not appear to be correct 21 - crash report is not sent properly 22 """ 23 24 def run_it(machine): 25 # We have set up our autotest to copy off the crashes in /var/spool/crash 26 # and purge its content after each test pass. This test executes several 27 # client-side tests and require that the content of /var/spool/crash be 28 # preserved between each client-side tests. So we'll need to remove the 29 # /var/spool/crash entry from the test_loggables so that autotest doesn't 30 # purge the content. 31 for log in job.sysinfo.test_loggables: 32 if type(log) is purgeable_logdir and log.dir == '/var/spool/crash': 33 job.sysinfo.test_loggables.remove(log) 34 break 35 host = hosts.create_host(machine) 36 job.run_test("logging_KernelCrashServer", host=host) 37 38 parallel_simple(run_it, machines) 39