diff -r 000000000000 -r e4d67989cc36 genericopenlibs/cstdlib/TSTLIB/TSTDLIBDEFECT.C --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/genericopenlibs/cstdlib/TSTLIB/TSTDLIBDEFECT.C Tue Feb 02 02:01:42 2010 +0200 @@ -0,0 +1,91 @@ +/* +* Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: +* +*/ + + + +#include /* definition of exit() */ +#include +#include +#include + +#include /* for getcwd */ +#include /* for O_RDONLY */ +#include +#include "CTEST.H" + +test_Data; /* needed for logging */ + +int close_console=0; + +/** +@SYMTestCaseID SYSLIB-STDLIB-CT-1120 +@SYMTestCaseDesc Tests for defect number 050968 +@SYMTestPriority High +@SYMTestActions Tests for stdlib defect +@SYMTestExpectedResults Test must not fail +@SYMREQ REQ0000 +*/ +void def050968() + { + unsigned char p = 0xFF; + + test_Next("Check DEF050968"); + + test(p==0xFF); + FD_ZERO(&p); + test(p==0); + } + +void doTests() + { + def050968(); + + if (close_console) + { + test_Close(); + close(0); + close(1); + close(2); + } + } + +int main() + { + void* client; + int err; + + test_Title("TStdlibDefect"); + + doTests(); + + test_Next("Do it again using the CPosixServer (for them, not me)"); + close_console=1; + + start_posix_server(); /* calls SpawnPosixServer from C++ code */ + + + client=create_thread(doTests, "TSTDLIBDEFECT tests"); + test(client!=0); + start_thread(client); + err=wait_for_thread(client); + test(err==0); + + test_Close(); + + return 0; + } +