os/kernelhwsrv/kerneltest/f32test/fsstress/t_sess.h
author sl@SLION-WIN7.fritz.box
Fri, 15 Jun 2012 03:10:57 +0200
changeset 0 bde4ae8d615e
permissions -rw-r--r--
First public contribution.
sl@0
     1
// Copyright (c) 1998-2009 Nokia Corporation and/or its subsidiary(-ies).
sl@0
     2
// All rights reserved.
sl@0
     3
// This component and the accompanying materials are made available
sl@0
     4
// under the terms of the License "Eclipse Public License v1.0"
sl@0
     5
// which accompanies this distribution, and is available
sl@0
     6
// at the URL "http://www.eclipse.org/legal/epl-v10.html".
sl@0
     7
//
sl@0
     8
// Initial Contributors:
sl@0
     9
// Nokia Corporation - initial contribution.
sl@0
    10
//
sl@0
    11
// Contributors:
sl@0
    12
//
sl@0
    13
// Description:
sl@0
    14
// f32test\fsstress\t_sess.h
sl@0
    15
// 
sl@0
    16
//
sl@0
    17
sl@0
    18
#include <f32file.h>
sl@0
    19
#include <e32test.h>
sl@0
    20
#include <e32hal.h>
sl@0
    21
#include <e32math.h>
sl@0
    22
#include <f32dbg.h>
sl@0
    23
sl@0
    24
GLDEF_D const TInt KMaxParses=7;
sl@0
    25
GLDEF_D const TInt KHeapSize=0x2000;
sl@0
    26
GLREF_C void TurnAllocFailureOff();
sl@0
    27
GLREF_C void TurnAllocFailureOn();
sl@0
    28
GLREF_C void ReportCheckDiskFailure(TInt aRet);
sl@0
    29
GLREF_D RTest test;
sl@0
    30
GLREF_D TFileName gTestSessionPath;
sl@0
    31
GLREF_D TInt gAllocFailOff;
sl@0
    32
GLREF_D TInt gAllocFailOn;
sl@0
    33
sl@0
    34
#if defined(_DEBUG)
sl@0
    35
#define SetAllocFailure(a) SetAllocFailure(a)
sl@0
    36
#else
sl@0
    37
#define SetAllocFailure(a) IsRomAddress(NULL)
sl@0
    38
#define KAllocFailureOn 0
sl@0
    39
#define KAllocFailureOff 0
sl@0
    40
#endif
sl@0
    41
sl@0
    42
sl@0
    43
struct SParse
sl@0
    44
	{
sl@0
    45
	const TText* src;
sl@0
    46
	const TText* rel;
sl@0
    47
	const TText* def;
sl@0
    48
	const TText* fullName;
sl@0
    49
	const TText* drive;
sl@0
    50
	const TText* path;
sl@0
    51
	const TText* name;
sl@0
    52
	const TText* ext;
sl@0
    53
	};
sl@0
    54
sl@0
    55
struct SParseServer
sl@0
    56
	{
sl@0
    57
	const TText* src;
sl@0
    58
	const TText* rel;
sl@0
    59
	const TText* fullName;
sl@0
    60
	const TText* drive;
sl@0
    61
	const TText* path;
sl@0
    62
	const TText* name;
sl@0
    63
	const TText* ext;
sl@0
    64
	};
sl@0
    65
sl@0
    66
sl@0
    67
class TSessionTest
sl@0
    68
	{
sl@0
    69
public:
sl@0
    70
	TSessionTest() {};
sl@0
    71
	TSessionTest(RFs& aFs):	iFs(aFs){};	
sl@0
    72
	void Initialise(RFs& aFs);
sl@0
    73
	void RunTests();
sl@0
    74
	void testDriveList();
sl@0
    75
	void testDriveInfo();
sl@0
    76
	void testVolumeInfo();
sl@0
    77
	void testPath();
sl@0
    78
	void testInitialisation();
sl@0
    79
	void testSubst();
sl@0
    80
	void CopyFileToTestDirectory();
sl@0
    81
	void MakeAndDeleteFiles();
sl@0
    82
	void FillUpDisk();
sl@0
    83
	void testSetVolume();
sl@0
    84
	void CreateTestDirectory(const TDesC& aTestPath);
sl@0
    85
	void DeleteTestDirectory();
sl@0
    86
	TInt CurrentDrive();
sl@0
    87
private:
sl@0
    88
	RFs iFs;
sl@0
    89
	};
sl@0
    90