michael@0: File: pr/tests/readme michael@0: michael@0: This document describes the test cases in the NSPR directory michael@0: pr/tests. michael@0: michael@0: ===================================================================== michael@0: There is a sub-directory here: michael@0: michael@0: dll michael@0: sources for the .dll(.so) used by test dlltest.c michael@0: michael@0: ===================================================================== michael@0: The individual files are described here. michael@0: michael@0: The script 'runtests.ksh' enumerates and runs test cases that are michael@0: expected to run on all platforms. michael@0: michael@0: michael@0: accept.c michael@0: Tests PR_Accept() and related socket functions. michael@0: michael@0: acceptread.c michael@0: Tests PR_AcceptRead() michael@0: michael@0: alarm.c michael@0: Tests alarm functions declared in obsolete/pralarm.h. michael@0: The alarm functions are obsolete, so is this test. michael@0: michael@0: atomic.c michael@0: Tests Atomic operations defined in pratom.h michael@0: michael@0: attach.c michael@0: Test PR_AttachThread() michael@0: Note: This is an NSPR private function. michael@0: michael@0: bigfile.c michael@0: Test 64bit file offset functions declared in prio.h michael@0: michael@0: bug1test.c michael@0: Demonstrates a bug on NT. michael@0: michael@0: cleanup.c michael@0: Tests PR_Cleanup() declared in prinit.h michael@0: michael@0: cltsrv.c michael@0: Tests many socket functions. michael@0: michael@0: concur.c michael@0: Tests threading functions and concurrent operations. michael@0: michael@0: cvar.c michael@0: Tests condition variables. michael@0: michael@0: cvar2.c michael@0: Tests condition variables. A rather abusive test. michael@0: michael@0: dbmalloc.c michael@0: Obsolete. Originally for testing debug builds of NSPR's malloc. michael@0: michael@0: dbmalloc1.c michael@0: Obsolete. Originally for testing debug builds of NSPR's malloc. michael@0: michael@0: dceemu.c michael@0: Tests special functions for DCE emulation. michael@0: michael@0: depend.c michael@0: Obsoltet. Tests early spec for library dependency. michael@0: michael@0: dlltest.c michael@0: Tests dynamic library functions. Used with dll/my.c michael@0: michael@0: dtoa.c michael@0: Tests conversions of double to string. michael@0: michael@0: exit.c michael@0: Tests PR_ProcessExit() declared in prinit.h michael@0: michael@0: fileio.c michael@0: Tests NSPR semaphores a bit of file i/o and threading michael@0: functions. michael@0: michael@0: foreign.c michael@0: Test auto-attach of a thread created by something other than michael@0: NSPR. michael@0: michael@0: forktest.c michael@0: Limited use. Tests unix fork() and related functions. michael@0: michael@0: fsync.c michael@0: Tests use of PR_Sync() declared in prio.h michael@0: michael@0: getproto.c michael@0: Tests socket functions PR_GetProtoByName(), etc. michael@0: michael@0: i2l.c michael@0: Tests LongLong functions for converting 32bit integer to 64bit michael@0: integer. michael@0: michael@0: initclk.c michael@0: Tests timing on minimal use of condition variable michael@0: michael@0: inrval.c michael@0: Tests interval timing functions. michael@0: michael@0: instrumt.c michael@0: Tests instrumentation functions. prcountr.h prtrace.h michael@0: michael@0: intrupt.c michael@0: Tests PR_Interrupt() michael@0: michael@0: ioconthr.c michael@0: Tests i/o continuation mechanism in pthreads. michael@0: michael@0: io_timeout.c michael@0: Test socket i/o timeouts. michael@0: michael@0: io_timeoutk.c michael@0: Obsolete. Subsumed in io_timeout.c michael@0: michael@0: io_timeoutu.c michael@0: Obsolete. Subsumed in io_timeout.c michael@0: michael@0: ipv6.c michael@0: Tests IPv6. IPv6 is not used by NSPR clients. michael@0: michael@0: join.c michael@0: Tests PR_JoinThread() michael@0: michael@0: joinkk.c michael@0: Tests PR_JoinThread() michael@0: michael@0: joinku.c michael@0: Tests PR_JoinThread() michael@0: michael@0: joinuk.c michael@0: Tests PR_JoinThread() michael@0: michael@0: joinuu.c michael@0: Tests PR_JoinThread() michael@0: michael@0: layer.c michael@0: Tests layered I/O. michael@0: michael@0: lazyinit.c michael@0: Tests implicit initialization. michael@0: michael@0: lltest.c michael@0: Tests LongLong (64bit integer) arithmentic and conversions. michael@0: michael@0: lock.c michael@0: Tests PR_Lock() in heavily threaded environment. michael@0: michael@0: lockfile.c michael@0: Test PR_Lockfile(). michael@0: michael@0: logger.c michael@0: Tests PR_LOG() michael@0: michael@0: makefile michael@0: The makefile that builds all the tests michael@0: michael@0: many_cv.c michael@0: Tests aquiring a large number of condition variables. michael@0: michael@0: multiwait.c michael@0: ??? michael@0: michael@0: nbconn.c michael@0: Test non-blocking connect. michael@0: michael@0: nblayer.c michael@0: Tests NSPR's layered I/O capability. michael@0: michael@0: nonblock.c michael@0: Tests operations on non-blocking socket. michael@0: michael@0: op_2long.c michael@0: Tests PR_Open() where filename is too long. michael@0: michael@0: op_filnf.c michael@0: Tests PR_Open() where filename is NotFound. michael@0: michael@0: op_filok.c michael@0: Tests PR_Open() where filename is accessable. michael@0: michael@0: op_noacc.c michael@0: Tests PR_Open() where file permissions are wrong. michael@0: Limited use. Windows has no concept of Unix style file permissions. michael@0: michael@0: op_nofil.c michael@0: Tests PR_Open() where filename does not exist. michael@0: michael@0: parent.c michael@0: Test parent/child process capability michael@0: michael@0: perf.c michael@0: Tests and measures context switch times for various thread michael@0: syncronization functions. michael@0: michael@0: pipeping.c michael@0: Tests inter-process pipes. Run with pipepong.c michael@0: michael@0: pipepong.c michael@0: Tests inter-process pipes. Run with pipeping.c michael@0: michael@0: pipeself.c michael@0: Tests inter-thread pipes. michael@0: michael@0: pollable.c michael@0: Tests pollable events. prio.h michael@0: michael@0: poll_er.c michael@0: Tests PR_Poll() where an error is expected. michael@0: michael@0: poll_nm.c michael@0: Tests PR_Poll() where normal operation is expected. michael@0: michael@0: poll_to.c michael@0: Tests PR_Poll() where timeout is expected. michael@0: michael@0: prftest.c michael@0: Tests printf-like formatting. michael@0: michael@0: prftest1.c michael@0: Obsolete. Subsumed in prftest.c michael@0: michael@0: prftest2.c michael@0: Obsolete. Subsumed in prftest.c michael@0: michael@0: priotest.c michael@0: Limited use. Tests NSPR thread dispatching priority. michael@0: michael@0: provider.c michael@0: michael@0: prpoll.c michael@0: Tests PR_Poll(). michael@0: michael@0: prselect.c michael@0: Obsolete. PR_Select() is obsolete. michael@0: michael@0: prttools.h michael@0: Unused file. michael@0: michael@0: ranfile.c michael@0: Tests random file access. michael@0: michael@0: readme michael@0: This file. michael@0: michael@0: runtests.ksh michael@0: A korn shell script that runs a set of tests that should run michael@0: on any of the NSPR supported platforms. michael@0: michael@0: runtests.pl michael@0: A perl script to run the test cases. This srcipt runs tests michael@0: common to all platforms and runs tests applicable to specific michael@0: platforms. Uses file runtests.txt to control execution. michael@0: michael@0: runtests.txt michael@0: Control file for perl script: runtests.pl michael@0: michael@0: rwlocktest.c michael@0: Tests Reader/Writer lock michael@0: michael@0: selct_er.c michael@0: Obsolete. PR_Select() is obsolete. michael@0: michael@0: selct_nm.c michael@0: Obsolete. PR_Select() is obsolete. michael@0: michael@0: selct_to.c michael@0: Obsolete. PR_Select() is obsolete. michael@0: michael@0: select2.c michael@0: Obsolete. PR_Select() is obsolete. michael@0: michael@0: sel_spd.c michael@0: Obsolete. PR_Select() is obsolete. michael@0: michael@0: sem.c michael@0: Obsolete. Semaphores are not supported. michael@0: michael@0: server_test.c michael@0: Tests sockets by simulating a server in loopback mode. michael@0: Makes its own client threads. michael@0: michael@0: servr_kk.c michael@0: Tests client/server sockets, threads using system threads. michael@0: michael@0: servr_ku.c michael@0: Tests client/server sockets, threads using system and user threads. michael@0: michael@0: servr_uk.c michael@0: Tests client/server sockets, threads using system and user threads. michael@0: michael@0: servr_uu.c michael@0: Tests client/server sockets, threads user threads. michael@0: michael@0: short_thread.c michael@0: Tests short-running threads. Useful for testing for race conditions. michael@0: michael@0: sigpipe.c michael@0: Tests NSPR's SIGPIPE handler. Unix only. michael@0: michael@0: sleep.c michael@0: Limited use. Tests sleep capability of platform. michael@0: michael@0: socket.c michael@0: Tests many socket functions. michael@0: michael@0: sockopt.c michael@0: Tests setting and getting socket options. michael@0: michael@0: sprintf.c michael@0: Tests sprintf. michael@0: michael@0: sproc_ch.c michael@0: Obsolete. Tests IRIX sproc-based threads. michael@0: michael@0: sproc_p.c michael@0: Obsolete. Tests IRIX sproc-based threads. michael@0: michael@0: stack.c michael@0: Test atomic stack operations. michael@0: michael@0: stat.c michael@0: Tests performance of getfileinfo() vs. stat() michael@0: michael@0: stdio.c michael@0: Tests NSPR's handling of stdin, stdout, stderr. michael@0: michael@0: strod.c michael@0: Tests formatting of double precision floating point. michael@0: michael@0: suspend.c michael@0: Private interfaces PR_SuspendAll(), PR_ResumeAll(), etc. michael@0: michael@0: switch.c michael@0: Tests thread switching michael@0: michael@0: system.c michael@0: Tests PR_GetSystemInfo() michael@0: michael@0: testbit.c michael@0: Tests bit arrays. michael@0: michael@0: testfile.c michael@0: Tests many file I/O functions. michael@0: michael@0: threads.c michael@0: Tests thread caching. michael@0: michael@0: thruput.c michael@0: Tests socket thruput. Must be run by hand as client/server. michael@0: Does not self terminate. michael@0: michael@0: time.c michael@0: Incomplete. Limited use. michael@0: michael@0: timemac.c michael@0: Test time and date functions. Originally for Mac. michael@0: michael@0: timetest.c michael@0: Tests time conversion over a wide range of dates. michael@0: michael@0: tmoacc.c michael@0: Server to tmocon.c and writev.c michael@0: Do not run it by itself. michael@0: michael@0: tmocon.c michael@0: Client thread to tmoacc.c michael@0: michael@0: tpd.c michael@0: Tests thread private data. michael@0: michael@0: udpsrv.c michael@0: Tests UDP socket functions. michael@0: michael@0: ut_ttools.h michael@0: unused file. michael@0: michael@0: version.c michael@0: Extract and print library version data. michael@0: michael@0: vercheck.c michael@0: Test PR_VersionCheck(). michael@0: michael@0: writev.c michael@0: Tests gather-write on a socket. Requires tmoacc.c michael@0: michael@0: xnotify.c michael@0: Tests cached monitors. michael@0: michael@0: yield.c michael@0: Limited use michael@0: michael@0: y2k.c michael@0: Test to verify NSPR's date functions as Y2K compliant. michael@0: michael@0: dll\Makefile michael@0: makefile for mygetval.c, mysetval.c michael@0: michael@0: dll\mygetval.c michael@0: Dynamic library test. See also dlltest.c michael@0: michael@0: dll\mysetval.c michael@0: Dynamic library test. See also dlltest.c