os/kernelhwsrv/kerneltest/f32test/server/t_notify_mfs.cpp
author sl
Tue, 10 Jun 2014 14:32:02 +0200
changeset 1 260cb5ec6c19
permissions -rw-r--r--
Update contrib.
sl@0
     1
// Copyright (c) 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\server\t_notify_mfs.cpp
sl@0
    15
// 
sl@0
    16
//
sl@0
    17
sl@0
    18
#include "t_notify_perf.h"
sl@0
    19
sl@0
    20
RTest test(_L("T_NOTIFY_MFS - Multi File Session Test For Enhanced Notification"));
sl@0
    21
sl@0
    22
extern void ClearTestPathL();
sl@0
    23
extern void SetTestPaths();
sl@0
    24
extern void CopyLogFilesL();
sl@0
    25
extern void DeleteLogFilesL();
sl@0
    26
sl@0
    27
//---------------------------------------------
sl@0
    28
//! @SYMTestCaseID          PBASE-T_NOTIFY-2457
sl@0
    29
//! @SYMTestType            PT/UT
sl@0
    30
//! @SYMREQ                 PREQ1847
sl@0
    31
//! @SYMTestCaseDesc        Performance Test – Multiple File Server Sessions, this is only a part of the test case.
sl@0
    32
//!                         It is executed as a functional test here. This test case is also run as performance test in t_notify_perf 
sl@0
    33
//! @SYMTestActions         Perform a series of file operations, create multiple notification threads to collect the notifications.                        
sl@0
    34
//! @SYMTestExpectedResults No notifications are missed
sl@0
    35
//! @SYMTestPriority        High
sl@0
    36
//! @SYMTestStatus          Implemented
sl@0
    37
//---------------------------------------------
sl@0
    38
LOCAL_C void MultipleFileSessionTestL()
sl@0
    39
    {
sl@0
    40
    test.Start(_L("T_NOTIFY_MFS - Test Preparation"));
sl@0
    41
    
sl@0
    42
    gPerfMeasure = EFalse;
sl@0
    43
    SetTestPaths();
sl@0
    44
    DeleteLogFilesL();  // Does not write log file but need create the log folder for test stopper to use
sl@0
    45
    
sl@0
    46
    const TInt KNumFiles = 10;
sl@0
    47
    const TInt KNumClients = 4;
sl@0
    48
    
sl@0
    49
    test.Next(_L("Single Notification on all clients"));
sl@0
    50
    ClearTestPathL();
sl@0
    51
    TTestSetting setting (KNumFiles, KNumClients, (EEnhanced|EBigBuffer), KDefaultOpList);
sl@0
    52
    CTestExecutor testcase (setting);
sl@0
    53
    testcase.RunTestCaseL();
sl@0
    54
    
sl@0
    55
    test.Next(_L("Multi notifications Mode 1, enhanced notification"));
sl@0
    56
    ClearTestPathL();
sl@0
    57
    setting.iOption = (EEnhanced|EBigBuffer|EMultiNoti1);
sl@0
    58
    testcase.SetTestSetting(setting);
sl@0
    59
    testcase.RunTestCaseL();
sl@0
    60
    
sl@0
    61
    test.Next(_L("Multi notifications Mode 2, enhanced notification"));
sl@0
    62
    ClearTestPathL();
sl@0
    63
    setting.iOption = (EEnhanced|EBigBuffer|EMultiNoti2);
sl@0
    64
    testcase.SetTestSetting(setting);
sl@0
    65
    testcase.RunTestCaseL();
sl@0
    66
    
sl@0
    67
    test.Next(_L("Test finishing - clearing test path"));
sl@0
    68
    
sl@0
    69
    ClearTestPathL();
sl@0
    70
    test.End();
sl@0
    71
    }
sl@0
    72
sl@0
    73
// Entry Point
sl@0
    74
GLDEF_C void CallTestsL()
sl@0
    75
    {
sl@0
    76
    MultipleFileSessionTestL();
sl@0
    77
    }
sl@0
    78
sl@0
    79
sl@0
    80