sl@0
|
1 |
/*
|
sl@0
|
2 |
* Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
|
sl@0
|
3 |
* All rights reserved.
|
sl@0
|
4 |
* This component and the accompanying materials are made available
|
sl@0
|
5 |
* under the terms of "Eclipse Public License v1.0"
|
sl@0
|
6 |
* which accompanies this distribution, and is available
|
sl@0
|
7 |
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
|
sl@0
|
8 |
*
|
sl@0
|
9 |
* Initial Contributors:
|
sl@0
|
10 |
* Nokia Corporation - initial contribution.
|
sl@0
|
11 |
*
|
sl@0
|
12 |
* Contributors:
|
sl@0
|
13 |
*
|
sl@0
|
14 |
* Description:
|
sl@0
|
15 |
* Name : tclock.h
|
sl@0
|
16 |
*
|
sl@0
|
17 |
*
|
sl@0
|
18 |
*/
|
sl@0
|
19 |
|
sl@0
|
20 |
|
sl@0
|
21 |
|
sl@0
|
22 |
#ifndef __TESTCLOCK_H__
|
sl@0
|
23 |
#define __TESTCLOCK_H__
|
sl@0
|
24 |
|
sl@0
|
25 |
#include <test/testexecutestepbase.h>
|
sl@0
|
26 |
#include <unistd.h>
|
sl@0
|
27 |
#include <fcntl.h>
|
sl@0
|
28 |
#include <string.h>
|
sl@0
|
29 |
#include <stdlib.h>
|
sl@0
|
30 |
#include <errno.h>
|
sl@0
|
31 |
#include <stdio.h>
|
sl@0
|
32 |
#include <signal.h>
|
sl@0
|
33 |
#include <spawn.h>
|
sl@0
|
34 |
#include <time.h>
|
sl@0
|
35 |
#include <sys/wait.h>
|
sl@0
|
36 |
#include <sys/stat.h>
|
sl@0
|
37 |
#include <sys/mman.h>
|
sl@0
|
38 |
|
sl@0
|
39 |
_LIT(KTestgetclockid1, "Testgetclockid1");
|
sl@0
|
40 |
_LIT(KTestgetclockid2, "Testgetclockid2");
|
sl@0
|
41 |
_LIT(KTestgetclockid3, "Testgetclockid3");
|
sl@0
|
42 |
_LIT(KTestgetclockid4, "Testgetclockid4");
|
sl@0
|
43 |
_LIT(KTestgetclockid5, "Testgetclockid5");
|
sl@0
|
44 |
_LIT(KTestclockresolution1, "Testclockresolution1");
|
sl@0
|
45 |
_LIT(KTestclockresolution2, "Testclockresolution2");
|
sl@0
|
46 |
_LIT(KTestclockresolution3, "Testclockresolution3");
|
sl@0
|
47 |
_LIT(KTestclocknanosleep1, "Testclocknanosleep1");
|
sl@0
|
48 |
_LIT(KTestclocknanosleep2, "Testclocknanosleep2");
|
sl@0
|
49 |
_LIT(KTestclocknanosleep3, "Testclocknanosleep3");
|
sl@0
|
50 |
_LIT(KTestclocknanosleep4, "Testclocknanosleep4");
|
sl@0
|
51 |
_LIT(KTestclocknanosleep5, "Testclocknanosleep5");
|
sl@0
|
52 |
_LIT(KTestclocknanosleep6, "Testclocknanosleep6");
|
sl@0
|
53 |
_LIT(KTestclockgettime1, "Testclockgettime1");
|
sl@0
|
54 |
_LIT(KTestclockgettime2, "Testclockgettime2");
|
sl@0
|
55 |
_LIT(KTestclockgettime3, "Testclockgettime3");
|
sl@0
|
56 |
_LIT(KTestclocksettime1, "Testclocksettime1");
|
sl@0
|
57 |
_LIT(KTestclocksettime2, "Testclocksettime2");
|
sl@0
|
58 |
_LIT(KTestclocksettime3, "Testclocksettime3");
|
sl@0
|
59 |
|
sl@0
|
60 |
enum TMode
|
sl@0
|
61 |
{
|
sl@0
|
62 |
TREAD = 0x00,
|
sl@0
|
63 |
TWRITE
|
sl@0
|
64 |
};
|
sl@0
|
65 |
|
sl@0
|
66 |
class CTestclock : public CTestStep
|
sl@0
|
67 |
{
|
sl@0
|
68 |
public:
|
sl@0
|
69 |
~CTestclock();
|
sl@0
|
70 |
CTestclock(const TDesC& aStepName);
|
sl@0
|
71 |
TVerdict doTestStepL();
|
sl@0
|
72 |
TVerdict doTestStepPreambleL();
|
sl@0
|
73 |
TVerdict doTestStepPostambleL();
|
sl@0
|
74 |
protected: // Functions from base classes
|
sl@0
|
75 |
|
sl@0
|
76 |
static void* ThreadEntryFunctionW(void* arg);
|
sl@0
|
77 |
static void* ThreadEntryFunctionR(void* arg);
|
sl@0
|
78 |
static void* ThreadEntryFunctionWrite(void* arg);
|
sl@0
|
79 |
private:
|
sl@0
|
80 |
|
sl@0
|
81 |
virtual TInt Testgetclockid1 ( );
|
sl@0
|
82 |
virtual TInt Testgetclockid2 ( );
|
sl@0
|
83 |
virtual TInt Testgetclockid3 ( );
|
sl@0
|
84 |
virtual TInt Testgetclockid4 ( );
|
sl@0
|
85 |
virtual TInt Testgetclockid5 ( );
|
sl@0
|
86 |
virtual TInt Testclockresolution1 ( );
|
sl@0
|
87 |
virtual TInt Testclockresolution2 ( );
|
sl@0
|
88 |
virtual TInt Testclockresolution3 ( );
|
sl@0
|
89 |
virtual TInt Testclocknanosleep1 ( );
|
sl@0
|
90 |
virtual TInt Testclocknanosleep2 ( );
|
sl@0
|
91 |
virtual TInt Testclocknanosleep3 ( );
|
sl@0
|
92 |
virtual TInt Testclocknanosleep4 ( );
|
sl@0
|
93 |
virtual TInt Testclocknanosleep5 ( );
|
sl@0
|
94 |
virtual TInt Testclocknanosleep6 ( );
|
sl@0
|
95 |
virtual TInt Testclockgettime1 ( );
|
sl@0
|
96 |
virtual TInt Testclockgettime2 ( );
|
sl@0
|
97 |
virtual TInt Testclockgettime3 ( );
|
sl@0
|
98 |
virtual TInt Testclocksettime1 ( );
|
sl@0
|
99 |
virtual TInt Testclocksettime2 ( );
|
sl@0
|
100 |
virtual TInt Testclocksettime3 ( );
|
sl@0
|
101 |
|
sl@0
|
102 |
private: // Data
|
sl@0
|
103 |
TInt iParamCnt;
|
sl@0
|
104 |
TInt iBlocked;
|
sl@0
|
105 |
TInt iThreadId;
|
sl@0
|
106 |
|
sl@0
|
107 |
};
|
sl@0
|
108 |
#endif
|