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

Unified Diff: tests/rbtest.conf

Issue 2857030: Exhaustive test for rollback code (Closed) Base URL: ssh://git@chromiumos-git/vboot_reference.git
Patch Set: Fix write count handling and improve comments. Created 10 years, 5 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 | « tests/Makefile ('k') | tests/rollback_index_test.c » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/rbtest.conf
diff --git a/tests/rbtest.conf b/tests/rbtest.conf
new file mode 100644
index 0000000000000000000000000000000000000000..e2e2e9f3fd64609a8bade9080be5133e63e567ec
--- /dev/null
+++ b/tests/rbtest.conf
@@ -0,0 +1,34 @@
+# 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.
+
+# Rollback code exhaustive test.
+#
+# INSTRUCTIONS. Put this file in /etc/init. Move /etc/init/tcsd.conf to
+# /etc/init/tcsd.confxxx to disable it. Then boot with the device connected by
+# wired ethernet. The test will start and reboot the host after every cycle.
+# Unplug the ethernet cable to stop testing. If left alone, the test will stop
+# at the first failure or when all the states have been tested.
+#
+# Reminder: rollback_index_test only works with TPM-agnostic firmware.
+
+# Connecting to tcsd requires that "localhost" be reachable, so we wait for
+# flimflam to start, but that's not enough, and in the while loop below we also
+# wait for pinging to localhost to succeed.
+
+start on started flimflam
+
+script
+ cable=""
+ while [ "$cable" != "yes" ]; do
+ cable=$(/usr/sbin/ethtool eth0 | grep Link | cut -f 3 -d ' ')
+ logger "rbtest: cable is $cable"
+ ping -c 1 localhost || cable=""
+ sleep 2
+ done
+ # ideally we would like to issue a "stop tcsd", but this doesn't work
+ # (upstart race?) so we must manually disable tcsd.conf
+ ### stop tcsd
+ logger "starting rbtest"
+ /usr/bin/rollback_index_test > /tmp/rbtest.out 2>&1
+end script
« no previous file with comments | « tests/Makefile ('k') | tests/rollback_index_test.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698