summaryrefslogtreecommitdiffstats
path: root/c/src/tests/psxtests/psx08
diff options
context:
space:
mode:
Diffstat (limited to 'c/src/tests/psxtests/psx08')
-rw-r--r--c/src/tests/psxtests/psx08/.cvsignore2
-rw-r--r--c/src/tests/psxtests/psx08/Makefile.am44
-rw-r--r--c/src/tests/psxtests/psx08/init.c97
-rw-r--r--c/src/tests/psxtests/psx08/psx08.scn22
-rw-r--r--c/src/tests/psxtests/psx08/system.h60
-rw-r--r--c/src/tests/psxtests/psx08/task1.c31
-rw-r--r--c/src/tests/psxtests/psx08/task2.c55
-rw-r--r--c/src/tests/psxtests/psx08/task3.c51
8 files changed, 0 insertions, 362 deletions
diff --git a/c/src/tests/psxtests/psx08/.cvsignore b/c/src/tests/psxtests/psx08/.cvsignore
deleted file mode 100644
index 282522db03..0000000000
--- a/c/src/tests/psxtests/psx08/.cvsignore
+++ /dev/null
@@ -1,2 +0,0 @@
-Makefile
-Makefile.in
diff --git a/c/src/tests/psxtests/psx08/Makefile.am b/c/src/tests/psxtests/psx08/Makefile.am
deleted file mode 100644
index a4d943dba9..0000000000
--- a/c/src/tests/psxtests/psx08/Makefile.am
+++ /dev/null
@@ -1,44 +0,0 @@
-##
-## $Id$
-##
-
-
-TEST = psx08
-
-MANAGERS = all
-
-C_FILES = init.c task1.c task2.c task3.c
-C_O_FILES = $(C_FILES:%.c=${ARCH}/%.$(OBJEXT))
-
-H_FILES = system.h
-noinst_HEADERS = $(H_FILES)
-
-DOCTYPES = scn
-DOCS = $(DOCTYPES:%=$(TEST).%)
-
-SRCS = $(DOCS) $(C_FILES) $(H_FILES)
-OBJS = $(C_O_FILES)
-
-PRINT_SRCS = $(DOCS)
-
-PGM = ${ARCH}/$(TEST).exe
-
-include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
-include $(top_srcdir)/../automake/compile.am
-include $(top_srcdir)/../automake/leaf.am
-include $(top_srcdir)/psxtests.am
-
-#
-# (OPTIONAL) Add local stuff here using +=
-#
-
-AM_CPPFLAGS += -I$(top_srcdir)/include
-
-${PGM}: $(OBJS) $(LINK_FILES)
- $(make-exe)
-
-all-local: $(ARCH) $(TMPINSTALL_FILES)
-
-EXTRA_DIST = $(C_FILES) $(DOCS)
-
-include $(top_srcdir)/../automake/local.am
diff --git a/c/src/tests/psxtests/psx08/init.c b/c/src/tests/psxtests/psx08/init.c
deleted file mode 100644
index b3f630208f..0000000000
--- a/c/src/tests/psxtests/psx08/init.c
+++ /dev/null
@@ -1,97 +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$
- */
-
-#define CONFIGURE_INIT
-#include "system.h"
-#include <errno.h>
-
-void *POSIX_Init(
- void *argument
-)
-{
- int status;
- void *return_pointer;
-
- puts( "\n\n*** POSIX TEST 8 ***" );
-
- /* set the time of day, and print our buffer in multiple ways */
-
- set_time( TM_FRIDAY, TM_MAY, 24, 96, 11, 5, 0 );
-
- /* get id of this thread */
-
- Init_id = pthread_self();
- printf( "Init's ID is 0x%08x\n", Init_id );
-
- puts( "Init: pthread_detach - ESRCH (invalid id)" );
- status = pthread_detach( -1 );
- assert( status == ESRCH );
-
- /* detach this thread */
-
- puts( "Init: pthread_detach self" );
- status = pthread_detach( pthread_self() );
- assert( !status );
-
- /* create thread */
-
- status = pthread_create( &Task1_id, NULL, Task_1, NULL );
- assert( !status );
-
- puts( "Init: pthread_join - ESRCH (invalid id)" );
- status = pthread_join( -1, &return_pointer );
- assert( status == ESRCH );
-
- puts( "Init: pthread_join - SUCCESSFUL" );
- status = pthread_join( Task1_id, &return_pointer );
-
- puts( "Init: returned from pthread_join through return" );
- if ( status )
- printf( "status = %d\n", status );
- assert( !status );
-
- if ( return_pointer == &Task1_id )
- puts( "Init: pthread_join returned correct pointer" );
- else
- printf(
- "Init: pthread_join returned incorrect pointer (%p != %p)\n",
- return_pointer,
- &Task1_id
- );
-
- puts( "Init: creating two pthreads" );
- status = pthread_create( &Task2_id, NULL, Task_2, NULL );
- assert( !status );
-
- status = pthread_create( &Task3_id, NULL, Task_3, NULL );
- assert( !status );
-
- puts( "Init: pthread_join - SUCCESSFUL" );
- status = pthread_join( Task2_id, &return_pointer );
- /* assert is below comment */
-
- puts( "Init: returned from pthread_join through pthread_exit" );
- if ( status )
- printf( "status = %d\n", status );
- assert( !status );
-
- if ( return_pointer == &Task2_id )
- puts( "Init: pthread_join returned correct pointer" );
- else
- printf(
- "Init: pthread_join returned incorrect pointer (%p != %p)\n",
- return_pointer,
- &Task2_id
- );
-
- puts( "Init: exitting" );
- return NULL;
-}
diff --git a/c/src/tests/psxtests/psx08/psx08.scn b/c/src/tests/psxtests/psx08/psx08.scn
deleted file mode 100644
index 9b76f51a2f..0000000000
--- a/c/src/tests/psxtests/psx08/psx08.scn
+++ /dev/null
@@ -1,22 +0,0 @@
-*** POSIX TEST 8 ***
-Init's ID is 0x0b010001
-Init: pthread_detach - ESRCH (invalid id)
-Init: pthread_detach self
-Init: pthread_join - ESRCH (invalid id)
-Init: pthread_join - SUCCESSFUL
-Task_1: exitting
-Init: returned from pthread_join through return
-Init: pthread_join returned correct pointer
-Init: creating two pthreads
-Init: pthread_join - SUCCESSFUL
-Task_2: sleep 1 second
-Task_3: join to Task_2
-Task_2: join to detached task (Init) -- EINVAL
-Task_2: join to self task (Init) -- EDEADLK
-Task_2: exitting
-Init: returned from pthread_join through pthread_exit
-Init: pthread_join returned correct pointer
-Init: exitting
-Task_3: returned from pthread_join
-Task_3: pthread_join returned correct pointer
-*** END OF POSIX TEST 8 ***
diff --git a/c/src/tests/psxtests/psx08/system.h b/c/src/tests/psxtests/psx08/system.h
deleted file mode 100644
index 191c7ab136..0000000000
--- a/c/src/tests/psxtests/psx08/system.h
+++ /dev/null
@@ -1,60 +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$
- */
-
-/* functions */
-
-#include <pmacros.h>
-
-void *POSIX_Init(
- void *argument
-);
-
-void *Task_1(
- void *argument
-);
-
-void *Task_2(
- void *argument
-);
-
-void *Task_3(
- void *argument
-);
-
-/* configuration information */
-
-#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER
-#define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER
-
-#define CONFIGURE_MAXIMUM_POSIX_THREADS 4
-
-#define CONFIGURE_POSIX_INIT_THREAD_TABLE
-
-#include <confdefs.h>
-
-/* global variables */
-
-#ifdef CONFIGURE_INIT
-#define TEST_EXTERN
-#else
-#define TEST_EXTERN extern
-#endif
-
-TEST_EXTERN pthread_t Init_id;
-TEST_EXTERN pthread_t Task1_id;
-TEST_EXTERN pthread_t Task2_id;
-TEST_EXTERN pthread_t Task3_id;
-
-/* end of include file */
diff --git a/c/src/tests/psxtests/psx08/task1.c b/c/src/tests/psxtests/psx08/task1.c
deleted file mode 100644
index 91708845eb..0000000000
--- a/c/src/tests/psxtests/psx08/task1.c
+++ /dev/null
@@ -1,31 +0,0 @@
-/* Task_1
- *
- * This routine serves as a test task. It verifies the basic task
- * switching capabilities of the executive.
- *
- * Input parameters:
- * argument - task argument
- *
- * 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 <errno.h>
-
-void *Task_1(
- void *argument
-)
-{
- puts( "Task_1: exitting" );
-
- return( &Task1_id );
-}
diff --git a/c/src/tests/psxtests/psx08/task2.c b/c/src/tests/psxtests/psx08/task2.c
deleted file mode 100644
index ffdd92bbdb..0000000000
--- a/c/src/tests/psxtests/psx08/task2.c
+++ /dev/null
@@ -1,55 +0,0 @@
-/* Task_2
- *
- * This routine serves as a test task. It verifies the basic task
- * switching capabilities of the executive.
- *
- * Input parameters:
- * argument - task argument
- *
- * 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 <errno.h>
-
-void *Task_2(
- void *argument
-)
-{
- int status;
-
- puts( "Task_2: sleep 1 second" );
-
- sleep( 1 );
-
- /* switch to task 3 */
-
- puts( "Task_2: join to detached task (Init) -- EINVAL" );
- status = pthread_join( Init_id, NULL );
- if ( status != EINVAL )
- printf( "status = %d\n", status );
- assert( status == EINVAL );
-
- puts( "Task_2: join to self task (Init) -- EDEADLK" );
- status = pthread_join( pthread_self(), NULL );
- if ( status != EDEADLK )
- printf( "status = %d\n", status );
- assert( status == EDEADLK );
-
- puts( "Task_2: exitting" );
-
- pthread_exit( &Task2_id );
-
- /* switch to init task */
-
- return NULL; /* just so the compiler thinks we returned something */
-}
diff --git a/c/src/tests/psxtests/psx08/task3.c b/c/src/tests/psxtests/psx08/task3.c
deleted file mode 100644
index 3584a30bbb..0000000000
--- a/c/src/tests/psxtests/psx08/task3.c
+++ /dev/null
@@ -1,51 +0,0 @@
-/* Task_3
- *
- * This routine serves as a test task. It verifies the basic task
- * switching capabilities of the executive.
- *
- * Input parameters:
- * argument - task argument
- *
- * 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 <errno.h>
-
-void *Task_3(
- void *argument
-)
-{
- int status;
- void *return_pointer;
-
- puts( "Task_3: join to Task_2" );
- status = pthread_join( Task2_id, &return_pointer );
- puts( "Task_3: returned from pthread_join" );
- if ( status )
- printf( "status = %d\n", status );
- assert( !status );
-
- if ( return_pointer == &Task2_id )
- puts( "Task_3: pthread_join returned correct pointer" );
- else
- printf(
- "Task_3: pthread_join returned incorrect pointer (%p != %p)\n",
- return_pointer,
- &Task2_id
- );
-
- puts( "*** END OF POSIX TEST 8 ***" );
- rtems_test_exit( 0 );
-
- return NULL; /* just so the compiler thinks we returned something */
-}