Update contrib.
1 // Copyright (c) 2005-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 "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 // T_WAITPIDLAUNCH.CPP
22 LOCAL_D RTest test(_L("WAITPID DEF073739"));
27 @SYMTestCaseID SYSLIB-STDLIB-UT-1575
28 @SYMTestCaseDesc Testing if POSIX waitpid function conforms to POSIX standard
30 @SYMTestActions Starts a new process (T_WAITPID) this new process
31 creates some processes and tests the POSIX waitpid function behaves correctly
32 by waiting for these processes.
33 @SYMTestExpectedResults The test should not fail.
37 //INC073739 Incorrect error codes returned from waitpid() in STDLIB
42 test.Printf(_L("Create a new process t_waitpid to test POSIX waitpid\n"));
43 //Creating another process to run T_WAITPID and test if it completed correctly
44 TInt err=me.Create(_L("T_WAITPID"),_L(""));
45 if (err==KErrNotFound)
46 err=me.Create(_L("z:\\test\\T_WAITPID"),_L(""));
47 if (err==KErrNotFound)
48 err=me.Create(_L("c:\\test\\T_WAITPID"),_L(""));
49 if (err==KErrNotFound)
50 err=me.Create(_L("c:\\sys\\bin\\T_WAITPID"),_L(""));
53 //Checking that the child proces T_WAITPID executes properly with no panic
54 TRequestStatus status;
57 User::WaitForRequest(status);
58 //Test to make sure the child process ended correctly
59 test(status==KErrNone);
60 test(me.ExitReason()==KErrNone);
68 LOCAL_C void RunTestsL ()
74 GLDEF_C TInt E32Main()
77 test.Start(_L(" @SYMTestCaseID:SYSLIB-STDLIB-UT-1575 Starting the T_WAITPID tests... "));
79 CTrapCleanup* cleanup=CTrapCleanup::New();
80 test(cleanup != NULL);
81 TRAPD(error,RunTestsL());
82 test(error==KErrNone);