summaryrefslogtreecommitdiffstats
path: root/src/usr/testcore/lib/time.H
diff options
context:
space:
mode:
Diffstat (limited to 'src/usr/testcore/lib/time.H')
-rw-r--r--src/usr/testcore/lib/time.H55
1 files changed, 32 insertions, 23 deletions
diff --git a/src/usr/testcore/lib/time.H b/src/usr/testcore/lib/time.H
index 895d2884e..0eb090ae4 100644
--- a/src/usr/testcore/lib/time.H
+++ b/src/usr/testcore/lib/time.H
@@ -1,31 +1,32 @@
-// IBM_PROLOG_BEGIN_TAG
-// This is an automatically generated prolog.
-//
-// $Source: src/usr/testcore/lib/time.H $
-//
-// IBM CONFIDENTIAL
-//
-// COPYRIGHT International Business Machines Corp. 2012
-//
-// p1
-//
-// Object Code Only (OCO) source materials
-// Licensed Internal Code Source Materials
-// IBM HostBoot Licensed Internal Code
-//
-// The source code for this program is not published or other-
-// wise divested of its trade secrets, irrespective of what has
-// been deposited with the U.S. Copyright Office.
-//
-// Origin: 30
-//
-// IBM_PROLOG_END
-
+/* IBM_PROLOG_BEGIN_TAG
+ * This is an automatically generated prolog.
+ *
+ * $Source: src/usr/testcore/lib/time.H $
+ *
+ * IBM CONFIDENTIAL
+ *
+ * COPYRIGHT International Business Machines Corp. 2012
+ *
+ * p1
+ *
+ * Object Code Only (OCO) source materials
+ * Licensed Internal Code Source Materials
+ * IBM HostBoot Licensed Internal Code
+ *
+ * The source code for this program is not published or other-
+ * wise divested of its trade secrets, irrespective of what has
+ * been deposited with the U.S. Copyright Office.
+ *
+ * Origin: 30
+ *
+ * IBM_PROLOG_END_TAG
+ */
#ifndef __TESTCORE_LIB_TIME_H
#define __TESTCORE_LIB_TIME_H
#include <time.h>
#include <sys/time.h>
+#include <sys/task.h>
#include <errno.h>
/** @file time.H
@@ -40,6 +41,12 @@ class TimeTest : public CxxTest::TestSuite
*/
void testClockGetTime()
{
+ task_affinity_pin(); // TODO: Bug in PHYP start-cores code that
+ // does not sync timebase register, so
+ // we need to pin ourselves to a core
+ // while doing timebase testing.
+ // RTC: 42921
+
timespec_t first, second;
if (-EINVAL != clock_gettime(CLOCK_REALTIME, &first))
@@ -64,6 +71,8 @@ class TimeTest : public CxxTest::TestSuite
{
TS_FAIL("Monotonic clock is not increasing.");
}
+
+ task_affinity_unpin(); // TODO.
}
};
OpenPOWER on IntegriCloud