Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1329)

Unified Diff: server/site_tests/logging_KernelCrashServer/logging_KernelCrashServer.py

Issue 3114016: Added full E2E kcrash testing (Closed) Base URL: ssh://git@chromiumos-git//autotest.git
Patch Set: fixes Created 10 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « server/site_tests/logging_KernelCrashServer/control ('k') | server/site_tests/suite_Nightly/control » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: server/site_tests/logging_KernelCrashServer/logging_KernelCrashServer.py
diff --git a/server/site_tests/logging_KernelCrashServer/logging_KernelCrashServer.py b/server/site_tests/logging_KernelCrashServer/logging_KernelCrashServer.py
new file mode 100644
index 0000000000000000000000000000000000000000..d139d06a24993ecbb0947ec464f94e0faf980afb
--- /dev/null
+++ b/server/site_tests/logging_KernelCrashServer/logging_KernelCrashServer.py
@@ -0,0 +1,33 @@
+# Copyright (c) 2010 The Chromium OS Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+import logging, os, shutil, time
+from autotest_lib.client.common_lib import error
+from autotest_lib.server import autotest, site_host_attributes, test
+
+
+class logging_KernelCrashServer(test.test):
+ version = 1
+
+
+ def run_once(self, host=None):
+ client_at = autotest.Autotest(host)
+ client_at.run_test('logging_KernelCrash',
+ tag='before-crash',
+ is_before=True)
+
+ client_attributes = site_host_attributes.HostAttributes(host.hostname)
+ if not client_attributes.has_working_kcrash:
+ raise error.TestNAError(
+ 'This device is unable to report kernel crashes')
+ # Crash the client
+ logging.info('KernelCrashServer: crashing %s' % host.hostname)
+ boot_id = host.get_boot_id()
+ host.run('sh -c "sleep 1; echo bug > /proc/breakme" >/dev/null 2>&1 &')
+ host.wait_for_restart(old_boot_id=boot_id)
+
+ # Check for crash handling
+ client_at.run_test('logging_KernelCrash',
+ tag='after-crash',
+ is_before=False)
« no previous file with comments | « server/site_tests/logging_KernelCrashServer/control ('k') | server/site_tests/suite_Nightly/control » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698