Index: hwclock/control
===================================================================
--- hwclock/control     (revision 0)
+++ hwclock/control     (revision 0)
@@ -0,0 +1,12 @@
+AUTHOR = "Martin J. Bligh <[email protected]>"
+NAME = "Hwclock"
+TIME = "SHORT"
+TEST_CATEGORY = "Functional"
+TEST_CLASS = "General"
+TEST_TYPE = "client"
+
+DOC = """
+This test checks that we can set and read the hwclock successfully
+"""
+
+job.run_test('hwclock')
Index: hwclock/hwclock.py
===================================================================
--- hwclock/hwclock.py  (revision 0)
+++ hwclock/hwclock.py  (revision 0)
@@ -0,0 +1,16 @@
+from autotest_lib.client.bin import test, utils
+from autotest_lib.client.common_lib import error
+import re
+
+class hwclock(test.test):
+    version = 1
+
+    def run_once(self, seconds=1):
+        utils.system('/sbin/hwclock --set --date "2/2/80 03:04:00"')
+        date = utils.system_output('/sbin/hwclock')
+        if not re.match('Sat *Feb *2 *03:04:.. 1980', date):
+            raise error.TestFail('Failed to set hwclock back to the eighties')
+
+
+    def cleanup(self):
+        utils.system('/sbin/hwclock --systohc --noadjfile --utc')
_______________________________________________
Autotest mailing list
[email protected]
http://test.kernel.org/cgi-bin/mailman/listinfo/autotest

Reply via email to