Update contrib.
1 // Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
2 // All rights reserved.
3 // This component and the accompanying materials are made available
4 // under the terms of the License "Eclipse Public License v1.0"
5 // which accompanies this distribution, and is available
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
8 // Initial Contributors:
9 // Nokia Corporation - initial contribution.
14 // navienginebsp\ne1_tb\test\interrupts\t_ints.cpp
17 // user-side test for Crazy-Interrupts functionality
22 #include "d_crazyints.h"
24 _LIT(testName,"t_crazyints");
25 _LIT(KLddFileName, "d_crazyints.ldd");
26 _LIT(KLddFileNameRoot, "d_crazyints");
29 GLDEF_D RTest IntsTest(testName);
30 GLDEF_D RBusIntTestClient IntsTestLdd; // Channel to kernel-side proxy
32 EXPORT_C TInt E32Main()
35 IntsTest.Start(_L("Test crazy interrupts"));
37 // Load the Test Driver
38 TInt r = User::LoadLogicalDevice(KLddFileName);
39 if(r != KErrNone && r != KErrAlreadyExists)
42 IntsTest.Printf(_L("\nFailed to load the device driver, r=%d"), r);
47 TBufC<11> proxyName(KLddFileNameRoot);
48 r = IntsTestLdd.Open(proxyName);
52 r = IntsTestLdd.TestCrazyInts();
54 if(r == KErrNotSupported)
55 IntsTest.Printf(_L("CrazyInterrupts are not enabled\n\r"));
59 IntsTest.Printf(_L("Failed to open the driver (r=%d)"), r);
60 if(r == KErrNotSupported)
62 IntsTest.Printf(_L(": Not SMP platform..\n"), r);
66 IntsTest(r); // fail..
74 User::FreeLogicalDevice(KLddFileName);
77 IntsTest((r == KErrNone) || (r == KErrNotSupported));