From 532f51ce426bc247b7054ffc64f006f7397d6268 Mon Sep 17 00:00:00 2001 From: Ralf Corsepius Date: Tue, 11 Nov 2003 00:57:23 +0000 Subject: 2003-11-10 Ralf Corsepius * base_mp/node1/.cvsignore: Remove. * base_mp/node1/Makefile.am: Remove. * base_mp/node1/base_mp.doc: Remove. * base_mp/node1/base_mp.scn: Remove. * base_mp/.cvsignore: Remove. * base_mp/Makefile.am: Remove. * base_mp/apptask.c: Remove. * base_mp/init.c: Remove. * base_mp/system.h: Remove. * base_mp/node2/.cvsignore: Remove. * base_mp/node2/Makefile.am: Remove. * base_mp/node2/base_mp.doc: Remove. * base_mp/node2/base_mp.scn: Remove. * .cvsignore: Remove. * ChangeLog: Remove. * Makefile.am: Remove. * README: Remove. * configure.ac: Remove. * sample.am: Remove. * base_sp/.cvsignore: Remove. * base_sp/Makefile.am: Remove. * base_sp/apptask.c: Remove. * base_sp/base_sp.doc: Remove. * base_sp/base_sp.scn: Remove. * base_sp/init.c: Remove. * base_sp/system.h: Remove. * cdtest/.cvsignore: Remove. * cdtest/Makefile.am: Remove. * cdtest/cdtest.scn: Remove. * cdtest/init.c: Remove. * cdtest/main.cc: Remove. * cdtest/system.h: Remove. * fileio/.cvsignore: Remove. * fileio/Makefile.am: Remove. * fileio/fileio.doc: Remove. * fileio/init.c: Remove. * fileio/system.h: Remove. * hello/.cvsignore: Remove. * hello/Makefile.am: Remove. * hello/hello.doc: Remove. * hello/hello.scn: Remove. * hello/init.c: Remove. * hello/system.h: Remove. * loopback/.cvsignore: Remove. * loopback/Makefile.am: Remove. * loopback/README: Remove. * loopback/init.c: Remove. * loopback/loopback.scn: Remove. * minimum/.cvsignore: Remove. * minimum/Makefile.am: Remove. * minimum/init.c: Remove. * minimum/minimum.doc: Remove. * minimum/minimum.scn: Remove. * paranoia/.cvsignore: Remove. * paranoia/Makefile.am: Remove. * paranoia/init.c: Remove. * paranoia/paranoia.c: Remove. * paranoia/paranoia.doc: Remove. * paranoia/system.h: Remove. * pppd/.cvsignore: Remove. * pppd/Makefile-user: Remove. * pppd/Makefile.am: Remove. * pppd/README: Remove. * pppd/init.c: Remove. * pppd/netconfig.h: Remove. * pppd/ppp.conf: Remove. * pppd/pppd.options: Remove. * pppd/pppdapp.c: Remove. * pppd/system.h: Remove. * ticker/.cvsignore: Remove. * ticker/Makefile.am: Remove. * ticker/init.c: Remove. * ticker/system.h: Remove. * ticker/tasks.c: Remove. * ticker/ticker.doc: Remove. * ticker/ticker.scn: Remove. * unlimited/.cvsignore: Remove. * unlimited/Makefile.am: Remove. * unlimited/init.c: Remove. * unlimited/system.h: Remove. * unlimited/test1.c: Remove. * unlimited/test2.c: Remove. * unlimited/test3.c: Remove. * unlimited/unlimited.doc: Remove. * unlimited/unlimited.scn: Remove. --- c/src/tests/samples/.cvsignore | 14 - c/src/tests/samples/ChangeLog | 388 ----- c/src/tests/samples/Makefile.am | 26 - c/src/tests/samples/README | 72 - c/src/tests/samples/base_mp/.cvsignore | 2 - c/src/tests/samples/base_mp/Makefile.am | 11 - c/src/tests/samples/base_mp/apptask.c | 38 - c/src/tests/samples/base_mp/init.c | 46 - c/src/tests/samples/base_mp/node1/.cvsignore | 2 - c/src/tests/samples/base_mp/node1/Makefile.am | 50 - c/src/tests/samples/base_mp/node1/base_mp.doc | 12 - c/src/tests/samples/base_mp/node1/base_mp.scn | 5 - c/src/tests/samples/base_mp/node2/.cvsignore | 2 - c/src/tests/samples/base_mp/node2/Makefile.am | 50 - c/src/tests/samples/base_mp/node2/base_mp.doc | 12 - c/src/tests/samples/base_mp/node2/base_mp.scn | 5 - c/src/tests/samples/base_mp/system.h | 47 - c/src/tests/samples/base_sp/.cvsignore | 2 - c/src/tests/samples/base_sp/Makefile.am | 41 - c/src/tests/samples/base_sp/apptask.c | 39 - c/src/tests/samples/base_sp/base_sp.doc | 12 - c/src/tests/samples/base_sp/base_sp.scn | 5 - c/src/tests/samples/base_sp/init.c | 48 - c/src/tests/samples/base_sp/system.h | 40 - c/src/tests/samples/cdtest/.cvsignore | 2 - c/src/tests/samples/cdtest/Makefile.am | 48 - c/src/tests/samples/cdtest/cdtest.scn | 31 - c/src/tests/samples/cdtest/init.c | 26 - c/src/tests/samples/cdtest/main.cc | 214 --- c/src/tests/samples/cdtest/system.h | 40 - c/src/tests/samples/configure.ac | 56 - c/src/tests/samples/fileio/.cvsignore | 2 - c/src/tests/samples/fileio/Makefile.am | 44 - c/src/tests/samples/fileio/fileio.doc | 45 - c/src/tests/samples/fileio/init.c | 596 ------- c/src/tests/samples/fileio/system.h | 136 -- c/src/tests/samples/hello/.cvsignore | 2 - c/src/tests/samples/hello/Makefile.am | 41 - c/src/tests/samples/hello/hello.doc | 12 - c/src/tests/samples/hello/hello.scn | 3 - c/src/tests/samples/hello/init.c | 36 - c/src/tests/samples/hello/system.h | 38 - c/src/tests/samples/loopback/.cvsignore | 2 - c/src/tests/samples/loopback/Makefile.am | 41 - c/src/tests/samples/loopback/README | 65 - c/src/tests/samples/loopback/init.c | 267 --- c/src/tests/samples/loopback/loopback.scn | 56 - c/src/tests/samples/minimum/.cvsignore | 2 - c/src/tests/samples/minimum/Makefile.am | 39 - c/src/tests/samples/minimum/init.c | 41 - c/src/tests/samples/minimum/minimum.doc | 12 - c/src/tests/samples/minimum/minimum.scn | 1 - c/src/tests/samples/paranoia/.cvsignore | 2 - c/src/tests/samples/paranoia/Makefile.am | 47 - c/src/tests/samples/paranoia/init.c | 49 - c/src/tests/samples/paranoia/paranoia.c | 2304 ------------------------- c/src/tests/samples/paranoia/paranoia.doc | 12 - c/src/tests/samples/paranoia/system.h | 41 - c/src/tests/samples/pppd/.cvsignore | 2 - c/src/tests/samples/pppd/Makefile-user | 45 - c/src/tests/samples/pppd/Makefile.am | 40 - c/src/tests/samples/pppd/README | 15 - c/src/tests/samples/pppd/init.c | 24 - c/src/tests/samples/pppd/netconfig.h | 36 - c/src/tests/samples/pppd/ppp.conf | 27 - c/src/tests/samples/pppd/pppd.options | 9 - c/src/tests/samples/pppd/pppdapp.c | 146 -- c/src/tests/samples/pppd/system.h | 50 - c/src/tests/samples/sample.am | 20 - c/src/tests/samples/ticker/.cvsignore | 2 - c/src/tests/samples/ticker/Makefile.am | 41 - c/src/tests/samples/ticker/init.c | 75 - c/src/tests/samples/ticker/system.h | 115 -- c/src/tests/samples/ticker/tasks.c | 45 - c/src/tests/samples/ticker/ticker.doc | 12 - c/src/tests/samples/ticker/ticker.scn | 16 - c/src/tests/samples/unlimited/.cvsignore | 2 - c/src/tests/samples/unlimited/Makefile.am | 41 - c/src/tests/samples/unlimited/init.c | 127 -- c/src/tests/samples/unlimited/system.h | 90 - c/src/tests/samples/unlimited/test1.c | 106 -- c/src/tests/samples/unlimited/test2.c | 229 --- c/src/tests/samples/unlimited/test3.c | 146 -- c/src/tests/samples/unlimited/unlimited.doc | 36 - c/src/tests/samples/unlimited/unlimited.scn | 337 ---- 85 files changed, 7156 deletions(-) delete mode 100644 c/src/tests/samples/.cvsignore delete mode 100644 c/src/tests/samples/ChangeLog delete mode 100644 c/src/tests/samples/Makefile.am delete mode 100644 c/src/tests/samples/README delete mode 100644 c/src/tests/samples/base_mp/.cvsignore delete mode 100644 c/src/tests/samples/base_mp/Makefile.am delete mode 100644 c/src/tests/samples/base_mp/apptask.c delete mode 100644 c/src/tests/samples/base_mp/init.c delete mode 100644 c/src/tests/samples/base_mp/node1/.cvsignore delete mode 100644 c/src/tests/samples/base_mp/node1/Makefile.am delete mode 100644 c/src/tests/samples/base_mp/node1/base_mp.doc delete mode 100644 c/src/tests/samples/base_mp/node1/base_mp.scn delete mode 100644 c/src/tests/samples/base_mp/node2/.cvsignore delete mode 100644 c/src/tests/samples/base_mp/node2/Makefile.am delete mode 100644 c/src/tests/samples/base_mp/node2/base_mp.doc delete mode 100644 c/src/tests/samples/base_mp/node2/base_mp.scn delete mode 100644 c/src/tests/samples/base_mp/system.h delete mode 100644 c/src/tests/samples/base_sp/.cvsignore delete mode 100644 c/src/tests/samples/base_sp/Makefile.am delete mode 100644 c/src/tests/samples/base_sp/apptask.c delete mode 100644 c/src/tests/samples/base_sp/base_sp.doc delete mode 100644 c/src/tests/samples/base_sp/base_sp.scn delete mode 100644 c/src/tests/samples/base_sp/init.c delete mode 100644 c/src/tests/samples/base_sp/system.h delete mode 100644 c/src/tests/samples/cdtest/.cvsignore delete mode 100644 c/src/tests/samples/cdtest/Makefile.am delete mode 100644 c/src/tests/samples/cdtest/cdtest.scn delete mode 100644 c/src/tests/samples/cdtest/init.c delete mode 100644 c/src/tests/samples/cdtest/main.cc delete mode 100644 c/src/tests/samples/cdtest/system.h delete mode 100644 c/src/tests/samples/configure.ac delete mode 100644 c/src/tests/samples/fileio/.cvsignore delete mode 100644 c/src/tests/samples/fileio/Makefile.am delete mode 100644 c/src/tests/samples/fileio/fileio.doc delete mode 100644 c/src/tests/samples/fileio/init.c delete mode 100644 c/src/tests/samples/fileio/system.h delete mode 100644 c/src/tests/samples/hello/.cvsignore delete mode 100644 c/src/tests/samples/hello/Makefile.am delete mode 100644 c/src/tests/samples/hello/hello.doc delete mode 100644 c/src/tests/samples/hello/hello.scn delete mode 100644 c/src/tests/samples/hello/init.c delete mode 100644 c/src/tests/samples/hello/system.h delete mode 100644 c/src/tests/samples/loopback/.cvsignore delete mode 100644 c/src/tests/samples/loopback/Makefile.am delete mode 100644 c/src/tests/samples/loopback/README delete mode 100644 c/src/tests/samples/loopback/init.c delete mode 100644 c/src/tests/samples/loopback/loopback.scn delete mode 100644 c/src/tests/samples/minimum/.cvsignore delete mode 100644 c/src/tests/samples/minimum/Makefile.am delete mode 100644 c/src/tests/samples/minimum/init.c delete mode 100644 c/src/tests/samples/minimum/minimum.doc delete mode 100644 c/src/tests/samples/minimum/minimum.scn delete mode 100644 c/src/tests/samples/paranoia/.cvsignore delete mode 100644 c/src/tests/samples/paranoia/Makefile.am delete mode 100644 c/src/tests/samples/paranoia/init.c delete mode 100644 c/src/tests/samples/paranoia/paranoia.c delete mode 100644 c/src/tests/samples/paranoia/paranoia.doc delete mode 100644 c/src/tests/samples/paranoia/system.h delete mode 100644 c/src/tests/samples/pppd/.cvsignore delete mode 100644 c/src/tests/samples/pppd/Makefile-user delete mode 100644 c/src/tests/samples/pppd/Makefile.am delete mode 100644 c/src/tests/samples/pppd/README delete mode 100644 c/src/tests/samples/pppd/init.c delete mode 100644 c/src/tests/samples/pppd/netconfig.h delete mode 100644 c/src/tests/samples/pppd/ppp.conf delete mode 100644 c/src/tests/samples/pppd/pppd.options delete mode 100644 c/src/tests/samples/pppd/pppdapp.c delete mode 100644 c/src/tests/samples/pppd/system.h delete mode 100644 c/src/tests/samples/sample.am delete mode 100644 c/src/tests/samples/ticker/.cvsignore delete mode 100644 c/src/tests/samples/ticker/Makefile.am delete mode 100644 c/src/tests/samples/ticker/init.c delete mode 100644 c/src/tests/samples/ticker/system.h delete mode 100644 c/src/tests/samples/ticker/tasks.c delete mode 100644 c/src/tests/samples/ticker/ticker.doc delete mode 100644 c/src/tests/samples/ticker/ticker.scn delete mode 100644 c/src/tests/samples/unlimited/.cvsignore delete mode 100644 c/src/tests/samples/unlimited/Makefile.am delete mode 100644 c/src/tests/samples/unlimited/init.c delete mode 100644 c/src/tests/samples/unlimited/system.h delete mode 100644 c/src/tests/samples/unlimited/test1.c delete mode 100644 c/src/tests/samples/unlimited/test2.c delete mode 100644 c/src/tests/samples/unlimited/test3.c delete mode 100644 c/src/tests/samples/unlimited/unlimited.doc delete mode 100644 c/src/tests/samples/unlimited/unlimited.scn (limited to 'c') diff --git a/c/src/tests/samples/.cvsignore b/c/src/tests/samples/.cvsignore deleted file mode 100644 index bfdfd995be..0000000000 --- a/c/src/tests/samples/.cvsignore +++ /dev/null @@ -1,14 +0,0 @@ -aclocal.m4 -autom4te*.cache -config.cache -config.guess -config.log -config.status -config.sub -configure -depcomp -install-sh -Makefile -Makefile.in -missing -mkinstalldirs diff --git a/c/src/tests/samples/ChangeLog b/c/src/tests/samples/ChangeLog deleted file mode 100644 index 288a889e09..0000000000 --- a/c/src/tests/samples/ChangeLog +++ /dev/null @@ -1,388 +0,0 @@ -2003-11-10 Ralf Corsepius - - * base_mp/node1/.cvsignore: Remove. - * base_mp/node1/Makefile.am: Remove. - * base_mp/node1/base_mp.doc: Remove. - * base_mp/node1/base_mp.scn: Remove. - * base_mp/.cvsignore: Remove. - * base_mp/Makefile.am: Remove. - * base_mp/apptask.c: Remove. - * base_mp/init.c: Remove. - * base_mp/system.h: Remove. - * base_mp/node2/.cvsignore: Remove. - * base_mp/node2/Makefile.am: Remove. - * base_mp/node2/base_mp.doc: Remove. - * base_mp/node2/base_mp.scn: Remove. - * .cvsignore: Remove. - * ChangeLog: Remove. - * Makefile.am: Remove. - * README: Remove. - * configure.ac: Remove. - * sample.am: Remove. - * base_sp/.cvsignore: Remove. - * base_sp/Makefile.am: Remove. - * base_sp/apptask.c: Remove. - * base_sp/base_sp.doc: Remove. - * base_sp/base_sp.scn: Remove. - * base_sp/init.c: Remove. - * base_sp/system.h: Remove. - * cdtest/.cvsignore: Remove. - * cdtest/Makefile.am: Remove. - * cdtest/cdtest.scn: Remove. - * cdtest/init.c: Remove. - * cdtest/main.cc: Remove. - * cdtest/system.h: Remove. - * fileio/.cvsignore: Remove. - * fileio/Makefile.am: Remove. - * fileio/fileio.doc: Remove. - * fileio/init.c: Remove. - * fileio/system.h: Remove. - * hello/.cvsignore: Remove. - * hello/Makefile.am: Remove. - * hello/hello.doc: Remove. - * hello/hello.scn: Remove. - * hello/init.c: Remove. - * hello/system.h: Remove. - * loopback/.cvsignore: Remove. - * loopback/Makefile.am: Remove. - * loopback/README: Remove. - * loopback/init.c: Remove. - * loopback/loopback.scn: Remove. - * minimum/.cvsignore: Remove. - * minimum/Makefile.am: Remove. - * minimum/init.c: Remove. - * minimum/minimum.doc: Remove. - * minimum/minimum.scn: Remove. - * paranoia/.cvsignore: Remove. - * paranoia/Makefile.am: Remove. - * paranoia/init.c: Remove. - * paranoia/paranoia.c: Remove. - * paranoia/paranoia.doc: Remove. - * paranoia/system.h: Remove. - * pppd/.cvsignore: Remove. - * pppd/Makefile-user: Remove. - * pppd/Makefile.am: Remove. - * pppd/README: Remove. - * pppd/init.c: Remove. - * pppd/netconfig.h: Remove. - * pppd/ppp.conf: Remove. - * pppd/pppd.options: Remove. - * pppd/pppdapp.c: Remove. - * pppd/system.h: Remove. - * ticker/.cvsignore: Remove. - * ticker/Makefile.am: Remove. - * ticker/init.c: Remove. - * ticker/system.h: Remove. - * ticker/tasks.c: Remove. - * ticker/ticker.doc: Remove. - * ticker/ticker.scn: Remove. - * unlimited/.cvsignore: Remove. - * unlimited/Makefile.am: Remove. - * unlimited/init.c: Remove. - * unlimited/system.h: Remove. - * unlimited/test1.c: Remove. - * unlimited/test2.c: Remove. - * unlimited/test3.c: Remove. - * unlimited/unlimited.doc: Remove. - * unlimited/unlimited.scn: Remove. - -2003-10-23 Ralf Corsepius - - * configure.ac: Add AM_CONDITIONAL(LIBCHIP). - * fileio/Makefile.am: Only build if LIBCHIP is available. - -2003-10-22 Ralf Corsepius - - * configure.ac: Remove RTEMS_CANONICAL_HOST. - -2003-10-02 Ralf Corsepius - - * configure.ac:Remove RTEMS_CHECK_CPU. - -2003-09-30 Ralf Corsepius - - * fileio/init.c: Unconditionally define MIN (We *do want* to see - error messages if it conflicts). - -2003-09-04 Joel Sherrill - - * README, base_mp/apptask.c, base_mp/init.c, base_mp/system.h, - base_mp/node1/base_mp.doc, base_mp/node2/base_mp.doc, - base_sp/apptask.c, base_sp/base_sp.doc, base_sp/init.c, - base_sp/system.h, cdtest/init.c, cdtest/main.cc, cdtest/system.h, - fileio/fileio.doc, fileio/init.c, fileio/system.h, hello/hello.doc, - hello/init.c, hello/system.h, minimum/init.c, minimum/minimum.doc, - paranoia/init.c, paranoia/paranoia.doc, paranoia/system.h, - ticker/init.c, ticker/system.h, ticker/tasks.c, ticker/ticker.doc, - unlimited/init.c, unlimited/system.h, unlimited/test1.c, - unlimited/test2.c, unlimited/test3.c, unlimited/unlimited.doc: URL - for license changed. - -2003-08-18 Ralf Corsepius - - * Makefile.am: Reflect having moved aclocal/. - -2003-08-16 Ralf Corsepius - - * Makefile.am: Reflect having moved automake/. - * base_mp/Makefile.am: Reflect having moved automake/. - * base_mp/node1/Makefile.am: Reflect having moved automake/. - * base_mp/node2/Makefile.am: Reflect having moved automake/. - * base_sp/Makefile.am: Reflect having moved automake/. - * cdtest/Makefile.am: Reflect having moved automake/. - * fileio/Makefile.am: Reflect having moved automake/. - * hello/Makefile.am: Reflect having moved automake/. - * loopback/Makefile.am: Reflect having moved automake/. - * minimum/Makefile.am: Reflect having moved automake/. - * paranoia/Makefile.am: Reflect having moved automake/. - * pppd/Makefile.am: Reflect having moved automake/. - * ticker/Makefile.am: Reflect having moved automake/. - * unlimited/Makefile.am: Reflect having moved automake/. - -2003-08-13 Joel Sherrill - - * fileio/.cvsignore: New file. - -2003-08-13 Joel Sherrill - - PR 451/bsps - * pppd/system.h: Depend on TTY driver being in BSPs not simply i386. - -2003-08-11 Ralf Corsepius - - * configure.ac: Use rtems-bugs@rtems.com as bug report email address. - -2003-08-11 Ralf Corsepius - - * fileio/Makefile.am: Remove references to *.scn (Doesn't exist). - * pppd/Makefile.am: Remove references to DOC* (Don't exist). - -2003-08-06 Thomas Doerfler - - PR 369/filesystem - * Makefile.am, configure.ac: sample application to show the use of the - DOSFS functions - * fileio/Makefile.am, fileio/fileio.doc, fileio/init.c, - fileio/system.h: New files. - -2003-06-04 Joel Sherrill - - * pppd/system.h: Hack from Ralf to compile on all targets. - -2003-04-29 Ralf Corsepius - - * configure.ac: Add pppd. - * Makefile.am: Add pppd. - -2003-04-29 Ralf Corsepius - - Adding pppd: - * pppd/Makefile-user: New, copied over from libnetworking/pppd/example. - * pppd/README: New, copied over from libnetworking/pppd/example. - * pppd/init.c: New, copied over from libnetworking/pppd/example. - * pppd/netconfig.h: New, copied over from libnetworking/pppd/example. - * pppd/ppp.conf: New, copied over from libnetworking/pppd/example. - * pppd/pppdapp.c: New, copied over from libnetworking/pppd/example. - * pppd/system.h: New, copied over from libnetworking/pppd/example. - * pppd/pppd.options: New, copied over from libnetworking/pppd/example. - * pppd/Makefile.am: New, converted to automake from Makefile-user. - * pppd/.cvsignore: New. - -2003-03-06 Ralf Corsepius - - * configure.ac: Remove AC_CONFIG_AUX_DIR. - -2003-02-11 Ralf Corsepius - - * configure.ac: AM_INIT_AUTOMAKE([1.7.2]). - -2003-02-11 Ralf Corsepius - - * configure.ac: AC_PREREQ(2.57). - -2003-01-27 Joel Sherrill - - * Makefile.am, configure.ac: Added new test loopback which shows how to - use the loopback interface. Thank you Eric Norum for a portable - target independent test which exercises the TCP/IP. This should - prevent massive failures in the TCP/IP stack from reaching the - street. - * loopback/.cvsignore, loopback/Makefile.am, loopback/README, - loopback/init.c, loopback/loopback.scn: New files. - -2003-01-03 Joel Sherrill - - * unlimited/system.h, unlimited/test1.c: Backed off previous - modification as it does not compile. - -2002-10-31 Chris Johns - - * unlimited/test1.c: PR296. Only fails if more tasks than allowed - can be created. - * unlimited/system.h: PR296. Reference the number of tasks in the - configuration table rather than a hardcoded number. - -2002-11-05 Ralf Corsepius - - * configure.ac: Unconditionally check for CXX (Hack to bug in - autoconf > 2.54). - -2002-10-31 Joel Sherrill - - * base_mp/apptask.c: Removed warning. - -2002-10-28 Joel Sherrill - - * base_mp/apptask.c: Add include of to eliminate warning. - -2002-10-21 Ralf Corsepius - - * .cvsignore: Reformat. - Add autom4te*cache. - Remove autom4te.cache. - -2002-08-11 Ralf Corsepius - - * base_mp/node1/Makefile.am: Use .$(OBJEXT) instead of .o. - * base_mp/node2/Makefile.am: Use .$(OBJEXT) instead of .o. - * base_sp/Makefile.am: Use .$(OBJEXT) instead of .o. - * cdtest/Makefile.am: Use .$(OBJEXT) instead of .o. - * hello/Makefile.am: Use .$(OBJEXT) instead of .o. - * minimum/Makefile.am: Use .$(OBJEXT) instead of .o. - * paranoia/Makefile.am: Use .$(OBJEXT) instead of .o. - * ticker/Makefile.am: Use .$(OBJEXT) instead of .o. - * unlimited/Makefile.am: Use .$(OBJEXT) instead of .o. - -2002-08-01 Joel Sherrill - - * Per PR47 add support for buffered test output. This involved - adding defines to redirect output to a buffer and dump it when - full, at "test pause", and at exit. To avoid problems when redefining - exit(), all tests were modified to call rtems_test_exit(). - Some tests, notable psxtests, had to be modified to include - the standard test macro .h file (pmacros.h or tmacros.h) to - enable this support. - * cdtest/init.c: Modified. - -2002-07-01 Joel Sherrill - - * unlimited/test1.c: Corrected use of _Objects_Information_table - now that it is a two dimensional array based upon API and class. - -2002-04-17 Ralf Corsepius - - * base_sp/apptask.c: Include . - * hello/init.c: Ditto. - * paranoia/init.c: Ditto. - * ticker/tasks.c: Ditto. - * unlimited/init.c: Ditto. - * unlimited/test1.c: Ditto. - * unlimited/test2.c: Ditto. - * unlimited/test3.c: Ditto. - -2002-04-14 Ralf Corsepius - - * configure.ac: Remove ENABLE_GCC28. - -2002-03-27 Ralf Corsepius - - * configure.ac: - AC_INIT(package,_RTEMS_VERSION,_RTEMS_BUGS). - AM_INIT_AUTOMAKE([no-define foreign 1.6]). - * base_mp/node1/Makefile.am: Remove AUTOMAKE_OPTIONS. - * base_mp/Makefile.am: Remove AUTOMAKE_OPTIONS. - * base_mp/node2/Makefile.am: Remove AUTOMAKE_OPTIONS. - * Makefile.am: Remove AUTOMAKE_OPTIONS. - * base_sp/Makefile.am: Remove AUTOMAKE_OPTIONS. - * cdtest/Makefile.am: Remove AUTOMAKE_OPTIONS. - * hello/Makefile.am: Remove AUTOMAKE_OPTIONS. - * minimum/Makefile.am: Remove AUTOMAKE_OPTIONS. - * paranoia/Makefile.am: Remove AUTOMAKE_OPTIONS. - * ticker/Makefile.am: Remove AUTOMAKE_OPTIONS. - * unlimited/Makefile.am: Remove AUTOMAKE_OPTIONS. - -2001-11-26 Ralf Corsepius - - * cdtest/main.cc: Remove RTEMS_TEST_IO_STREAM. - -2001-10-25 Eric Norum - - * cdtest/system.h: Configure 1 semaphore. This probably covers - up not defining one for the GCC C++ Run-Time Libraries. - -2001-10-17 Ralf Corsepius - - * paranoia/Makefile.am: Use LD_LIBS = -lm to make automake-1.5 happy. - -2001-10-12 Joel Sherrill - - * unlimited/init.c, unlimited/system.h, unlimited/test1.c, - unlimited/test2.c, unlimited/test3.c, unlimited/unlimited.doc: - Fixed typo. - -2001-10-11 Ralf Corsepius - - * .cvsignore: Add autom4te.cache for autoconf > 2.52. - * configure.in: Remove. - * configure.ac: New file, generated from configure.in by autoupdate. - -2001-09-22 Ralf Corsepius - - * minimum/Makefile.am: Fix comments to make automake-1.5 happy. - * sample.am: Use TMPINSTALL_FILES = to make automake-1.5 happy. - * cdtest/Makefile.am: Remove LD_LIBS. - -2001-09-19 Ralf Corsepius - - * unlimited/Makefile.am: include leaf.am instead of leaf.cfg. - * base_mp/node2/Makefile.am: include leaf.am instead of leaf.cfg. - * base_mp/node1/Makefile.am: include leaf.am instead of leaf.cfg. - * hello/Makefile.am: include leaf.am instead of leaf.cfg. - * base_sp/Makefile.am: include leaf.am instead of leaf.cfg. - * paranoia/Makefile.am: include leaf.am instead of leaf.cfg. - * cdtest/Makefile.am: include leaf.am instead of leaf.cfg, use - make-cxx-exe. - * ticker/Makefile.am: include leaf.am instead of leaf.cfg. - * minimum/Makefile.am: include leaf.am instead of leaf.cfg. - -2001-06-14 Joel Sherrill - - * cdtest/system.h: Removed configure of POSIX mutexes since - there do not appear to be any used in this test. - -2001-05-10 Ralf Corsepius - - * configure.in: Use RTEMS_PROG_CC_FOR_TARGET([-ansi -fasm]). - -2000-11-09 Ralf Corsepius - - * Makefile.am: Use ... instead of RTEMS_TOPdir in ACLOCAL_AMFLAGS. - -2000-11-02 Ralf Corsepius - - * Makefile.am: Switch to ACLOCAL_AMFLAGS = -I $(RTEMS_TOPdir)/aclocal. - -2000-10-30 Joel Sherrill - - * POSIX include files merged into newlib. This resulted in - some definitions moving to other files and thus some secondary - effects in RTEMS source code. - * paranoia/paranoia.c: Commented out incorrect and conflicting - prototype of read(). - -2000-10-27 Ralf Corsepius - - * Makefile.am: ACLOCAL_AMFLAGS= -I $(RTEMS_TOPdir)/macros. - Switch to GNU canonicalization. - * sample.am: Remove DEFS. - -2000-09-04 Ralf Corsepius - - * base_mp/node1/Makefile.am, base_mp/node2/Makefile.am, - base_sp/Makefile.am, cdtest/Makefile.am, hello/Makefile.am, - minimum/Makefile.am, paranoia/Makefile.am, ticker/Makefile.am, - unlimited/Makefile.am: Include compile.am - -2000-08-10 Joel Sherrill - - * ChangeLog: New file. diff --git a/c/src/tests/samples/Makefile.am b/c/src/tests/samples/Makefile.am deleted file mode 100644 index 07088554ef..0000000000 --- a/c/src/tests/samples/Makefile.am +++ /dev/null @@ -1,26 +0,0 @@ -## -## $Id$ -## - -ACLOCAL_AMFLAGS = -I ../aclocal - -CPLUSPLUS_TESTS = cdtest - -## base_mp is a sample multiprocessing test -MP_TESTS = base_mp - -FP_TESTS = paranoia - -## loopback tests a network loopback interface -NET_TESTS = loopback -NET_TESTS += pppd - -SUBDIRS = hello ticker base_sp unlimited minimum fileio $(MP_TESTS) \ - $(CPLUSPLUS_TESTS) $(FP_TESTS) $(NET_TESTS) - -AUTOMAKE_FILES = sample.am - -EXTRA_DIST = $(AUTOMAKE_FILES) - -include $(top_srcdir)/../automake/subdirs.am -include $(top_srcdir)/../automake/local.am diff --git a/c/src/tests/samples/README b/c/src/tests/samples/README deleted file mode 100644 index b6e03a41f5..0000000000 --- a/c/src/tests/samples/README +++ /dev/null @@ -1,72 +0,0 @@ -# -# COPYRIGHT (c) 1989-1999. -# On-Line Applications Research Corporation (OAR). -# -# The license and distribution terms for this file may be -# found in the file LICENSE in this distribution or at -# http://www.rtems.com/license/LICENSE. -# -# $Id$ -# - -This directory contains the RTEMS Sample Application Suite. -The tests in this directory perform two functions: - - + provide simple examples of applications which can be - used as a starting point for your application. - - + help test a new board support package - -The hello and ticker applications are useful when first bringing up -a new board support package. The base_mp test is useful when -performing initial checkout on a new MPCI layer. - -The following describes each of the sample applications: - - base_mp - - This is a very simple two node multiprocessor application. It consists - of a single initialization task on each node which print out - their respective node numbers and task IDs. This test can be - used as a simple test of a new MPCI layer because it minimizes - the number of packets sent by RTEMS. - - This is intended as a starting point for custom developed multiprocessor - applications. - - base_sp - - This is a simple single processor application which consists of - an initialization task which creates another task. - - This is intended as a starting point for custom developed single - processor applications. - - cdtest - - A very simple C++ application which demonstrates that it is - possible to use C++ contructors and destructors in an RTEMS - application. Also does a perfunctory iostream test. - - hello - - This is the RTEMS version of the classic hello world program. - It consists of single initialization task which prints out - a few messages. - - This test does not include a Clock Tick device driver and can - be used to test the startup code of the board support package - as well as console output. - - paranoia - - A public domain test of the floating point and math library - capabilities of a toolset. It reports discrepancies between - actual and expected results. It is a large test. - - ticker - - This is a simple test of the user's Clock Tick device driver. - This test has an initialization task create three application - tasks which sleep and periodically wake up and print the time. - diff --git a/c/src/tests/samples/base_mp/.cvsignore b/c/src/tests/samples/base_mp/.cvsignore deleted file mode 100644 index 282522db03..0000000000 --- a/c/src/tests/samples/base_mp/.cvsignore +++ /dev/null @@ -1,2 +0,0 @@ -Makefile -Makefile.in diff --git a/c/src/tests/samples/base_mp/Makefile.am b/c/src/tests/samples/base_mp/Makefile.am deleted file mode 100644 index c9d9638c6b..0000000000 --- a/c/src/tests/samples/base_mp/Makefile.am +++ /dev/null @@ -1,11 +0,0 @@ -## -## $Id$ -## - - -SUBDIRS = node1 node2 - -EXTRA_DIST = apptask.c init.c system.h - -include $(top_srcdir)/../automake/subdirs.am -include $(top_srcdir)/../automake/local.am diff --git a/c/src/tests/samples/base_mp/apptask.c b/c/src/tests/samples/base_mp/apptask.c deleted file mode 100644 index de41ea7d52..0000000000 --- a/c/src/tests/samples/base_mp/apptask.c +++ /dev/null @@ -1,38 +0,0 @@ -/* Application_task - * - * This routine is as an example of an application task which - * prints a message including its RTEMS task id. This task - * then invokes exit to return to the monitor. - * - * Input parameters: - * node - processor's node number - * - * Output parameters: NONE - * - * COPYRIGHT (c) 1989-1999. - * On-Line Applications Research Corporation (OAR). - * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.rtems.com/license/LICENSE. - * - * $Id$ - */ - -#include "system.h" -#include -#include - -rtems_task Application_task( - rtems_task_argument node -) -{ - rtems_id tid; - rtems_status_code status; - - status = rtems_task_ident( RTEMS_SELF, RTEMS_SEARCH_ALL_NODES, &tid ); - printf( "This task was invoked with the node argument (%d)\n", node ); - printf( "This task has the id of 0x%x\n", tid ); - printf( "*** END OF SAMPLE MULTIPROCESSOR APPLICATION ***\n" ); - exit( 0 ); -} diff --git a/c/src/tests/samples/base_mp/init.c b/c/src/tests/samples/base_mp/init.c deleted file mode 100644 index ac0dc3716a..0000000000 --- a/c/src/tests/samples/base_mp/init.c +++ /dev/null @@ -1,46 +0,0 @@ -/* Init - * - * This routine is the initialization task for this test program. - * It is called from init_exec and has the responsibility for creating - * and starting the tasks that make up the test. If the time of day - * clock is required for the application, the current time might be - * set by this task. - * - * Input parameters: NONE - * - * Output parameters: NONE - * - * COPYRIGHT (c) 1989-1999. - * On-Line Applications Research Corporation (OAR). - * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.rtems.com/license/LICENSE. - * - * $Id$ - */ - -#define CONFIGURE_INIT -#include "system.h" -#include - -rtems_task Init( - rtems_task_argument argument -) -{ - rtems_name task_name; - rtems_id tid; - rtems_status_code status; - - printf( "\n\n*** SAMPLE MULTIPROCESSOR APPLICATION ***\n" ); - printf( "Creating and starting an application task\n" ); - task_name = rtems_build_name( 'T', 'A', '1', ' ' ); - status = rtems_task_create( task_name, 1, RTEMS_MINIMUM_STACK_SIZE, - RTEMS_INTERRUPT_LEVEL(0), RTEMS_DEFAULT_ATTRIBUTES, &tid ); - status = rtems_task_start( - tid, - Application_task, - Multiprocessing_configuration.node - ); - status = rtems_task_delete( RTEMS_SELF ); -} diff --git a/c/src/tests/samples/base_mp/node1/.cvsignore b/c/src/tests/samples/base_mp/node1/.cvsignore deleted file mode 100644 index 282522db03..0000000000 --- a/c/src/tests/samples/base_mp/node1/.cvsignore +++ /dev/null @@ -1,2 +0,0 @@ -Makefile -Makefile.in diff --git a/c/src/tests/samples/base_mp/node1/Makefile.am b/c/src/tests/samples/base_mp/node1/Makefile.am deleted file mode 100644 index 10afb291e4..0000000000 --- a/c/src/tests/samples/base_mp/node1/Makefile.am +++ /dev/null @@ -1,50 +0,0 @@ -## -## $Id$ -## - - -VPATH = @srcdir@:@srcdir@/.. - -NODE = 1 -SAMPLE = base_mp-node$(NODE) -PGM = ${ARCH}/$(SAMPLE).exe - -MANAGERS = io mp - -C_FILES = init.c apptask.c -C_O_FILES = $(C_FILES:%.c=${ARCH}/%.$(OBJEXT)) - -H_FILES = system.h - -DOCTYPES = doc scn -DOCS = $(DOCTYPES:%=base_mp.%) - -SRCS = $(DOCS) $(C_FILES) $(H_FILES) -OBJS = $(C_O_FILES) - -PRINT_SRCS = $(DOCS) - -include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg -include $(top_srcdir)/../automake/compile.am -include $(top_srcdir)/../automake/leaf.am -include $(top_srcdir)/sample.am - -AM_CPPFLAGS += -DNODE_NUMBER=$(NODE) -I. - -if HAS_MP - -# -# (OPTIONAL) Add local stuff here using += -# - -${PGM}: $(OBJS) $(LINK_FILES) - $(make-exe) - -all-local: $(ARCH) $(TMPINSTALL_FILES) -else -all-local: -endif - -EXTRA_DIST = $(DOCS) - -include $(top_srcdir)/../automake/local.am diff --git a/c/src/tests/samples/base_mp/node1/base_mp.doc b/c/src/tests/samples/base_mp/node1/base_mp.doc deleted file mode 100644 index 5c0baceb8d..0000000000 --- a/c/src/tests/samples/base_mp/node1/base_mp.doc +++ /dev/null @@ -1,12 +0,0 @@ -# -# $Id$ -# -# COPYRIGHT (c) 1989-1999. -# On-Line Applications Research Corporation (OAR). -# -# The license and distribution terms for this file may be -# found in the file LICENSE in this distribution or at -# http://www.rtems.com/license/LICENSE. -# - - diff --git a/c/src/tests/samples/base_mp/node1/base_mp.scn b/c/src/tests/samples/base_mp/node1/base_mp.scn deleted file mode 100644 index a2d2f359be..0000000000 --- a/c/src/tests/samples/base_mp/node1/base_mp.scn +++ /dev/null @@ -1,5 +0,0 @@ -*** SAMPLE MULTIPROCESSOR APPLICATION *** -Creating and starting an application task -This task was invoked with the node argument (1) -This task has the id of 0x10002 -*** END OF SAMPLE MULTIPROCESSOR APPLICATION *** diff --git a/c/src/tests/samples/base_mp/node2/.cvsignore b/c/src/tests/samples/base_mp/node2/.cvsignore deleted file mode 100644 index 282522db03..0000000000 --- a/c/src/tests/samples/base_mp/node2/.cvsignore +++ /dev/null @@ -1,2 +0,0 @@ -Makefile -Makefile.in diff --git a/c/src/tests/samples/base_mp/node2/Makefile.am b/c/src/tests/samples/base_mp/node2/Makefile.am deleted file mode 100644 index 5d912c0680..0000000000 --- a/c/src/tests/samples/base_mp/node2/Makefile.am +++ /dev/null @@ -1,50 +0,0 @@ -## -## $Id$ -## - - -VPATH = @srcdir@:@srcdir@/.. - -NODE = 2 -SAMPLE = base_mp-node$(NODE) -PGM = ${ARCH}/$(SAMPLE).exe - -MANAGERS = io mp - -C_FILES = init.c apptask.c -C_O_FILES = $(C_FILES:%.c=${ARCH}/%.$(OBJEXT)) - -H_FILES = system.h - -DOCTYPES = doc scn -DOCS = $(DOCTYPES:%=base_mp.%) - -SRCS = $(DOCS) $(C_FILES) $(H_FILES) -OBJS = $(C_O_FILES) - -PRINT_SRCS = $(DOCS) - -include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg -include $(top_srcdir)/../automake/compile.am -include $(top_srcdir)/../automake/leaf.am -include $(top_srcdir)/sample.am - -AM_CPPFLAGS += -DNODE_NUMBER=$(NODE) -I. - -if HAS_MP - -# -# (OPTIONAL) Add local stuff here using += -# - -${PGM}: $(OBJS) $(LINK_FILES) - $(make-exe) - -all-local: $(ARCH) $(TMPINSTALL_FILES) -else -all-local: -endif - -EXTRA_DIST = $(DOCS) - -include $(top_srcdir)/../automake/local.am diff --git a/c/src/tests/samples/base_mp/node2/base_mp.doc b/c/src/tests/samples/base_mp/node2/base_mp.doc deleted file mode 100644 index 5c0baceb8d..0000000000 --- a/c/src/tests/samples/base_mp/node2/base_mp.doc +++ /dev/null @@ -1,12 +0,0 @@ -# -# $Id$ -# -# COPYRIGHT (c) 1989-1999. -# On-Line Applications Research Corporation (OAR). -# -# The license and distribution terms for this file may be -# found in the file LICENSE in this distribution or at -# http://www.rtems.com/license/LICENSE. -# - - diff --git a/c/src/tests/samples/base_mp/node2/base_mp.scn b/c/src/tests/samples/base_mp/node2/base_mp.scn deleted file mode 100644 index 95bc96a808..0000000000 --- a/c/src/tests/samples/base_mp/node2/base_mp.scn +++ /dev/null @@ -1,5 +0,0 @@ -*** SAMPLE MULTIPROCESSOR APPLICATION *** -Creating and starting an application task -This task was invoked with the node argument (2) -This task has the id of 0x20002 -*** END OF SAMPLE MULTIPROCESSOR APPLICATION *** diff --git a/c/src/tests/samples/base_mp/system.h b/c/src/tests/samples/base_mp/system.h deleted file mode 100644 index f846d60b2b..0000000000 --- a/c/src/tests/samples/base_mp/system.h +++ /dev/null @@ -1,47 +0,0 @@ -/* system.h - * - * This include file contains information that is included in every - * function in the test set. - * - * COPYRIGHT (c) 1989-1999. - * On-Line Applications Research Corporation (OAR). - * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.rtems.com/license/LICENSE. - * - * $Id$ - */ - -#include - -/* functions */ - -rtems_task Init( - rtems_task_argument argument -); - -rtems_task Application_task( - rtems_task_argument argument -); - -/* configuration information */ - -#include /* for device driver prototypes */ - -#define CONFIGURE_MP_APPLICATION - -#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER -#define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER - -#define CONFIGURE_MAXIMUM_TASKS 2 - -#define CONFIGURE_RTEMS_INIT_TASKS_TABLE - -/* - * Put the overrides of default configuration parameters here. - */ - -#include - -/* end of include file */ diff --git a/c/src/tests/samples/base_sp/.cvsignore b/c/src/tests/samples/base_sp/.cvsignore deleted file mode 100644 index 282522db03..0000000000 --- a/c/src/tests/samples/base_sp/.cvsignore +++ /dev/null @@ -1,2 +0,0 @@ -Makefile -Makefile.in diff --git a/c/src/tests/samples/base_sp/Makefile.am b/c/src/tests/samples/base_sp/Makefile.am deleted file mode 100644 index 0c5b0ac218..0000000000 --- a/c/src/tests/samples/base_sp/Makefile.am +++ /dev/null @@ -1,41 +0,0 @@ -## -## $Id$ -## - - -SAMPLE = base_sp -PGM = ${ARCH}/$(SAMPLE).exe - -MANAGERS = io - -C_FILES = init.c apptask.c -C_O_FILES = $(C_FILES:%.c=${ARCH}/%.$(OBJEXT)) - -H_FILES = system.h -noinst_HEADERS = $(H_FILES) - -DOCTYPES = doc scn -DOCS = $(DOCTYPES:%=$(SAMPLE).%) - -SRCS = $(DOCS) $(C_FILES) $(H_FILES) -OBJS = $(C_O_FILES) - -PRINT_SRCS = $(DOCS) - -include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg -include $(top_srcdir)/../automake/compile.am -include $(top_srcdir)/../automake/leaf.am -include $(top_srcdir)/sample.am - -# -# (OPTIONAL) Add local stuff here using += -# - -all-local: ${ARCH} $(TMPINSTALL_FILES) - -${PGM}: $(OBJS) $(LINK_FILES) - $(make-exe) - -EXTRA_DIST = $(C_FILES) $(DOCS) - -include $(top_srcdir)/../automake/local.am diff --git a/c/src/tests/samples/base_sp/apptask.c b/c/src/tests/samples/base_sp/apptask.c deleted file mode 100644 index c3f9cc5571..0000000000 --- a/c/src/tests/samples/base_sp/apptask.c +++ /dev/null @@ -1,39 +0,0 @@ -/* Application_task - * - * This routine is as an example of an application task which - * prints a message including its RTEMS task id. This task - * then invokes exit to return to the monitor. - * - * Input parameters: NONE - * - * Output parameters: NONE - * - * COPYRIGHT (c) 1989-1999. - * On-Line Applications Research Corporation (OAR). - * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.rtems.com/license/LICENSE. - * - * $Id$ - */ - -#include "system.h" -#include -#include - -rtems_task Application_task( - rtems_task_argument argument -) -{ - rtems_id tid; - rtems_status_code status; - - status = rtems_task_ident( RTEMS_SELF, RTEMS_SEARCH_ALL_NODES, &tid ); - - printf( "Application task was invoked with argument (%d) " - "and has id of 0x%x\n", argument, tid ); - - printf( "*** END OF SAMPLE SINGLE PROCESSOR APPLICATION ***\n" ); - exit( 0 ); -} diff --git a/c/src/tests/samples/base_sp/base_sp.doc b/c/src/tests/samples/base_sp/base_sp.doc deleted file mode 100644 index 5c0baceb8d..0000000000 --- a/c/src/tests/samples/base_sp/base_sp.doc +++ /dev/null @@ -1,12 +0,0 @@ -# -# $Id$ -# -# COPYRIGHT (c) 1989-1999. -# On-Line Applications Research Corporation (OAR). -# -# The license and distribution terms for this file may be -# found in the file LICENSE in this distribution or at -# http://www.rtems.com/license/LICENSE. -# - - diff --git a/c/src/tests/samples/base_sp/base_sp.scn b/c/src/tests/samples/base_sp/base_sp.scn deleted file mode 100644 index 117ddaecb8..0000000000 --- a/c/src/tests/samples/base_sp/base_sp.scn +++ /dev/null @@ -1,5 +0,0 @@ -*** SAMPLE SINGLE PROCESSOR APPLICATION *** -Creating and starting an application task -Application task was invoked with argument (0) and has id of 0x10002 -*** END OF SAMPLE SINGLE PROCESSOR APPLICATION *** - diff --git a/c/src/tests/samples/base_sp/init.c b/c/src/tests/samples/base_sp/init.c deleted file mode 100644 index 24d4e93b6e..0000000000 --- a/c/src/tests/samples/base_sp/init.c +++ /dev/null @@ -1,48 +0,0 @@ -/* Init - * - * This routine is the initialization task for this test program. - * It is called from init_exec and has the responsibility for creating - * and starting the tasks that make up the test. If the time of day - * clock is required for the application, the current time might be - * set by this task. - * - * Input parameters: NONE - * - * Output parameters: NONE - * - * COPYRIGHT (c) 1989-1999. - * On-Line Applications Research Corporation (OAR). - * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.rtems.com/license/LICENSE. - * - * $Id$ - */ - -#define CONFIGURE_INIT -#include "system.h" -#include - -#define ARGUMENT 0 - -rtems_task Init( - rtems_task_argument argument -) -{ - rtems_name task_name; - rtems_id tid; - rtems_status_code status; - - printf( "\n\n*** SAMPLE SINGLE PROCESSOR APPLICATION ***\n" ); - printf( "Creating and starting an application task\n" ); - - task_name = rtems_build_name( 'T', 'A', '1', ' ' ); - - status = rtems_task_create( task_name, 1, RTEMS_MINIMUM_STACK_SIZE, - RTEMS_INTERRUPT_LEVEL(0), RTEMS_DEFAULT_ATTRIBUTES, &tid ); - - status = rtems_task_start( tid, Application_task, ARGUMENT ); - - status = rtems_task_delete( RTEMS_SELF ); -} diff --git a/c/src/tests/samples/base_sp/system.h b/c/src/tests/samples/base_sp/system.h deleted file mode 100644 index c076ab3b1b..0000000000 --- a/c/src/tests/samples/base_sp/system.h +++ /dev/null @@ -1,40 +0,0 @@ -/* system.h - * - * This include file contains information that is included in every - * function in the test set. - * - * COPYRIGHT (c) 1989-1999. - * On-Line Applications Research Corporation (OAR). - * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.rtems.com/license/LICENSE. - * - * $Id$ - */ - -#include - -/* functions */ - -rtems_task Init( - rtems_task_argument argument -); - -rtems_task Application_task( - rtems_task_argument argument -); - -/* configuration information */ - -#include /* for device driver prototypes */ - -#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER -#define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER - -#define CONFIGURE_MAXIMUM_TASKS 2 -#define CONFIGURE_RTEMS_INIT_TASKS_TABLE - -#include - -/* end of include file */ diff --git a/c/src/tests/samples/cdtest/.cvsignore b/c/src/tests/samples/cdtest/.cvsignore deleted file mode 100644 index 282522db03..0000000000 --- a/c/src/tests/samples/cdtest/.cvsignore +++ /dev/null @@ -1,2 +0,0 @@ -Makefile -Makefile.in diff --git a/c/src/tests/samples/cdtest/Makefile.am b/c/src/tests/samples/cdtest/Makefile.am deleted file mode 100644 index ebe262ac92..0000000000 --- a/c/src/tests/samples/cdtest/Makefile.am +++ /dev/null @@ -1,48 +0,0 @@ -## -## $Id$ -## - - -SAMPLE = cdtest -PGM = ${ARCH}/$(SAMPLE).exe - -MANAGERS = all - -C_FILES = init.c -C_O_FILES = $(C_FILES:%.c=${ARCH}/%.$(OBJEXT)) - -CC_FILES = main.cc -CC_O_FILES = $(CC_FILES:%.cc=${ARCH}/%.$(OBJEXT)) - -H_FILES = system.h -noinst_HEADERS = $(H_FILES) - -DOCTYPES = scn -DOCS = $(DOCTYPES:%=$(SAMPLE).%) - -SRCS = $(DOCS) $(C_FILES) $(CC_FILES) $(H_FILES) -OBJS = $(C_O_FILES) $(CC_O_FILES) - -PRINT_SRCS = $(DOCS) - -include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg -include $(top_srcdir)/../automake/compile.am -include $(top_srcdir)/../automake/leaf.am -include $(top_srcdir)/sample.am - -# -# (OPTIONAL) Add local stuff here using += -# - -if HAS_CXX -${PGM}: $(OBJS) $(LINK_FILES) - $(make-cxx-exe) - -all-local: ${ARCH} $(TMPINSTALL_FILES) -else -all-local: -endif - -EXTRA_DIST = $(C_FILES) $(CC_FILES) $(DOCS) - -include $(top_srcdir)/../automake/local.am diff --git a/c/src/tests/samples/cdtest/cdtest.scn b/c/src/tests/samples/cdtest/cdtest.scn deleted file mode 100644 index a832a72372..0000000000 --- a/c/src/tests/samples/cdtest/cdtest.scn +++ /dev/null @@ -1,31 +0,0 @@ -Hey I'm in base class constructor number 1 for 0x400010cc. -Hey I'm in base class constructor number 2 for 0x400010d4. -Hey I'm in derived class constructor number 3 for 0x400010d4. - - -*** CONSTRUCTOR/DESTRUCTOR TEST *** -Hey I'm in base class constructor number 4 for 0x4009ee08. -Hey I'm in base class constructor number 5 for 0x4009ee10. -Hey I'm in base class constructor number 6 for 0x4009ee18. -Hey I'm in base class constructor number 7 for 0x4009ee20. -Hey I'm in derived class constructor number 8 for 0x4009ee20. -Testing a C++ I/O stream -Hey I'm in derived class destructor number 8 for 0x4009ee20. -Derived class - Instantiation order 8 -Hey I'm in base class destructor number 7 for 0x4009ee20. -Instantiation order 8 -Hey I'm in base class destructor number 6 for 0x4009ee18. -Instantiation order 6 -Hey I'm in base class destructor number 5 for 0x4009ee10. -Instantiation order 5 -Hey I'm in base class destructor number 4 for 0x4009ee08. -Instantiation order 5 -*** END OF CONSTRUCTOR/DESTRUCTOR TEST *** - - -Hey I'm in derived class destructor number 3 for 0x400010d4. -Derived class - Instantiation order 3 -Hey I'm in base class destructor number 2 for 0x400010d4. -Instantiation order 3 -Hey I'm in base class destructor number 1 for 0x400010cc. -Instantiation order 1 diff --git a/c/src/tests/samples/cdtest/init.c b/c/src/tests/samples/cdtest/init.c deleted file mode 100644 index b2bed90f86..0000000000 --- a/c/src/tests/samples/cdtest/init.c +++ /dev/null @@ -1,26 +0,0 @@ -/* Init - * - * This routine is the initialization task for this test program. - * It is called from init_exec and has the responsibility for creating - * and starting the tasks that make up the test. If the time of day - * clock is required for the test, it should also be set to a known - * value by this function. - * - * Input parameters: NONE - * - * Output parameters: NONE - * - * COPYRIGHT (c) 1989-1999. - * On-Line Applications Research Corporation (OAR). - * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.rtems.com/license/LICENSE. - * - * $Id$ - */ - -#define CONFIGURE_INIT -#include "system.h" -#include -#include diff --git a/c/src/tests/samples/cdtest/main.cc b/c/src/tests/samples/cdtest/main.cc deleted file mode 100644 index 25dd0e2a63..0000000000 --- a/c/src/tests/samples/cdtest/main.cc +++ /dev/null @@ -1,214 +0,0 @@ -/* - * This routine is the initialization task for this test program. - * It is called from init_exec and has the responsibility for creating - * and starting the tasks that make up the test. If the time of day - * clock is required for the test, it should also be set to a known - * value by this function. - * - * Input parameters: NONE - * - * Output parameters: NONE - * - * COPYRIGHT (c) 1994 by Division Incorporated - * Based in part on OAR works. - * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.rtems.com/license/LICENSE. - * - * - * by Rosimildo da Silva: - * Modified the test a bit to indicate when an instance is - * global or not, and added code to test C++ exception. - * - * - * $Id$ - */ - -#include -#include -#include -#ifdef RTEMS_TEST_IO_STREAM -#include -#endif - -extern "C" -{ -#include -extern rtems_task main_task(rtems_task_argument); -} - -static int num_inst = 0; - -class AClass { -public: - AClass(const char *p = "LOCAL" ) : ptr( p ) - { - num_inst++; - printf( - "%s: Hey I'm in base class constructor number %d for %p.\n", - p, num_inst, this - ); - - /* - * Make sure we use some space - */ - - string = new char[50]; - sprintf(string, "Instantiation order %d", num_inst); - }; - - virtual ~AClass() - { - printf( - "%s: Hey I'm in base class destructor number %d for %p.\n", - ptr, num_inst, this - ); - print(); - num_inst--; - }; - - virtual void print() { printf("%s\n", string); }; - -protected: - char *string; - const char *ptr; -}; - -class BClass : public AClass { -public: - BClass(const char *p = "LOCAL" ) : AClass( p ) - { - num_inst++; - printf( - "%s: Hey I'm in derived class constructor number %d for %p.\n", - p, num_inst, this - ); - - /* - * Make sure we use some space - */ - - string = new char[50]; - sprintf(string, "Instantiation order %d", num_inst); - }; - - ~BClass() - { - printf( - "%s: Hey I'm in derived class destructor number %d for %p.\n", - ptr, num_inst, - this - ); - print(); - num_inst--; - }; - - void print() { printf("Derived class - %s\n", string); } -}; - - -class RtemsException -{ -public: - - RtemsException( char *module, int ln, int err = 0 ) - : error( err ), line( ln ), file( module ) - { - printf( "RtemsException raised=File:%s, Line:%d, Error=%X\n", - file, line, error ); - } - - void show() - { - printf( "RtemsException ---> File:%s, Line:%d, Error=%X\n", - file, line, error ); - } - -private: - int error; - int line; - char *file; - -}; - - - -AClass foo( "GLOBAL" ); -BClass foobar( "GLOBAL" ); - -void -cdtest(void) -{ - AClass bar, blech, blah; - BClass bleak; - -#ifdef RTEMS_TEST_IO_STREAM - cout << "Testing a C++ I/O stream" << endl; -#else - printf("IO Stream not tested\n"); -#endif - bar = blech; - rtems_task_wake_after( 5 * get_ticks_per_second() ); -} - -// -// main equivalent -// It can not be called 'main' since the bsp owns that name -// in many implementations in order to get global constructors -// run. -// - -static void foo_function() -{ - try - { - throw "foo_function() throw this exception"; - } - catch( const char *e ) - { - printf( "foo_function() catch block called:\n < %s >\n", e ); - throw "foo_function() re-throwing execption..."; - } -} - -rtems_task main_task( - rtems_task_argument -) -{ - printf( "\n\n*** CONSTRUCTOR/DESTRUCTOR TEST ***\n" ); - - cdtest(); - - printf( "*** END OF CONSTRUCTOR/DESTRUCTOR TEST ***\n\n\n" ); - - - printf( "*** TESTING C++ EXCEPTIONS ***\n\n" ); - - try - { - foo_function(); - } - catch( const char *e ) - { - printf( "Success catching a char * exception\n%s\n", e ); - } - try - { - printf( "throw an instance based exception\n" ); - throw RtemsException( __FILE__, __LINE__, 0x55 ); - } - catch( RtemsException & ex ) - { - printf( "Success catching RtemsException...\n" ); - ex.show(); - } - catch(...) - { - printf( "Caught another exception.\n" ); - } - printf( "Exceptions are working properly.\n" ); - rtems_task_wake_after( 5 * get_ticks_per_second() ); - printf( "Global Dtors should be called after this line....\n" ); - exit(0); -} diff --git a/c/src/tests/samples/cdtest/system.h b/c/src/tests/samples/cdtest/system.h deleted file mode 100644 index de883665c4..0000000000 --- a/c/src/tests/samples/cdtest/system.h +++ /dev/null @@ -1,40 +0,0 @@ -/* system.h - * - * This include file contains information that is included in every - * function in the test set. - * - * COPYRIGHT (c) 1989-1999. - * On-Line Applications Research Corporation (OAR). - * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.rtems.com/license/LICENSE. - * - * $Id$ - */ - -#include - -/* functions */ - -rtems_task main_task( - rtems_task_argument argument -); - -/* configuration information */ - -#include /* for device driver prototypes */ - -#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER -#define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER - -#define CONFIGURE_MAXIMUM_TASKS 1 -#define CONFIGURE_MAXIMUM_SEMAPHORES 1 - -#define CONFIGURE_RTEMS_INIT_TASKS_TABLE -#define CONFIGURE_INIT_TASK_ENTRY_POINT main_task -#define CONFIGURE_INIT_TASK_NAME rtems_build_name( 'C', 'T', 'O', 'R' ) - -#include - -/* end of include file */ diff --git a/c/src/tests/samples/configure.ac b/c/src/tests/samples/configure.ac deleted file mode 100644 index a8c8891bb5..0000000000 --- a/c/src/tests/samples/configure.ac +++ /dev/null @@ -1,56 +0,0 @@ -## Process this file with autoconf to produce a configure script. -## -## $Id$ - -AC_PREREQ(2.57) -AC_INIT([rtems-c-src-tests-samples],[_RTEMS_VERSION],[rtems-bugs@rtems.com]) -AC_CONFIG_SRCDIR([hello]) -RTEMS_TOP(../../../..) - -RTEMS_CANONICAL_TARGET_CPU - -AM_INIT_AUTOMAKE([no-define foreign 1.7.2]) -AM_MAINTAINER_MODE - -RTEMS_ENABLE_NETWORKING -RTEMS_ENABLE_CXX -RTEMS_ENABLE_BARE - -RTEMS_ENV_RTEMSBSP - -RTEMS_PROJECT_ROOT - -RTEMS_PROG_CC_FOR_TARGET([-ansi -fasm]) - -RTEMS_PROG_CXX_FOR_TARGET - -RTEMS_CANONICALIZE_TOOLS - -RTEMS_CHECK_CUSTOM_BSP(RTEMS_BSP) -RTEMS_CHECK_MULTIPROCESSING(RTEMS_BSP) -RTEMS_CHECK_CXX(RTEMS_BSP) -RTEMS_CHECK_NETWORKING - -AM_CONDITIONAL(HAS_NETWORKING,test "$HAS_NETWORKING" = "yes") -AM_CONDITIONAL(HAS_CXX,test "$HAS_CPLUSPLUS" = "yes") -AM_CONDITIONAL(HAS_MP,test "$HAS_MP" = "yes") -#FIXME: We should use a feature based check -AM_CONDITIONAL(LIBCHIP,[test "$RTEMS_BSP_FAMILY" != "posix"]) - -# Explicitly list all Makefiles here -AC_CONFIG_FILES([Makefile -base_sp/Makefile -hello/Makefile -loopback/Makefile -minimum/Makefile -fileio/Makefile -paranoia/Makefile -ticker/Makefile -unlimited/Makefile -base_mp/Makefile -base_mp/node1/Makefile -base_mp/node2/Makefile -cdtest/Makefile -pppd/Makefile -]) -AC_OUTPUT diff --git a/c/src/tests/samples/fileio/.cvsignore b/c/src/tests/samples/fileio/.cvsignore deleted file mode 100644 index 282522db03..0000000000 --- a/c/src/tests/samples/fileio/.cvsignore +++ /dev/null @@ -1,2 +0,0 @@ -Makefile -Makefile.in diff --git a/c/src/tests/samples/fileio/Makefile.am b/c/src/tests/samples/fileio/Makefile.am deleted file mode 100644 index eab6dbba35..0000000000 --- a/c/src/tests/samples/fileio/Makefile.am +++ /dev/null @@ -1,44 +0,0 @@ -## -## Makefile.am,v 1.9 2002/08/11 05:18:59 ralf Exp -## - - -SAMPLE = fileio -PGM = ${ARCH}/$(SAMPLE).exe - -MANAGERS = io message semaphore - -C_FILES = init.c -C_O_FILES = $(C_FILES:%.c=${ARCH}/%.$(OBJEXT)) - -H_FILES = system.h -noinst_HEADERS = $(H_FILES) - -DOCTYPES = doc -DOCS = $(DOCTYPES:%=$(SAMPLE).%) - -SRCS = $(DOCS) $(C_FILES) $(H_FILES) -OBJS = $(C_O_FILES) - -PRINT_SRCS = $(DOCS) - -include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg -include $(top_srcdir)/../automake/compile.am -include $(top_srcdir)/../automake/leaf.am -include $(top_srcdir)/sample.am - -# -# (OPTIONAL) Add local stuff here using += -# - -if LIBCHIP -all-local: ${ARCH} $(TMPINSTALL_FILES) - -${PGM}: $(OBJS) $(LINK_FILES) - $(make-exe) -endif - -EXTRA_DIST = $(C_FILES) $(DOCS) - -include $(top_srcdir)/../automake/local.am - diff --git a/c/src/tests/samples/fileio/fileio.doc b/c/src/tests/samples/fileio/fileio.doc deleted file mode 100644 index 4bce0f016f..0000000000 --- a/c/src/tests/samples/fileio/fileio.doc +++ /dev/null @@ -1,45 +0,0 @@ -# -# fileio.doc,v -# -# COPYRIGHT (c) 1989-1999. -# On-Line Applications Research Corporation (OAR). -# -# The license and distribution terms for this file may be -# found in the file LICENSE in this distribution or at -# http://www.rtems.com/license/LICENSE. -# - -This sample implements some basic tests for the file systems -available. It provides the following functionality: - -- perform basic file read/write tests on arbitrary file paths with -selectable I/O buffer size -- perform functions to evaluate FAT disk partition tables -- perform functions to mount FAT disks to the file system tree - -A sample session might look like this: - -- start this system - -- select "p" (part_table_initialize) to read in the partition table of -first harddisk, enter the device name "/dev/hda", when prompted - -- select "f" (fsmount) to try to mount the partitions - /dev/hda1../dev/hdc4 to corresponding mount points. Non-existant - partitions will report an error, but will not abort the tests - -- select "w" (write file) to create a new file on the mounted disk (or - in the IMFS). Enter the file name (e.g. "/mnt/hda1/test_1M.txt"), - the file size (e.g. 64K or 2M) and the buffer size to use for the - write calls (e.g. 32 or 4K). Then the sample will try to write the - corresponding file and print the time consumed and data rate achived. - -- select "r" (read file) to read a file (without displaying the - contents). It has similar parameters as "write file", but does not - query the file size. - -- select "s" to call the rtems shell with its various capabilities. - - - - diff --git a/c/src/tests/samples/fileio/init.c b/c/src/tests/samples/fileio/init.c deleted file mode 100644 index 1cb82a011d..0000000000 --- a/c/src/tests/samples/fileio/init.c +++ /dev/null @@ -1,596 +0,0 @@ -/* Init - * - * This routine is the initialization task for this test program. - * It is called from init_exec and has the responsibility for creating - * and starting the tasks that make up the test. If the time of day - * clock is required for the test, it should also be set to a known - * value by this function. - * - * Input parameters: NONE - * - * Output parameters: NONE - * - * COPYRIGHT (c) 1989-1999. - * On-Line Applications Research Corporation (OAR). - * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.rtems.com/license/LICENSE. - * - * init.c,v 1.11 2000/06/12 15:00:12 joel Exp - */ - -#define CONFIGURE_INIT -#include "system.h" -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -/* - * Table of FAT file systems that will be mounted - * with the "fsmount" function. - * See cpukit/libmisc/fsmount for definition of fields - */ -fstab_t fs_table[] = { - { - "/dev/hda1","/mnt/hda1", - &msdos_ops, RTEMS_FILESYSTEM_READ_WRITE, - FSMOUNT_MNT_OK | FSMOUNT_MNTPNT_CRTERR | FSMOUNT_MNT_FAILED, - 0 - }, - { - "/dev/hda2","/mnt/hda2", - &msdos_ops, RTEMS_FILESYSTEM_READ_WRITE, - FSMOUNT_MNT_OK | FSMOUNT_MNTPNT_CRTERR | FSMOUNT_MNT_FAILED, - 0 - }, - { - "/dev/hda3","/mnt/hda3", - &msdos_ops, RTEMS_FILESYSTEM_READ_WRITE, - FSMOUNT_MNT_OK | FSMOUNT_MNTPNT_CRTERR | FSMOUNT_MNT_FAILED, - 0 - }, - { - "/dev/hda4","/mnt/hda4", - &msdos_ops, RTEMS_FILESYSTEM_READ_WRITE, - FSMOUNT_MNT_OK | FSMOUNT_MNTPNT_CRTERR | FSMOUNT_MNT_FAILED, - 0 - }, - { - "/dev/hdc1","/mnt/hdc1", - &msdos_ops, RTEMS_FILESYSTEM_READ_WRITE, - FSMOUNT_MNT_OK | FSMOUNT_MNTPNT_CRTERR | FSMOUNT_MNT_FAILED, - 0 - }, - { - "/dev/hdc2","/mnt/hdc2", - &msdos_ops, RTEMS_FILESYSTEM_READ_WRITE, - FSMOUNT_MNT_OK | FSMOUNT_MNTPNT_CRTERR | FSMOUNT_MNT_FAILED, - 0 - }, - { - "/dev/hdc3","/mnt/hdc3", - &msdos_ops, RTEMS_FILESYSTEM_READ_WRITE, - FSMOUNT_MNT_OK | FSMOUNT_MNTPNT_CRTERR | FSMOUNT_MNT_FAILED, - 0 - }, - { - "/dev/hdc4","/mnt/hdc4", - &msdos_ops, RTEMS_FILESYSTEM_READ_WRITE, - FSMOUNT_MNT_OK | FSMOUNT_MNTPNT_CRTERR | FSMOUNT_MNT_FAILED, - 0 - } -}; - -#define MIN(a,b) (((a) > (b)) ? (b) : (a)) - -#define USE_SHELL - -#ifdef USE_SHELL -#include - -void fileio_start_shell(void) -{ - printf(" =========================\n"); - printf(" starting shell\n"); - printf(" =========================\n"); - shell_init("SHLL",0,100,"/dev/console", - B9600 | CS8, - 0); - rtems_task_suspend(RTEMS_SELF); -} - -#endif /* USE_SHELL */ - -void fileio_print_free_heap(void) -{ - printf("--- unused dynamic memory: %lu bytes ---\n", - (unsigned long) malloc_free_space()); -} - - -void fileio_part_table_initialize(void) -{ - char devname[64]; - rtems_status_code rc; - - printf(" =========================\n"); - printf(" Initialize partition table\n"); - printf(" =========================\n"); - fileio_print_free_heap(); - printf(" Enter device to initialize ==>"); - fgets(devname,sizeof(devname)-1,stdin); - while (devname[strlen(devname)-1] == '\n') { - devname[strlen(devname)-1] = '\0'; - } - /* - * call function - */ - rc = rtems_ide_part_table_initialize(devname); - printf("result = %d\n",rc); - fileio_print_free_heap(); -} - -void fileio_fsmount(void) -{ - rtems_status_code rc; - - printf(" =========================\n"); - printf(" Process fsmount table\n"); - printf(" =========================\n"); - fileio_print_free_heap(); - /* - * call function - */ - rc = rtems_fsmount( fs_table, - sizeof(fs_table)/sizeof(fs_table[0]), - NULL); - printf("result = %d\n",rc); - fileio_print_free_heap(); -} - -void fileio_list_file(void) -{ - char fname[1024]; - char *buf_ptr = NULL; - unsigned32 flen = 0; - int fd = -1; - ssize_t n; - size_t buf_size = 100; - - rtems_interval start_tick,curr_tick,ticks_per_sec; - - printf(" =========================\n"); - printf(" LIST FILE ... \n"); - printf(" =========================\n"); - fileio_print_free_heap(); - printf(" Enter filename to list ==>"); - fgets(fname,sizeof(fname)-1,stdin); - while (fname[strlen(fname)-1] == '\n') { - fname[strlen(fname)-1] = '\0'; - } - /* - * allocate buffer of given size - */ - if (buf_size > 0) { - buf_ptr = malloc(buf_size); - } - - if (buf_ptr != NULL) { - printf("\n Trying to open file \"%s\" for read\n",fname); - fd = open(fname,O_RDONLY); - if (fd < 0) { - printf("*** file open failed, errno = %d(%s)\n",errno,strerror(errno)); - } - } - - if (fd >= 0) { - rtems_clock_get (RTEMS_CLOCK_GET_TICKS_SINCE_BOOT, &start_tick); - do { - n = read(fd,buf_ptr,buf_size); - if (n > 0) { - write(1,buf_ptr,n); - flen += n; - } - } while (n > 0); - - rtems_clock_get (RTEMS_CLOCK_GET_TICKS_SINCE_BOOT, &curr_tick); - - printf("\n ******** End of file reached, flen = %d\n",flen); - close(fd); - - rtems_clock_get(RTEMS_CLOCK_GET_TICKS_PER_SECOND, &ticks_per_sec); - printf("time elapsed for read: %g seconds\n", - ((double)curr_tick-start_tick)/ticks_per_sec); - } - /* - * free buffer - */ - if (buf_ptr != NULL) { - free(buf_ptr); - } - fileio_print_free_heap(); -} - -/* - * convert a size string (like 34K or 12M) to actual byte count - */ -boolean fileio_str2size(const char *str,unsigned32 *res_ptr) -{ - boolean failed = FALSE; - unsigned long size; - char suffix = ' '; - - if (1 > sscanf(str,"%lu%c",&size,&suffix)) { - failed = TRUE; - } - else if (toupper(suffix) == 'K') { - size *= 1024; - } - else if (toupper(suffix) == 'M') { - size *= 1024UL*1024UL; - } - else if (isalpha(suffix)) { - failed = TRUE; - } - - if (!failed) { - *res_ptr = size; - } - return failed; -} - -void fileio_write_file(void) -{ - char fname[1024]; - char tmp_str[32]; - unsigned32 file_size = 0; - unsigned32 buf_size = 0; - size_t curr_pos,bytes_to_copy; - int fd = -1; - ssize_t n; - rtems_interval start_tick,curr_tick,ticks_per_sec; - char *bufptr = NULL; - boolean failed = FALSE; - static const char write_test_string[] = - "The quick brown fox jumps over the lazy dog\n"; - static const char write_block_string[] = - "\n----- end of write buffer ------\n"; - - printf(" =========================\n"); - printf(" WRITE FILE ... \n"); - printf(" =========================\n"); - fileio_print_free_heap(); - /* - * get number of ticks per second - */ - rtems_clock_get(RTEMS_CLOCK_GET_TICKS_PER_SECOND, &ticks_per_sec); - - /* - * get path to file to write - */ - if (!failed) { - printf("Enter path/filename ==>"); - fgets(fname,sizeof(fname)-1,stdin); - while (fname[strlen(fname)-1] == '\n') { - fname[strlen(fname)-1] = '\0'; - } - if (0 == strlen(fname)) { - printf("*** no filename entered, aborted\n"); - failed = TRUE; - } - } - /* - * get total file size to write - */ - if (!failed) { - printf("use suffix K for Kbytes, M for Mbytes or no suffix for bytes:\n" - "Enter filesize to write ==>"); - fgets(tmp_str,sizeof(tmp_str)-1,stdin); - failed = fileio_str2size(tmp_str,&file_size); - if (failed) { - printf("*** illegal file size, aborted\n"); - } - } - /* - * get block size to write - */ - if (!failed) { - printf("use suffix K for Kbytes, M for Mbytes or no suffix for bytes:\n" - "Enter block size to use for write calls ==>"); - fgets(tmp_str,sizeof(tmp_str)-1,stdin); - failed = fileio_str2size(tmp_str,&buf_size); - if (failed) { - printf("*** illegal block size, aborted\n"); - } - } - - /* - * allocate buffer - */ - if (!failed) { - printf("... allocating %lu bytes of buffer for write data\n", - (unsigned long)buf_size); - bufptr = malloc(buf_size+1); /* extra space for terminating NUL char */ - if (bufptr == NULL) { - printf("*** malloc failed, aborted\n"); - failed = TRUE; - } - } - /* - * fill buffer with test pattern - */ - if (!failed) { - printf("... filling buffer with write data\n"); - curr_pos = 0; - /* - * fill buffer with test string - */ - while (curr_pos < buf_size) { - bytes_to_copy = MIN(buf_size-curr_pos, - sizeof(write_test_string)-1); - memcpy(bufptr+curr_pos,write_test_string,bytes_to_copy); - curr_pos += bytes_to_copy; - } - /* - * put "end" mark at end of buffer - */ - bytes_to_copy = sizeof(write_block_string)-1; - if (buf_size >= bytes_to_copy) { - memcpy(bufptr+buf_size-bytes_to_copy, - write_block_string, - bytes_to_copy); - } - } - /* - * create file - */ - if (!failed) { - printf("... creating file \"%s\"\n",fname); - fd = open(fname,O_WRONLY | O_CREAT | O_TRUNC,S_IREAD|S_IWRITE); - if (fd < 0) { - printf("*** file create failed, errno = %d(%s)\n",errno,strerror(errno)); - failed = TRUE; - } - } - /* - * write file - */ - if (!failed) { - printf("... writing to file\n"); - rtems_clock_get (RTEMS_CLOCK_GET_TICKS_SINCE_BOOT, &start_tick); - curr_pos = 0; - do { - bytes_to_copy = buf_size; - do { - n = write(fd, - bufptr + (buf_size-bytes_to_copy), - MIN(bytes_to_copy,file_size-curr_pos)); - if (n > 0) { - bytes_to_copy -= n; - curr_pos += n; - } - } while ((bytes_to_copy > 0) && (n > 0)); - } while ((file_size > curr_pos) && (n > 0)); - rtems_clock_get (RTEMS_CLOCK_GET_TICKS_SINCE_BOOT, &curr_tick); - if (n < 0) { - failed = TRUE; - printf("*** file write failed, " - "%lu bytes written, " - "errno = %d(%s)\n", - (unsigned long)curr_pos,errno,strerror(errno)); - } - else { - printf("time elapsed for write: %g seconds\n", - ((double)curr_tick-start_tick)/ticks_per_sec); - printf("write data rate: %g KBytes/second\n", - (((double)file_size) / 1024.0 / - (((double)curr_tick-start_tick)/ticks_per_sec))); - } - } - if (fd >= 0) { - printf("... closing file\n"); - close(fd); - } - if (bufptr != NULL) { - printf("... deallocating buffer\n"); - free(bufptr); - bufptr = NULL; - } - printf("\n ******** End of file write\n"); - fileio_print_free_heap(); -} - -void fileio_read_file(void) -{ - char fname[1024]; - char tmp_str[32]; - unsigned32 buf_size = 0; - size_t curr_pos; - int fd = -1; - ssize_t n; - rtems_interval start_tick,curr_tick,ticks_per_sec; - char *bufptr = NULL; - boolean failed = FALSE; - - printf(" =========================\n"); - printf(" READ FILE ... \n"); - printf(" =========================\n"); - fileio_print_free_heap(); - /* - * get number of ticks per second - */ - rtems_clock_get(RTEMS_CLOCK_GET_TICKS_PER_SECOND, &ticks_per_sec); - - /* - * get path to file to read - */ - if (!failed) { - printf("Enter path/filename ==>"); - fgets(fname,sizeof(fname)-1,stdin); - while (fname[strlen(fname)-1] == '\n') { - fname[strlen(fname)-1] = '\0'; - } - if (0 == strlen(fname)) { - printf("*** no filename entered, aborted\n"); - failed = TRUE; - } - } - /* - * get block size to read - */ - if (!failed) { - printf("use suffix K for Kbytes, M for Mbytes or no suffix for bytes:\n" - "Enter block size to use for read calls ==>"); - fgets(tmp_str,sizeof(tmp_str)-1,stdin); - failed = fileio_str2size(tmp_str,&buf_size); - if (failed) { - printf("*** illegal block size, aborted\n"); - } - } - - /* - * allocate buffer - */ - if (!failed) { - printf("... allocating %lu bytes of buffer for write data\n", - (unsigned long)buf_size); - bufptr = malloc(buf_size+1); /* extra space for terminating NUL char */ - if (bufptr == NULL) { - printf("*** malloc failed, aborted\n"); - failed = TRUE; - } - } - /* - * open file - */ - if (!failed) { - printf("... opening file \"%s\"\n",fname); - fd = open(fname,O_RDONLY); - if (fd < 0) { - printf("*** file open failed, errno = %d(%s)\n",errno,strerror(errno)); - failed = TRUE; - } - } - /* - * read file - */ - if (!failed) { - printf("... reading from file\n"); - rtems_clock_get (RTEMS_CLOCK_GET_TICKS_SINCE_BOOT, &start_tick); - curr_pos = 0; - do { - n = read(fd, - bufptr, - buf_size); - if (n > 0) { - curr_pos += n; - } - } while (n > 0); - rtems_clock_get (RTEMS_CLOCK_GET_TICKS_SINCE_BOOT, &curr_tick); - if (n < 0) { - failed = TRUE; - printf("*** file read failed, " - "%lu bytes read, " - "errno = %d(%s)\n", - (unsigned long)curr_pos,errno,strerror(errno)); - } - else { - printf("%lu bytes read\n", - (unsigned long)curr_pos); - printf("time elapsed for read: %g seconds\n", - ((double)curr_tick-start_tick)/ticks_per_sec); - printf("read data rate: %g KBytes/second\n", - (((double)curr_pos) / 1024.0 / - (((double)curr_tick-start_tick)/ticks_per_sec))); - } - } - if (fd >= 0) { - printf("... closing file\n"); - close(fd); - } - if (bufptr != NULL) { - printf("... deallocating buffer\n"); - free(bufptr); - bufptr = NULL; - } - printf("\n ******** End of file read\n"); - fileio_print_free_heap(); - -} - -void fileio_menu (void) -{ - char inbuf[10]; - - /* - * Wait for characters from console terminal - */ - for (;;) { - printf(" =========================\n"); - printf(" RTEMS FILE I/O Test Menu \n"); - printf(" =========================\n"); - printf(" p -> part_table_initialize\n"); - printf(" f -> mount all disks in fs_table\n"); - printf(" l -> list file\n"); - printf(" r -> read file\n"); - printf(" w -> write file\n"); -#ifdef USE_SHELL - printf(" s -> start shell\n"); -#endif - printf(" Enter your selection ==>"); - - inbuf[0] = '\0'; - fgets(inbuf,sizeof(inbuf),stdin); - switch (inbuf[0]) { - case 'l': - fileio_list_file (); - break; - case 'r': - fileio_read_file (); - break; - case 'w': - fileio_write_file (); - break; - case 'p': - fileio_part_table_initialize (); - break; - case 'f': - fileio_fsmount (); - break; -#ifdef USE_SHELL - case 's': - fileio_start_shell (); - break; -#endif - default: - printf("Selection `%c` not implemented\n",inbuf[0]); - break; - } - - } - exit (0); -} - -int menu_tid; - -/* - * RTEMS Startup Task - */ -rtems_task -Init (rtems_task_argument ignored) -{ - puts( "\n\n*** FILE I/O SAMPLE AND TEST ***" ); - - fileio_menu(); -} diff --git a/c/src/tests/samples/fileio/system.h b/c/src/tests/samples/fileio/system.h deleted file mode 100644 index 9c35b83da3..0000000000 --- a/c/src/tests/samples/fileio/system.h +++ /dev/null @@ -1,136 +0,0 @@ -/* system.h - * - * This include file contains information that is included in every - * function in the test set. - * - * COPYRIGHT (c) 1989-1999. - * On-Line Applications Research Corporation (OAR). - * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.rtems.com/license/LICENSE. - * - * system.h,v 1.13 2000/06/12 15:00:12 joel Exp - */ - -#include - -/* functions */ - -rtems_task Init( - rtems_task_argument argument -); - -/* global variables */ - - -/* configuration information */ - -#include /* for device driver prototypes */ -#include /* for ata driver prototype */ -#include /* for general ide driver prototype */ - -#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER -#define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER -#define CONFIGURE_USE_IMFS_AS_BASE_FILESYSTEM - -#define CONFIGURE_HAS_OWN_DEVICE_DRIVER_TABLE - -#ifdef CONFIGURE_INIT -rtems_driver_address_table Device_drivers[] = - { - CONSOLE_DRIVER_TABLE_ENTRY - ,CLOCK_DRIVER_TABLE_ENTRY -#ifdef RTEMS_BSP_HAS_IDE_DRIVER - ,IDE_CONTROLLER_DRIVER_TABLE_ENTRY - /* important: ATA driver must be after ide drivers */ - ,ATA_DRIVER_TABLE_ENTRY -#endif - }; - -#include -rtems_bdbuf_config rtems_bdbuf_configuration[] = { - {512,128,NULL} -}; -int rtems_bdbuf_configuration_size =( sizeof(rtems_bdbuf_configuration) - /sizeof(rtems_bdbuf_configuration[0])); -#endif - - -/* - * XXX: these values are higher than needed... - */ -#define CONFIGURE_MAXIMUM_TASKS 20 -#define CONFIGURE_MAXIMUM_SEMAPHORES 20 -#define CONFIGURE_MAXIMUM_MESSAGE_QUEUES 20 -#define CONFIGURE_LIBIO_MAXIMUM_FILE_DESCRIPTORS 20 -#define CONFIGURE_RTEMS_INIT_TASKS_TABLE - -#define CONFIGURE_EXTRA_TASK_STACKS (3 * RTEMS_MINIMUM_STACK_SIZE) - -#include - -/* - * Handy macros and static inline functions - */ - -/* - * Macro to hide the ugliness of printing the time. - */ - -#define print_time(_s1, _tb, _s2) \ - do { \ - printf( "%s%02d:%02d:%02d %02d/%02d/%04d%s", \ - _s1, (_tb)->hour, (_tb)->minute, (_tb)->second, \ - (_tb)->month, (_tb)->day, (_tb)->year, _s2 ); \ - fflush(stdout); \ - } while ( 0 ) - -/* - * Macro to print an task name that is composed of ASCII characters. - * - */ - -#define put_name( _name, _crlf ) \ - do { \ - rtems_unsigned32 c0, c1, c2, c3; \ - \ - c0 = ((_name) >> 24) & 0xff; \ - c1 = ((_name) >> 16) & 0xff; \ - c2 = ((_name) >> 8) & 0xff; \ - c3 = (_name) & 0xff; \ - putchar( (char)c0 ); \ - if ( c1 ) putchar( (char)c1 ); \ - if ( c2 ) putchar( (char)c2 ); \ - if ( c3 ) putchar( (char)c3 ); \ - if ( (_crlf) ) \ - putchar( '\n' ); \ - } while (0) - -/* - * static inline routine to make obtaining ticks per second easier. - */ - -static inline rtems_unsigned32 get_ticks_per_second( void ) -{ - rtems_interval ticks_per_second; - (void) rtems_clock_get( RTEMS_CLOCK_GET_TICKS_PER_SECOND, &ticks_per_second ); return ticks_per_second; -} - - -/* - * This allows us to view the "Test_task" instantiations as a set - * of numbered tasks by eliminating the number of application - * tasks created. - * - * In reality, this is too complex for the purposes of this - * example. It would have been easier to pass a task argument. :) - * But it shows how rtems_id's can sometimes be used. - */ - -#define task_number( tid ) \ - ( rtems_get_index( tid ) - \ - rtems_configuration_get_rtems_api_configuration()->number_of_initialization_tasks ) - -/* end of include file */ - diff --git a/c/src/tests/samples/hello/.cvsignore b/c/src/tests/samples/hello/.cvsignore deleted file mode 100644 index 282522db03..0000000000 --- a/c/src/tests/samples/hello/.cvsignore +++ /dev/null @@ -1,2 +0,0 @@ -Makefile -Makefile.in diff --git a/c/src/tests/samples/hello/Makefile.am b/c/src/tests/samples/hello/Makefile.am deleted file mode 100644 index 16680298f1..0000000000 --- a/c/src/tests/samples/hello/Makefile.am +++ /dev/null @@ -1,41 +0,0 @@ -## -## $Id$ -## - - -SAMPLE = hello -PGM = ${ARCH}/$(SAMPLE).exe - -MANAGERS = io - -C_FILES = init.c -C_O_FILES = $(C_FILES:%.c=${ARCH}/%.$(OBJEXT)) - -H_FILES = system.h -noinst_HEADERS = $(H_FILES) - -DOCTYPES = doc scn -DOCS = $(DOCTYPES:%=$(SAMPLE).%) - -SRCS = $(DOCS) $(C_FILES) $(H_FILES) -OBJS = $(C_O_FILES) - -PRINT_SRCS = $(DOCS) - -include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg -include $(top_srcdir)/../automake/compile.am -include $(top_srcdir)/../automake/leaf.am -include $(top_srcdir)/sample.am - -# -# (OPTIONAL) Add local stuff here using += -# - -all-local: ${ARCH} $(TMPINSTALL_FILES) - -${PGM}: $(OBJS) $(LINK_FILES) - $(make-exe) - -EXTRA_DIST = $(C_FILES) $(DOCS) - -include $(top_srcdir)/../automake/local.am diff --git a/c/src/tests/samples/hello/hello.doc b/c/src/tests/samples/hello/hello.doc deleted file mode 100644 index 5c0baceb8d..0000000000 --- a/c/src/tests/samples/hello/hello.doc +++ /dev/null @@ -1,12 +0,0 @@ -# -# $Id$ -# -# COPYRIGHT (c) 1989-1999. -# On-Line Applications Research Corporation (OAR). -# -# The license and distribution terms for this file may be -# found in the file LICENSE in this distribution or at -# http://www.rtems.com/license/LICENSE. -# - - diff --git a/c/src/tests/samples/hello/hello.scn b/c/src/tests/samples/hello/hello.scn deleted file mode 100644 index d9e92d81d5..0000000000 --- a/c/src/tests/samples/hello/hello.scn +++ /dev/null @@ -1,3 +0,0 @@ -*** HELLO WORLD TEST *** -Hello World -*** END OF HELLO WORLD TEST *** diff --git a/c/src/tests/samples/hello/init.c b/c/src/tests/samples/hello/init.c deleted file mode 100644 index e02a23cfa6..0000000000 --- a/c/src/tests/samples/hello/init.c +++ /dev/null @@ -1,36 +0,0 @@ -/* Init - * - * This routine is the initialization task for this test program. - * It is called from init_exec and has the responsibility for creating - * and starting the tasks that make up the test. If the time of day - * clock is required for the test, it should also be set to a known - * value by this function. - * - * Input parameters: NONE - * - * Output parameters: NONE - * - * COPYRIGHT (c) 1989-1999. - * On-Line Applications Research Corporation (OAR). - * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.rtems.com/license/LICENSE. - * - * $Id$ - */ - -#define CONFIGURE_INIT -#include "system.h" -#include -#include - -rtems_task Init( - rtems_task_argument ignored -) -{ - printf( "\n\n*** HELLO WORLD TEST ***\n" ); - printf( "Hello World\n" ); - printf( "*** END OF HELLO WORLD TEST ***\n" ); - exit( 0 ); -} diff --git a/c/src/tests/samples/hello/system.h b/c/src/tests/samples/hello/system.h deleted file mode 100644 index 89c5381b81..0000000000 --- a/c/src/tests/samples/hello/system.h +++ /dev/null @@ -1,38 +0,0 @@ -/* system.h - * - * This include file contains information that is included in every - * function in the test set. - * - * COPYRIGHT (c) 1989-1999. - * On-Line Applications Research Corporation (OAR). - * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.rtems.com/license/LICENSE. - * - * $Id$ - */ - -#include - -/* functions */ - -rtems_task Init( - rtems_task_argument argument -); - -/* configuration information */ - -#include /* for device driver prototypes */ - -#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER - -#define CONFIGURE_MAXIMUM_TASKS 1 - -#define CONFIGURE_RTEMS_INIT_TASKS_TABLE - -#define CONFIGURE_USE_MINIIMFS_AS_BASE_FILESYSTEM - -#include - -/* end of include file */ diff --git a/c/src/tests/samples/loopback/.cvsignore b/c/src/tests/samples/loopback/.cvsignore deleted file mode 100644 index 282522db03..0000000000 --- a/c/src/tests/samples/loopback/.cvsignore +++ /dev/null @@ -1,2 +0,0 @@ -Makefile -Makefile.in diff --git a/c/src/tests/samples/loopback/Makefile.am b/c/src/tests/samples/loopback/Makefile.am deleted file mode 100644 index dfbfcb32c4..0000000000 --- a/c/src/tests/samples/loopback/Makefile.am +++ /dev/null @@ -1,41 +0,0 @@ -## -## $Id$ -## - - -SAMPLE = loopback -PGM = ${ARCH}/$(SAMPLE).exe - -MANAGERS = io event - -C_FILES = init.c -C_O_FILES = $(C_FILES:%.c=${ARCH}/%.$(OBJEXT)) - -DOCTYPES = scn -DOCS = $(DOCTYPES:%=$(SAMPLE).%) - -SRCS = $(DOCS) $(C_FILES) $(H_FILES) -OBJS = $(C_O_FILES) - -PRINT_SRCS = $(DOCS) - -include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg -include $(top_srcdir)/../automake/compile.am -include $(top_srcdir)/../automake/leaf.am -include $(top_srcdir)/sample.am - -# -# (OPTIONAL) Add local stuff here using += -# - - -if HAS_NETWORKING -all-local: ${ARCH} $(TMPINSTALL_FILES) - -${PGM}: $(OBJS) $(LINK_FILES) - $(make-exe) -endif - -EXTRA_DIST = $(C_FILES) $(DOCS) - -include $(top_srcdir)/../automake/local.am diff --git a/c/src/tests/samples/loopback/README b/c/src/tests/samples/loopback/README deleted file mode 100644 index 8733bed358..0000000000 --- a/c/src/tests/samples/loopback/README +++ /dev/null @@ -1,65 +0,0 @@ -# -# $Id$ -# - -Simple test of kernel network code. -Requires no network hardware since only the loopback network address is used. - -Output should look like: -======================================================================== -"Network" initializing! -"Network" initialized! -Try running client with no server present. -Should fail with `connection refused'. -Connect to server. -Can't connect to server: Connection refused -Client closing connection. - -Start server. - -Try running client with server present. -Create socket. -Connect to server. -Bind socket. -Can't connect to server: Connection refused -Client closing connection. -Client task terminating. - -Try running two clients. -Connect to server. -Connect to server. -ACCEPTED:7F000001 -ACCEPTED:7F000001 -Write 22-byte message to server. -Write 22-byte message to server. -Read 43 from server: Server received 22 (Hi there, server (2).) -Read 43 from server: Server received 22 (Hi there, server (3).) -Client closing connection. -Client task terminating. -Worker task terminating. -Client closing connection. -Client task terminating. -Worker task terminating. - -Try running three clients. -Connect to server. -Connect to server. -Connect to server. -ACCEPTED:7F000001 -ACCEPTED:7F000001 -ACCEPTED:7F000001 -Write 22-byte message to server. -Write 22-byte message to server. -Write 22-byte message to server. -Read 43 from server: Server received 22 (Hi there, server (4).) -Read 43 from server: Server received 22 (Hi there, server (5).) -Read 43 from server: Server received 22 (Hi there, server (6).) -Client closing connection. -Client task terminating. -Worker task terminating. -Client closing connection. -Client task terminating. -Worker task terminating. -Client closing connection. -Client task terminating. -Worker task terminating. diff --git a/c/src/tests/samples/loopback/init.c b/c/src/tests/samples/loopback/init.c deleted file mode 100644 index b0aaf66597..0000000000 --- a/c/src/tests/samples/loopback/init.c +++ /dev/null @@ -1,267 +0,0 @@ -#include - -#define CONFIGURE_TEST_NEEDS_CONSOLE_DRIVER -#define CONFIGURE_TEST_NEEDS_CLOCK_DRIVER -#define CONFIGURE_RTEMS_INIT_TASKS_TABLE - -#define CONFIGURE_EXECUTIVE_RAM_SIZE (512*1024) -#define CONFIGURE_MAXIMUM_SEMAPHORES 20 -#define CONFIGURE_MAXIMUM_MESSAGE_QUEUES 20 -#define CONFIGURE_MAXIMUM_TASKS 20 - -#define CONFIGURE_MICROSECONDS_PER_TICK 10000 -#define CONFIGURE_LIBIO_MAXIMUM_FILE_DESCRIPTORS 50 -#define CONFIGURE_USE_IMFS_AS_BASE_FILESYSTEM - -#define CONFIGURE_INIT_TASK_STACK_SIZE (10*1024) -#define CONFIGURE_INIT_TASK_PRIORITY 50 -#define CONFIGURE_INIT_TASK_INITIAL_MODES (RTEMS_PREEMPT | \ - RTEMS_NO_TIMESLICE | \ - RTEMS_NO_ASR | \ - RTEMS_INTERRUPT_LEVEL(0)) - -#define CONFIGURE_INIT -rtems_task Init(rtems_task_argument argument); - -#include - -#include -#include -#include -#include -#include -#include -#include -#include - -/* - * Network configuration - */ -extern void rtems_bsdnet_loopattach(); -static struct rtems_bsdnet_ifconfig loopback_config = { - "lo0", /* name */ - (int (*)(struct rtems_bsdnet_ifconfig *, int))rtems_bsdnet_loopattach, /* attach function */ - NULL, /* link to next interface */ - "127.0.0.1", /* IP address */ - "255.0.0.0", /* IP net mask */ -}; - -struct rtems_bsdnet_config rtems_bsdnet_config = { - &loopback_config, /* Network interface */ - NULL, /* Use fixed network configuration */ - 0, /* Default network task priority */ - 0, /* Default mbuf capacity */ - 0, /* Default mbuf cluster capacity */ - "testSystem", /* Host name */ - "nowhere.com", /* Domain name */ - "127.0.0.1", /* Gateway */ - "127.0.0.1", /* Log host */ - {"127.0.0.1" }, /* Name server(s) */ - {"127.0.0.1" }, /* NTP server(s) */ -}; - -/* - * Thread-safe output routines - */ -static rtems_id printMutex; -static void printSafe(const char *fmt, ...) -{ - va_list args; - va_start(args, fmt); - rtems_semaphore_obtain(printMutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT); - vprintf(fmt, args); - rtems_semaphore_release(printMutex); - va_end(args); -} -#define printf printSafe - -/* - * Spawn a task - */ -static void spawnTask(rtems_task_entry entryPoint, rtems_task_priority priority, rtems_task_argument arg) -{ - rtems_status_code sc; - rtems_id tid; - - sc = rtems_task_create(rtems_build_name('t','a','s','k'), - priority, - RTEMS_MINIMUM_STACK_SIZE+(8*1024), - RTEMS_PREEMPT|RTEMS_TIMESLICE|RTEMS_NO_ASR|RTEMS_INTERRUPT_LEVEL(0), - RTEMS_FLOATING_POINT|RTEMS_LOCAL, - &tid); - if (sc != RTEMS_SUCCESSFUL) - rtems_panic("Can't create task: %s", rtems_status_text(sc)); - sc = rtems_task_start(tid, entryPoint, arg); - if (sc != RTEMS_SUCCESSFUL) - rtems_panic("Can't start task: %s", rtems_status_text(sc)); -} - -/* - * Server subtask - */ -static rtems_task workerTask(rtems_task_argument arg) -{ - int s = arg; - char msg[80]; - char reply[100]; - int i; - - for (;;) { - if ((i = read(s, msg, sizeof msg)) < 0) { - printf("Server couldn't read message from client: %s\n", strerror(errno)); - break; - } - if (i == 0) - break; - rtems_task_wake_after(20); /* Simulate some processing delay */ - i = sprintf(reply, "Server received %d (%s)", i, msg); - if ((i = write(s, reply, i+1)) < 0) { - printf("Server couldn't write message to client: %s\n", strerror(errno)); - break; - } - } - if (close(s) < 0) - printf("Can't close worker task socket: %s\n", strerror(errno)); - printf("Worker task terminating.\n"); - rtems_task_delete(RTEMS_SELF); -} - -/* - * Server Task - */ -static rtems_task serverTask(rtems_task_argument arg) -{ - int s, s1; - int addrlen; - struct sockaddr_in myAddr, farAddr; - rtems_task_priority myPriority; - - printf("Create socket.\n"); - s = socket(AF_INET, SOCK_STREAM, 0); - if (s < 0) - rtems_panic("Can't create socket: %s\n", strerror(errno)); - memset(&myAddr, 0, sizeof myAddr); - myAddr.sin_family = AF_INET; - myAddr.sin_port = htons(1234); - myAddr.sin_addr.s_addr = htonl(INADDR_ANY); - printf("Bind socket.\n"); - if (bind(s, (struct sockaddr *)&myAddr, sizeof myAddr) < 0) - rtems_panic("Can't bind socket: %s\n", strerror(errno)); - if (listen(s, 5) < 0) - printf("Can't listen on socket: %s\n", strerror(errno)); - rtems_task_set_priority(RTEMS_SELF, RTEMS_CURRENT_PRIORITY, &myPriority); - for(;;) { - addrlen = sizeof farAddr; - s1 = accept(s, (struct sockaddr *)&farAddr, &addrlen); - if (s1 < 0) - rtems_panic("Can't accept connection: %s", strerror(errno)); - else - printf("ACCEPTED:%lX\n", ntohl(farAddr.sin_addr.s_addr)); - spawnTask(workerTask, myPriority, s1); - } -} - -/* - * The real part of the client - */ -static rtems_task clientWorker(int arg) -{ - int s; - struct sockaddr_in myAddr, farAddr; - char cbuf[50]; - int i; - - s = socket(AF_INET, SOCK_STREAM, 0); - if (s < 0) { - printf("Can't create client socket: %s\n", strerror(errno)); - return; - } - memset(&myAddr, 0, sizeof myAddr); - myAddr.sin_family = AF_INET; - myAddr.sin_port = htons(0); - myAddr.sin_addr.s_addr = htonl(INADDR_ANY); - if (bind(s, (struct sockaddr *)&myAddr, sizeof myAddr) < 0) { - printf("Can't bind socket: %s\n", strerror(errno)); - goto close; - } - memset(&farAddr, 0, sizeof farAddr); - farAddr.sin_family = AF_INET; - farAddr.sin_port = htons(1234); - farAddr.sin_addr.s_addr = htonl(INADDR_ANY); - printf("Connect to server.\n"); - if (connect(s, (struct sockaddr *)&farAddr, sizeof farAddr) < 0) { - printf("Can't connect to server: %s\n", strerror(errno)); - goto close; - } - rtems_task_wake_after(20); /* Simulate client delay */ - i = sprintf(cbuf, "Hi there, server (%d).", arg); - i++; /* Send the '\0', too */ - printf("Write %d-byte message to server.\n", i); - if (write(s, cbuf, i) < 0) { - printf("Can't write to server: %s\n", strerror(errno)); - goto close; - } - if ((i = read(s, cbuf, sizeof cbuf)) < 0) { - printf("Can't read from server: %s\n", strerror(errno)); - goto close; - } - printf("Read %d from server: %.*s\n", i, i, cbuf); - rtems_task_wake_after(20); /* Simulate client delay */ - close: - printf("Client closing connection.\n"); - if (close(s) < 0) - printf("Can't close client task socket: %s\n", strerror(errno)); -} - -/* - * Client Task - */ -static rtems_task clientTask(rtems_task_argument arg) -{ - clientWorker(arg); - printf("Client task terminating.\n"); -} - -/* - * RTEMS Startup Task - */ -rtems_task -Init (rtems_task_argument ignored) -{ - rtems_status_code sc; - - sc = rtems_semaphore_create(rtems_build_name('P','m','t','x'), - 1, - RTEMS_PRIORITY|RTEMS_BINARY_SEMAPHORE|RTEMS_INHERIT_PRIORITY| - RTEMS_NO_PRIORITY_CEILING|RTEMS_LOCAL, - 0, - &printMutex); - if (sc != RTEMS_SUCCESSFUL) - rtems_panic("Can't create printf mutex:", rtems_status_text(sc)); - printf("\"Network\" initializing!\n"); - rtems_bsdnet_initialize_network(); - printf("\"Network\" initialized!\n"); - - printf("Try running client with no server present.\n"); - printf("Should fail with `connection refused'.\n"); - clientWorker(0); - - printf("\nStart server.\n"); - spawnTask(serverTask, 150, 0); - - printf("\nTry running client with server present.\n"); - spawnTask(clientTask, 120, 1); - rtems_task_wake_after(500); - - printf("\nTry running two clients.\n"); - spawnTask(clientTask, 120, 2); - spawnTask(clientTask, 120, 3); - rtems_task_wake_after(500); - - printf("\nTry running three clients.\n"); - spawnTask(clientTask, 120, 4); - spawnTask(clientTask, 120, 5); - spawnTask(clientTask, 120, 6); - - rtems_task_suspend(RTEMS_SELF); -} diff --git a/c/src/tests/samples/loopback/loopback.scn b/c/src/tests/samples/loopback/loopback.scn deleted file mode 100644 index ec6207f315..0000000000 --- a/c/src/tests/samples/loopback/loopback.scn +++ /dev/null @@ -1,56 +0,0 @@ -"Network" initializing! -"Network" initialized! -Try running client with no server present. -Should fail with `connection refused'. -Connect to server. -Can't connect to server: Connection refused -Client closing connection. - -Start server. - -Try running client with server present. -Create socket. -Connect to server. -Bind socket. -Can't connect to server: Connection refused -Client closing connection. -Client task terminating. - -Try running two clients. -Connect to server. -Connect to server. -ACCEPTED:7F000001 -ACCEPTED:7F000001 -Write 22-byte message to server. -Write 22-byte message to server. -Read 43 from server: Server received 22 (Hi there, server (2).) -Read 43 from server: Server received 22 (Hi there, server (3).) -Client closing connection. -Client task terminating. -Worker task terminating. -Client closing connection. -Client task terminating. -Worker task terminating. - -Try running three clients. -Connect to server. -Connect to server. -Connect to server. -ACCEPTED:7F000001 -ACCEPTED:7F000001 -ACCEPTED:7F000001 -Write 22-byte message to server. -Write 22-byte message to server. -Write 22-byte message to server. -Read 43 from server: Server received 22 (Hi there, server (4).) -Read 43 from server: Server received 22 (Hi there, server (5).) -Read 43 from server: Server received 22 (Hi there, server (6).) -Client closing connection. -Client task terminating. -Worker task terminating. -Client closing connection. -Client task terminating. -Worker task terminating. -Client closing connection. -Client task terminating. -Worker task terminating. diff --git a/c/src/tests/samples/minimum/.cvsignore b/c/src/tests/samples/minimum/.cvsignore deleted file mode 100644 index 282522db03..0000000000 --- a/c/src/tests/samples/minimum/.cvsignore +++ /dev/null @@ -1,2 +0,0 @@ -Makefile -Makefile.in diff --git a/c/src/tests/samples/minimum/Makefile.am b/c/src/tests/samples/minimum/Makefile.am deleted file mode 100644 index a4c68d234e..0000000000 --- a/c/src/tests/samples/minimum/Makefile.am +++ /dev/null @@ -1,39 +0,0 @@ -## -## $Id$ -## - - -SAMPLE = minimum -PGM = ${ARCH}/$(SAMPLE).exe - -MANAGERS = all - -C_FILES = init.c -C_O_FILES = $(C_FILES:%.c=${ARCH}/%.$(OBJEXT)) - -DOCTYPES = doc scn -DOCS = $(DOCTYPES:%=$(SAMPLE).%) - -SRCS = $(DOCS) $(C_FILES) $(H_FILES) -OBJS = $(C_O_FILES) - -PRINT_SRCS = $(DOCS) - -include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg -include $(top_srcdir)/../automake/compile.am -include $(top_srcdir)/../automake/leaf.am -include $(top_srcdir)/sample.am - -# -# (OPTIONAL) Add local stuff here using += -# - -all-local: ${ARCH} $(TMPINSTALL_FILES) -# This test should not be executed - -${PGM}: $(OBJS) $(LINK_FILES) - $(make-exe) - -EXTRA_DIST = $(C_FILES) $(DOCS) - -include $(top_srcdir)/../automake/local.am diff --git a/c/src/tests/samples/minimum/init.c b/c/src/tests/samples/minimum/init.c deleted file mode 100644 index a0fbda9338..0000000000 --- a/c/src/tests/samples/minimum/init.c +++ /dev/null @@ -1,41 +0,0 @@ -/* Init - * - * - * Input parameters: NONE - * - * Output parameters: NONE - * - * COPYRIGHT (c) 1989-1999. - * On-Line Applications Research Corporation (OAR). - * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.rtems.com/license/LICENSE. - * - * $Id$ - */ - -#include - -rtems_task Init( - rtems_task_argument ignored -) -{ -} - -/* configuration information */ - -#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER - -#define CONFIGURE_RTEMS_INIT_TASKS_TABLE - -#define CONFIGURE_USE_MINIIMFS_AS_BASE_FILESYSTEM - -#define CONFIGURE_MAXIMUM_TASKS 1 - -#define CONFIGURE_INIT - -#include - -/* global variables */ - diff --git a/c/src/tests/samples/minimum/minimum.doc b/c/src/tests/samples/minimum/minimum.doc deleted file mode 100644 index 5c0baceb8d..0000000000 --- a/c/src/tests/samples/minimum/minimum.doc +++ /dev/null @@ -1,12 +0,0 @@ -# -# $Id$ -# -# COPYRIGHT (c) 1989-1999. -# On-Line Applications Research Corporation (OAR). -# -# The license and distribution terms for this file may be -# found in the file LICENSE in this distribution or at -# http://www.rtems.com/license/LICENSE. -# - - diff --git a/c/src/tests/samples/minimum/minimum.scn b/c/src/tests/samples/minimum/minimum.scn deleted file mode 100644 index 610f3d4ddd..0000000000 --- a/c/src/tests/samples/minimum/minimum.scn +++ /dev/null @@ -1 +0,0 @@ -*** TEST SHOULD NOT BE RUN *** diff --git a/c/src/tests/samples/paranoia/.cvsignore b/c/src/tests/samples/paranoia/.cvsignore deleted file mode 100644 index 282522db03..0000000000 --- a/c/src/tests/samples/paranoia/.cvsignore +++ /dev/null @@ -1,2 +0,0 @@ -Makefile -Makefile.in diff --git a/c/src/tests/samples/paranoia/Makefile.am b/c/src/tests/samples/paranoia/Makefile.am deleted file mode 100644 index 0934a517b7..0000000000 --- a/c/src/tests/samples/paranoia/Makefile.am +++ /dev/null @@ -1,47 +0,0 @@ -## -## $Id$ -## - - -SAMPLE = paranoia -PGM = ${ARCH}/$(SAMPLE).exe - -MANAGERS = all - -C_FILES = init.c paranoia.c -C_O_FILES = $(C_FILES:%.c=${ARCH}/%.$(OBJEXT)) - -H_FILES = system.h -noinst_HEADERS = $(H_FILES) - -DOCTYPES = doc -DOCS = $(DOCTYPES:%=$(SAMPLE).%) - -SRCS = $(DOCS) $(C_FILES) $(H_FILES) -OBJS = $(C_O_FILES) - -PRINT_SRCS = $(DOCS) - -include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg -include $(top_srcdir)/../automake/compile.am -include $(top_srcdir)/../automake/leaf.am -include $(top_srcdir)/sample.am - -# -# (OPTIONAL) Add local stuff here using += -# -# -DCYGNUS turns on more verbose msgs -# - -AM_CPPFLAGS += -DNOSIGNAL -DCYGNUS -DNOMAIN - -LD_LIBS = -lm - -all-local: ${ARCH} $(TMPINSTALL_FILES) - -${PGM}: $(OBJS) $(LINK_FILES) - $(make-exe) - -EXTRA_DIST = $(C_FILES) $(DOCS) - -include $(top_srcdir)/../automake/local.am diff --git a/c/src/tests/samples/paranoia/init.c b/c/src/tests/samples/paranoia/init.c deleted file mode 100644 index be0805c8e4..0000000000 --- a/c/src/tests/samples/paranoia/init.c +++ /dev/null @@ -1,49 +0,0 @@ -/* Init - * - * This routine is the initialization task for this test program. - * It is called from init_exec and has the responsibility for creating - * and starting the tasks that make up the test. If the time of day - * clock is required for the test, it should also be set to a known - * value by this function. - * - * Input parameters: NONE - * - * Output parameters: NONE - * - * COPYRIGHT (c) 1989-1999. - * On-Line Applications Research Corporation (OAR). - * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.rtems.com/license/LICENSE. - * - * $Id$ - */ - -#define CONFIGURE_INIT -#include "system.h" -#include -#include /* exit */ - -extern int paranoia(int, char **); - -char *args[2] = { "paranoia", 0 }; - -rtems_task Init( - rtems_task_argument ignored -) -{ - /* - * Install whatever optional floating point assistance package - * is required by this CPU. - */ - -#if (defined (m68040)) - M68KFPSPInstallExceptionHandlers (); -#endif - - printf( "\n\n*** PARANOIA TEST ***\n" ); - paranoia(1, args); - printf( "*** END OF PARANOIA TEST ***\n" ); - exit( 0 ); -} diff --git a/c/src/tests/samples/paranoia/paranoia.c b/c/src/tests/samples/paranoia/paranoia.c deleted file mode 100644 index da03db6606..0000000000 --- a/c/src/tests/samples/paranoia/paranoia.c +++ /dev/null @@ -1,2304 +0,0 @@ -/* - * $Id$ - * - * A C version of Kahan's Floating Point Test "Paranoia" - * - * Thos Sumner, UCSF, Feb. 1985 - * David Gay, BTL, Jan. 1986 - * - * This is a rewrite from the Pascal version by - * - * B. A. Wichmann, 18 Jan. 1985 - * - * (and does NOT exhibit good C programming style). - * - * Sun May 16 18:21:51 MDT 1993 Jeffrey Wheat (cassidy@cygnus.com) - * Removed KR_headers defines, removed ANSI prototyping - * Cleaned up and reformated code. Added special CYGNUS - * "verbose" mode type messages (-DCYGNUS). - * Note: This code is VERY NASTY. - * - * Adjusted to use Standard C headers 19 Jan. 1992 (dmg); - * compile with -DKR_headers or insert - * #define KR_headers - * at the beginning if you have an old-style C compiler. - * - * (C) Apr 19 1983 in BASIC version by: - * Professor W. M. Kahan, - * 567 Evans Hall - * Electrical Engineering & Computer Science Dept. - * University of California - * Berkeley, California 94720 - * USA - * - * converted to Pascal by: - * B. A. Wichmann - * National Physical Laboratory - * Teddington Middx - * TW11 OLW - * UK - * - * converted to C by: - * - * David M. Gay and Thos Sumner - * AT&T Bell Labs Computer Center, Rm. U-76 - * 600 Mountain Avenue University of California - * Murray Hill, NJ 07974 San Francisco, CA 94143 - * USA USA - * - * with simultaneous corrections to the Pascal source (reflected - * in the Pascal source available over netlib). - * [A couple of bug fixes from dgh = sun!dhough incorporated 31 July 1986.] - * - * Reports of results on various systems from all the versions - * of Paranoia are being collected by Richard Karpinski at the - * same address as Thos Sumner. This includes sample outputs, - * bug reports, and criticisms. - * - * You may copy this program freely if you acknowledge its source. - * Comments on the Pascal version to NPL, please. - * - * - * The C version catches signals from floating-point exceptions. - * If signal(SIGFPE,...) is unavailable in your environment, you may - * #define NOSIGNAL to comment out the invocations of signal. - * - * This source file is too big for some C compilers, but may be split - * into pieces. Comments containing "SPLIT" suggest convenient places - * for this splitting. At the end of these comments is an "ed script" - * (for the UNIX(tm) editor ed) that will do this splitting. - * - * By #defining SINGLE_PRECISION when you compile this source, you may - * obtain a single-precision C version of Paranoia. - * - * The following is from the introductory commentary from Wichmann's work: - * - * The BASIC program of Kahan is written in Microsoft BASIC using many - * facilities which have no exact analogy in Pascal. The Pascal - * version below cannot therefore be exactly the same. Rather than be - * a minimal transcription of the BASIC program, the Pascal coding - * follows the conventional style of block-structured languages. Hence - * the Pascal version could be useful in producing versions in other - * structured languages. - * - * Rather than use identifiers of minimal length (which therefore have - * little mnemonic significance), the Pascal version uses meaningful - * identifiers as follows [Note: A few changes have been made for C]: - * - * - * BASIC C BASIC C BASIC C - * - * A J S StickyBit - * A1 AInverse J0 NoErrors T - * B Radix [Failure] T0 Underflow - * B1 BInverse J1 NoErrors T2 ThirtyTwo - * B2 RadixD2 [SeriousDefect] T5 OneAndHalf - * B9 BMinusU2 J2 NoErrors T7 TwentySeven - * C [Defect] T8 TwoForty - * C1 CInverse J3 NoErrors U OneUlp - * D [Flaw] U0 UnderflowThreshold - * D4 FourD K PageNo U1 - * E0 L Milestone U2 - * E1 M V - * E2 Exp2 N V0 - * E3 N1 V8 - * E5 MinSqEr O Zero V9 - * E6 SqEr O1 One W - * E7 MaxSqEr O2 Two X - * E8 O3 Three X1 - * E9 O4 Four X8 - * F1 MinusOne O5 Five X9 Random1 - * F2 Half O8 Eight Y - * F3 Third O9 Nine Y1 - * F6 P Precision Y2 - * F9 Q Y9 Random2 - * G1 GMult Q8 Z - * G2 GDiv Q9 Z0 PseudoZero - * G3 GAddSub R Z1 - * H R1 RMult Z2 - * H1 HInverse R2 RDiv Z9 - * I R3 RAddSub - * IO NoTrials R4 RSqrt - * I3 IEEE R9 Random9 - * - * SqRWrng - * - * All the variables in BASIC are true variables and in consequence, - * the program is more difficult to follow since the "constants" must - * be determined (the glossary is very helpful). The Pascal version - * uses Real constants, but checks are added to ensure that the values - * are correctly converted by the compiler. - * - * The major textual change to the Pascal version apart from the - * identifiersis that named procedures are used, inserting parameters - * wherehelpful. New procedures are also introduced. The - * correspondence is as follows: - * - * - * BASIC Pascal - * lines - * - * 90- 140 Pause - * 170- 250 Instructions - * 380- 460 Heading - * 480- 670 Characteristics - * 690- 870 History - * 2940-2950 Random - * 3710-3740 NewD - * 4040-4080 DoesYequalX - * 4090-4110 PrintIfNPositive - * 4640-4850 TestPartialUnderflow - * -*/ - -#include -#include - -#if defined(solaris2) -#include -#endif - -/* - * To compile this on host using only libm from newlib (and using host libc) - * do: - * gcc -g -DNEED_REENT -DCYGNUS paranoia.c .../newlib-1.6/newlib/libm.a - */ - -#ifdef NEED_REENT -#include -struct _reent libm_reent = _REENT_INIT(libm_reent); -struct _reent *_impure_ptr = &libm_reent; -#endif - -#ifndef NOSIGNAL -#include -#include -#else /* NOSIGNAL */ -#define longjmp(e,v) -#define setjmp(e) 0 -#define jmp_buf int -#endif /* NOSIGNAL */ - -#ifdef SINGLE_PRECISION -#define FLOAT float -#define FABS(x) (float)fabs((double)(x)) -#define FLOOR(x) (float)floor((double)(x)) -#define LOG(x) (float)log((double)(x)) -#define POW(x,y) (float)pow((double)(x),(double)(y)) -#define SQRT(x) (float)sqrt((double)(x)) -#else /* !SINGLE_PRECISION */ -#define FLOAT double -#define FABS(x) fabs(x) -#define FLOOR(x) floor(x) -#define LOG(x) log(x) -#define POW(x,y) pow(x,y) -#define SQRT(x) sqrt(x) -#endif /* SINGLE_PRECISION */ - -jmp_buf ovfl_buf; -extern double fabs (), floor (), log (), pow (), sqrt (); -extern void exit (); -typedef void (*Sig_type) (); -FLOAT Sign (), Random (); -extern void BadCond (); -extern void SqXMinX (); -extern void TstCond (); -extern void notify (); -/* extern int read (); */ -extern void Characteristics (); -extern void Heading (); -extern void History (); -extern void Instructions (); -extern void IsYeqX (); -extern void NewD (); -extern void Pause (); -extern void PrintIfNPositive (); -extern void SR3750 (); -extern void SR3980 (); -extern void TstPtUf (); - -Sig_type sigsave; - -#define KEYBOARD 0 - -FLOAT Radix, BInvrse, RadixD2, BMinusU2; - -/*Small floating point constants.*/ -FLOAT Zero = 0.0; -FLOAT Half = 0.5; -FLOAT One = 1.0; -FLOAT Two = 2.0; -FLOAT Three = 3.0; -FLOAT Four = 4.0; -FLOAT Five = 5.0; -FLOAT Eight = 8.0; -FLOAT Nine = 9.0; -FLOAT TwentySeven = 27.0; -FLOAT ThirtyTwo = 32.0; -FLOAT TwoForty = 240.0; -FLOAT MinusOne = -1.0; -FLOAT OneAndHalf = 1.5; - -/*Integer constants*/ -int NoTrials = 20; /*Number of tests for commutativity. */ -#define False 0 -#define True 1 - -/* - * Definitions for declared types - * Guard == (Yes, No); - * Rounding == (Chopped, Rounded, Other); - * Message == packed array [1..40] of char; - * Class == (Flaw, Defect, Serious, Failure); - */ -#define Yes 1 -#define No 0 -#define Chopped 2 -#define Rounded 1 -#define Other 0 -#define Flaw 3 -#define Defect 2 -#define Serious 1 -#define Failure 0 -typedef int Guard, Rounding, Class; -typedef char Message; - -/* Declarations of Variables */ -int Indx; -char ch[8]; -FLOAT AInvrse, A1; -FLOAT C, CInvrse; -FLOAT D, FourD; -FLOAT E0, E1, Exp2, E3, MinSqEr; -FLOAT SqEr, MaxSqEr, E9; -FLOAT Third; -FLOAT F6, F9; -FLOAT HVar, HInvrse; -int I; -FLOAT StickyBit, J; -FLOAT MyZero; -FLOAT Precision; -FLOAT Q, Q9; -FLOAT R, Random9; -FLOAT T, Underflow, S; -FLOAT OneUlp, UfThold, U1, U2; -FLOAT V, V0, V9; -FLOAT WVar; -FLOAT X, X1, X2, X8, Random1; -FLOAT Y, Y1, Y2, Random2; -FLOAT Z, PseudoZero, Z1, Z2, Z9; -int ErrCnt[4]; -int fpecount; -int Milestone; -int PageNo; -int M, N, N1; -Guard GMult, GDiv, GAddSub; -Rounding RMult, RDiv, RAddSub, RSqrt; -int Break, Done, NotMonot, Monot, Anomaly, IEEE, SqRWrng, UfNGrad; - -/* Computed constants. - * U1 gap below 1.0, i.e, 1.0 - U1 is next number below 1.0 - * U2 gap above 1.0, i.e, 1.0 + U2 is next number above 1.0 - */ - -int batchmode; /* global batchmode test */ - -/* program name and version variables and macro */ -char *temp; -char *program_name; -char *program_vers; - -#ifndef VERSION -#define VERSION "1.1 [cygnus]" -#endif /* VERSION */ - -#define basename(cp) ((temp=(char *)strrchr((cp), '/')) ? temp+1 : (cp)) - -#ifndef BATCHMODE -# ifdef CYGNUS -# define BATCHMODE -# endif -#endif - -/* floating point exception receiver */ -void -_sigfpe (x) -int x; -{ - fpecount++; - printf ("\n* * * FLOATING-POINT ERROR %d * * *\n", x); - fflush (stdout); - if (sigsave) { -#ifndef NOSIGNAL - signal (SIGFPE, sigsave); -#endif /* NOSIGNAL */ - sigsave = 0; - longjmp (ovfl_buf, 1); - } - exit (1); -} - -#ifdef NOMAIN -#define main paranoia -#endif - -int -main (argc, argv) -int argc; -char **argv; -{ - /* First two assignments use integer right-hand sides. */ - Zero = 0; - One = 1; - Two = One + One; - Three = Two + One; - Four = Three + One; - Five = Four + One; - Eight = Four + Four; - Nine = Three * Three; - TwentySeven = Nine * Three; - ThirtyTwo = Four * Eight; - TwoForty = Four * Five * Three * Four; - MinusOne = -One; - Half = One / Two; - OneAndHalf = One + Half; - ErrCnt[Failure] = 0; - ErrCnt[Serious] = 0; - ErrCnt[Defect] = 0; - ErrCnt[Flaw] = 0; - PageNo = 1; - -#ifdef BATCHMODE - batchmode = 1; /* run test in batchmode? */ -#else /* !BATCHMODE */ - batchmode = 0; /* run test interactively */ -#endif /* BATCHMODE */ - - program_name = basename (argv[0]); - program_vers = VERSION; - - printf ("%s version %s\n", program_name, program_vers); - - /*=============================================*/ - Milestone = 0; - /*=============================================*/ -#ifndef NOSIGNAL - signal (SIGFPE, _sigfpe); -#endif - - if (!batchmode) { - Instructions (); - Pause (); - Heading (); - Instructions (); - Pause (); - Heading (); - Pause (); - Characteristics (); - Pause (); - History (); - Pause (); - } - - /*=============================================*/ - Milestone = 7; - /*=============================================*/ - printf ("Program is now RUNNING tests on small integers:\n"); - TstCond (Failure, (Zero + Zero == Zero) && (One - One == Zero) - && (One > Zero) && (One + One == Two), - "0+0 != 0, 1-1 != 0, 1 <= 0, or 1+1 != 2"); - Z = -Zero; - if (Z != 0.0) { - ErrCnt[Failure] = ErrCnt[Failure] + 1; - printf ("Comparison alleges that -0.0 is Non-zero!\n"); - U1 = 0.001; - Radix = 1; - TstPtUf (); - } - TstCond (Failure, (Three == Two + One) && (Four == Three + One) - && (Four + Two * (-Two) == Zero) - && (Four - Three - One == Zero), - "3 != 2+1, 4 != 3+1, 4+2*(-2) != 0, or 4-3-1 != 0"); - TstCond (Failure, (MinusOne == (0 - One)) - && (MinusOne + One == Zero) && (One + MinusOne == Zero) - && (MinusOne + FABS (One) == Zero) - && (MinusOne + MinusOne * MinusOne == Zero), - "-1+1 != 0, (-1)+abs(1) != 0, or -1+(-1)*(-1) != 0"); - TstCond (Failure, Half + MinusOne + Half == Zero, - "1/2 + (-1) + 1/2 != 0"); - /*=============================================*/ - Milestone = 10; - /*=============================================*/ - TstCond (Failure, (Nine == Three * Three) - && (TwentySeven == Nine * Three) && (Eight == Four + Four) - && (ThirtyTwo == Eight * Four) - && (ThirtyTwo - TwentySeven - Four - One == Zero), - "9 != 3*3, 27 != 9*3, 32 != 8*4, or 32-27-4-1 != 0"); - TstCond (Failure, (Five == Four + One) && - (TwoForty == Four * Five * Three * Four) - && (TwoForty / Three - Four * Four * Five == Zero) - && (TwoForty / Four - Five * Three * Four == Zero) - && (TwoForty / Five - Four * Three * Four == Zero), - "5 != 4+1, 240/3 != 80, 240/4 != 60, or 240/5 != 48"); - if (ErrCnt[Failure] == 0) { - printf ("-1, 0, 1/2, 1, 2, 3, 4, 5, 9, 27, 32 & 240 are O.K.\n"); - printf ("\n"); - } - printf ("Searching for Radix and Precision.\n"); - WVar = One; - do { - WVar = WVar + WVar; - Y = WVar + One; - Z = Y - WVar; - Y = Z - One; - } - while (MinusOne + FABS (Y) < Zero); - /*.. now WVar is just big enough that |((WVar+1)-WVar)-1| >= 1 ...*/ - Precision = Zero; - Y = One; - do { - Radix = WVar + Y; - Y = Y + Y; - Radix = Radix - WVar; - } - while (Radix == Zero); - if (Radix < Two) - Radix = One; - printf ("Radix = %f .\n", Radix); - if (Radix != 1) { - WVar = One; - do { - Precision = Precision + One; - WVar = WVar * Radix; - Y = WVar + One; - } - while ((Y - WVar) == One); - } - /*... now WVar == Radix^Precision is barely too big to satisfy (WVar+1)-WVar == 1 - ...*/ - U1 = One / WVar; - U2 = Radix * U1; - printf ("Closest relative separation found is U1 = %.7e .\n\n", U1); - printf ("Recalculating radix and precision\n "); - - /*save old values*/ - E0 = Radix; - E1 = U1; - E9 = U2; - E3 = Precision; - - X = Four / Three; - Third = X - One; - F6 = Half - Third; - X = F6 + F6; - X = FABS (X - Third); - if (X < U2) - X = U2; - - /*... now X = (unknown no.) ulps of 1+...*/ - do { - U2 = X; - Y = Half * U2 + ThirtyTwo * U2 * U2; - Y = One + Y; - X = Y - One; - } - while (!((U2 <= X) || (X <= Zero))); - - /*... now U2 == 1 ulp of 1 + ... */ - X = Two / Three; - F6 = X - Half; - Third = F6 + F6; - X = Third - Half; - X = FABS (X + F6); - if (X < U1) - X = U1; - - /*... now X == (unknown no.) ulps of 1 -... */ - do { - U1 = X; - Y = Half * U1 + ThirtyTwo * U1 * U1; - Y = Half - Y; - X = Half + Y; - Y = Half - X; - X = Half + Y; - } - while (!((U1 <= X) || (X <= Zero))); - /*... now U1 == 1 ulp of 1 - ... */ - if (U1 == E1) - printf ("confirms closest relative separation U1 .\n"); - else - printf ("gets better closest relative separation U1 = %.7e .\n", U1); - WVar = One / U1; - F9 = (Half - U1) + Half; - Radix = FLOOR (0.01 + U2 / U1); - if (Radix == E0) - printf ("Radix confirmed.\n"); - else - printf ("MYSTERY: recalculated Radix = %.7e .\n", Radix); - TstCond (Defect, Radix <= Eight + Eight, - "Radix is too big: roundoff problems"); - TstCond (Flaw, (Radix == Two) || (Radix == 10) - || (Radix == One), "Radix is not as good as 2 or 10"); - /*=============================================*/ - Milestone = 20; - /*=============================================*/ - TstCond (Failure, F9 - Half < Half, - "(1-U1)-1/2 < 1/2 is FALSE, prog. fails?"); - X = F9; - I = 1; - Y = X - Half; - Z = Y - Half; - TstCond (Failure, (X != One) - || (Z == Zero), "Comparison is fuzzy,X=1 but X-1/2-1/2 != 0"); - X = One + U2; - I = 0; - /*=============================================*/ - Milestone = 25; - /*=============================================*/ - /*... BMinusU2 = nextafter(Radix, 0) */ - BMinusU2 = Radix - One; - BMinusU2 = (BMinusU2 - U2) + One; - /* Purify Integers */ - if (Radix != One) { - X = -TwoForty * LOG (U1) / LOG (Radix); - Y = FLOOR (Half + X); - if (FABS (X - Y) * Four < One) - X = Y; - Precision = X / TwoForty; - Y = FLOOR (Half + Precision); - if (FABS (Precision - Y) * TwoForty < Half) - Precision = Y; - } - if ((Precision != FLOOR (Precision)) || (Radix == One)) { - printf ("Precision cannot be characterized by an Integer number\n"); - printf ("of significant digits but, by itself, this is a minor flaw.\n"); - } - if (Radix == One) - printf ("logarithmic encoding has precision characterized solely by U1.\n"); - else - printf ("The number of significant digits of the Radix is %f .\n", - Precision); - TstCond (Serious, U2 * Nine * Nine * TwoForty < One, - "Precision worse than 5 decimal figures "); - /*=============================================*/ - Milestone = 30; - /*=============================================*/ - /* Test for extra-precise subepressions */ - X = FABS (((Four / Three - One) - One / Four) * Three - One / Four); - do { - Z2 = X; - X = (One + (Half * Z2 + ThirtyTwo * Z2 * Z2)) - One; - } - while (!((Z2 <= X) || (X <= Zero))); - X = Y = Z = FABS ((Three / Four - Two / Three) * Three - One / Four); - do { - Z1 = Z; - Z = (One / Two - ((One / Two - (Half * Z1 + ThirtyTwo * Z1 * Z1)) - + One / Two)) + One / Two; - } - while (!((Z1 <= Z) || (Z <= Zero))); - do { - do { - Y1 = Y; - Y = (Half - ((Half - (Half * Y1 + ThirtyTwo * Y1 * Y1)) + Half - )) + Half; - } - while (!((Y1 <= Y) || (Y <= Zero))); - X1 = X; - X = ((Half * X1 + ThirtyTwo * X1 * X1) - F9) + F9; - } - while (!((X1 <= X) || (X <= Zero))); - if ((X1 != Y1) || (X1 != Z1)) { - BadCond (Serious, "Disagreements among the values X1, Y1, Z1,\n"); - printf ("respectively %.7e, %.7e, %.7e,\n", X1, Y1, Z1); - printf ("are symptoms of inconsistencies introduced\n"); - printf ("by extra-precise evaluation of arithmetic subexpressions.\n"); - notify ("Possibly some part of this"); - if ((X1 == U1) || (Y1 == U1) || (Z1 == U1)) - printf ( - "That feature is not tested further by this program.\n"); - } else { - if ((Z1 != U1) || (Z2 != U2)) { - if ((Z1 >= U1) || (Z2 >= U2)) { - BadCond (Failure, ""); - notify ("Precision"); - printf ("\tU1 = %.7e, Z1 - U1 = %.7e\n", U1, Z1 - U1); - printf ("\tU2 = %.7e, Z2 - U2 = %.7e\n", U2, Z2 - U2); - } else { - if ((Z1 <= Zero) || (Z2 <= Zero)) { - printf ("Because of unusual Radix = %f", Radix); - printf (", or exact rational arithmetic a result\n"); - printf ("Z1 = %.7e, or Z2 = %.7e ", Z1, Z2); - notify ("of an\nextra-precision"); - } - if (Z1 != Z2 || Z1 > Zero) { - X = Z1 / U1; - Y = Z2 / U2; - if (Y > X) - X = Y; - Q = -LOG (X); - printf ("Some subexpressions appear to be calculated extra\n"); - printf ("precisely with about %g extra B-digits, i.e.\n", - (Q / LOG (Radix))); - printf ("roughly %g extra significant decimals.\n", - Q / LOG (10.)); - } - printf ("That feature is not tested further by this program.\n"); - } - } - } - Pause (); - /*=============================================*/ - Milestone = 35; - /*=============================================*/ - if (Radix >= Two) { - X = WVar / (Radix * Radix); - Y = X + One; - Z = Y - X; - T = Z + U2; - X = T - Z; - TstCond (Failure, X == U2, - "Subtraction is not normalized X=Y,X+Z != Y+Z!"); - if (X == U2) - printf ( - "Subtraction appears to be normalized, as it should be."); - } - printf ("\nChecking for guard digit in *, /, and -.\n"); - Y = F9 * One; - Z = One * F9; - X = F9 - Half; - Y = (Y - Half) - X; - Z = (Z - Half) - X; - X = One + U2; - T = X * Radix; - R = Radix * X; - X = T - Radix; - X = X - Radix * U2; - T = R - Radix; - T = T - Radix * U2; - X = X * (Radix - One); - T = T * (Radix - One); - if ((X == Zero) && (Y == Zero) && (Z == Zero) && (T == Zero)) - GMult = Yes; - else { - GMult = No; - TstCond (Serious, False, - "* lacks a Guard Digit, so 1*X != X"); - } - Z = Radix * U2; - X = One + Z; - Y = FABS ((X + Z) - X * X) - U2; - X = One - U2; - Z = FABS ((X - U2) - X * X) - U1; - TstCond (Failure, (Y <= Zero) - && (Z <= Zero), "* gets too many final digits wrong.\n"); - Y = One - U2; - X = One + U2; - Z = One / Y; - Y = Z - X; - X = One / Three; - Z = Three / Nine; - X = X - Z; - T = Nine / TwentySeven; - Z = Z - T; - TstCond (Defect, X == Zero && Y == Zero && Z == Zero, - "Division lacks a Guard Digit, so error can exceed 1 ulp\n\ -or 1/3 and 3/9 and 9/27 may disagree"); - Y = F9 / One; - X = F9 - Half; - Y = (Y - Half) - X; - X = One + U2; - T = X / One; - X = T - X; - if ((X == Zero) && (Y == Zero) && (Z == Zero)) - GDiv = Yes; - else { - GDiv = No; - TstCond (Serious, False, - "Division lacks a Guard Digit, so X/1 != X"); - } - X = One / (One + U2); - Y = X - Half - Half; - TstCond (Serious, Y < Zero, - "Computed value of 1/1.000..1 >= 1"); - X = One - U2; - Y = One + Radix * U2; - Z = X * Radix; - T = Y * Radix; - R = Z / Radix; - StickyBit = T / Radix; - X = R - X; - Y = StickyBit - Y; - TstCond (Failure, X == Zero && Y == Zero, - "* and/or / gets too many last digits wrong"); - Y = One - U1; - X = One - F9; - Y = One - Y; - T = Radix - U2; - Z = Radix - BMinusU2; - T = Radix - T; - if ((X == U1) && (Y == U1) && (Z == U2) && (T == U2)) - GAddSub = Yes; - else { - GAddSub = No; - TstCond (Serious, False, - "- lacks Guard Digit, so cancellation is obscured"); - } - if (F9 != One && F9 - One >= Zero) { - BadCond (Serious, "comparison alleges (1-U1) < 1 although\n"); - printf (" subtraction yields (1-U1) - 1 = 0 , thereby vitiating\n"); - printf (" such precautions against division by zero as\n"); - printf (" ... if (X == 1.0) {.....} else {.../(X-1.0)...}\n"); - } - if (GMult == Yes && GDiv == Yes && GAddSub == Yes) - printf ( - " *, /, and - appear to have guard digits, as they should.\n"); - /*=============================================*/ - Milestone = 40; - /*=============================================*/ - Pause (); - printf ("Checking rounding on multiply, divide and add/subtract.\n"); - RMult = Other; - RDiv = Other; - RAddSub = Other; - RadixD2 = Radix / Two; - A1 = Two; - Done = False; - do { - AInvrse = Radix; - do { - X = AInvrse; - AInvrse = AInvrse / A1; - } - while (!(FLOOR (AInvrse) != AInvrse)); - Done = (X == One) || (A1 > Three); - if (!Done) - A1 = Nine + One; - } - while (!(Done)); - if (X == One) - A1 = Radix; - AInvrse = One / A1; - X = A1; - Y = AInvrse; - Done = False; - do { - Z = X * Y - Half; - TstCond (Failure, Z == Half, - "X * (1/X) differs from 1"); - Done = X == Radix; - X = Radix; - Y = One / X; - } - while (!(Done)); - Y2 = One + U2; - Y1 = One - U2; - X = OneAndHalf - U2; - Y = OneAndHalf + U2; - Z = (X - U2) * Y2; - T = Y * Y1; - Z = Z - X; - T = T - X; - X = X * Y2; - Y = (Y + U2) * Y1; - X = X - OneAndHalf; - Y = Y - OneAndHalf; - if ((X == Zero) && (Y == Zero) && (Z == Zero) && (T <= Zero)) { - X = (OneAndHalf + U2) * Y2; - Y = OneAndHalf - U2 - U2; - Z = OneAndHalf + U2 + U2; - T = (OneAndHalf - U2) * Y1; - X = X - (Z + U2); - StickyBit = Y * Y1; - S = Z * Y2; - T = T - Y; - Y = (U2 - Y) + StickyBit; - Z = S - (Z + U2 + U2); - StickyBit = (Y2 + U2) * Y1; - Y1 = Y2 * Y1; - StickyBit = StickyBit - Y2; - Y1 = Y1 - Half; - if ((X == Zero) && (Y == Zero) && (Z == Zero) && (T == Zero) - && (StickyBit == Zero) && (Y1 == Half)) { - RMult = Rounded; - printf ("Multiplication appears to round correctly.\n"); - } else if ((X + U2 == Zero) && (Y < Zero) && (Z + U2 == Zero) - && (T < Zero) && (StickyBit + U2 == Zero) - && (Y1 < Half)) { - RMult = Chopped; - printf ("Multiplication appears to chop.\n"); - } else - printf ("* is neither chopped nor correctly rounded.\n"); - if ((RMult == Rounded) && (GMult == No)) - notify ("Multiplication"); - } else - printf ("* is neither chopped nor correctly rounded.\n"); - /*=============================================*/ - Milestone = 45; - /*=============================================*/ - Y2 = One + U2; - Y1 = One - U2; - Z = OneAndHalf + U2 + U2; - X = Z / Y2; - T = OneAndHalf - U2 - U2; - Y = (T - U2) / Y1; - Z = (Z + U2) / Y2; - X = X - OneAndHalf; - Y = Y - T; - T = T / Y1; - Z = Z - (OneAndHalf + U2); - T = (U2 - OneAndHalf) + T; - if (!((X > Zero) || (Y > Zero) || (Z > Zero) || (T > Zero))) { - X = OneAndHalf / Y2; - Y = OneAndHalf - U2; - Z = OneAndHalf + U2; - X = X - Y; - T = OneAndHalf / Y1; - Y = Y / Y1; - T = T - (Z + U2); - Y = Y - Z; - Z = Z / Y2; - Y1 = (Y2 + U2) / Y2; - Z = Z - OneAndHalf; - Y2 = Y1 - Y2; - Y1 = (F9 - U1) / F9; - if ((X == Zero) && (Y == Zero) && (Z == Zero) && (T == Zero) - && (Y2 == Zero) && (Y2 == Zero) - && (Y1 - Half == F9 - Half)) { - RDiv = Rounded; - printf ("Division appears to round correctly.\n"); - if (GDiv == No) - notify ("Division"); - } else if ((X < Zero) && (Y < Zero) && (Z < Zero) && (T < Zero) - && (Y2 < Zero) && (Y1 - Half < F9 - Half)) { - RDiv = Chopped; - printf ("Division appears to chop.\n"); - } - } - if (RDiv == Other) - printf ("/ is neither chopped nor correctly rounded.\n"); - BInvrse = One / Radix; - TstCond (Failure, (BInvrse * Radix - Half == Half), - "Radix * ( 1 / Radix ) differs from 1"); - /*=============================================*/ - Milestone = 50; - /*=============================================*/ - TstCond (Failure, ((F9 + U1) - Half == Half) - && ((BMinusU2 + U2) - One == Radix - One), - "Incomplete carry-propagation in Addition"); - X = One - U1 * U1; - Y = One + U2 * (One - U2); - Z = F9 - Half; - X = (X - Half) - Z; - Y = Y - One; - if ((X == Zero) && (Y == Zero)) { - RAddSub = Chopped; - printf ("Add/Subtract appears to be chopped.\n"); - } - if (GAddSub == Yes) { - X = (Half + U2) * U2; - Y = (Half - U2) * U2; - X = One + X; - Y = One + Y; - X = (One + U2) - X; - Y = One - Y; - if ((X == Zero) && (Y == Zero)) { - X = (Half + U2) * U1; - Y = (Half - U2) * U1; - X = One - X; - Y = One - Y; - X = F9 - X; - Y = One - Y; - if ((X == Zero) && (Y == Zero)) { - RAddSub = Rounded; - printf ("Addition/Subtraction appears to round correctly.\n"); - if (GAddSub == No) - notify ("Add/Subtract"); - } else - printf ("Addition/Subtraction neither rounds nor chops.\n"); - } else - printf ("Addition/Subtraction neither rounds nor chops.\n"); - } else - printf ("Addition/Subtraction neither rounds nor chops.\n"); - S = One; - X = One + Half * (One + Half); - Y = (One + U2) * Half; - Z = X - Y; - T = Y - X; - StickyBit = Z + T; - if (StickyBit != Zero) { - S = Zero; - BadCond (Flaw, "(X - Y) + (Y - X) is non zero!\n"); - } - StickyBit = Zero; - if ((GMult == Yes) && (GDiv == Yes) && (GAddSub == Yes) - && (RMult == Rounded) && (RDiv == Rounded) - && (RAddSub == Rounded) && (FLOOR (RadixD2) == RadixD2)) { - printf ("Checking for sticky bit.\n"); - X = (Half + U1) * U2; - Y = Half * U2; - Z = One + Y; - T = One + X; - if ((Z - One <= Zero) && (T - One >= U2)) { - Z = T + Y; - Y = Z - X; - if ((Z - T >= U2) && (Y - T == Zero)) { - X = (Half + U1) * U1; - Y = Half * U1; - Z = One - Y; - T = One - X; - if ((Z - One == Zero) && (T - F9 == Zero)) { - Z = (Half - U1) * U1; - T = F9 - Z; - Q = F9 - Y; - if ((T - F9 == Zero) && (F9 - U1 - Q == Zero)) { - Z = (One + U2) * OneAndHalf; - T = (OneAndHalf + U2) - Z + U2; - X = One + Half / Radix; - Y = One + Radix * U2; - Z = X * Y; - if (T == Zero && X + Radix * U2 - Z == Zero) { - if (Radix != Two) { - X = Two + U2; - Y = X / Two; - if ((Y - One == Zero)) - StickyBit = S; - } else - StickyBit = S; - } - } - } - } - } - } - if (StickyBit == One) - printf ("Sticky bit apparently used correctly.\n"); - else - printf ("Sticky bit used incorrectly or not at all.\n"); - TstCond (Flaw, !(GMult == No || GDiv == No || GAddSub == No || - RMult == Other || RDiv == Other || RAddSub == Other), - "lack(s) of guard digits or failure(s) to correctly round or chop\n\ -(noted above) count as one flaw in the final tally below"); - /*=============================================*/ - Milestone = 60; - /*=============================================*/ - printf ("\n"); - printf ("Does Multiplication commute? "); - printf ("Testing on %d random pairs.\n", NoTrials); - Random9 = SQRT (3.0); - Random1 = Third; - I = 1; - do { - X = Random (); - Y = Random (); - Z9 = Y * X; - Z = X * Y; - Z9 = Z - Z9; - I = I + 1; - } - while (!((I > NoTrials) || (Z9 != Zero))); - if (I == NoTrials) { - Random1 = One + Half / Three; - Random2 = (U2 + U1) + One; - Z = Random1 * Random2; - Y = Random2 * Random1; - Z9 = (One + Half / Three) * ((U2 + U1) + One) - (One + Half / - Three) * ((U2 + U1) + One); - } - if (!((I == NoTrials) || (Z9 == Zero))) - BadCond (Defect, "X * Y == Y * X trial fails.\n"); - else - printf (" No failures found in %d integer pairs.\n", NoTrials); - /*=============================================*/ - Milestone = 70; - /*=============================================*/ - printf ("\nRunning test of square root(x).\n"); - TstCond (Failure, (Zero == SQRT (Zero)) - && (-Zero == SQRT (-Zero)) - && (One == SQRT (One)), "Square root of 0.0, -0.0 or 1.0 wrong"); - MinSqEr = Zero; - MaxSqEr = Zero; - J = Zero; - X = Radix; - OneUlp = U2; - SqXMinX (Serious); - X = BInvrse; - OneUlp = BInvrse * U1; - SqXMinX (Serious); - X = U1; - OneUlp = U1 * U1; - SqXMinX (Serious); - if (J != Zero) - Pause (); - printf ("Testing if sqrt(X * X) == X for %d Integers X.\n", NoTrials); - J = Zero; - X = Two; - Y = Radix; - if ((Radix != One)) - do { - X = Y; - Y = Radix * Y; - } - while (!((Y - X >= NoTrials))); - OneUlp = X * U2; - I = 1; - while (I <= NoTrials) { - X = X + One; - SqXMinX (Defect); - if (J > Zero) - break; - I = I + 1; - } - printf ("Test for sqrt monotonicity.\n"); - I = -1; - X = BMinusU2; - Y = Radix; - Z = Radix + Radix * U2; - NotMonot = False; - Monot = False; - while (!(NotMonot || Monot)) { - I = I + 1; - X = SQRT (X); - Q = SQRT (Y); - Z = SQRT (Z); - if ((X > Q) || (Q > Z)) - NotMonot = True; - else { - Q = FLOOR (Q + Half); - if ((I > 0) || (Radix == Q * Q)) - Monot = True; - else if (I > 0) { - if (I > 1) - Monot = True; - else { - Y = Y * BInvrse; - X = Y - U1; - Z = Y + U1; - } - } else { - Y = Q; - X = Y - U2; - Z = Y + U2; - } - } - } - if (Monot) - printf ("sqrt has passed a test for Monotonicity.\n"); - else { - BadCond (Defect, ""); - printf ("sqrt(X) is non-monotonic for X near %.7e .\n", Y); - } - /*=============================================*/ - Milestone = 80; - /*=============================================*/ - MinSqEr = MinSqEr + Half; - MaxSqEr = MaxSqEr - Half; - Y = (SQRT (One + U2) - One) / U2; - SqEr = (Y - One) + U2 / Eight; - if (SqEr > MaxSqEr) - MaxSqEr = SqEr; - SqEr = Y + U2 / Eight; - if (SqEr < MinSqEr) - MinSqEr = SqEr; - Y = ((SQRT (F9) - U2) - (One - U2)) / U1; - SqEr = Y + U1 / Eight; - if (SqEr > MaxSqEr) - MaxSqEr = SqEr; - SqEr = (Y + One) + U1 / Eight; - if (SqEr < MinSqEr) - MinSqEr = SqEr; - OneUlp = U2; - X = OneUlp; - for (Indx = 1; Indx <= 3; ++Indx) { - Y = SQRT ((X + U1 + X) + F9); - Y = ((Y - U2) - ((One - U2) + X)) / OneUlp; - Z = ((U1 - X) + F9) * Half * X * X / OneUlp; - SqEr = (Y + Half) + Z; - if (SqEr < MinSqEr) - MinSqEr = SqEr; - SqEr = (Y - Half) + Z; - if (SqEr > MaxSqEr) - MaxSqEr = SqEr; - if (((Indx == 1) || (Indx == 3))) - X = OneUlp * Sign (X) * FLOOR (Eight / (Nine * SQRT (OneUlp))); - else { - OneUlp = U1; - X = -OneUlp; - } - } - /*=============================================*/ - Milestone = 85; - /*=============================================*/ - SqRWrng = False; - Anomaly = False; - RSqrt = Other; /* ~dgh */ - if (Radix != One) { - printf ("Testing whether sqrt is rounded or chopped.\n"); - D = FLOOR (Half + POW (Radix, One + Precision - FLOOR (Precision))); - /* ... == Radix^(1 + fract) if (Precision == Integer + fract. */ - X = D / Radix; - Y = D / A1; - if ((X != FLOOR (X)) || (Y != FLOOR (Y))) { - Anomaly = True; - } else { - X = Zero; - Z2 = X; - Y = One; - Y2 = Y; - Z1 = Radix - One; - FourD = Four * D; - do { - if (Y2 > Z2) { - Q = Radix; - Y1 = Y; - do { - X1 = FABS (Q + FLOOR (Half - Q / Y1) * Y1); - Q = Y1; - Y1 = X1; - } - while (!(X1 <= Zero)); - if (Q <= One) { - Z2 = Y2; - Z = Y; - } - } - Y = Y + Two; - X = X + Eight; - Y2 = Y2 + X; - if (Y2 >= FourD) - Y2 = Y2 - FourD; - } - while (!(Y >= D)); - X8 = FourD - Z2; - Q = (X8 + Z * Z) / FourD; - X8 = X8 / Eight; - if (Q != FLOOR (Q)) - Anomaly = True; - else { - Break = False; - do { - X = Z1 * Z; - X = X - FLOOR (X / Radix) * Radix; - if (X == One) - Break = True; - else - Z1 = Z1 - One; - } - while (!(Break || (Z1 <= Zero))); - if ((Z1 <= Zero) && (!Break)) - Anomaly = True; - else { - if (Z1 > RadixD2) - Z1 = Z1 - Radix; - do { - NewD (); - } - while (!(U2 * D >= F9)); - if (D * Radix - D != WVar - D) - Anomaly = True; - else { - Z2 = D; - I = 0; - Y = D + (One + Z) * Half; - X = D + Z + Q; - SR3750 (); - Y = D + (One - Z) * Half + D; - X = D - Z + D; - X = X + Q + X; - SR3750 (); - NewD (); - if (D - Z2 != WVar - Z2) - Anomaly = True; - else { - Y = (D - Z2) + (Z2 + (One - Z) * Half); - X = (D - Z2) + (Z2 - Z + Q); - SR3750 (); - Y = (One + Z) * Half; - X = Q; - SR3750 (); - if (I == 0) - Anomaly = True; - } - } - } - } - } - if ((I == 0) || Anomaly) { - BadCond (Failure, "Anomalous arithmetic with Integer < "); - printf ("Radix^Precision = %.7e\n", WVar); - printf (" fails test whether sqrt rounds or chops.\n"); - SqRWrng = True; - } - } - if (!Anomaly) { - if (!((MinSqEr < Zero) || (MaxSqEr > Zero))) { - RSqrt = Rounded; - printf ("Square root appears to be correctly rounded.\n"); - } else { - if ((MaxSqEr + U2 > U2 - Half) || (MinSqEr > Half) - || (MinSqEr + Radix < Half)) - SqRWrng = True; - else { - RSqrt = Chopped; - printf ("Square root appears to be chopped.\n"); - } - } - } - if (SqRWrng) { - printf ("Square root is neither chopped nor correctly rounded.\n"); - printf ("Observed errors run from %.7e ", MinSqEr - Half); - printf ("to %.7e ulps.\n", Half + MaxSqEr); - TstCond (Serious, MaxSqEr - MinSqEr < Radix * Radix, - "sqrt gets too many last digits wrong"); - } - /*=============================================*/ - Milestone = 90; - /*=============================================*/ - Pause (); - printf ("Testing powers Z^i for small Integers Z and i.\n"); - N = 0; - /* ... test powers of zero. */ - I = 0; - Z = -Zero; - M = 3; - Break = False; - do { - X = One; - SR3980 (); - if (I <= 10) { - I = 1023; - SR3980 (); - } - if (Z == MinusOne) - Break = True; - else { - Z = MinusOne; - /* .. if(-1)^N is invalid, replace MinusOne by One. */ - I = -4; - } - } - while (!Break); - PrintIfNPositive (); - N1 = N; - N = 0; - Z = A1; - M = (int) FLOOR (Two * LOG (WVar) / LOG (A1)); - Break = False; - do { - X = Z; - I = 1; - SR3980 (); - if (Z == AInvrse) - Break = True; - else - Z = AInvrse; - } - while (!(Break)); - /*=============================================*/ - Milestone = 100; - /*=============================================*/ - /* Powers of Radix have been tested, */ - /* next try a few primes */ - M = NoTrials; - Z = Three; - do { - X = Z; - I = 1; - SR3980 (); - do { - Z = Z + Two; - } - while (Three * FLOOR (Z / Three) == Z); - } - while (Z < Eight * Three); - if (N > 0) { - printf ("Errors like this may invalidate financial calculations\n"); - printf ("\tinvolving interest rates.\n"); - } - PrintIfNPositive (); - N += N1; - if (N == 0) - printf ("... no discrepancies found.\n"); - if (N > 0) - Pause (); - else - printf ("\n"); - /*=============================================*/ - Milestone = 110; - /*=============================================*/ - printf ("Seeking Underflow thresholds UfThold and E0.\n"); - D = U1; - if (Precision != FLOOR (Precision)) { - D = BInvrse; - X = Precision; - do { - D = D * BInvrse; - X = X - One; - } - while (X > Zero); - } - Y = One; - Z = D; - /* ... D is power of 1/Radix < 1. */ - do { - C = Y; - Y = Z; - Z = Y * Y; - } - while ((Y > Z) && (Z + Z > Z)); - Y = C; - Z = Y * D; - do { - C = Y; - Y = Z; - Z = Y * D; - } - while ((Y > Z) && (Z + Z > Z)); - if (Radix < Two) - HInvrse = Two; - else - HInvrse = Radix; - HVar = One / HInvrse; - /* ... 1/HInvrse == HVar == Min(1/Radix, 1/2) */ - CInvrse = One / C; - E0 = C; - Z = E0 * HVar; - /* ...1/Radix^(BIG Integer) << 1 << CInvrse == 1/C */ - do { - Y = E0; - E0 = Z; - Z = E0 * HVar; - } - while ((E0 > Z) && (Z + Z > Z)); - UfThold = E0; - E1 = Zero; - Q = Zero; - E9 = U2; - S = One + E9; - D = C * S; - if (D <= C) { - E9 = Radix * U2; - S = One + E9; - D = C * S; - if (D <= C) { - BadCond (Failure, "multiplication gets too many last digits wrong.\n"); - Underflow = E0; - Y1 = Zero; - PseudoZero = Z; - Pause (); - } - } else { - Underflow = D; - PseudoZero = Underflow * HVar; - UfThold = Zero; - do { - Y1 = Underflow; - Underflow = PseudoZero; - if (E1 + E1 <= E1) { - Y2 = Underflow * HInvrse; - E1 = FABS (Y1 - Y2); - Q = Y1; - if ((UfThold == Zero) && (Y1 != Y2)) - UfThold = Y1; - } - PseudoZero = PseudoZero * HVar; - } - while ((Underflow > PseudoZero) - && (PseudoZero + PseudoZero > PseudoZero)); - } - /* Comment line 4530 .. 4560 */ - if (PseudoZero != Zero) { - printf ("\n"); - Z = PseudoZero; - /* ... Test PseudoZero for "phoney- zero" violates */ - /* ... PseudoZero < Underflow or PseudoZero < PseudoZero + PseudoZero - ... */ - if (PseudoZero <= Zero) { - BadCond (Failure, "Positive expressions can underflow to an\n"); - printf ("allegedly negative value\n"); - printf ("PseudoZero that prints out as: %g .\n", PseudoZero); - X = -PseudoZero; - if (X <= Zero) { - printf ("But -PseudoZero, which should be\n"); - printf ("positive, isn't; it prints out as %g .\n", X); - } - } else { - BadCond (Flaw, "Underflow can stick at an allegedly positive\n"); - printf ("value PseudoZero that prints out as %g .\n", PseudoZero); - } - TstPtUf (); - } - /*=============================================*/ - Milestone = 120; - /*=============================================*/ - if (CInvrse * Y > CInvrse * Y1) { - S = HVar * S; - E0 = Underflow; - } - if (!((E1 == Zero) || (E1 == E0))) { - BadCond (Defect, ""); - if (E1 < E0) { - printf ("Products underflow at a higher"); - printf (" threshold than differences.\n"); - if (PseudoZero == Zero) - E0 = E1; - } else { - printf ("Difference underflows at a higher"); - printf (" threshold than products.\n"); - } - } - printf ("Smallest strictly positive number found is E0 = %g .\n", E0); - Z = E0; - TstPtUf (); - Underflow = E0; - if (N == 1) - Underflow = Y; - I = 4; - if (E1 == Zero) - I = 3; - if (UfThold == Zero) - I = I - 2; - UfNGrad = True; - switch (I) { - case 1: - UfThold = Underflow; - if ((CInvrse * Q) != ((CInvrse * Y) * S)) { - UfThold = Y; - BadCond (Failure, "Either accuracy deteriorates as numbers\n"); - printf ("approach a threshold = %.17e\n", UfThold);; - printf (" coming down from %.17e\n", C); - printf (" or else multiplication gets too many last digits wrong.\n"); - } - Pause (); - break; - - case 2: - BadCond (Failure, "Underflow confuses Comparison, which alleges that\n"); - printf ("Q == Y while denying that |Q - Y| == 0; these values\n"); - printf ("print out as Q = %.17e, Y = %.17e .\n", Q, Y2); - printf ("|Q - Y| = %.17e .\n", FABS (Q - Y2)); - UfThold = Q; - break; - - case 3: - X = X; - break; - - case 4: - if ((Q == UfThold) && (E1 == E0) - && (FABS (UfThold - E1 / E9) <= E1)) { - UfNGrad = False; - printf ("Underflow is gradual; it incurs Absolute Error =\n"); - printf ("(roundoff in UfThold) < E0.\n"); - Y = E0 * CInvrse; - Y = Y * (OneAndHalf + U2); - X = CInvrse * (One + U2); - Y = Y / X; - IEEE = (Y == E0); - } - } - if (UfNGrad) { - printf ("\n"); - sigsave = _sigfpe; - if (setjmp (ovfl_buf)) { - printf ("Underflow / UfThold failed!\n"); - R = HVar + HVar; - } else - R = SQRT (Underflow / UfThold); - sigsave = 0; - if (R <= HVar) { - Z = R * UfThold; - X = Z * (One + R * HVar * (One + HVar)); - } else { - Z = UfThold; - X = Z * (One + HVar * HVar * (One + HVar)); - } - if (!((X == Z) || (X - Z != Zero))) { - BadCond (Flaw, ""); - printf ("X = %.17e\n\tis not equal to Z = %.17e .\n", X, Z); - Z9 = X - Z; - printf ("yet X - Z yields %.17e .\n", Z9); - printf (" Should this NOT signal Underflow, "); - printf ("this is a SERIOUS DEFECT\nthat causes "); - printf ("confusion when innocent statements like\n");; - printf (" if (X == Z) ... else"); - printf (" ... (f(X) - f(Z)) / (X - Z) ...\n"); - printf ("encounter Division by Zero although actually\n"); - sigsave = _sigfpe; - if (setjmp (ovfl_buf)) - printf ("X / Z fails!\n"); - else - printf ("X / Z = 1 + %g .\n", (X / Z - Half) - Half); - sigsave = 0; - } - } - printf ("The Underflow threshold is %.17e, %s\n", UfThold, - " below which"); - printf ("calculation may suffer larger Relative error than "); - printf ("merely roundoff.\n"); - Y2 = U1 * U1; - Y = Y2 * Y2; - Y2 = Y * U1; - if (Y2 <= UfThold) { - if (Y > E0) { - BadCond (Defect, ""); - I = 5; - } else { - BadCond (Serious, ""); - I = 4; - } - printf ("Range is too narrow; U1^%d Underflows.\n", I); - } - /*=============================================*/ - Milestone = 130; - /*=============================================*/ - Y = -FLOOR (Half - TwoForty * LOG (UfThold) / LOG (HInvrse)) / TwoForty; - Y2 = Y + Y; - printf ("Since underflow occurs below the threshold\n"); - printf ("UfThold = (%.17e) ^ (%.17e)\nonly underflow ", HInvrse, Y); - printf ("should afflict the expression\n\t(%.17e) ^ (%.17e);\n", - HInvrse, Y2); - printf ("actually calculating yields:"); - if (setjmp (ovfl_buf)) { - sigsave = 0; - BadCond (Serious, "trap on underflow.\n"); - } else { - sigsave = _sigfpe; - V9 = POW (HInvrse, Y2); - sigsave = 0; - printf (" %.17e .\n", V9); - if (!((V9 >= Zero) && (V9 <= (Radix + Radix + E9) * UfThold))) { - BadCond (Serious, "this is not between 0 and underflow\n"); - printf (" threshold = %.17e .\n", UfThold); - } else if (!(V9 > UfThold * (One + E9))) - printf ("This computed value is O.K.\n"); - else { - BadCond (Defect, "this is not between 0 and underflow\n"); - printf (" threshold = %.17e .\n", UfThold); - } - } - /*=============================================*/ - Milestone = 140; - /*=============================================*/ - printf ("\n"); - /* ...calculate Exp2 == exp(2) == 7.389056099... */ - X = Zero; - I = 2; - Y = Two * Three; - Q = Zero; - N = 0; - do { - Z = X; - I = I + 1; - Y = Y / (I + I); - R = Y + Q; - X = Z + R; - Q = (Z - X) + R; - } - while (X > Z); - Z = (OneAndHalf + One / Eight) + X / (OneAndHalf * ThirtyTwo); - X = Z * Z; - Exp2 = X * X; - X = F9; - Y = X - U1; - printf ("Testing X^((X + 1) / (X - 1)) vs. exp(2) = %.17e as X -> 1.\n", - Exp2); - for (I = 1;;) { - Z = X - BInvrse; - Z = (X + One) / (Z - (One - BInvrse)); - Q = POW (X, Z) - Exp2; - if (FABS (Q) > TwoForty * U2) { - N = 1; - V9 = (X - BInvrse) - (One - BInvrse); - BadCond (Defect, "Calculated"); - printf (" %.17e for\n", POW (X, Z)); - printf ("\t(1 + (%.17e) ^ (%.17e);\n", V9, Z); - printf ("\tdiffers from correct value by %.17e .\n", Q); - printf ("\tThis much error may spoil financial\n"); - printf ("\tcalculations involving tiny interest rates.\n"); - break; - } else { - Z = (Y - X) * Two + Y; - X = Y; - Y = Z; - Z = One + (X - F9) * (X - F9); - if (Z > One && I < NoTrials) - I++; - else { - if (X > One) { - if (N == 0) - printf ("Accuracy seems adequate.\n"); - break; - } else { - X = One + U2; - Y = U2 + U2; - Y += X; - I = 1; - } - } - } - } - /*=============================================*/ - Milestone = 150; - /*=============================================*/ - printf ("Testing powers Z^Q at four nearly extreme values.\n"); - N = 0; - Z = A1; - Q = FLOOR (Half - LOG (C) / LOG (A1)); - Break = False; - do { - X = CInvrse; - Y = POW (Z, Q); - IsYeqX (); - Q = -Q; - X = C; - Y = POW (Z, Q); - IsYeqX (); - if (Z < One) - Break = True; - else - Z = AInvrse; - } - while (!(Break)); - PrintIfNPositive (); - if (N == 0) - printf (" ... no discrepancies found.\n"); - printf ("\n"); - - /*=============================================*/ - Milestone = 160; - /*=============================================*/ - Pause (); - printf ("Searching for Overflow threshold:\n"); - printf ("This may generate an error.\n"); - Y = -CInvrse; - V9 = HInvrse * Y; - sigsave = _sigfpe; - if (setjmp (ovfl_buf)) { - I = 0; - V9 = Y; - goto overflow; - } - do { - V = Y; - Y = V9; - V9 = HInvrse * Y; - } - while (V9 < Y); - I = 1; - overflow: - sigsave = 0; - Z = V9; - printf ("Can `Z = -Y' overflow?\n"); - printf ("Trying it on Y = %.17e .\n", Y); - V9 = -Y; - V0 = V9; - if (V - Y == V + V0) - printf ("Seems O.K.\n"); - else { - printf ("finds a "); - BadCond (Flaw, "-(-Y) differs from Y.\n"); - } - if (Z != Y) { - BadCond (Serious, ""); - printf ("overflow past %.17e\n\tshrinks to %.17e .\n", Y, Z); - } - if (I) { - Y = V * (HInvrse * U2 - HInvrse); - Z = Y + ((One - HInvrse) * U2) * V; - if (Z < V0) - Y = Z; - if (Y < V0) - V = Y; - if (V0 - V < V0) - V = V0; - } else { - V = Y * (HInvrse * U2 - HInvrse); - V = V + ((One - HInvrse) * U2) * Y; - } - printf ("Overflow threshold is V = %.17e .\n", V); - if (I) - printf ("Overflow saturates at V0 = %.17e .\n", V0); - else - printf ("There is no saturation value because \ -the system traps on overflow.\n"); - V9 = V * One; - printf ("No Overflow should be signaled for V * 1 = %.17e\n", V9); - V9 = V / One; - printf (" nor for V / 1 = %.17e .\n", V9); - printf ("Any overflow signal separating this * from the one\n"); - printf ("above is a DEFECT.\n"); - /*=============================================*/ - Milestone = 170; - /*=============================================*/ - if (!(-V < V && -V0 < V0 && -UfThold < V && UfThold < V)) { - BadCond (Failure, "Comparisons involving "); - printf ("+-%g, +-%g\nand +-%g are confused by Overflow.", - V, V0, UfThold); - } - /*=============================================*/ - Milestone = 175; - /*=============================================*/ - printf ("\n"); - for (Indx = 1; Indx <= 3; ++Indx) { - switch (Indx) { - case 1: - Z = UfThold; - break; - case 2: - Z = E0; - break; - case 3: - Z = PseudoZero; - break; - } - if (Z != Zero) { - V9 = SQRT (Z); - Y = V9 * V9; - if (Y / (One - Radix * E9) < Z - || Y > (One + Radix * E9) * Z) { /* dgh: + E9 --> * E9 */ - if (V9 > U1) - BadCond (Serious, ""); - else - BadCond (Defect, ""); - printf ("Comparison alleges that what prints as Z = %.17e\n", Z); - printf (" is too far from sqrt(Z) ^ 2 = %.17e .\n", Y); - } - } - } - /*=============================================*/ - Milestone = 180; - /*=============================================*/ - for (Indx = 1; Indx <= 2; ++Indx) { - if (Indx == 1) - Z = V; - else - Z = V0; - V9 = SQRT (Z); - X = (One - Radix * E9) * V9; - V9 = V9 * X; - if (((V9 < (One - Two * Radix * E9) * Z) || (V9 > Z))) { - Y = V9; - if (X < WVar) - BadCond (Serious, ""); - else - BadCond (Defect, ""); - printf ("Comparison alleges that Z = %17e\n", Z); - printf (" is too far from sqrt(Z) ^ 2 (%.17e) .\n", Y); - } - } - /*=============================================*/ - Milestone = 190; - /*=============================================*/ - Pause (); - X = UfThold * V; - Y = Radix * Radix; - if (X * Y < One || X > Y) { - if (X * Y < U1 || X > Y / U1) - BadCond (Defect, "Badly"); - else - BadCond (Flaw, ""); - - printf (" unbalanced range; UfThold * V = %.17e\n\t%s\n", - X, "is too far from 1.\n"); - } - /*=============================================*/ - Milestone = 200; - /*=============================================*/ - for (Indx = 1; Indx <= 5; ++Indx) { - X = F9; - switch (Indx) { - case 2: - X = One + U2; - break; - case 3: - X = V; - break; - case 4: - X = UfThold; - break; - case 5: - X = Radix; - } - Y = X; - sigsave = _sigfpe; - if (setjmp (ovfl_buf)) - printf (" X / X traps when X = %g\n", X); - else { - V9 = (Y / X - Half) - Half; - if (V9 == Zero) - continue; - if (V9 == -U1 && Indx < 5) - BadCond (Flaw, ""); - else - BadCond (Serious, ""); - printf (" X / X differs from 1 when X = %.17e\n", X); - printf (" instead, X / X - 1/2 - 1/2 = %.17e .\n", V9); - } - sigsave = 0; - } - /*=============================================*/ - Milestone = 210; - /*=============================================*/ - MyZero = Zero; - printf ("\n"); - printf ("What message and/or values does Division by Zero produce?\n"); -#ifndef BATCHMODE - printf ("This can interupt your program. You can "); - printf ("skip this part if you wish.\n"); - printf ("Do you wish to compute 1 / 0? "); - fflush (stdout); - read (KEYBOARD, ch, 8); - if ((ch[0] == 'Y') || (ch[0] == 'y')) { -#endif /* !BATCHMODE */ - sigsave = _sigfpe; - printf (" Trying to compute 1 / 0 produces ..."); - if (!setjmp (ovfl_buf)) - printf (" %.7e .\n", One / MyZero); - sigsave = 0; -#ifndef BATCHMODE - } else - printf ("O.K.\n"); - printf ("\nDo you wish to compute 0 / 0? "); - fflush (stdout); - read (KEYBOARD, ch, 80); - if ((ch[0] == 'Y') || (ch[0] == 'y')) { -#endif /* !BATCHMODE */ - sigsave = _sigfpe; - printf ("\n Trying to compute 0 / 0 produces ..."); - if (!setjmp (ovfl_buf)) - printf (" %.7e .\n", Zero / MyZero); - sigsave = 0; -#ifndef BATCHMODE - } else - printf ("O.K.\n"); -#endif /* !BATCHMODE */ - /*=============================================*/ - Milestone = 220; - /*=============================================*/ - - Pause (); - printf ("\n"); - { - static char *msg[] = - { - "FAILUREs encountered =", - "SERIOUS DEFECTs discovered =", - "DEFECTs discovered =", - "FLAWs discovered ="}; - int i; - for (i = 0; i < 4; i++) - if (ErrCnt[i]) - printf ("The number of %-29s %d.\n", - msg[i], ErrCnt[i]); - } - - printf ("\n"); - if ((ErrCnt[Failure] + ErrCnt[Serious] + ErrCnt[Defect] - + ErrCnt[Flaw]) > 0) { - if ((ErrCnt[Failure] + ErrCnt[Serious] + ErrCnt[ - Defect] == 0) && (ErrCnt[Flaw] > 0)) { - printf ("The arithmetic diagnosed seems "); - printf ("Satisfactory though flawed.\n"); - } - if ((ErrCnt[Failure] + ErrCnt[Serious] == 0) - && (ErrCnt[Defect] > 0)) { - printf ("The arithmetic diagnosed may be Acceptable\n"); - printf ("despite inconvenient Defects.\n"); - } - if ((ErrCnt[Failure] + ErrCnt[Serious]) > 0) { - printf ("The arithmetic diagnosed has "); - printf ("unacceptable Serious Defects.\n"); - } - if (ErrCnt[Failure] > 0) { - printf ("Potentially fatal FAILURE may have spoiled this"); - printf (" program's subsequent diagnoses.\n"); - } - } else { - - printf ("No failures, defects nor flaws have been discovered.\n"); - if (!((RMult == Rounded) && (RDiv == Rounded) - && (RAddSub == Rounded) && (RSqrt == Rounded))) - printf ("The arithmetic diagnosed seems Satisfactory.\n"); - else { - if (StickyBit >= One && - (Radix - Two) * (Radix - Nine - One) == Zero) { - printf ("Rounding appears to conform to "); - printf ("the proposed IEEE standard P"); - if ((Radix == Two) && - ((Precision - Four * Three * Two) * - (Precision - TwentySeven - - TwentySeven + One) == Zero)) - printf ("754"); - else - printf ("854"); - if (IEEE) - printf (".\n"); - else { - printf (",\nexcept for possibly Double Rounding"); - printf (" during Gradual Underflow.\n"); - } - } - printf ("The arithmetic diagnosed appears to be Excellent!\n"); - } - } - - if (fpecount) - printf ("\nA total of %d floating point exceptions were registered.\n", - fpecount); - printf ("END OF TEST.\n"); - return 0; -} - -FLOAT -Sign (X) - FLOAT X; -{ - return X >= 0. ? 1.0 : -1.0; -} - -void -Pause () -{ -#ifndef BATCHMODE - char ch[8]; - - printf ("\nTo continue, press RETURN"); - fflush (stdout); - read (KEYBOARD, ch, 8); -#endif /* !BATCHMODE */ -#ifndef CYGNUS - printf ("\nDiagnosis resumes after milestone Number %d", Milestone); - printf (" Page: %d\n\n", PageNo); - ++Milestone; - ++PageNo; -#endif /* !CYGNUS */ -} - -void -TstCond (K, Valid, T) - int K, Valid; - char *T; -{ -#ifdef CYGNUS - printf ("TEST: %s\n", T); -#endif /* CYGNUS */ - if (!Valid) { - BadCond (K, T); - printf (".\n"); - } -#ifdef CYGNUS - printf ("PASS: %s\n", T); -#endif /* CYGNUS */ -} - -void -BadCond (K, T) - int K; - char *T; -{ - static char *msg[] = - {"FAILURE", "SERIOUS DEFECT", "DEFECT", "FLAW"}; - - ErrCnt[K] = ErrCnt[K] + 1; -#ifndef CYGNUS - printf ("%s: %s", msg[K], T); -#else - printf ("ERROR: Severity: %s: %s", msg[K], T); -#endif /* CYGNUS */ -} - -/* - * Random computes - * X = (Random1 + Random9)^5 - * Random1 = X - FLOOR(X) + 0.000005 * X; - * and returns the new value of Random1 -*/ -FLOAT -Random () -{ - FLOAT X, Y; - - X = Random1 + Random9; - Y = X * X; - Y = Y * Y; - X = X * Y; - Y = X - FLOOR (X); - Random1 = Y + X * 0.000005; - return (Random1); -} - -void -SqXMinX (ErrKind) - int ErrKind; -{ - FLOAT XA, XB; - - XB = X * BInvrse; - XA = X - XB; - SqEr = ((SQRT (X * X) - XB) - XA) / OneUlp; - if (SqEr != Zero) { - if (SqEr < MinSqEr) - MinSqEr = SqEr; - if (SqEr > MaxSqEr) - MaxSqEr = SqEr; - J = J + 1.0; - BadCond (ErrKind, "\n"); - printf ("sqrt( %.17e) - %.17e = %.17e\n", X * X, X, OneUlp * SqEr); - printf ("\tinstead of correct value 0 .\n"); - } -} - -void -NewD () -{ - X = Z1 * Q; - X = FLOOR (Half - X / Radix) * Radix + X; - Q = (Q - X * Z) / Radix + X * X * (D / Radix); - Z = Z - Two * X * D; - if (Z <= Zero) { - Z = -Z; - Z1 = -Z1; - } - D = Radix * D; -} - -void -SR3750 () -{ - if (!((X - Radix < Z2 - Radix) || (X - Z2 > WVar - Z2))) { - I = I + 1; - X2 = SQRT (X * D); - Y2 = (X2 - Z2) - (Y - Z2); - X2 = X8 / (Y - Half); - X2 = X2 - Half * X2 * X2; - SqEr = (Y2 + Half) + (Half - X2); - if (SqEr < MinSqEr) - MinSqEr = SqEr; - SqEr = Y2 - X2; - if (SqEr > MaxSqEr) - MaxSqEr = SqEr; - } -} - -void -IsYeqX () -{ - if (Y != X) { - if (N <= 0) { - if (Z == Zero && Q <= Zero) - printf ("WARNING: computing\n"); - else - BadCond (Defect, "computing\n"); - printf ("\t(%.17e) ^ (%.17e)\n", Z, Q); - printf ("\tyielded %.17e;\n", Y); - printf ("\twhich compared unequal to correct %.17e ;\n", - X); - printf ("\t\tthey differ by %.17e .\n", Y - X); - } - N = N + 1; /* ... count discrepancies. */ - } -} - -void -SR3980 () -{ - do { - Q = (FLOAT) I; - Y = POW (Z, Q); - IsYeqX (); - if (++I > M) - break; - X = Z * X; - } - while (X < WVar); -} - -void -PrintIfNPositive () -{ - if (N > 0) - printf ("Similar discrepancies have occurred %d times.\n", N); -} - -void -TstPtUf () -{ - N = 0; - if (Z != Zero) { - printf ("Since comparison denies Z = 0, evaluating "); - printf ("(Z + Z) / Z should be safe.\n"); - sigsave = _sigfpe; - if (setjmp (ovfl_buf)) - goto very_serious; - Q9 = (Z + Z) / Z; - printf ("What the machine gets for (Z + Z) / Z is %.17e .\n", - Q9); - if (FABS (Q9 - Two) < Radix * U2) { - printf ("This is O.K., provided Over/Underflow"); - printf (" has NOT just been signaled.\n"); - } else { - if ((Q9 < One) || (Q9 > Two)) { - very_serious: - N = 1; - ErrCnt[Serious] = ErrCnt[Serious] + 1; - printf ("This is a VERY SERIOUS DEFECT!\n"); - } else { - N = 1; - ErrCnt[Defect] = ErrCnt[Defect] + 1; - printf ("This is a DEFECT!\n"); - } - } - sigsave = 0; - V9 = Z * One; - Random1 = V9; - V9 = One * Z; - Random2 = V9; - V9 = Z / One; - if ((Z == Random1) && (Z == Random2) && (Z == V9)) { - if (N > 0) - Pause (); - } else { - N = 1; - BadCond (Defect, "What prints as Z = "); - printf ("%.17e\n\tcompares different from ", Z); - if (Z != Random1) - printf ("Z * 1 = %.17e ", Random1); - if (!((Z == Random2) - || (Random2 == Random1))) - printf ("1 * Z == %g\n", Random2); - if (!(Z == V9)) - printf ("Z / 1 = %.17e\n", V9); - if (Random2 != Random1) { - ErrCnt[Defect] = ErrCnt[Defect] + 1; - BadCond (Defect, "Multiplication does not commute!\n"); - printf ("\tComparison alleges that 1 * Z = %.17e\n", - Random2); - printf ("\tdiffers from Z * 1 = %.17e\n", Random1); - } - Pause (); - } - } -} - -void -notify (s) - char *s; -{ - printf ("%s test appears to be inconsistent...\n", s); - printf (" PLEASE NOTIFY KARPINKSI!\n"); -} - -void -msglist (s) - char **s; -{ - while (*s) - printf ("%s\n", *s++); -} - -void -Instructions () -{ - static char *instr[] = - { - "Lest this program stop prematurely, i.e. before displaying\n", - " `END OF TEST',\n", - "try to persuade the computer NOT to terminate execution when an", - "error like Over/Underflow or Division by Zero occurs, but rather", - "to persevere with a surrogate value after, perhaps, displaying some", - "warning. If persuasion avails naught, don't despair but run this", - "program anyway to see how many milestones it passes, and then", - "amend it to make further progress.\n", - "Answer questions with Y, y, N or n (unless otherwise indicated).\n", - 0}; - - msglist (instr); -} - -void -Heading () -{ - static char *head[] = - { - "Users are invited to help debug and augment this program so it will", - "cope with unanticipated and newly uncovered arithmetic pathologies.\n", - "Please send suggestions and interesting results to", - "\tRichard Karpinski", - "\tComputer Center U-76", - "\tUniversity of California", - "\tSan Francisco, CA 94143-0704, USA\n", - "In doing so, please include the following information:", -#ifdef SINGLE_PRECISION - "\tPrecision:\tsingle;", -#else /* !SINGLE_PRECISION */ - "\tPrecision:\tdouble;", -#endif /* SINGLE_PRECISION */ - "\tVersion:\t10 February 1989;", - "\tComputer:\n", - "\tCompiler:\n", - "\tOptimization level:\n", - "\tOther relevant compiler options:", - 0}; - - msglist (head); -} - -void -Characteristics () -{ - static char *chars[] = - { - "Running this program should reveal these characteristics:", - " Radix = 1, 2, 4, 8, 10, 16, 100, 256 ...", - " Precision = number of significant digits carried.", - " U2 = Radix/Radix^Precision = One Ulp", - "\t(OneUlpnit in the Last Place) of 1.000xxx .", - " U1 = 1/Radix^Precision = One Ulp of numbers a little less than 1.0 .", - " Adequacy of guard digits for Mult., Div. and Subt.", - " Whether arithmetic is chopped, correctly rounded, or something else", - "\tfor Mult., Div., Add/Subt. and Sqrt.", - " Whether a Sticky Bit used correctly for rounding.", - " UnderflowThreshold = an underflow threshold.", - " E0 and PseudoZero tell whether underflow is abrupt, gradual, or fuzzy.", - " V = an overflow threshold, roughly.", - " V0 tells, roughly, whether Infinity is represented.", - " Comparisions are checked for consistency with subtraction", - "\tand for contamination with pseudo-zeros.", - " Sqrt is tested. Y^X is not tested.", - " Extra-precise subexpressions are revealed but NOT YET tested.", - " Decimal-Binary conversion is NOT YET tested for accuracy.", - 0}; - - msglist (chars); -} - -void -History () -{ /* History */ - /* Converted from Brian Wichmann's Pascal version to C by Thos Sumner, - with further massaging by David M. Gay. */ - - static char *hist[] = - { - "The program attempts to discriminate among", - " FLAWs, like lack of a sticky bit,", - " Serious DEFECTs, like lack of a guard digit, and", - " FAILUREs, like 2+2 == 5 .", - "Failures may confound subsequent diagnoses.\n", - "The diagnostic capabilities of this program go beyond an earlier", - "program called `MACHAR', which can be found at the end of the", - "book `Software Manual for the Elementary Functions' (1980) by", - "W. J. Cody and W. Waite. Although both programs try to discover", - "the Radix, Precision and range (over/underflow thresholds)", - "of the arithmetic, this program tries to cope with a wider variety", - "of pathologies, and to say how well the arithmetic is implemented.", - "\nThe program is based upon a conventional radix representation for", - "floating-point numbers, but also allows logarithmic encoding", - "as used by certain early WANG machines.\n", - "BASIC version of this program (C) 1983 by Prof. W. M. Kahan;", - "see source comments for more history.", - 0}; - - msglist (hist); -} diff --git a/c/src/tests/samples/paranoia/paranoia.doc b/c/src/tests/samples/paranoia/paranoia.doc deleted file mode 100644 index 5c0baceb8d..0000000000 --- a/c/src/tests/samples/paranoia/paranoia.doc +++ /dev/null @@ -1,12 +0,0 @@ -# -# $Id$ -# -# COPYRIGHT (c) 1989-1999. -# On-Line Applications Research Corporation (OAR). -# -# The license and distribution terms for this file may be -# found in the file LICENSE in this distribution or at -# http://www.rtems.com/license/LICENSE. -# - - diff --git a/c/src/tests/samples/paranoia/system.h b/c/src/tests/samples/paranoia/system.h deleted file mode 100644 index 8e782dc30e..0000000000 --- a/c/src/tests/samples/paranoia/system.h +++ /dev/null @@ -1,41 +0,0 @@ -/* system.h - * - * This include file contains information that is included in every - * function in the test set. - * - * COPYRIGHT (c) 1989-1999. - * On-Line Applications Research Corporation (OAR). - * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.rtems.com/license/LICENSE. - * - * $Id$ - */ - -#include - -/* functions */ - -rtems_task Init( - rtems_task_argument argument -); - -/* configuration information */ - -#include /* for device driver prototypes */ - -#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER -#define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER - -#define CONFIGURE_MAXIMUM_TASKS 1 - -#define CONFIGURE_RTEMS_INIT_TASKS_TABLE -#define CONFIGURE_INIT_TASK_ATTRIBUTES RTEMS_FLOATING_POINT -#define CONFIGURE_INIT_TASK_STACK_SIZE (RTEMS_MINIMUM_STACK_SIZE * 2) - -#define CONFIGURE_EXTRA_TASK_STACKS (1 * RTEMS_MINIMUM_STACK_SIZE) - -#include - -/* end of include file */ diff --git a/c/src/tests/samples/pppd/.cvsignore b/c/src/tests/samples/pppd/.cvsignore deleted file mode 100644 index 282522db03..0000000000 --- a/c/src/tests/samples/pppd/.cvsignore +++ /dev/null @@ -1,2 +0,0 @@ -Makefile -Makefile.in diff --git a/c/src/tests/samples/pppd/Makefile-user b/c/src/tests/samples/pppd/Makefile-user deleted file mode 100644 index 69cc8aab50..0000000000 --- a/c/src/tests/samples/pppd/Makefile-user +++ /dev/null @@ -1,45 +0,0 @@ -# -# Makefile -# - -# -# RTEMS_MAKEFILE_PATH is typically set in an environment variable -# - -EXEC=ppptest.exe -PGM=${ARCH}/$(EXEC) - -# optional managers required -MANAGERS=io event semaphore - -# C source names -CSRCS = init.c pppdapp.c - -COBJS_ = $(CSRCS:.c=.o) -COBJS = $(COBJS_:%=${ARCH}/%) - -# C++ source names -CXXSRCS = -CXXOBJS_ = $(CXXSRCS:.cc=.o) -CXXOBJS = $(CXXOBJS_:%=${ARCH}/%) - -# AS source names -ASSRCS = -ASOBJS_ = $(ASSRCS:.s=.o) -ASOBJS = $(ASOBJS_:%=${ARCH}/%) - -# Libraries -LIBS = -lrtemsall -lc - -include $(RTEMS_MAKEFILE_PATH)/Makefile.inc - -include $(RTEMS_CUSTOM) -include $(PROJECT_ROOT)/make/leaf.cfg - -OBJS= $(COBJS) $(CXXOBJS) $(ASOBJS) - -all: ${ARCH} $(PGM) - -$(PGM): $(OBJS) - $(make-exe) - diff --git a/c/src/tests/samples/pppd/Makefile.am b/c/src/tests/samples/pppd/Makefile.am deleted file mode 100644 index 5a0bd43ce8..0000000000 --- a/c/src/tests/samples/pppd/Makefile.am +++ /dev/null @@ -1,40 +0,0 @@ -## -## $Id$ -## - - -SAMPLE = pppd -PGM = ${ARCH}/$(SAMPLE).exe - -MANAGERS = io event semaphore - -C_FILES = init.c pppdapp.c -C_O_FILES = $(C_FILES:%.c=${ARCH}/%.$(OBJEXT)) - -H_FILES = netconfig.h system.h - -SRCS = $(C_FILES) $(H_FILES) -OBJS = $(C_O_FILES) - -PRINT_SRCS = $(DOCS) - -include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg -include $(top_srcdir)/../automake/compile.am -include $(top_srcdir)/../automake/leaf.am -include $(top_srcdir)/sample.am - -# -# (OPTIONAL) Add local stuff here using += -# - - -if HAS_NETWORKING -all-local: ${ARCH} $(TMPINSTALL_FILES) - -${PGM}: $(OBJS) $(LINK_FILES) - $(make-exe) -endif - -EXTRA_DIST = $(C_FILES) $(H_FILES) - -include $(top_srcdir)/../automake/local.am diff --git a/c/src/tests/samples/pppd/README b/c/src/tests/samples/pppd/README deleted file mode 100644 index 677e00af33..0000000000 --- a/c/src/tests/samples/pppd/README +++ /dev/null @@ -1,15 +0,0 @@ -# -# $Id$ -# - -This is an example user application using pppd. It is built using -the RTEMS application Makefiles. The file Makefile-user should -be renamed to Makefile or the -f option given to make. The file -is renamed to avoid bootstrap -c removing it. - -The files ppp.conf and pppd.options are sample configuration files -that have successfully used to make ppp connections over a null -modem serial cable to a UNIX box. Please review the man pages -for either the ppp or pppd applications to ensure they are configured -correctly. - diff --git a/c/src/tests/samples/pppd/init.c b/c/src/tests/samples/pppd/init.c deleted file mode 100644 index f35d195bf2..0000000000 --- a/c/src/tests/samples/pppd/init.c +++ /dev/null @@ -1,24 +0,0 @@ - -#include -#include -#include -#include -#include - -#define CONFIGURE_INIT -#include "system.h" -#include "netconfig.h" - - -extern int pppdapp_initialize(void); - - -rtems_task Init(rtems_task_argument argument) -{ - /* initialize network */ - rtems_bsdnet_initialize_network(); - rtems_pppd_initialize(); - pppdapp_initialize(); - - rtems_task_delete(RTEMS_SELF); -} diff --git a/c/src/tests/samples/pppd/netconfig.h b/c/src/tests/samples/pppd/netconfig.h deleted file mode 100644 index 3428288cd2..0000000000 --- a/c/src/tests/samples/pppd/netconfig.h +++ /dev/null @@ -1,36 +0,0 @@ - -#ifndef NETCONFIG_H_ -#define NETCONFIG_H_ - -#include - -/* external function prototypes */ -extern int rtems_ppp_driver_attach(struct rtems_bsdnet_ifconfig *config, int attaching); - -/* Default network interface */ -static struct rtems_bsdnet_ifconfig netdriver_config = { - "ppp0", /* name */ - rtems_ppp_driver_attach, /* attach function */ - NULL, /* No more interfaces */ - NULL, /* IP address */ - NULL, /* IP net mask */ - NULL, /* Driver supplies hardware address */ - 0 /* Use default driver parameters */ -}; - -/* Network configuration */ -struct rtems_bsdnet_config rtems_bsdnet_config = { - &netdriver_config, - NULL, - 30, /* Default network task priority */ - (256*1024), /* Default mbuf capacity */ - (512*1024), /* Default mbuf cluster capacity */ - 0, /* Host name */ - 0, /* Domain name */ - 0, /* Gateway */ - 0, /* Log host */ - { 0 }, /* Name server(s) */ - { 0 }, /* NTP server(s) */ -}; - -#endif diff --git a/c/src/tests/samples/pppd/ppp.conf b/c/src/tests/samples/pppd/ppp.conf deleted file mode 100644 index 094b1946a8..0000000000 --- a/c/src/tests/samples/pppd/ppp.conf +++ /dev/null @@ -1,27 +0,0 @@ - -# -# Example configuration file for setting up a ppp server -# using a null-modem serial cable: -# -# Tested using ppp on OpenBSD 2.9 -# - just follow instructions in man page for accepting -# ppp connections over the serial port -# - if pap and/or chap is enabled, you must have a ppp.secret -# file which will be used for user authentication -# - found useful to turn on syslog for ppp -# - -default: - set log Phase Chat LQM LCP IPCP CCP command - set device /dev/cua00 - set speed 57600 - set ctsrts on - set dial "" - -openbsd-server: - set timeout 0 - set ifaddr 192.168.2.100 192.168.2.123 - enable dns - allow users - enable chap - enable pap diff --git a/c/src/tests/samples/pppd/pppd.options b/c/src/tests/samples/pppd/pppd.options deleted file mode 100644 index c0706e6ec5..0000000000 --- a/c/src/tests/samples/pppd/pppd.options +++ /dev/null @@ -1,9 +0,0 @@ -/dev/tty00 -57600 -crtscts -passive -local -noauth -debug -persist -192.168.2.222:192.168.2.111 diff --git a/c/src/tests/samples/pppd/pppdapp.c b/c/src/tests/samples/pppd/pppdapp.c deleted file mode 100644 index 59e5029088..0000000000 --- a/c/src/tests/samples/pppd/pppdapp.c +++ /dev/null @@ -1,146 +0,0 @@ - -#include -#include -#include "system.h" - - -/* define global variables */ -static unsigned int pppdapp_linkcount = 0; -static rtems_id pppdapp_taskid; - - -static void pppdapp_linkup_hook(void) -{ - pppdapp_linkcount++; - printf("PPP LINK UP [%d]\n", pppdapp_linkcount); -} - -static void pppdapp_linkdown_hook(void) -{ - printf("PPP LINK DOWN [%d]\n", pppdapp_linkcount); -} - -static void pppdapp_ipup_hook(void) -{ - /* send ipup signal to pppdapp task */ - rtems_event_send(pppdapp_taskid, RTEMS_EVENT_10); -} - -static void pppdapp_ipdown_hook(void) -{ - /* send ip down signal to pppdapp task */ - rtems_event_send(pppdapp_taskid, RTEMS_EVENT_11); -} - -static void pppdapp_setup(void) -{ - const char *pUser = "oscar"; - const char *pPassword = "goldman"; - -#undef USE_MODEM -#ifdef USE_MODEM - const char *pTelephone = "5551234"; - const char *pInitScript = "TIMEOUT@5@@AT@@OK@"; - const char *pConnectScript = "TIMEOUT@90@@ATDT%s@CONNECT@@name:@%s@word:@%s@"; - const char *pDisconnectScript = "TIMEOUT@5@@ATH0@@OK@"; - char pConnect[128]; - - /* set the connect string */ - sprintf(pConnect, pConnectScript, pTelephone, pUser, pPassword); - - /* set pppd options for modem */ - rtems_pppd_set_option("/dev/ttyS2", NULL); - rtems_pppd_set_option("57600", NULL); - rtems_pppd_set_option("crtscts", NULL); - rtems_pppd_set_option("modem", NULL); - rtems_pppd_set_option("noauth", NULL); - rtems_pppd_set_option("debug", NULL); - rtems_pppd_set_option("init", pInitScript); - rtems_pppd_set_option("connect", pConnect); - rtems_pppd_set_option("disconnect", pDisconnectScript); -#else - /* set pppd options for null modem direct link serial cable */ - rtems_pppd_set_option("/dev/ttyS1", NULL); - rtems_pppd_set_option("57600", NULL); - rtems_pppd_set_option("crtscts", NULL); - rtems_pppd_set_option("local", NULL); - rtems_pppd_set_option("noauth", NULL); - rtems_pppd_set_option("debug", NULL); - rtems_pppd_set_option("user", pUser); - rtems_pppd_set_option("password", pPassword); -#endif - - /* set up pppd hooks */ - rtems_pppd_set_hook(RTEMS_PPPD_LINKUP_HOOK, pppdapp_linkup_hook); - rtems_pppd_set_hook(RTEMS_PPPD_LINKDOWN_HOOK, pppdapp_linkdown_hook); - rtems_pppd_set_hook(RTEMS_PPPD_IPUP_HOOK, pppdapp_ipup_hook); - rtems_pppd_set_hook(RTEMS_PPPD_IPDOWN_HOOK, pppdapp_ipdown_hook); -} - -static rtems_task pppdapp(rtems_task_argument arg) -{ - rtems_status_code sc = RTEMS_SUCCESSFUL; - rtems_interval tickspersecond = 0; - rtems_option options; - rtems_event_set in; - rtems_event_set out; - - /* initialize ticks per second */ - rtems_clock_get(RTEMS_CLOCK_GET_TICKS_PER_SECOND, &tickspersecond); - if ( tickspersecond == 0 ) { - /* ensure value is greater than zero */ - tickspersecond = 100; - } - - /* initiate connection */ - pppdapp_setup(); - rtems_pppd_connect(); - - /* enter processing loop */ - in = (RTEMS_EVENT_10 | RTEMS_EVENT_11); - options = (RTEMS_EVENT_ANY | RTEMS_WAIT); - while ( sc == RTEMS_SUCCESSFUL ) { - /* wait for the next event */ - sc = rtems_event_receive(in, options, RTEMS_NO_TIMEOUT, &out); - if ( sc == RTEMS_SUCCESSFUL ) { - /* determine which event was sent */ - if ( out & RTEMS_EVENT_10 ) { - /* ip up recived */ - /* call disconnect function */ - rtems_pppd_disconnect(); - } - if ( out & RTEMS_EVENT_11 ) { - /* ip down recived */ - /* sleep 10 seconds and call connect function */ - rtems_task_wake_after(10*tickspersecond); - rtems_pppd_connect(); - } - } - } - - /* terminate myself */ - rtems_task_delete(RTEMS_SELF); -} - -int pppdapp_initialize(void) -{ - int iReturn = (int)-1; - rtems_status_code status; - rtems_name taskName; - - taskName = rtems_build_name( 'p', 'a', 'p', 'p' ); - status = rtems_task_create(taskName, - CONFIGURE_INIT_TASK_PRIORITY, - CONFIGURE_INIT_TASK_STACK_SIZE, - CONFIGURE_INIT_TASK_INITIAL_MODES, - RTEMS_DEFAULT_ATTRIBUTES, - &pppdapp_taskid); - if ( status == RTEMS_SUCCESSFUL ) { - status = rtems_task_start(pppdapp_taskid, pppdapp, 0); - if ( status == RTEMS_SUCCESSFUL ) { - iReturn = (int)0; - } - } - - return ( iReturn ); -} diff --git a/c/src/tests/samples/pppd/system.h b/c/src/tests/samples/pppd/system.h deleted file mode 100644 index ec117cbab6..0000000000 --- a/c/src/tests/samples/pppd/system.h +++ /dev/null @@ -1,50 +0,0 @@ - -#ifndef SYSTEM_H -#define SYSTEM_H - -#include - -/* HACK */ -#if defined(__i386__) -#include -#endif - -/* functions */ -extern rtems_task Init(rtems_task_argument argument); - -#include - -#define CONFIGURE_HAS_OWN_DEVICE_DRIVER_TABLE -#ifdef CONFIGURE_INIT -rtems_driver_address_table Device_drivers[5] = { - CONSOLE_DRIVER_TABLE_ENTRY, - CLOCK_DRIVER_TABLE_ENTRY, -#if defined(TTY1_DRIVER_TABLE_ENTRY) - TTY1_DRIVER_TABLE_ENTRY, -#endif -#if defined(TTY2_DRIVER_TABLE_ENTRY) - TTY2_DRIVER_TABLE_ENTRY, -#endif - {NULL, NULL, NULL, NULL, NULL, NULL} -}; -#endif - -#define CONFIGURE_RTEMS_INIT_TASKS_TABLE -#define CONFIGURE_LIBIO_MAXIMUM_FILE_DESCRIPTORS 8 - -#define CONFIGURE_EXECUTIVE_RAM_SIZE (512*1024) -#define CONFIGURE_MAXIMUM_SEMAPHORES 20 -#define CONFIGURE_MAXIMUM_TASKS 20 - -#define CONFIGURE_MICROSECONDS_PER_TICK 10000 - -#define CONFIGURE_INIT_TASK_STACK_SIZE (10*1024) -#define CONFIGURE_INIT_TASK_PRIORITY 120 -#define CONFIGURE_INIT_TASK_INITIAL_MODES (RTEMS_PREEMPT | \ - RTEMS_NO_TIMESLICE | \ - RTEMS_NO_ASR | \ - RTEMS_INTERRUPT_LEVEL(0)) - -#include - -#endif diff --git a/c/src/tests/samples/sample.am b/c/src/tests/samples/sample.am deleted file mode 100644 index 8ea5642da1..0000000000 --- a/c/src/tests/samples/sample.am +++ /dev/null @@ -1,20 +0,0 @@ -## $Id$ - -project_bspdir=$(PROJECT_ROOT)/@RTEMS_BSP@ - -$(project_bspdir)/samples: - @$(mkinstalldirs) $@ -$(project_bspdir)/tests: - @$(mkinstalldirs) $@ - -$(project_bspdir)/samples/$(SAMPLE)$(LIB_VARIANT).exe: $(PGM) - $(INSTALL_PROGRAM) $< $@ - -$(project_bspdir)/tests/$(SAMPLE)$(LIB_VARIANT).exe: $(PGM) - $(INSTALL_PROGRAM) $< $@ - -TMPINSTALL_FILES = \ -$(project_bspdir)/tests \ -$(project_bspdir)/tests/$(SAMPLE)$(LIB_VARIANT).exe \ -$(project_bspdir)/samples \ -$(project_bspdir)/samples/$(SAMPLE)$(LIB_VARIANT).exe diff --git a/c/src/tests/samples/ticker/.cvsignore b/c/src/tests/samples/ticker/.cvsignore deleted file mode 100644 index 282522db03..0000000000 --- a/c/src/tests/samples/ticker/.cvsignore +++ /dev/null @@ -1,2 +0,0 @@ -Makefile -Makefile.in diff --git a/c/src/tests/samples/ticker/Makefile.am b/c/src/tests/samples/ticker/Makefile.am deleted file mode 100644 index 7d5d0a4b21..0000000000 --- a/c/src/tests/samples/ticker/Makefile.am +++ /dev/null @@ -1,41 +0,0 @@ -## -## $Id$ -## - - -SAMPLE = ticker -PGM = ${ARCH}/$(SAMPLE).exe - -MANAGERS = io - -C_FILES = init.c tasks.c -C_O_FILES = $(C_FILES:%.c=${ARCH}/%.$(OBJEXT)) - -H_FILES = system.h -noinst_HEADERS = $(H_FILES) - -DOCTYPES = doc scn -DOCS = $(DOCTYPES:%=$(SAMPLE).%) - -SRCS = $(DOCS) $(C_FILES) $(H_FILES) -OBJS = $(C_O_FILES) - -PRINT_SRCS = $(DOCS) - -include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg -include $(top_srcdir)/../automake/compile.am -include $(top_srcdir)/../automake/leaf.am -include $(top_srcdir)/sample.am - -# -# (OPTIONAL) Add local stuff here using += -# - -all-local: ${ARCH} $(TMPINSTALL_FILES) - -${PGM}: $(OBJS) $(LINK_FILES) - $(make-exe) - -EXTRA_DIST = $(C_FILES) $(DOCS) - -include $(top_srcdir)/../automake/local.am diff --git a/c/src/tests/samples/ticker/init.c b/c/src/tests/samples/ticker/init.c deleted file mode 100644 index e71c05140f..0000000000 --- a/c/src/tests/samples/ticker/init.c +++ /dev/null @@ -1,75 +0,0 @@ -/* Init - * - * This routine is the initialization task for this test program. - * It is called from init_exec and has the responsibility for creating - * and starting the tasks that make up the test. If the time of day - * clock is required for the test, it should also be set to a known - * value by this function. - * - * Input parameters: NONE - * - * Output parameters: NONE - * - * COPYRIGHT (c) 1989-1999. - * On-Line Applications Research Corporation (OAR). - * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.rtems.com/license/LICENSE. - * - * $Id$ - */ - -#define CONFIGURE_INIT -#include "system.h" -#include - -/* - * Keep the names and IDs in global variables so another task can use them. - */ - -rtems_id Task_id[ 4 ]; /* array of task ids */ -rtems_name Task_name[ 4 ]; /* array of task names */ - -rtems_task Init( - rtems_task_argument argument -) -{ - rtems_status_code status; - rtems_time_of_day time; - - puts( "\n\n*** CLOCK TICK TEST ***" ); - - time.year = 1988; - time.month = 12; - time.day = 31; - time.hour = 9; - time.minute = 0; - time.second = 0; - time.ticks = 0; - - status = rtems_clock_set( &time ); - - Task_name[ 1 ] = rtems_build_name( 'T', 'A', '1', ' ' ); - Task_name[ 2 ] = rtems_build_name( 'T', 'A', '2', ' ' ); - Task_name[ 3 ] = rtems_build_name( 'T', 'A', '3', ' ' ); - - status = rtems_task_create( - Task_name[ 1 ], 1, RTEMS_MINIMUM_STACK_SIZE * 2, RTEMS_DEFAULT_MODES, - RTEMS_DEFAULT_ATTRIBUTES, &Task_id[ 1 ] - ); - status = rtems_task_create( - Task_name[ 2 ], 1, RTEMS_MINIMUM_STACK_SIZE * 2, RTEMS_DEFAULT_MODES, - RTEMS_DEFAULT_ATTRIBUTES, &Task_id[ 2 ] - ); - status = rtems_task_create( - Task_name[ 3 ], 1, RTEMS_MINIMUM_STACK_SIZE * 2, RTEMS_DEFAULT_MODES, - RTEMS_DEFAULT_ATTRIBUTES, &Task_id[ 3 ] - ); - - status = rtems_task_start( Task_id[ 1 ], Test_task, 1 ); - status = rtems_task_start( Task_id[ 2 ], Test_task, 2 ); - status = rtems_task_start( Task_id[ 3 ], Test_task, 3 ); - - status = rtems_task_delete( RTEMS_SELF ); -} diff --git a/c/src/tests/samples/ticker/system.h b/c/src/tests/samples/ticker/system.h deleted file mode 100644 index 2139bc1403..0000000000 --- a/c/src/tests/samples/ticker/system.h +++ /dev/null @@ -1,115 +0,0 @@ -/* system.h - * - * This include file contains information that is included in every - * function in the test set. - * - * COPYRIGHT (c) 1989-1999. - * On-Line Applications Research Corporation (OAR). - * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.rtems.com/license/LICENSE. - * - * $Id$ - */ - -#include - -/* functions */ - -rtems_task Init( - rtems_task_argument argument -); - -rtems_task Test_task( - rtems_task_argument argument -); - -/* global variables */ - -/* - * Keep the names and IDs in global variables so another task can use them. - */ - -extern rtems_id Task_id[ 4 ]; /* array of task ids */ -extern rtems_name Task_name[ 4 ]; /* array of task names */ - - -/* configuration information */ - -#include /* for device driver prototypes */ - -#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER -#define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER - -#define CONFIGURE_MAXIMUM_TASKS 4 - -#define CONFIGURE_RTEMS_INIT_TASKS_TABLE - -#define CONFIGURE_EXTRA_TASK_STACKS (3 * RTEMS_MINIMUM_STACK_SIZE) - -#include - -/* - * Handy macros and static inline functions - */ - -/* - * Macro to hide the ugliness of printing the time. - */ - -#define print_time(_s1, _tb, _s2) \ - do { \ - printf( "%s%02d:%02d:%02d %02d/%02d/%04d%s", \ - _s1, (_tb)->hour, (_tb)->minute, (_tb)->second, \ - (_tb)->month, (_tb)->day, (_tb)->year, _s2 ); \ - fflush(stdout); \ - } while ( 0 ) - -/* - * Macro to print an task name that is composed of ASCII characters. - * - */ - -#define put_name( _name, _crlf ) \ - do { \ - rtems_unsigned32 c0, c1, c2, c3; \ - \ - c0 = ((_name) >> 24) & 0xff; \ - c1 = ((_name) >> 16) & 0xff; \ - c2 = ((_name) >> 8) & 0xff; \ - c3 = (_name) & 0xff; \ - putchar( (char)c0 ); \ - if ( c1 ) putchar( (char)c1 ); \ - if ( c2 ) putchar( (char)c2 ); \ - if ( c3 ) putchar( (char)c3 ); \ - if ( (_crlf) ) \ - putchar( '\n' ); \ - } while (0) - -/* - * static inline routine to make obtaining ticks per second easier. - */ - -static inline rtems_unsigned32 get_ticks_per_second( void ) -{ - rtems_interval ticks_per_second; - (void) rtems_clock_get( RTEMS_CLOCK_GET_TICKS_PER_SECOND, &ticks_per_second ); return ticks_per_second; -} - - -/* - * This allows us to view the "Test_task" instantiations as a set - * of numbered tasks by eliminating the number of application - * tasks created. - * - * In reality, this is too complex for the purposes of this - * example. It would have been easier to pass a task argument. :) - * But it shows how rtems_id's can sometimes be used. - */ - -#define task_number( tid ) \ - ( rtems_get_index( tid ) - \ - rtems_configuration_get_rtems_api_configuration()->number_of_initialization_tasks ) - -/* end of include file */ diff --git a/c/src/tests/samples/ticker/tasks.c b/c/src/tests/samples/ticker/tasks.c deleted file mode 100644 index 4ba35f61c1..0000000000 --- a/c/src/tests/samples/ticker/tasks.c +++ /dev/null @@ -1,45 +0,0 @@ -/* Test_task - * - * This routine serves as a test task. It verifies the basic task - * switching capabilities of the executive. - * - * Input parameters: NONE - * - * Output parameters: NONE - * - * COPYRIGHT (c) 1989-1999. - * On-Line Applications Research Corporation (OAR). - * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.rtems.com/license/LICENSE. - * - * $Id$ - */ - -#include "system.h" -#include -#include - -rtems_task Test_task( - rtems_task_argument unused -) -{ - rtems_id tid; - rtems_time_of_day time; - rtems_unsigned32 task_index; - rtems_status_code status; - - status = rtems_task_ident( RTEMS_SELF, RTEMS_SEARCH_ALL_NODES, &tid ); - task_index = task_number( tid ); - for ( ; ; ) { - status = rtems_clock_get( RTEMS_CLOCK_GET_TOD, &time ); - if ( time.second >= 35 ) { - puts( "*** END OF CLOCK TICK TEST ***" ); - exit( 0 ); - } - put_name( Task_name[ task_index ], FALSE ); - print_time( " - rtems_clock_get - ", &time, "\n" ); - status = rtems_task_wake_after( task_index * 5 * get_ticks_per_second() ); - } -} diff --git a/c/src/tests/samples/ticker/ticker.doc b/c/src/tests/samples/ticker/ticker.doc deleted file mode 100644 index 5c0baceb8d..0000000000 --- a/c/src/tests/samples/ticker/ticker.doc +++ /dev/null @@ -1,12 +0,0 @@ -# -# $Id$ -# -# COPYRIGHT (c) 1989-1999. -# On-Line Applications Research Corporation (OAR). -# -# The license and distribution terms for this file may be -# found in the file LICENSE in this distribution or at -# http://www.rtems.com/license/LICENSE. -# - - diff --git a/c/src/tests/samples/ticker/ticker.scn b/c/src/tests/samples/ticker/ticker.scn deleted file mode 100644 index 35952e6170..0000000000 --- a/c/src/tests/samples/ticker/ticker.scn +++ /dev/null @@ -1,16 +0,0 @@ -*** CLOCK TICK TEST *** -TA1 - tm_get - 09:00:00 12/31/1988 -TA2 - tm_get - 09:00:00 12/31/1988 -TA3 - tm_get - 09:00:00 12/31/1988 -TA1 - tm_get - 09:00:05 12/31/1988 -TA1 - tm_get - 09:00:10 12/31/1988 -TA2 - tm_get - 09:00:10 12/31/1988 -TA1 - tm_get - 09:00:15 12/31/1988 -TA3 - tm_get - 09:00:15 12/31/1988 -TA1 - tm_get - 09:00:20 12/31/1988 -TA2 - tm_get - 09:00:20 12/31/1988 -TA1 - tm_get - 09:00:25 12/31/1988 -TA1 - tm_get - 09:00:30 12/31/1988 -TA2 - tm_get - 09:00:30 12/31/1988 -TA3 - tm_get - 09:00:30 12/31/1988 -*** END OF CLOCK TICK TEST *** diff --git a/c/src/tests/samples/unlimited/.cvsignore b/c/src/tests/samples/unlimited/.cvsignore deleted file mode 100644 index 282522db03..0000000000 --- a/c/src/tests/samples/unlimited/.cvsignore +++ /dev/null @@ -1,2 +0,0 @@ -Makefile -Makefile.in diff --git a/c/src/tests/samples/unlimited/Makefile.am b/c/src/tests/samples/unlimited/Makefile.am deleted file mode 100644 index 9041fb4bed..0000000000 --- a/c/src/tests/samples/unlimited/Makefile.am +++ /dev/null @@ -1,41 +0,0 @@ -## -## $Id$ -## - - -SAMPLE = unlimited -PGM = ${ARCH}/$(SAMPLE).exe - -MANAGERS = io event - -C_FILES = init.c test1.c test2.c test3.c -C_O_FILES = $(C_FILES:%.c=${ARCH}/%.$(OBJEXT)) - -H_FILES = system.h -noinst_HEADERS = $(H_FILES) - -DOCTYPES = doc scn -DOCS = $(DOCTYPES:%=$(SAMPLE).%) - -SRCS = $(DOCS) $(C_FILES) $(H_FILES) -OBJS = $(C_O_FILES) - -PRINT_SRCS = $(DOCS) - -include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg -include $(top_srcdir)/../automake/compile.am -include $(top_srcdir)/../automake/leaf.am -include $(top_srcdir)/sample.am - -# -# (OPTIONAL) Add local stuff here using += -# - -all-local: ${ARCH} $(TMPINSTALL_FILES) - -${PGM}: $(OBJS) $(LINK_FILES) - $(make-exe) - -EXTRA_DIST = $(C_FILES) $(DOCS) - -include $(top_srcdir)/../automake/local.am diff --git a/c/src/tests/samples/unlimited/init.c b/c/src/tests/samples/unlimited/init.c deleted file mode 100644 index 925d4589b3..0000000000 --- a/c/src/tests/samples/unlimited/init.c +++ /dev/null @@ -1,127 +0,0 @@ -/* Init - * - * This routine is the initialization task for this test program. - * It is called from init_exec and has the responsibility for creating - * and starting the tasks that make up the test. If the time of day - * clock is required for the test, it should also be set to a known - * value by this function. - * - * Input parameters: NONE - * - * Output parameters: NONE - * - * COPYRIGHT (c) 1989-1997. - * On-Line Applications Research Corporation (OAR). - * - * The license and distribution terms for this file may in - * the file LICENSE in this distribution or at - * http://www.rtems.com/license/LICENSE. - * - * $Id$ - */ - -#define CONFIGURE_INIT - -#include "system.h" -#include -#include - -rtems_id task_id[MAX_TASKS]; - -void test1(); -void test2(); - -rtems_task Init( - rtems_task_argument ignored -) -{ - rtems_task_priority old_priority; - rtems_mode old_mode; - rtems_unsigned32 task; - - /* lower the task priority to allow created tasks to execute */ - - rtems_task_set_priority(RTEMS_SELF, 20, &old_priority); - rtems_task_mode(RTEMS_PREEMPT, RTEMS_PREEMPT_MASK, &old_mode); - - printf( "\n*** UNLIMITED TASK TEST ***\n" ); - - /* - * Invalid state if the task id is 0 - */ - - for (task = 0; task < MAX_TASKS; task++) - task_id[task] = 0; - - test1(); - test2(); - test3(); - - printf( "\n*** END OF UNLIMITED TASK TEST ***\n" ); - exit( 0 ); -} - -rtems_task test_task( - rtems_task_argument my_number - ) -{ - rtems_event_set out; - - printf( "task %i has started.\n", my_number); - - rtems_event_receive(1, RTEMS_WAIT | RTEMS_EVENT_ANY, 0, &out); - - printf( "task %i ending.\n", my_number); - - rtems_task_delete(RTEMS_SELF); -} - -void destory_all_tasks( - const char *who -) -{ - rtems_unsigned32 task; - - /* - * If the id is not zero, signal the task to delete. - */ - - for (task = 0; task < MAX_TASKS; task++) - if (task_id[task]) - { - printf(" %s : signal task %08x to delete, ", who, task_id[task]); - fflush(stdout); - rtems_event_send(task_id[task], 1); - task_id[task] = 0; - } -} - -boolean status_code_bad( - rtems_status_code status_code - ) -{ - if (status_code != RTEMS_SUCCESSFUL) - { - printf("failure, "); - - if (status_code == RTEMS_TOO_MANY) - { - printf("too many.\n"); - return TRUE; - } - if (status_code == RTEMS_UNSATISFIED) - { - printf("unsatisfied.\n"); - return TRUE; - } - - printf("error code = %i\n", status_code); - exit( 1 ); - } - return FALSE; -} - - - - - diff --git a/c/src/tests/samples/unlimited/system.h b/c/src/tests/samples/unlimited/system.h deleted file mode 100644 index 274a0a00e3..0000000000 --- a/c/src/tests/samples/unlimited/system.h +++ /dev/null @@ -1,90 +0,0 @@ -/* system.h - * - * This include file contains information that is included in every - * function in the test set. - * - * COPYRIGHT (c) 1989-1997. - * On-Line Applications Research Corporation (OAR). - * - * The license and distribution terms for this file may in - * the file LICENSE in this distribution or at - * http://www.rtems.com/license/LICENSE. - * - * $Id$ - */ - -#include - -/* functions */ - -rtems_task Init( - rtems_task_argument argument -); - -rtems_task test_task( - rtems_task_argument my_number -); - -void -destory_all_tasks( - const char *who -); - -boolean status_code_bad( - rtems_status_code status_code -); - -void test1(); -void test2(); -void test3(); - -/* configuration information */ - -#include /* for device driver prototypes */ - -#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER - -#define CONFIGURE_RTEMS_INIT_TASKS_TABLE - -#define TASK_ALLOCATION_SIZE (5) -#define CONFIGURE_MAXIMUM_TASKS rtems_resource_unlimited(TASK_ALLOCATION_SIZE) -#define CONFIGURE_EXTRA_TASK_STACKS (62 * RTEMS_MINIMUM_STACK_SIZE) - - -#include - -/* - * Keep track of the task id's created, use a large array. - */ - -#define MAX_TASKS (1000) -#define TASK_INDEX_OFFSET (1) - -extern rtems_id task_id[MAX_TASKS]; - -/* - * Increment the task name. - */ - -#define NEXT_TASK_NAME(c1, c2, c3, c4) \ - if (c4 == '9') { \ - if (c3 == '9') { \ - if (c2 == 'z') { \ - if (c1 == 'z') { \ - printf("not enough task letters for names !!!\n"); \ - exit( 1 ); \ - } else \ - c1++; \ - c2 = 'a'; \ - } else \ - c2++; \ - c3 = '0'; \ - } else \ - c3++; \ - c4 = '0'; \ - } \ - else \ - c4++ \ - - -/* end of include file */ diff --git a/c/src/tests/samples/unlimited/test1.c b/c/src/tests/samples/unlimited/test1.c deleted file mode 100644 index 89e46a54a9..0000000000 --- a/c/src/tests/samples/unlimited/test1.c +++ /dev/null @@ -1,106 +0,0 @@ -/* Test1 - * - * This test uses a hack to disable suto-extend then checks to see only the - * requested number of objects are allocated. - * - * Input parameters: NONE - * - * Output parameters: NONE - * - * COPYRIGHT (c) 1989-1997. - * On-Line Applications Research Corporation (OAR). - * - * The license and distribution terms for this file may in - * the file LICENSE in this distribution or at - * http://www.rtems.com/license/LICENSE. - * - * $Id$ - */ - -#include "system.h" -#include -#include -#include - -void test1() -{ - boolean auto_extend; - rtems_status_code result; - rtems_unsigned32 task_count = 0; - Objects_Information *the_information; - - char c1 = 'a'; - char c2 = 'a'; - char c3 = '0'; - char c4 = '0'; - - printf( "\n TEST1 : auto-extend disabled.\n" ); - - /* - * This is a major hack and only recommended for a test. Doing this - * saves having another test. - */ - - the_information = - _Objects_Information_table[OBJECTS_CLASSIC_API][OBJECTS_RTEMS_TASKS]; - auto_extend = the_information->auto_extend; - the_information->auto_extend = FALSE; - - while (task_count < MAX_TASKS) - { - rtems_name name; - - printf(" TEST1 : creating task '%c%c%c%c', ", c1, c2, c3, c4); - - name = rtems_build_name(c1, c2, c3, c4); - - result = rtems_task_create(name, - 10, - RTEMS_MINIMUM_STACK_SIZE, - RTEMS_DEFAULT_ATTRIBUTES, - RTEMS_LOCAL, - &task_id[task_count]); - - if (status_code_bad(result)) - break; - - printf("number = %3i, id = %08x, starting, ", task_count, task_id[task_count]); - - fflush(stdout); - result = rtems_task_start(task_id[task_count], - test_task, - (rtems_task_argument) task_count); - - if (status_code_bad(result)) - break; - - /* - * Update the name. - */ - - NEXT_TASK_NAME(c1, c2, c3, c4); - - task_count++; - } - - if (task_count >= MAX_TASKS) - printf( "\nMAX_TASKS too small for work-space size, please make larger !!\n\n" ); - - if (task_count != (TASK_ALLOCATION_SIZE - 1)) { - printf( " FAIL1 : the number of tasks does not equal the expected size -\n" - " task created = %i, required number = %i\n", - task_count, TASK_ALLOCATION_SIZE); - exit( 1 ); - } - - destory_all_tasks("TEST1"); - - the_information->auto_extend = auto_extend; - - printf( " TEST1 : completed\n" ); -} - - - - - diff --git a/c/src/tests/samples/unlimited/test2.c b/c/src/tests/samples/unlimited/test2.c deleted file mode 100644 index c892315143..0000000000 --- a/c/src/tests/samples/unlimited/test2.c +++ /dev/null @@ -1,229 +0,0 @@ -/* Init - * - * This routine is the initialization task for this test program. - * It is called from init_exec and has the responsibility for creating - * and starting the tasks that make up the test. If the time of day - * clock is required for the test, it should also be set to a known - * value by this function. - * - * Input parameters: NONE - * - * Output parameters: NONE - * - * COPYRIGHT (c) 1989-1997. - * On-Line Applications Research Corporation (OAR). - * - * The license and distribution terms for this file may in - * the file LICENSE in this distribution or at - * http://www.rtems.com/license/LICENSE. - * - * $Id$ - */ - -#include "system.h" -#include -#include - -void test2() -{ - rtems_status_code result; - rtems_unsigned32 remove_task; - rtems_unsigned32 task; - rtems_unsigned32 block; - rtems_unsigned32 task_count = 0; - rtems_id removed_ids[TASK_ALLOCATION_SIZE * 2]; - - char c1 = 'a'; - char c2 = 'a'; - char c3 = '0'; - char c4 = '0'; - - printf( "\n TEST2 : re-allocate of index numbers, and a block free'ed and one inactive\n" ); - - /* - * Allocate enought tasks so the Inactive list is empty. Remember - * to count the Init task, ie ... - 1. - */ - - while (task_count < ((TASK_ALLOCATION_SIZE * 5) - TASK_INDEX_OFFSET)) - { - rtems_name name; - - printf(" TEST2 : creating task '%c%c%c%c', ", c1, c2, c3, c4); - - name = rtems_build_name(c1, c2, c3, c4); - - result = rtems_task_create(name, - 10, - RTEMS_MINIMUM_STACK_SIZE, - RTEMS_DEFAULT_ATTRIBUTES, - RTEMS_LOCAL, - &task_id[task_count]); - - if (status_code_bad(result)) - break; - - printf("number = %3i, id = %08x, starting, ", task_count, task_id[task_count]); - fflush(stdout); - - result = rtems_task_start(task_id[task_count], - test_task, - (rtems_task_argument) task_count); - - if (status_code_bad(result)) - break; - - /* - * Update the name. - */ - - NEXT_TASK_NAME(c1, c2, c3, c4); - - task_count++; - } - - /* - * Take out the second and fourth allocation size block of tasks - */ - - if (task_count != ((TASK_ALLOCATION_SIZE * 5) - TASK_INDEX_OFFSET)) { - printf( " FAIL2 : not enough tasks created -\n" - " task created = %i, required number = %i\n", - task_count, (TASK_ALLOCATION_SIZE * 5) - TASK_INDEX_OFFSET); - destory_all_tasks("TEST2"); - exit( 1 ); - } - - task = 0; - - for (block = 1; block < 4; block += 2) - { - for (remove_task = (block * TASK_ALLOCATION_SIZE) - TASK_INDEX_OFFSET; - remove_task < (((block + 1) * TASK_ALLOCATION_SIZE) - TASK_INDEX_OFFSET); - remove_task++) - { - if (!task_id[remove_task]) - { - printf( " FAIL2 : remove task has a 0 id -\n" - " task number = %i\n", - remove_task); - destory_all_tasks("TEST2"); - exit( 1 ); - } - - /* - * Save the id's to match them against the reallocated ids - */ - - removed_ids[task++] = task_id[remove_task]; - - printf(" TEST2 : block %i remove, signal task %08x, ", block, task_id[remove_task]); - rtems_event_send(task_id[remove_task], 1); - task_id[remove_task] = 0; - } - } - - for (task = 0; task < (TASK_ALLOCATION_SIZE * 2); task++) - { - rtems_name name; - rtems_unsigned32 id_slot; - - /* - * Find a free slot in the task id table. - */ - - for (id_slot = 0; id_slot < MAX_TASKS; id_slot++) - if (!task_id[id_slot]) - break; - - if (id_slot == MAX_TASKS) - { - printf( " FAIL2 : no free task id slot.\n"); - destory_all_tasks("TEST2"); - exit( 1 ); - } - - printf(" TEST2 : creating task '%c%c%c%c', ", c1, c2, c3, c4); - - name = rtems_build_name(c1, c2, c3, c4); - - result = rtems_task_create(name, - 10, - RTEMS_MINIMUM_STACK_SIZE, - RTEMS_DEFAULT_ATTRIBUTES, - RTEMS_LOCAL, - &task_id[id_slot]); - - if (status_code_bad(result)) - { - printf( " FAIL2 : re-creating a task -\n" - " task number = %i\n", - id_slot); - destory_all_tasks("TEST2"); - exit( 1 ); - } - - printf("number = %3i, id = %08x, starting, ", task_count, task_id[id_slot]); - - result = rtems_task_start(task_id[id_slot], - test_task, - (rtems_task_argument) task_count); - - if (status_code_bad(result)) - { - printf( " FAIL : re-starting a task -\n" - " task number = %i\n", - id_slot); - destory_all_tasks("TEST2"); - exit( 1 ); - } - - /* - * Update the name. - */ - - NEXT_TASK_NAME(c1, c2, c3, c4); - - /* - * Search the removed ids to see if it existed, clear the removed id when found - */ - - for (remove_task = 0; remove_task < (TASK_ALLOCATION_SIZE * 2); remove_task++) - if (removed_ids[remove_task] == task_id[id_slot]) - { - removed_ids[remove_task] = 0; - break; - } - - /* - * If not located in the removed id table, check and make sure it is not - * already allocated - */ - - if (remove_task == (TASK_ALLOCATION_SIZE * 2)) - { - rtems_unsigned32 allocated_id; - - for (allocated_id = 0; allocated_id < MAX_TASKS; allocated_id++) - if ((task_id[id_slot] == task_id[allocated_id]) && (id_slot != allocated_id)) - { - printf( " FAIL2 : the new id is the same as an id already allocated -\n" - " task id = %08x\n", - task_id[id_slot]); - exit( 1 ); - } - - printf( " FAIL2 : could not find the task id in the removed table -\n" - " task id = %08x\n", - task_id[id_slot]); - exit( 1 ); - } - - task_count++; - } - - destory_all_tasks("TEST2"); - - printf( " TEST2 : completed\n" ); -} - diff --git a/c/src/tests/samples/unlimited/test3.c b/c/src/tests/samples/unlimited/test3.c deleted file mode 100644 index f3624d72ad..0000000000 --- a/c/src/tests/samples/unlimited/test3.c +++ /dev/null @@ -1,146 +0,0 @@ -/* Init - * - * This routine is the initialization task for this test program. - * It is called from init_exec and has the responsibility for creating - * and starting the tasks that make up the test. If the time of day - * clock is required for the test, it should also be set to a known - * value by this function. - * - * Input parameters: NONE - * - * Output parameters: NONE - * - * COPYRIGHT (c) 1989-1997. - * On-Line Applications Research Corporation (OAR). - * - * The license and distribution terms for this file may in - * the file LICENSE in this distribution or at - * http://www.rtems.com/license/LICENSE. - * - * $Id$ - */ - -#include "system.h" -#include -#include - -void test3() -{ - rtems_status_code result; - rtems_unsigned32 remove_task; - rtems_unsigned32 block; - rtems_unsigned32 task_count = 0; - - char c1 = 'a'; - char c2 = 'a'; - char c3 = '0'; - char c4 = '0'; - - printf( "\n TEST3 : free more than 3 x allocation size, but not the same block,\n" - " then free a block\n"); - - /* - * Check the value of the allocation unit - */ - - if (TASK_ALLOCATION_SIZE < 4) - { - printf( " FAIL3 : task allocation size must be greater than 4.\n"); - exit( 1 ); - } - - /* - * Allocate as many tasks as possible. - */ - - while (task_count < MAX_TASKS) - { - rtems_name name; - - printf(" TEST3 : creating task '%c%c%c%c', ", c1, c2, c3, c4); - - name = rtems_build_name(c1, c2, c3, c4); - - result = rtems_task_create(name, - 10, - RTEMS_MINIMUM_STACK_SIZE, - RTEMS_DEFAULT_ATTRIBUTES, - RTEMS_LOCAL, - &task_id[task_count]); - - if (status_code_bad(result)) - break; - - printf("number = %3i, id = %08x, starting, ", task_count, task_id[task_count]); - fflush(stdout); - - result = rtems_task_start(task_id[task_count], - test_task, - (rtems_task_argument) task_count); - - if (status_code_bad(result)) - break; - - /* - * Update the name. - */ - - NEXT_TASK_NAME(c1, c2, c3, c4); - - task_count++; - } - - /* - * Take out 3 tasks from each block of allocated tasks. Do this for - * allocation size number of blocks. - */ - - if (task_count < (TASK_ALLOCATION_SIZE * 11)) - { - printf( " FAIL3 : not enough tasks created -\n" - " task created = %i, required number = %i\n", - task_count, (TASK_ALLOCATION_SIZE * 11)); - exit( 1 ); - } - - for (block = 0; block < TASK_ALLOCATION_SIZE; block++) - { - for (remove_task = ((block * TASK_ALLOCATION_SIZE) - TASK_INDEX_OFFSET); - remove_task < (((block * TASK_ALLOCATION_SIZE) + 3) - TASK_INDEX_OFFSET); - remove_task++) - { - if (!task_id[remove_task]) - { - printf( " FAIL3 : remove task has a 0 id -\n" - " task number = %i\n", - remove_task); - exit( 1 ); - } - - printf(" TEST3 : remove, signal task %08x, ", task_id[remove_task]); - rtems_event_send(task_id[remove_task], 1); - task_id[remove_task] = 0; - } - } - - /* - * Remove a complete block, not the first, forces a scan of the blocks in the - * allocator's free routine - */ - - for (remove_task = (TASK_ALLOCATION_SIZE - TASK_INDEX_OFFSET); - remove_task < ((TASK_ALLOCATION_SIZE * 2) - - TASK_INDEX_OFFSET); - remove_task++) - { - if (task_id[remove_task]) - { - printf(" TEST3 : remove, signal task %08x, ", task_id[remove_task]); - rtems_event_send(task_id[remove_task], 1); - task_id[remove_task] = 0; - } - } - - destory_all_tasks("TEST3"); - - printf( " TEST3 : completed\n" ); -} diff --git a/c/src/tests/samples/unlimited/unlimited.doc b/c/src/tests/samples/unlimited/unlimited.doc deleted file mode 100644 index 781a420f40..0000000000 --- a/c/src/tests/samples/unlimited/unlimited.doc +++ /dev/null @@ -1,36 +0,0 @@ -# -# $Id$ -# -# COPYRIGHT (c) 1989-1997. -# On-Line Applications Research Corporation (OAR). -# -# The license and distribution terms for this file may in -# the file LICENSE in this distribution or at -# http://www.rtems.com/license/LICENSE. -# - -This file describes the directives and concepts tested by this test set. - -test set name: test1 - -directives: - _Object_Allocate, _Object_Free, _Object_Extend_information, - _Object_Shrink_information - -concepts: - - a. Verifies when the auto-extend is false the number of objects does - not grow, and the number of objects is the maximum number specified - in the Configuration table. - - b. Verify the re-allocation of index numbers, and a block of objects is - freed while another remains yet all it objects are not in - use. Four blocks of the allocation size of objects are created, - then the first and third blocks are freed. Only the first - block's memory will be released, while the second remains. This - is due the allocation hystersis. - - c. Allocate as many objects are the work-space can hold. Free objects - from a number of blocks with-out freeing the blocks. Free the remaining - blocks. - diff --git a/c/src/tests/samples/unlimited/unlimited.scn b/c/src/tests/samples/unlimited/unlimited.scn deleted file mode 100644 index f1c026fe4b..0000000000 --- a/c/src/tests/samples/unlimited/unlimited.scn +++ /dev/null @@ -1,337 +0,0 @@ - -*** UNLIMITED TASK TEST *** - - TEST1 : auto-extend disabled. - TEST1 : creating task 'aa00', number = 0, id = 08010002, starting, task 0 has started. - TEST1 : creating task 'aa01', number = 1, id = 08010003, starting, task 1 has started. - TEST1 : creating task 'aa02', number = 2, id = 08010004, starting, task 2 has started. - TEST1 : creating task 'aa03', number = 3, id = 08010005, starting, task 3 has started. - TEST1 : creating task 'aa04', failure, too many. - TEST1 : signal task 08010002 to delete, task 0 ending. - TEST1 : signal task 08010003 to delete, task 1 ending. - TEST1 : signal task 08010004 to delete, task 2 ending. - TEST1 : signal task 08010005 to delete, task 3 ending. - TEST1 : completed - - TEST2 : re-allocate of index numbers, and a block free'ed and one inactive - TEST2 : creating task 'aa00', number = 0, id = 08010002, starting, task 0 has started. - TEST2 : creating task 'aa01', number = 1, id = 08010003, starting, task 1 has started. - TEST2 : creating task 'aa02', number = 2, id = 08010004, starting, task 2 has started. - TEST2 : creating task 'aa03', number = 3, id = 08010005, starting, task 3 has started. - TEST2 : creating task 'aa04', number = 4, id = 08010006, starting, task 4 has started. - TEST2 : creating task 'aa05', number = 5, id = 08010007, starting, task 5 has started. - TEST2 : creating task 'aa06', number = 6, id = 08010008, starting, task 6 has started. - TEST2 : creating task 'aa07', number = 7, id = 08010009, starting, task 7 has started. - TEST2 : creating task 'aa08', number = 8, id = 0801000a, starting, task 8 has started. - TEST2 : creating task 'aa09', number = 9, id = 0801000b, starting, task 9 has started. - TEST2 : creating task 'aa10', number = 10, id = 0801000c, starting, task 10 has started. - TEST2 : creating task 'aa11', number = 11, id = 0801000d, starting, task 11 has started. - TEST2 : creating task 'aa12', number = 12, id = 0801000e, starting, task 12 has started. - TEST2 : creating task 'aa13', number = 13, id = 0801000f, starting, task 13 has started. - TEST2 : creating task 'aa14', number = 14, id = 08010010, starting, task 14 has started. - TEST2 : creating task 'aa15', number = 15, id = 08010011, starting, task 15 has started. - TEST2 : creating task 'aa16', number = 16, id = 08010012, starting, task 16 has started. - TEST2 : creating task 'aa17', number = 17, id = 08010013, starting, task 17 has started. - TEST2 : creating task 'aa18', number = 18, id = 08010014, starting, task 18 has started. - TEST2 : creating task 'aa19', number = 19, id = 08010015, starting, task 19 has started. - TEST2 : creating task 'aa20', number = 20, id = 08010016, starting, task 20 has started. - TEST2 : creating task 'aa21', number = 21, id = 08010017, starting, task 21 has started. - TEST2 : creating task 'aa22', number = 22, id = 08010018, starting, task 22 has started. - TEST2 : creating task 'aa23', number = 23, id = 08010019, starting, task 23 has started. - TEST2 : block 1 remove, signal task 08010006, task 4 ending. - TEST2 : block 1 remove, signal task 08010007, task 5 ending. - TEST2 : block 1 remove, signal task 08010008, task 6 ending. - TEST2 : block 1 remove, signal task 08010009, task 7 ending. - TEST2 : block 1 remove, signal task 0801000a, task 8 ending. - TEST2 : block 3 remove, signal task 08010010, task 14 ending. - TEST2 : block 3 remove, signal task 08010011, task 15 ending. - TEST2 : block 3 remove, signal task 08010012, task 16 ending. - TEST2 : block 3 remove, signal task 08010013, task 17 ending. - TEST2 : block 3 remove, signal task 08010014, task 18 ending. - TEST2 : creating task 'aa24', number = 24, id = 08010010, starting, task 24 has started. - TEST2 : creating task 'aa25', number = 25, id = 08010011, starting, task 25 has started. - TEST2 : creating task 'aa26', number = 26, id = 08010012, starting, task 26 has started. - TEST2 : creating task 'aa27', number = 27, id = 08010013, starting, task 27 has started. - TEST2 : creating task 'aa28', number = 28, id = 08010014, starting, task 28 has started. - TEST2 : creating task 'aa29', number = 29, id = 08010006, starting, task 29 has started. - TEST2 : creating task 'aa30', number = 30, id = 08010007, starting, task 30 has started. - TEST2 : creating task 'aa31', number = 31, id = 08010008, starting, task 31 has started. - TEST2 : creating task 'aa32', number = 32, id = 08010009, starting, task 32 has started. - TEST2 : creating task 'aa33', number = 33, id = 0801000a, starting, task 33 has started. - TEST2 : signal task 08010002 to delete, task 0 ending. - TEST2 : signal task 08010003 to delete, task 1 ending. - TEST2 : signal task 08010004 to delete, task 2 ending. - TEST2 : signal task 08010005 to delete, task 3 ending. - TEST2 : signal task 08010010 to delete, task 24 ending. - TEST2 : signal task 08010011 to delete, task 25 ending. - TEST2 : signal task 08010012 to delete, task 26 ending. - TEST2 : signal task 08010013 to delete, task 27 ending. - TEST2 : signal task 08010014 to delete, task 28 ending. - TEST2 : signal task 0801000b to delete, task 9 ending. - TEST2 : signal task 0801000c to delete, task 10 ending. - TEST2 : signal task 0801000d to delete, task 11 ending. - TEST2 : signal task 0801000e to delete, task 12 ending. - TEST2 : signal task 0801000f to delete, task 13 ending. - TEST2 : signal task 08010006 to delete, task 29 ending. - TEST2 : signal task 08010007 to delete, task 30 ending. - TEST2 : signal task 08010008 to delete, task 31 ending. - TEST2 : signal task 08010009 to delete, task 32 ending. - TEST2 : signal task 0801000a to delete, task 33 ending. - TEST2 : signal task 08010015 to delete, task 19 ending. - TEST2 : signal task 08010016 to delete, task 20 ending. - TEST2 : signal task 08010017 to delete, task 21 ending. - TEST2 : signal task 08010018 to delete, task 22 ending. - TEST2 : signal task 08010019 to delete, task 23 ending. - TEST2 : completed - TEST3 : free more than 3 x allocation size, but not the same block, - then free a block - TEST3 : creating task 'aa00', number = 0, id = 08010002, starting, task 0 has started. - TEST3 : creating task 'aa01', number = 1, id = 08010003, starting, task 1 has started. - TEST3 : creating task 'aa02', number = 2, id = 08010004, starting, task 2 has started. - TEST3 : creating task 'aa03', number = 3, id = 08010005, starting, task 3 has started. - TEST3 : creating task 'aa04', number = 4, id = 08010015, starting, task 4 has started. - TEST3 : creating task 'aa05', number = 5, id = 08010016, starting, task 5 has started. - TEST3 : creating task 'aa06', number = 6, id = 08010017, starting, task 6 has started. - TEST3 : creating task 'aa07', number = 7, id = 08010018, starting, task 7 has started. - TEST3 : creating task 'aa08', number = 8, id = 08010019, starting, task 8 has started. - TEST3 : creating task 'aa09', number = 9, id = 08010006, starting, task 9 has started. - TEST3 : creating task 'aa10', number = 10, id = 08010007, starting, task 10 has started. - TEST3 : creating task 'aa11', number = 11, id = 08010008, starting, task 11 has started. - TEST3 : creating task 'aa12', number = 12, id = 08010009, starting, task 12 has started. - TEST3 : creating task 'aa13', number = 13, id = 0801000a, starting, task 13 has started. - TEST3 : creating task 'aa14', number = 14, id = 0801000b, starting, task 14 has started. - TEST3 : creating task 'aa15', number = 15, id = 0801000c, starting, task 15 has started. - TEST3 : creating task 'aa16', number = 16, id = 0801000d, starting, task 16 has started. - TEST3 : creating task 'aa17', number = 17, id = 0801000e, starting, task 17 has started. - TEST3 : creating task 'aa18', number = 18, id = 0801000f, starting, task 18 has started. - TEST3 : creating task 'aa19', number = 19, id = 08010010, starting, task 19 has started. - TEST3 : creating task 'aa20', number = 20, id = 08010011, starting, task 20 has started. - TEST3 : creating task 'aa21', number = 21, id = 08010012, starting, task 21 has started. - TEST3 : creating task 'aa22', number = 22, id = 08010013, starting, task 22 has started. - TEST3 : creating task 'aa23', number = 23, id = 08010014, starting, task 23 has started. - TEST3 : creating task 'aa24', number = 24, id = 0801001a, starting, task 24 has started. - TEST3 : creating task 'aa25', number = 25, id = 0801001b, starting, task 25 has started. - TEST3 : creating task 'aa26', number = 26, id = 0801001c, starting, task 26 has started. - TEST3 : creating task 'aa27', number = 27, id = 0801001d, starting, task 27 has started. - TEST3 : creating task 'aa28', number = 28, id = 0801001e, starting, task 28 has started. - TEST3 : creating task 'aa29', number = 29, id = 0801001f, starting, task 29 has started. - TEST3 : creating task 'aa30', number = 30, id = 08010020, starting, task 30 has started. - TEST3 : creating task 'aa31', number = 31, id = 08010021, starting, task 31 has started. - TEST3 : creating task 'aa32', number = 32, id = 08010022, starting, task 32 has started. - TEST3 : creating task 'aa33', number = 33, id = 08010023, starting, task 33 has started. - TEST3 : creating task 'aa34', number = 34, id = 08010024, starting, task 34 has started. - TEST3 : creating task 'aa35', number = 35, id = 08010025, starting, task 35 has started. - TEST3 : creating task 'aa36', number = 36, id = 08010026, starting, task 36 has started. - TEST3 : creating task 'aa37', number = 37, id = 08010027, starting, task 37 has started. - TEST3 : creating task 'aa38', number = 38, id = 08010028, starting, task 38 has started. - TEST3 : creating task 'aa39', number = 39, id = 08010029, starting, task 39 has started. - TEST3 : creating task 'aa40', number = 40, id = 0801002a, starting, task 40 has started. - TEST3 : creating task 'aa41', number = 41, id = 0801002b, starting, task 41 has started. - TEST3 : creating task 'aa42', number = 42, id = 0801002c, starting, task 42 has started. - TEST3 : creating task 'aa43', number = 43, id = 0801002d, starting, task 43 has started. - TEST3 : creating task 'aa44', number = 44, id = 0801002e, starting, task 44 has started. - TEST3 : creating task 'aa45', number = 45, id = 0801002f, starting, task 45 has started. - TEST3 : creating task 'aa46', number = 46, id = 08010030, starting, task 46 has started. - TEST3 : creating task 'aa47', number = 47, id = 08010031, starting, task 47 has started. - TEST3 : creating task 'aa48', number = 48, id = 08010032, starting, task 48 has started. - TEST3 : creating task 'aa49', number = 49, id = 08010033, starting, task 49 has started. - TEST3 : creating task 'aa50', number = 50, id = 08010034, starting, task 50 has started. - TEST3 : creating task 'aa51', number = 51, id = 08010035, starting, task 51 has started. - TEST3 : creating task 'aa52', number = 52, id = 08010036, starting, task 52 has started. - TEST3 : creating task 'aa53', number = 53, id = 08010037, starting, task 53 has started. - TEST3 : creating task 'aa54', number = 54, id = 08010038, starting, task 54 has started. - TEST3 : creating task 'aa55', number = 55, id = 08010039, starting, task 55 has started. - TEST3 : creating task 'aa56', number = 56, id = 0801003a, starting, task 56 has started. - TEST3 : creating task 'aa57', number = 57, id = 0801003b, starting, task 57 has started. - TEST3 : creating task 'aa58', number = 58, id = 0801003c, starting, task 58 has started. - TEST3 : creating task 'aa59', number = 59, id = 0801003d, starting, task 59 has started. - TEST3 : creating task 'aa60', number = 60, id = 0801003e, starting, task 60 has started. - TEST3 : creating task 'aa61', number = 61, id = 0801003f, starting, task 61 has started. - TEST3 : creating task 'aa62', number = 62, id = 08010040, starting, task 62 has started. - TEST3 : creating task 'aa63', number = 63, id = 08010041, starting, task 63 has started. - TEST3 : creating task 'aa64', number = 64, id = 08010042, starting, task 64 has started. - TEST3 : creating task 'aa65', number = 65, id = 08010043, starting, task 65 has started. - TEST3 : creating task 'aa66', number = 66, id = 08010044, starting, task 66 has started. - TEST3 : creating task 'aa67', number = 67, id = 08010045, starting, task 67 has started. - TEST3 : creating task 'aa68', number = 68, id = 08010046, starting, task 68 has started. - TEST3 : creating task 'aa69', number = 69, id = 08010047, starting, task 69 has started. - TEST3 : creating task 'aa70', number = 70, id = 08010048, starting, task 70 has started. - TEST3 : creating task 'aa71', number = 71, id = 08010049, starting, task 71 has started. - TEST3 : creating task 'aa72', number = 72, id = 0801004a, starting, task 72 has started. - TEST3 : creating task 'aa73', number = 73, id = 0801004b, starting, task 73 has started. - TEST3 : creating task 'aa74', number = 74, id = 0801004c, starting, task 74 has started. - TEST3 : creating task 'aa75', number = 75, id = 0801004d, starting, task 75 has started. - TEST3 : creating task 'aa76', number = 76, id = 0801004e, starting, task 76 has started. - TEST3 : creating task 'aa77', number = 77, id = 0801004f, starting, task 77 has started. - TEST3 : creating task 'aa78', number = 78, id = 08010050, starting, task 78 has started. - TEST3 : creating task 'aa79', number = 79, id = 08010051, starting, task 79 has started. - TEST3 : creating task 'aa80', number = 80, id = 08010052, starting, task 80 has started. - TEST3 : creating task 'aa81', number = 81, id = 08010053, starting, task 81 has started. - TEST3 : creating task 'aa82', number = 82, id = 08010054, starting, task 82 has started. - TEST3 : creating task 'aa83', number = 83, id = 08010055, starting, task 83 has started. - TEST3 : creating task 'aa84', number = 84, id = 08010056, starting, task 84 has started. - TEST3 : creating task 'aa85', number = 85, id = 08010057, starting, task 85 has started. - TEST3 : creating task 'aa86', number = 86, id = 08010058, starting, task 86 has started. - TEST3 : creating task 'aa87', number = 87, id = 08010059, starting, task 87 has started. - TEST3 : creating task 'aa88', number = 88, id = 0801005a, starting, task 88 has started. - TEST3 : creating task 'aa89', number = 89, id = 0801005b, starting, task 89 has started. - TEST3 : creating task 'aa90', number = 90, id = 0801005c, starting, task 90 has started. - TEST3 : creating task 'aa91', number = 91, id = 0801005d, starting, task 91 has started. - TEST3 : creating task 'aa92', number = 92, id = 0801005e, starting, task 92 has started. - TEST3 : creating task 'aa93', number = 93, id = 0801005f, starting, task 93 has started. - TEST3 : creating task 'aa94', number = 94, id = 08010060, starting, task 94 has started. - TEST3 : creating task 'aa95', number = 95, id = 08010061, starting, task 95 has started. - TEST3 : creating task 'aa96', number = 96, id = 08010062, starting, task 96 has started. - TEST3 : creating task 'aa97', number = 97, id = 08010063, starting, task 97 has started. - TEST3 : creating task 'aa98', number = 98, id = 08010064, starting, task 98 has started. - TEST3 : creating task 'aa99', number = 99, id = 08010065, starting, task 99 has started. - TEST3 : creating task 'ab00', number = 100, id = 08010066, starting, task 100 has started. - TEST3 : creating task 'ab01', number = 101, id = 08010067, starting, task 101 has started. - TEST3 : creating task 'ab02', number = 102, id = 08010068, starting, task 102 has started. - TEST3 : creating task 'ab03', number = 103, id = 08010069, starting, task 103 has started. - TEST3 : creating task 'ab04', number = 104, id = 0801006a, starting, task 104 has started. - TEST3 : creating task 'ab05', number = 105, id = 0801006b, starting, task 105 has started. - TEST3 : creating task 'ab06', number = 106, id = 0801006c, starting, task 106 has started. - TEST3 : creating task 'ab07', number = 107, id = 0801006d, starting, task 107 has started. - TEST3 : creating task 'ab08', number = 108, id = 0801006e, starting, task 108 has started. - TEST3 : creating task 'ab09', number = 109, id = 0801006f, starting, task 109 has started. - TEST3 : creating task 'ab10', number = 110, id = 08010070, starting, task 110 has started. - TEST3 : creating task 'ab11', number = 111, id = 08010071, starting, task 111 has started. - TEST3 : creating task 'ab12', number = 112, id = 08010072, starting, task 112 has started. - TEST3 : creating task 'ab13', number = 113, id = 08010073, starting, task 113 has started. - TEST3 : creating task 'ab14', number = 114, id = 08010074, starting, task 114 has started. - TEST3 : creating task 'ab15', number = 115, id = 08010075, starting, task 115 has started. - TEST3 : creating task 'ab16', number = 116, id = 08010076, starting, task 116 has started. - TEST3 : creating task 'ab17', number = 117, id = 08010077, starting, task 117 has started. - TEST3 : creating task 'ab18', number = 118, id = 08010078, starting, task 118 has started. - TEST3 : creating task 'ab19', number = 119, id = 08010079, starting, task 119 has started. - TEST3 : creating task 'ab20', number = 120, id = 0801007a, starting, task 120 has started. - TEST3 : creating task 'ab21', failure, unsatisfied. - TEST3 : remove, signal task 08010015, task 4 ending. - TEST3 : remove, signal task 08010016, task 5 ending. - TEST3 : remove, signal task 08010017, task 6 ending. - TEST3 : remove, signal task 08010006, task 9 ending. - TEST3 : remove, signal task 08010007, task 10 ending. - TEST3 : remove, signal task 08010008, task 11 ending. - TEST3 : remove, signal task 0801000b, task 14 ending. - TEST3 : remove, signal task 0801000c, task 15 ending. - TEST3 : remove, signal task 0801000d, task 16 ending. - TEST3 : remove, signal task 08010010, task 19 ending. - TEST3 : remove, signal task 08010011, task 20 ending. - TEST3 : remove, signal task 08010012, task 21 ending. - TEST3 : remove, signal task 08010018, task 7 ending. - TEST3 : remove, signal task 08010019, task 8 ending. - TEST3 : signal task 08010002 to delete, task 0 ending. - TEST3 : signal task 08010003 to delete, task 1 ending. - TEST3 : signal task 08010004 to delete, task 2 ending. - TEST3 : signal task 08010005 to delete, task 3 ending. - TEST3 : signal task 08010009 to delete, task 12 ending. - TEST3 : signal task 0801000a to delete, task 13 ending. - TEST3 : signal task 0801000e to delete, task 17 ending. - TEST3 : signal task 0801000f to delete, task 18 ending. - TEST3 : signal task 08010013 to delete, task 22 ending. - TEST3 : signal task 08010014 to delete, task 23 ending. - TEST3 : signal task 0801001a to delete, task 24 ending. - TEST3 : signal task 0801001b to delete, task 25 ending. - TEST3 : signal task 0801001c to delete, task 26 ending. - TEST3 : signal task 0801001d to delete, task 27 ending. - TEST3 : signal task 0801001e to delete, task 28 ending. - TEST3 : signal task 0801001f to delete, task 29 ending. - TEST3 : signal task 08010020 to delete, task 30 ending. - TEST3 : signal task 08010021 to delete, task 31 ending. - TEST3 : signal task 08010022 to delete, task 32 ending. - TEST3 : signal task 08010023 to delete, task 33 ending. - TEST3 : signal task 08010024 to delete, task 34 ending. - TEST3 : signal task 08010025 to delete, task 35 ending. - TEST3 : signal task 08010026 to delete, task 36 ending. - TEST3 : signal task 08010027 to delete, task 37 ending. - TEST3 : signal task 08010028 to delete, task 38 ending. - TEST3 : signal task 08010029 to delete, task 39 ending. - TEST3 : signal task 0801002a to delete, task 40 ending. - TEST3 : signal task 0801002b to delete, task 41 ending. - TEST3 : signal task 0801002c to delete, task 42 ending. - TEST3 : signal task 0801002d to delete, task 43 ending. - TEST3 : signal task 0801002e to delete, task 44 ending. - TEST3 : signal task 0801002f to delete, task 45 ending. - TEST3 : signal task 08010030 to delete, task 46 ending. - TEST3 : signal task 08010031 to delete, task 47 ending. - TEST3 : signal task 08010032 to delete, task 48 ending. - TEST3 : signal task 08010033 to delete, task 49 ending. - TEST3 : signal task 08010034 to delete, task 50 ending. - TEST3 : signal task 08010035 to delete, task 51 ending. - TEST3 : signal task 08010036 to delete, task 52 ending. - TEST3 : signal task 08010037 to delete, task 53 ending. - TEST3 : signal task 08010038 to delete, task 54 ending. - TEST3 : signal task 08010039 to delete, task 55 ending. - TEST3 : signal task 0801003a to delete, task 56 ending. - TEST3 : signal task 0801003b to delete, task 57 ending. - TEST3 : signal task 0801003c to delete, task 58 ending. - TEST3 : signal task 0801003d to delete, task 59 ending. - TEST3 : signal task 0801003e to delete, task 60 ending. - TEST3 : signal task 0801003f to delete, task 61 ending. - TEST3 : signal task 08010040 to delete, task 62 ending. - TEST3 : signal task 08010041 to delete, task 63 ending. - TEST3 : signal task 08010042 to delete, task 64 ending. - TEST3 : signal task 08010043 to delete, task 65 ending. - TEST3 : signal task 08010044 to delete, task 66 ending. - TEST3 : signal task 08010045 to delete, task 67 ending. - TEST3 : signal task 08010046 to delete, task 68 ending. - TEST3 : signal task 08010047 to delete, task 69 ending. - TEST3 : signal task 08010048 to delete, task 70 ending. - TEST3 : signal task 08010049 to delete, task 71 ending. - TEST3 : signal task 0801004a to delete, task 72 ending. - TEST3 : signal task 0801004b to delete, task 73 ending. - TEST3 : signal task 0801004c to delete, task 74 ending. - TEST3 : signal task 0801004d to delete, task 75 ending. - TEST3 : signal task 0801004e to delete, task 76 ending. - TEST3 : signal task 0801004f to delete, task 77 ending. - TEST3 : signal task 08010050 to delete, task 78 ending. - TEST3 : signal task 08010051 to delete, task 79 ending. - TEST3 : signal task 08010052 to delete, task 80 ending. - TEST3 : signal task 08010053 to delete, task 81 ending. - TEST3 : signal task 08010054 to delete, task 82 ending. - TEST3 : signal task 08010055 to delete, task 83 ending. - TEST3 : signal task 08010056 to delete, task 84 ending. - TEST3 : signal task 08010057 to delete, task 85 ending. - TEST3 : signal task 08010058 to delete, task 86 ending. - TEST3 : signal task 08010059 to delete, task 87 ending. - TEST3 : signal task 0801005a to delete, task 88 ending. - TEST3 : signal task 0801005b to delete, task 89 ending. - TEST3 : signal task 0801005c to delete, task 90 ending. - TEST3 : signal task 0801005d to delete, task 91 ending. - TEST3 : signal task 0801005e to delete, task 92 ending. - TEST3 : signal task 0801005f to delete, task 93 ending. - TEST3 : signal task 08010060 to delete, task 94 ending. - TEST3 : signal task 08010061 to delete, task 95 ending. - TEST3 : signal task 08010062 to delete, task 96 ending. - TEST3 : signal task 08010063 to delete, task 97 ending. - TEST3 : signal task 08010064 to delete, task 98 ending. - TEST3 : signal task 08010065 to delete, task 99 ending. - TEST3 : signal task 08010066 to delete, task 100 ending. - TEST3 : signal task 08010067 to delete, task 101 ending. - TEST3 : signal task 08010068 to delete, task 102 ending. - TEST3 : signal task 08010069 to delete, task 103 ending. - TEST3 : signal task 0801006a to delete, task 104 ending. - TEST3 : signal task 0801006b to delete, task 105 ending. - TEST3 : signal task 0801006c to delete, task 106 ending. - TEST3 : signal task 0801006d to delete, task 107 ending. - TEST3 : signal task 0801006e to delete, task 108 ending. - TEST3 : signal task 0801006f to delete, task 109 ending. - TEST3 : signal task 08010070 to delete, task 110 ending. - TEST3 : signal task 08010071 to delete, task 111 ending. - TEST3 : signal task 08010072 to delete, task 112 ending. - TEST3 : signal task 08010073 to delete, task 113 ending. - TEST3 : signal task 08010074 to delete, task 114 ending. - TEST3 : signal task 08010075 to delete, task 115 ending. - TEST3 : signal task 08010076 to delete, task 116 ending. - TEST3 : signal task 08010077 to delete, task 117 ending. - TEST3 : signal task 08010078 to delete, task 118 ending. - TEST3 : signal task 08010079 to delete, task 119 ending. - TEST3 : signal task 0801007a to delete, task 120 ending. - TEST3 : completed - -*** END OF UNLIMITED TASK TEST *** - -NOTE: The failures are expected. This is the limiting factor, memory in the - work-space. -NOTE: The number of tasks may vary due to the size of the work-space. -- cgit v1.2.3