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