io_timeout.c revision 677833bc953b6cb418c701facbdcf4aa18d6c44e
325N/A/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ 325N/A/* ***** BEGIN LICENSE BLOCK ***** 325N/A * Version: MPL 1.1/GPL 2.0/LGPL 2.1 325N/A * The contents of this file are subject to the Mozilla Public License Version 325N/A * 1.1 (the "License"); you may not use this file except in compliance with 325N/A * the License. You may obtain a copy of the License at 325N/A * Software distributed under the License is distributed on an "AS IS" basis, 325N/A * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License 325N/A * for the specific language governing rights and limitations under the 325N/A * The Original Code is the Netscape Portable Runtime (NSPR). 325N/A * The Initial Developer of the Original Code is 325N/A * Netscape Communications Corporation. 325N/A * Portions created by the Initial Developer are Copyright (C) 1998-2000 325N/A * the Initial Developer. All Rights Reserved. 325N/A * Alternatively, the contents of this file may be used under the terms of 325N/A * either the GNU General Public License Version 2 or later (the "GPL"), or 325N/A * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), 325N/A * in which case the provisions of the GPL or the LGPL are applicable instead 325N/A * of those above. If you wish to allow use of your version of this file only 325N/A * under the terms of either the GPL or the LGPL, and not to allow others to 325N/A * use your version of this file under the terms of the MPL, indicate your 325N/A * decision by deleting the provisions above and replace them with the notice 325N/A * and other provisions required by the GPL or the LGPL. If you do not delete 325N/A * the provisions above, a recipient may use your version of this file under 325N/A * the terms of any one of the MPL, the GPL or the LGPL. 325N/A * ***** END LICENSE BLOCK ***** */ 325N/A** Test socket IO timeouts 325N/A** Modification History: 325N/A** 14-May-97 AGarcia- Converted the test to accomodate the debug_mode flag. 325N/A** The debug mode will print all of the printfs associated with this test. 325N/A** The regress mode will be the default mode. Since the regress tool limits 325N/A** the output to a one line status:PASS or FAIL,all of the printf statements 325N/A** have been handled with an if (debug_mode) statement. 325N/A***********************************************************************/ 325N/A/*********************************************************************** 325N/A***********************************************************************/ 325N/A/* Used to get the command line option */ printf(
"unable to create listen socket\n");
printf(
"thread %d going into accept for %d seconds\n",
printf(
"PR_Accept() timeout worked!\n");
printf(
"TEST PASSED! PR_Accept() returned error %d\n",
printf(
"TEST FAILED! PR_Accept() returned error %d\n",
printf (
"TEST FAILED! PR_Accept() succeeded?\n");
printf(
"Failed to create thread, error = %d(%d)\n",
/* The command line argument: -d is used to determine if the test is being run in debug mode. The regress tool requires only one line output:PASS or FAIL. All of the printfs associated with this test has been handled with a if (debug_mode) Usage: test_name [-d] [-t <threads>] case 'd':
/* debug mode */ case 't':
/* threads to involve */ printf(
"test with global bound thread\n");
printf(
"test with local thread\n");
printf(
"test with global thread\n");