From ff6ab1b594d9f073ece9b7fedf1f6977f52aeee5 Mon Sep 17 00:00:00 2001 From: Ralf Corsepius Date: Tue, 11 Nov 2003 00:59:49 +0000 Subject: 2003-11-10 Ralf Corsepius * .cvsignore: Remove. * ChangeLog: Remove. * Makefile.am: Remove. * configure.ac: Remove. * psxtests.am: Remove. * include/.cvsignore: Remove. * include/Makefile.am: Remove. * include/pmacros.h: Remove. * psx01/.cvsignore: Remove. * psx01/Makefile.am: Remove. * psx01/init.c: Remove. * psx01/psx01.scn: Remove. * psx01/system.h: Remove. * psx01/task.c: Remove. * psx02/.cvsignore: Remove. * psx02/Makefile.am: Remove. * psx02/init.c: Remove. * psx02/psx02.scn: Remove. * psx02/system.h: Remove. * psx02/task.c: Remove. * psx03/.cvsignore: Remove. * psx03/Makefile.am: Remove. * psx03/init.c: Remove. * psx03/psx03.scn: Remove. * psx03/system.h: Remove. * psx03/task.c: Remove. * psx04/.cvsignore: Remove. * psx04/Makefile.am: Remove. * psx04/init.c: Remove. * psx04/psx04.scn: Remove. * psx04/system.h: Remove. * psx04/task1.c: Remove. * psx04/task2.c: Remove. * psx04/task3.c: Remove. * psx05/.cvsignore: Remove. * psx05/Makefile.am: Remove. * psx05/init.c: Remove. * psx05/psx05.scn: Remove. * psx05/system.h: Remove. * psx05/task.c: Remove. * psx05/task2.c: Remove. * psx05/task3.c: Remove. * psx06/.cvsignore: Remove. * psx06/Makefile.am: Remove. * psx06/init.c: Remove. * psx06/psx06.scn: Remove. * psx06/system.h: Remove. * psx06/task.c: Remove. * psx06/task2.c: Remove. * psx07/.cvsignore: Remove. * psx07/Makefile.am: Remove. * psx07/init.c: Remove. * psx07/psx07.scn: Remove. * psx07/system.h: Remove. * psx07/task.c: Remove. * psx08/.cvsignore: Remove. * psx08/Makefile.am: Remove. * psx08/init.c: Remove. * psx08/psx08.scn: Remove. * psx08/system.h: Remove. * psx08/task1.c: Remove. * psx08/task2.c: Remove. * psx08/task3.c: Remove. * psx09/.cvsignore: Remove. * psx09/Makefile.am: Remove. * psx09/init.c: Remove. * psx09/psx09.scn: Remove. * psx09/system.h: Remove. * psx10/.cvsignore: Remove. * psx10/Makefile.am: Remove. * psx10/init.c: Remove. * psx10/psx10.scn: Remove. * psx10/system.h: Remove. * psx10/task.c: Remove. * psx10/task2.c: Remove. * psx10/task3.c: Remove. * psx11/.cvsignore: Remove. * psx11/Makefile.am: Remove. * psx11/init.c: Remove. * psx11/psx11.scn: Remove. * psx11/system.h: Remove. * psx11/task.c: Remove. * psx12/.cvsignore: Remove. * psx12/Makefile.am: Remove. * psx12/init.c: Remove. * psx12/psx12.scn: Remove. * psx12/system.h: Remove. * psx12/task.c: Remove. * psx13/.cvsignore: Remove. * psx13/Makefile.am: Remove. * psx13/main.c: Remove. * psx13/psx13.scn: Remove. * psx13/test.c: Remove. * psxcancel/.cvsignore: Remove. * psxcancel/Makefile.am: Remove. * psxcancel/init.c: Remove. * psxcancel/psxcancel.scn: Remove. * psxchroot01/.cvsignore: Remove. * psxchroot01/Makefile.am: Remove. * psxchroot01/main.c: Remove. * psxchroot01/psxchroot01.scn: Remove. * psxchroot01/test.c: Remove. * psxfile01/.cvsignore: Remove. * psxfile01/Makefile.am: Remove. * psxfile01/main.c: Remove. * psxfile01/psxfile01.scn: Remove. * psxfile01/test.c: Remove. * psxfile01/test_cat.c: Remove. * psxfile01/test_extend.c: Remove. * psxfile01/test_write.c: Remove. * psxhdrs/.cvsignore: Remove. * psxhdrs/Makefile.am: Remove. * psxhdrs/clock01.c: Remove. * psxhdrs/clock02.c: Remove. * psxhdrs/clock03.c: Remove. * psxhdrs/clock04.c: Remove. * psxhdrs/clock05.c: Remove. * psxhdrs/clock06.c: Remove. * psxhdrs/cond01.c: Remove. * psxhdrs/cond02.c: Remove. * psxhdrs/cond03.c: Remove. * psxhdrs/cond04.c: Remove. * psxhdrs/cond05.c: Remove. * psxhdrs/cond06.c: Remove. * psxhdrs/cond07.c: Remove. * psxhdrs/cond08.c: Remove. * psxhdrs/cond09.c: Remove. * psxhdrs/cond10.c: Remove. * psxhdrs/key01.c: Remove. * psxhdrs/key02.c: Remove. * psxhdrs/key03.c: Remove. * psxhdrs/key04.c: Remove. * psxhdrs/mutex01.c: Remove. * psxhdrs/mutex02.c: Remove. * psxhdrs/mutex03.c: Remove. * psxhdrs/mutex04.c: Remove. * psxhdrs/mutex05.c: Remove. * psxhdrs/mutex06.c: Remove. * psxhdrs/mutex07.c: Remove. * psxhdrs/mutex08.c: Remove. * psxhdrs/mutex09.c: Remove. * psxhdrs/mutex10.c: Remove. * psxhdrs/mutex11.c: Remove. * psxhdrs/mutex12.c: Remove. * psxhdrs/mutex13.c: Remove. * psxhdrs/mutex14.c: Remove. * psxhdrs/mutex15.c: Remove. * psxhdrs/mutex16.c: Remove. * psxhdrs/proc01.c: Remove. * psxhdrs/proc02.c: Remove. * psxhdrs/proc03.c: Remove. * psxhdrs/proc04.c: Remove. * psxhdrs/proc05.c: Remove. * psxhdrs/proc06.c: Remove. * psxhdrs/proc07.c: Remove. * psxhdrs/proc08.c: Remove. * psxhdrs/proc09.c: Remove. * psxhdrs/proc10.c: Remove. * psxhdrs/proc11.c: Remove. * psxhdrs/proc12.c: Remove. * psxhdrs/proc13.c: Remove. * psxhdrs/proc14.c: Remove. * psxhdrs/pthread01.c: Remove. * psxhdrs/pthread02.c: Remove. * psxhdrs/pthread03.c: Remove. * psxhdrs/pthread04.c: Remove. * psxhdrs/pthread05.c: Remove. * psxhdrs/pthread06.c: Remove. * psxhdrs/pthread07.c: Remove. * psxhdrs/pthread08.c: Remove. * psxhdrs/pthread09.c: Remove. * psxhdrs/pthread10.c: Remove. * psxhdrs/pthread11.c: Remove. * psxhdrs/pthread12.c: Remove. * psxhdrs/pthread13.c: Remove. * psxhdrs/pthread14.c: Remove. * psxhdrs/pthread15.c: Remove. * psxhdrs/pthread16.c: Remove. * psxhdrs/pthread17.c: Remove. * psxhdrs/pthread18.c: Remove. * psxhdrs/pthread19.c: Remove. * psxhdrs/pthread20.c: Remove. * psxhdrs/pthread21.c: Remove. * psxhdrs/pthread22.c: Remove. * psxhdrs/pthread23.c: Remove. * psxhdrs/pthread24.c: Remove. * psxhdrs/pthread25.c: Remove. * psxhdrs/pthread26.c: Remove. * psxhdrs/pthread27.c: Remove. * psxhdrs/pthread28.c: Remove. * psxhdrs/pthread29.c: Remove. * psxhdrs/pthread30.c: Remove. * psxhdrs/pthread31.c: Remove. * psxhdrs/pthread32.c: Remove. * psxhdrs/pthread33.c: Remove. * psxhdrs/pthread34.c: Remove. * psxhdrs/pthread35.c: Remove. * psxhdrs/pthread36.c: Remove. * psxhdrs/sched01.c: Remove. * psxhdrs/sched02.c: Remove. * psxhdrs/sched03.c: Remove. * psxhdrs/sched04.c: Remove. * psxhdrs/sched05.c: Remove. * psxhdrs/sched06.c: Remove. * psxhdrs/sched07.c: Remove. * psxhdrs/sched08.c: Remove. * psxhdrs/signal01.c: Remove. * psxhdrs/signal02.c: Remove. * psxhdrs/signal03.c: Remove. * psxhdrs/signal04.c: Remove. * psxhdrs/signal05.c: Remove. * psxhdrs/signal06.c: Remove. * psxhdrs/signal07.c: Remove. * psxhdrs/signal08.c: Remove. * psxhdrs/signal09.c: Remove. * psxhdrs/signal10.c: Remove. * psxhdrs/signal11.c: Remove. * psxhdrs/signal12.c: Remove. * psxhdrs/signal13.c: Remove. * psxhdrs/signal14.c: Remove. * psxhdrs/signal15.c: Remove. * psxhdrs/signal16.c: Remove. * psxhdrs/signal17.c: Remove. * psxhdrs/signal18.c: Remove. * psxhdrs/signal19.c: Remove. * psxhdrs/signal20.c: Remove. * psxhdrs/signal21.c: Remove. * psxhdrs/signal22.c: Remove. * psxhdrs/signal23.c: Remove. * psxhdrs/sync01.c: Remove. * psxhdrs/sync02.c: Remove. * psxhdrs/sync03.c: Remove. * psxhdrs/time01.c: Remove. * psxhdrs/time02.c: Remove. * psxhdrs/time03.c: Remove. * psxhdrs/time04.c: Remove. * psxhdrs/time05.c: Remove. * psxhdrs/time06.c: Remove. * psxhdrs/time07.c: Remove. * psxhdrs/time08.c: Remove. * psxhdrs/time09.c: Remove. * psxhdrs/time10.c: Remove. * psxhdrs/time11.c: Remove. * psxhdrs/time12.c: Remove. * psxhdrs/time13.c: Remove. * psxhdrs/timer01.c: Remove. * psxhdrs/timer02.c: Remove. * psxhdrs/timer03.c: Remove. * psxhdrs/timer04.c: Remove. * psxhdrs/timer05.c: Remove. * psxhdrs/timer06.c: Remove. * psxhdrs/timer07.c: Remove. * psxmount/.cvsignore: Remove. * psxmount/Makefile.am: Remove. * psxmount/main.c: Remove. * psxmount/psxmount.scn: Remove. * psxmount/test.c: Remove. * psxmsgq01/.cvsignore: Remove. * psxmsgq01/Makefile.am: Remove. * psxmsgq01/init.c: Remove. * psxmsgq01/psxmsgq01.scn: Remove. * psxmsgq01/system.h: Remove. * psxreaddir/.cvsignore: Remove. * psxreaddir/Makefile.am: Remove. * psxreaddir/main.c: Remove. * psxreaddir/psxreaddir.scn: Remove. * psxreaddir/test.c: Remove. * psxsem01/.cvsignore: Remove. * psxsem01/Makefile.am: Remove. * psxsem01/init.c: Remove. * psxsem01/psxsem01.scn: Remove. * psxsem01/system.h: Remove. * psxstat/.cvsignore: Remove. * psxstat/Makefile.am: Remove. * psxstat/main.c: Remove. * psxstat/psxstat.scn: Remove. * psxstat/test.c: Remove. * psxtime/.cvsignore: Remove. * psxtime/Makefile.am: Remove. * psxtime/main.c: Remove. * psxtime/psxtime.scn: Remove. * psxtime/test.c: Remove. * psxtimer/.cvsignore: Remove. * psxtimer/Makefile.am: Remove. * psxtimer/psxtimer.c: Remove. * psxtimer/psxtimer.scn: Remove. * psxtimer/system.h: Remove. --- c/src/tests/psxtests/.cvsignore | 14 - c/src/tests/psxtests/ChangeLog | 708 ------------ c/src/tests/psxtests/Makefile.am | 21 - c/src/tests/psxtests/configure.ac | 58 - c/src/tests/psxtests/include/.cvsignore | 2 - c/src/tests/psxtests/include/Makefile.am | 8 - c/src/tests/psxtests/include/pmacros.h | 89 -- c/src/tests/psxtests/psx01/.cvsignore | 2 - c/src/tests/psxtests/psx01/Makefile.am | 44 - c/src/tests/psxtests/psx01/init.c | 242 ---- c/src/tests/psxtests/psx01/psx01.scn | 53 - c/src/tests/psxtests/psx01/system.h | 53 - c/src/tests/psxtests/psx01/task.c | 93 -- c/src/tests/psxtests/psx02/.cvsignore | 2 - c/src/tests/psxtests/psx02/Makefile.am | 44 - c/src/tests/psxtests/psx02/init.c | 145 --- c/src/tests/psxtests/psx02/psx02.scn | 26 - c/src/tests/psxtests/psx02/system.h | 51 - c/src/tests/psxtests/psx02/task.c | 44 - c/src/tests/psxtests/psx03/.cvsignore | 2 - c/src/tests/psxtests/psx03/Makefile.am | 44 - c/src/tests/psxtests/psx03/init.c | 203 ---- c/src/tests/psxtests/psx03/psx03.scn | 21 - c/src/tests/psxtests/psx03/system.h | 54 - c/src/tests/psxtests/psx03/task.c | 64 -- c/src/tests/psxtests/psx04/.cvsignore | 2 - c/src/tests/psxtests/psx04/Makefile.am | 44 - c/src/tests/psxtests/psx04/init.c | 558 --------- c/src/tests/psxtests/psx04/psx04.scn | 99 -- c/src/tests/psxtests/psx04/system.h | 63 -- c/src/tests/psxtests/psx04/task1.c | 43 - c/src/tests/psxtests/psx04/task2.c | 41 - c/src/tests/psxtests/psx04/task3.c | 118 -- c/src/tests/psxtests/psx05/.cvsignore | 2 - c/src/tests/psxtests/psx05/Makefile.am | 44 - c/src/tests/psxtests/psx05/init.c | 583 ---------- c/src/tests/psxtests/psx05/psx05.scn | 103 -- c/src/tests/psxtests/psx05/system.h | 65 -- c/src/tests/psxtests/psx05/task.c | 57 - c/src/tests/psxtests/psx05/task2.c | 48 - c/src/tests/psxtests/psx05/task3.c | 50 - c/src/tests/psxtests/psx06/.cvsignore | 2 - c/src/tests/psxtests/psx06/Makefile.am | 44 - c/src/tests/psxtests/psx06/init.c | 120 -- c/src/tests/psxtests/psx06/psx06.scn | 20 - c/src/tests/psxtests/psx06/system.h | 59 - c/src/tests/psxtests/psx06/task.c | 50 - c/src/tests/psxtests/psx06/task2.c | 51 - c/src/tests/psxtests/psx07/.cvsignore | 2 - c/src/tests/psxtests/psx07/Makefile.am | 44 - c/src/tests/psxtests/psx07/init.c | 493 -------- c/src/tests/psxtests/psx07/psx07.scn | 96 -- c/src/tests/psxtests/psx07/system.h | 50 - c/src/tests/psxtests/psx07/task.c | 33 - c/src/tests/psxtests/psx08/.cvsignore | 2 - c/src/tests/psxtests/psx08/Makefile.am | 44 - c/src/tests/psxtests/psx08/init.c | 97 -- c/src/tests/psxtests/psx08/psx08.scn | 22 - c/src/tests/psxtests/psx08/system.h | 60 - c/src/tests/psxtests/psx08/task1.c | 31 - c/src/tests/psxtests/psx08/task2.c | 55 - c/src/tests/psxtests/psx08/task3.c | 51 - c/src/tests/psxtests/psx09/.cvsignore | 2 - c/src/tests/psxtests/psx09/Makefile.am | 44 - c/src/tests/psxtests/psx09/init.c | 225 ---- c/src/tests/psxtests/psx09/psx09.scn | 22 - c/src/tests/psxtests/psx09/system.h | 56 - c/src/tests/psxtests/psx10/.cvsignore | 2 - c/src/tests/psxtests/psx10/Makefile.am | 44 - c/src/tests/psxtests/psx10/init.c | 311 ----- c/src/tests/psxtests/psx10/psx10.scn | 55 - c/src/tests/psxtests/psx10/system.h | 66 -- c/src/tests/psxtests/psx10/task.c | 64 -- c/src/tests/psxtests/psx10/task2.c | 46 - c/src/tests/psxtests/psx10/task3.c | 45 - c/src/tests/psxtests/psx11/.cvsignore | 2 - c/src/tests/psxtests/psx11/Makefile.am | 44 - c/src/tests/psxtests/psx11/init.c | 107 -- c/src/tests/psxtests/psx11/psx11.scn | 18 - c/src/tests/psxtests/psx11/system.h | 50 - c/src/tests/psxtests/psx11/task.c | 91 -- c/src/tests/psxtests/psx12/.cvsignore | 2 - c/src/tests/psxtests/psx12/Makefile.am | 44 - c/src/tests/psxtests/psx12/init.c | 139 --- c/src/tests/psxtests/psx12/psx12.scn | 11 - c/src/tests/psxtests/psx12/system.h | 52 - c/src/tests/psxtests/psx12/task.c | 33 - c/src/tests/psxtests/psx13/.cvsignore | 2 - c/src/tests/psxtests/psx13/Makefile.am | 41 - c/src/tests/psxtests/psx13/main.c | 45 - c/src/tests/psxtests/psx13/psx13.scn | 16 - c/src/tests/psxtests/psx13/test.c | 690 ------------ c/src/tests/psxtests/psxcancel/.cvsignore | 2 - c/src/tests/psxtests/psxcancel/Makefile.am | 44 - c/src/tests/psxtests/psxcancel/init.c | 127 --- c/src/tests/psxtests/psxcancel/psxcancel.scn | 14 - c/src/tests/psxtests/psxchroot01/.cvsignore | 2 - c/src/tests/psxtests/psxchroot01/Makefile.am | 41 - c/src/tests/psxtests/psxchroot01/main.c | 35 - c/src/tests/psxtests/psxchroot01/psxchroot01.scn | 9 - c/src/tests/psxtests/psxchroot01/test.c | 121 -- c/src/tests/psxtests/psxfile01/.cvsignore | 2 - c/src/tests/psxtests/psxfile01/Makefile.am | 41 - c/src/tests/psxtests/psxfile01/main.c | 45 - c/src/tests/psxtests/psxfile01/psxfile01.scn | 208 ---- c/src/tests/psxtests/psxfile01/test.c | 547 --------- c/src/tests/psxtests/psxfile01/test_cat.c | 83 -- c/src/tests/psxtests/psxfile01/test_extend.c | 62 - c/src/tests/psxtests/psxfile01/test_write.c | 61 - c/src/tests/psxtests/psxhdrs/.cvsignore | 2 - c/src/tests/psxtests/psxhdrs/Makefile.am | 40 - c/src/tests/psxtests/psxhdrs/clock01.c | 28 - c/src/tests/psxtests/psxhdrs/clock02.c | 28 - c/src/tests/psxtests/psxhdrs/clock03.c | 28 - c/src/tests/psxtests/psxhdrs/clock04.c | 28 - c/src/tests/psxtests/psxhdrs/clock05.c | 34 - c/src/tests/psxtests/psxhdrs/clock06.c | 31 - c/src/tests/psxtests/psxhdrs/cond01.c | 27 - c/src/tests/psxtests/psxhdrs/cond02.c | 27 - c/src/tests/psxtests/psxhdrs/cond03.c | 28 - c/src/tests/psxtests/psxhdrs/cond04.c | 27 - c/src/tests/psxtests/psxhdrs/cond05.c | 27 - c/src/tests/psxtests/psxhdrs/cond06.c | 28 - c/src/tests/psxtests/psxhdrs/cond07.c | 29 - c/src/tests/psxtests/psxhdrs/cond08.c | 31 - c/src/tests/psxtests/psxhdrs/cond09.c | 34 - c/src/tests/psxtests/psxhdrs/cond10.c | 27 - c/src/tests/psxtests/psxhdrs/key01.c | 33 - c/src/tests/psxtests/psxhdrs/key02.c | 31 - c/src/tests/psxtests/psxhdrs/key03.c | 29 - c/src/tests/psxtests/psxhdrs/key04.c | 27 - c/src/tests/psxtests/psxhdrs/mutex01.c | 27 - c/src/tests/psxtests/psxhdrs/mutex02.c | 27 - c/src/tests/psxtests/psxhdrs/mutex03.c | 28 - c/src/tests/psxtests/psxhdrs/mutex04.c | 27 - c/src/tests/psxtests/psxhdrs/mutex05.c | 27 - c/src/tests/psxtests/psxhdrs/mutex06.c | 27 - c/src/tests/psxtests/psxhdrs/mutex07.c | 35 - c/src/tests/psxtests/psxhdrs/mutex08.c | 31 - c/src/tests/psxtests/psxhdrs/mutex09.c | 31 - c/src/tests/psxtests/psxhdrs/mutex10.c | 31 - c/src/tests/psxtests/psxhdrs/mutex11.c | 34 - c/src/tests/psxtests/psxhdrs/mutex12.c | 27 - c/src/tests/psxtests/psxhdrs/mutex13.c | 31 - c/src/tests/psxtests/psxhdrs/mutex14.c | 31 - c/src/tests/psxtests/psxhdrs/mutex15.c | 31 - c/src/tests/psxtests/psxhdrs/mutex16.c | 34 - c/src/tests/psxtests/psxhdrs/proc01.c | 22 - c/src/tests/psxtests/psxhdrs/proc02.c | 22 - c/src/tests/psxtests/psxhdrs/proc03.c | 23 - c/src/tests/psxtests/psxhdrs/proc04.c | 23 - c/src/tests/psxtests/psxhdrs/proc05.c | 23 - c/src/tests/psxtests/psxhdrs/proc06.c | 23 - c/src/tests/psxtests/psxhdrs/proc07.c | 25 - c/src/tests/psxtests/psxhdrs/proc08.c | 25 - c/src/tests/psxtests/psxhdrs/proc09.c | 26 - c/src/tests/psxtests/psxhdrs/proc10.c | 22 - c/src/tests/psxtests/psxhdrs/proc11.c | 24 - c/src/tests/psxtests/psxhdrs/proc12.c | 22 - c/src/tests/psxtests/psxhdrs/proc13.c | 22 - c/src/tests/psxtests/psxhdrs/proc14.c | 24 - c/src/tests/psxtests/psxhdrs/pthread01.c | 27 - c/src/tests/psxtests/psxhdrs/pthread02.c | 27 - c/src/tests/psxtests/psxhdrs/pthread03.c | 31 - c/src/tests/psxtests/psxhdrs/pthread04.c | 28 - c/src/tests/psxtests/psxhdrs/pthread05.c | 35 - c/src/tests/psxtests/psxhdrs/pthread06.c | 32 - c/src/tests/psxtests/psxhdrs/pthread07.c | 38 - c/src/tests/psxtests/psxhdrs/pthread08.c | 26 - c/src/tests/psxtests/psxhdrs/pthread09.c | 26 - c/src/tests/psxtests/psxhdrs/pthread10.c | 28 - c/src/tests/psxtests/psxhdrs/pthread11.c | 51 - c/src/tests/psxtests/psxhdrs/pthread12.c | 31 - c/src/tests/psxtests/psxhdrs/pthread13.c | 31 - c/src/tests/psxtests/psxhdrs/pthread14.c | 28 - c/src/tests/psxtests/psxhdrs/pthread15.c | 31 - c/src/tests/psxtests/psxhdrs/pthread16.c | 28 - c/src/tests/psxtests/psxhdrs/pthread17.c | 35 - c/src/tests/psxtests/psxhdrs/pthread18.c | 28 - c/src/tests/psxtests/psxhdrs/pthread19.c | 28 - c/src/tests/psxtests/psxhdrs/pthread20.c | 28 - c/src/tests/psxtests/psxhdrs/pthread21.c | 28 - c/src/tests/psxtests/psxhdrs/pthread22.c | 49 - c/src/tests/psxtests/psxhdrs/pthread23.c | 29 - c/src/tests/psxtests/psxhdrs/pthread24.c | 35 - c/src/tests/psxtests/psxhdrs/pthread25.c | 33 - c/src/tests/psxtests/psxhdrs/pthread26.c | 30 - c/src/tests/psxtests/psxhdrs/pthread27.c | 31 - c/src/tests/psxtests/psxhdrs/pthread28.c | 32 - c/src/tests/psxtests/psxhdrs/pthread29.c | 35 - c/src/tests/psxtests/psxhdrs/pthread30.c | 35 - c/src/tests/psxtests/psxhdrs/pthread31.c | 28 - c/src/tests/psxtests/psxhdrs/pthread32.c | 34 - c/src/tests/psxtests/psxhdrs/pthread33.c | 24 - c/src/tests/psxtests/psxhdrs/pthread34.c | 30 - c/src/tests/psxtests/psxhdrs/pthread35.c | 31 - c/src/tests/psxtests/psxhdrs/pthread36.c | 28 - c/src/tests/psxtests/psxhdrs/sched01.c | 43 - c/src/tests/psxtests/psxhdrs/sched02.c | 30 - c/src/tests/psxtests/psxhdrs/sched03.c | 51 - c/src/tests/psxtests/psxhdrs/sched04.c | 29 - c/src/tests/psxtests/psxhdrs/sched05.c | 26 - c/src/tests/psxtests/psxhdrs/sched06.c | 34 - c/src/tests/psxtests/psxhdrs/sched07.c | 34 - c/src/tests/psxtests/psxhdrs/sched08.c | 30 - c/src/tests/psxtests/psxhdrs/signal01.c | 26 - c/src/tests/psxtests/psxhdrs/signal02.c | 26 - c/src/tests/psxtests/psxhdrs/signal03.c | 23 - c/src/tests/psxtests/psxhdrs/signal04.c | 26 - c/src/tests/psxtests/psxhdrs/signal05.c | 23 - c/src/tests/psxtests/psxhdrs/signal06.c | 38 - c/src/tests/psxtests/psxhdrs/signal07.c | 31 - c/src/tests/psxtests/psxhdrs/signal08.c | 33 - c/src/tests/psxtests/psxhdrs/signal09.c | 28 - c/src/tests/psxtests/psxhdrs/signal10.c | 24 - c/src/tests/psxtests/psxhdrs/signal11.c | 25 - c/src/tests/psxtests/psxhdrs/signal12.c | 25 - c/src/tests/psxtests/psxhdrs/signal13.c | 31 - c/src/tests/psxtests/psxhdrs/signal14.c | 25 - c/src/tests/psxtests/psxhdrs/signal15.c | 25 - c/src/tests/psxtests/psxhdrs/signal16.c | 35 - c/src/tests/psxtests/psxhdrs/signal17.c | 26 - c/src/tests/psxtests/psxhdrs/signal18.c | 27 - c/src/tests/psxtests/psxhdrs/signal19.c | 26 - c/src/tests/psxtests/psxhdrs/signal20.c | 25 - c/src/tests/psxtests/psxhdrs/signal21.c | 22 - c/src/tests/psxtests/psxhdrs/signal22.c | 25 - c/src/tests/psxtests/psxhdrs/signal23.c | 28 - c/src/tests/psxtests/psxhdrs/sync01.c | 24 - c/src/tests/psxtests/psxhdrs/sync02.c | 24 - c/src/tests/psxtests/psxhdrs/sync03.c | 20 - c/src/tests/psxtests/psxhdrs/time01.c | 22 - c/src/tests/psxtests/psxhdrs/time02.c | 27 - c/src/tests/psxtests/psxhdrs/time03.c | 33 - c/src/tests/psxtests/psxhdrs/time04.c | 22 - c/src/tests/psxtests/psxhdrs/time05.c | 27 - c/src/tests/psxtests/psxhdrs/time06.c | 23 - c/src/tests/psxtests/psxhdrs/time07.c | 23 - c/src/tests/psxtests/psxhdrs/time08.c | 23 - c/src/tests/psxtests/psxhdrs/time09.c | 23 - c/src/tests/psxtests/psxhdrs/time10.c | 24 - c/src/tests/psxtests/psxhdrs/time11.c | 24 - c/src/tests/psxtests/psxhdrs/time12.c | 24 - c/src/tests/psxtests/psxhdrs/time13.c | 24 - c/src/tests/psxtests/psxhdrs/timer01.c | 36 - c/src/tests/psxtests/psxhdrs/timer02.c | 27 - c/src/tests/psxtests/psxhdrs/timer03.c | 38 - c/src/tests/psxtests/psxhdrs/timer04.c | 28 - c/src/tests/psxtests/psxhdrs/timer05.c | 27 - c/src/tests/psxtests/psxhdrs/timer06.c | 30 - c/src/tests/psxtests/psxhdrs/timer07.c | 24 - c/src/tests/psxtests/psxmount/.cvsignore | 2 - c/src/tests/psxtests/psxmount/Makefile.am | 41 - c/src/tests/psxtests/psxmount/main.c | 37 - c/src/tests/psxtests/psxmount/psxmount.scn | 86 -- c/src/tests/psxtests/psxmount/test.c | 447 -------- c/src/tests/psxtests/psxmsgq01/.cvsignore | 2 - c/src/tests/psxtests/psxmsgq01/Makefile.am | 44 - c/src/tests/psxtests/psxmsgq01/init.c | 1315 ---------------------- c/src/tests/psxtests/psxmsgq01/psxmsgq01.scn | 116 -- c/src/tests/psxtests/psxmsgq01/system.h | 75 -- c/src/tests/psxtests/psxreaddir/.cvsignore | 2 - c/src/tests/psxtests/psxreaddir/Makefile.am | 41 - c/src/tests/psxtests/psxreaddir/main.c | 35 - c/src/tests/psxtests/psxreaddir/psxreaddir.scn | 236 ---- c/src/tests/psxtests/psxreaddir/test.c | 503 --------- c/src/tests/psxtests/psxsem01/.cvsignore | 2 - c/src/tests/psxtests/psxsem01/Makefile.am | 44 - c/src/tests/psxtests/psxsem01/init.c | 246 ---- c/src/tests/psxtests/psxsem01/psxsem01.scn | 37 - c/src/tests/psxtests/psxsem01/system.h | 55 - c/src/tests/psxtests/psxstat/.cvsignore | 2 - c/src/tests/psxtests/psxstat/Makefile.am | 41 - c/src/tests/psxtests/psxstat/main.c | 46 - c/src/tests/psxtests/psxstat/psxstat.scn | 1199 -------------------- c/src/tests/psxtests/psxstat/test.c | 857 -------------- c/src/tests/psxtests/psxtests.am | 25 - c/src/tests/psxtests/psxtime/.cvsignore | 2 - c/src/tests/psxtests/psxtime/Makefile.am | 39 - c/src/tests/psxtests/psxtime/main.c | 42 - c/src/tests/psxtests/psxtime/psxtime.scn | 302 ----- c/src/tests/psxtests/psxtime/test.c | 115 -- c/src/tests/psxtests/psxtimer/.cvsignore | 2 - c/src/tests/psxtests/psxtimer/Makefile.am | 44 - c/src/tests/psxtests/psxtimer/psxtimer.c | 340 ------ c/src/tests/psxtests/psxtimer/psxtimer.scn | 37 - c/src/tests/psxtests/psxtimer/system.h | 64 -- 287 files changed, 19824 deletions(-) delete mode 100644 c/src/tests/psxtests/.cvsignore delete mode 100644 c/src/tests/psxtests/ChangeLog delete mode 100644 c/src/tests/psxtests/Makefile.am delete mode 100644 c/src/tests/psxtests/configure.ac delete mode 100644 c/src/tests/psxtests/include/.cvsignore delete mode 100644 c/src/tests/psxtests/include/Makefile.am delete mode 100644 c/src/tests/psxtests/include/pmacros.h delete mode 100644 c/src/tests/psxtests/psx01/.cvsignore delete mode 100644 c/src/tests/psxtests/psx01/Makefile.am delete mode 100644 c/src/tests/psxtests/psx01/init.c delete mode 100644 c/src/tests/psxtests/psx01/psx01.scn delete mode 100644 c/src/tests/psxtests/psx01/system.h delete mode 100644 c/src/tests/psxtests/psx01/task.c delete mode 100644 c/src/tests/psxtests/psx02/.cvsignore delete mode 100644 c/src/tests/psxtests/psx02/Makefile.am delete mode 100644 c/src/tests/psxtests/psx02/init.c delete mode 100644 c/src/tests/psxtests/psx02/psx02.scn delete mode 100644 c/src/tests/psxtests/psx02/system.h delete mode 100644 c/src/tests/psxtests/psx02/task.c delete mode 100644 c/src/tests/psxtests/psx03/.cvsignore delete mode 100644 c/src/tests/psxtests/psx03/Makefile.am delete mode 100644 c/src/tests/psxtests/psx03/init.c delete mode 100644 c/src/tests/psxtests/psx03/psx03.scn delete mode 100644 c/src/tests/psxtests/psx03/system.h delete mode 100644 c/src/tests/psxtests/psx03/task.c delete mode 100644 c/src/tests/psxtests/psx04/.cvsignore delete mode 100644 c/src/tests/psxtests/psx04/Makefile.am delete mode 100644 c/src/tests/psxtests/psx04/init.c delete mode 100644 c/src/tests/psxtests/psx04/psx04.scn delete mode 100644 c/src/tests/psxtests/psx04/system.h delete mode 100644 c/src/tests/psxtests/psx04/task1.c delete mode 100644 c/src/tests/psxtests/psx04/task2.c delete mode 100644 c/src/tests/psxtests/psx04/task3.c delete mode 100644 c/src/tests/psxtests/psx05/.cvsignore delete mode 100644 c/src/tests/psxtests/psx05/Makefile.am delete mode 100644 c/src/tests/psxtests/psx05/init.c delete mode 100644 c/src/tests/psxtests/psx05/psx05.scn delete mode 100644 c/src/tests/psxtests/psx05/system.h delete mode 100644 c/src/tests/psxtests/psx05/task.c delete mode 100644 c/src/tests/psxtests/psx05/task2.c delete mode 100644 c/src/tests/psxtests/psx05/task3.c delete mode 100644 c/src/tests/psxtests/psx06/.cvsignore delete mode 100644 c/src/tests/psxtests/psx06/Makefile.am delete mode 100644 c/src/tests/psxtests/psx06/init.c delete mode 100644 c/src/tests/psxtests/psx06/psx06.scn delete mode 100644 c/src/tests/psxtests/psx06/system.h delete mode 100644 c/src/tests/psxtests/psx06/task.c delete mode 100644 c/src/tests/psxtests/psx06/task2.c delete mode 100644 c/src/tests/psxtests/psx07/.cvsignore delete mode 100644 c/src/tests/psxtests/psx07/Makefile.am delete mode 100644 c/src/tests/psxtests/psx07/init.c delete mode 100644 c/src/tests/psxtests/psx07/psx07.scn delete mode 100644 c/src/tests/psxtests/psx07/system.h delete mode 100644 c/src/tests/psxtests/psx07/task.c delete mode 100644 c/src/tests/psxtests/psx08/.cvsignore delete mode 100644 c/src/tests/psxtests/psx08/Makefile.am delete mode 100644 c/src/tests/psxtests/psx08/init.c delete mode 100644 c/src/tests/psxtests/psx08/psx08.scn delete mode 100644 c/src/tests/psxtests/psx08/system.h delete mode 100644 c/src/tests/psxtests/psx08/task1.c delete mode 100644 c/src/tests/psxtests/psx08/task2.c delete mode 100644 c/src/tests/psxtests/psx08/task3.c delete mode 100644 c/src/tests/psxtests/psx09/.cvsignore delete mode 100644 c/src/tests/psxtests/psx09/Makefile.am delete mode 100644 c/src/tests/psxtests/psx09/init.c delete mode 100644 c/src/tests/psxtests/psx09/psx09.scn delete mode 100644 c/src/tests/psxtests/psx09/system.h delete mode 100644 c/src/tests/psxtests/psx10/.cvsignore delete mode 100644 c/src/tests/psxtests/psx10/Makefile.am delete mode 100644 c/src/tests/psxtests/psx10/init.c delete mode 100644 c/src/tests/psxtests/psx10/psx10.scn delete mode 100644 c/src/tests/psxtests/psx10/system.h delete mode 100644 c/src/tests/psxtests/psx10/task.c delete mode 100644 c/src/tests/psxtests/psx10/task2.c delete mode 100644 c/src/tests/psxtests/psx10/task3.c delete mode 100644 c/src/tests/psxtests/psx11/.cvsignore delete mode 100644 c/src/tests/psxtests/psx11/Makefile.am delete mode 100644 c/src/tests/psxtests/psx11/init.c delete mode 100644 c/src/tests/psxtests/psx11/psx11.scn delete mode 100644 c/src/tests/psxtests/psx11/system.h delete mode 100644 c/src/tests/psxtests/psx11/task.c delete mode 100644 c/src/tests/psxtests/psx12/.cvsignore delete mode 100644 c/src/tests/psxtests/psx12/Makefile.am delete mode 100644 c/src/tests/psxtests/psx12/init.c delete mode 100644 c/src/tests/psxtests/psx12/psx12.scn delete mode 100644 c/src/tests/psxtests/psx12/system.h delete mode 100644 c/src/tests/psxtests/psx12/task.c delete mode 100644 c/src/tests/psxtests/psx13/.cvsignore delete mode 100644 c/src/tests/psxtests/psx13/Makefile.am delete mode 100644 c/src/tests/psxtests/psx13/main.c delete mode 100644 c/src/tests/psxtests/psx13/psx13.scn delete mode 100644 c/src/tests/psxtests/psx13/test.c delete mode 100644 c/src/tests/psxtests/psxcancel/.cvsignore delete mode 100644 c/src/tests/psxtests/psxcancel/Makefile.am delete mode 100644 c/src/tests/psxtests/psxcancel/init.c delete mode 100644 c/src/tests/psxtests/psxcancel/psxcancel.scn delete mode 100644 c/src/tests/psxtests/psxchroot01/.cvsignore delete mode 100644 c/src/tests/psxtests/psxchroot01/Makefile.am delete mode 100644 c/src/tests/psxtests/psxchroot01/main.c delete mode 100644 c/src/tests/psxtests/psxchroot01/psxchroot01.scn delete mode 100644 c/src/tests/psxtests/psxchroot01/test.c delete mode 100644 c/src/tests/psxtests/psxfile01/.cvsignore delete mode 100644 c/src/tests/psxtests/psxfile01/Makefile.am delete mode 100644 c/src/tests/psxtests/psxfile01/main.c delete mode 100644 c/src/tests/psxtests/psxfile01/psxfile01.scn delete mode 100644 c/src/tests/psxtests/psxfile01/test.c delete mode 100644 c/src/tests/psxtests/psxfile01/test_cat.c delete mode 100644 c/src/tests/psxtests/psxfile01/test_extend.c delete mode 100644 c/src/tests/psxtests/psxfile01/test_write.c delete mode 100644 c/src/tests/psxtests/psxhdrs/.cvsignore delete mode 100644 c/src/tests/psxtests/psxhdrs/Makefile.am delete mode 100644 c/src/tests/psxtests/psxhdrs/clock01.c delete mode 100644 c/src/tests/psxtests/psxhdrs/clock02.c delete mode 100644 c/src/tests/psxtests/psxhdrs/clock03.c delete mode 100644 c/src/tests/psxtests/psxhdrs/clock04.c delete mode 100644 c/src/tests/psxtests/psxhdrs/clock05.c delete mode 100644 c/src/tests/psxtests/psxhdrs/clock06.c delete mode 100644 c/src/tests/psxtests/psxhdrs/cond01.c delete mode 100644 c/src/tests/psxtests/psxhdrs/cond02.c delete mode 100644 c/src/tests/psxtests/psxhdrs/cond03.c delete mode 100644 c/src/tests/psxtests/psxhdrs/cond04.c delete mode 100644 c/src/tests/psxtests/psxhdrs/cond05.c delete mode 100644 c/src/tests/psxtests/psxhdrs/cond06.c delete mode 100644 c/src/tests/psxtests/psxhdrs/cond07.c delete mode 100644 c/src/tests/psxtests/psxhdrs/cond08.c delete mode 100644 c/src/tests/psxtests/psxhdrs/cond09.c delete mode 100644 c/src/tests/psxtests/psxhdrs/cond10.c delete mode 100644 c/src/tests/psxtests/psxhdrs/key01.c delete mode 100644 c/src/tests/psxtests/psxhdrs/key02.c delete mode 100644 c/src/tests/psxtests/psxhdrs/key03.c delete mode 100644 c/src/tests/psxtests/psxhdrs/key04.c delete mode 100644 c/src/tests/psxtests/psxhdrs/mutex01.c delete mode 100644 c/src/tests/psxtests/psxhdrs/mutex02.c delete mode 100644 c/src/tests/psxtests/psxhdrs/mutex03.c delete mode 100644 c/src/tests/psxtests/psxhdrs/mutex04.c delete mode 100644 c/src/tests/psxtests/psxhdrs/mutex05.c delete mode 100644 c/src/tests/psxtests/psxhdrs/mutex06.c delete mode 100644 c/src/tests/psxtests/psxhdrs/mutex07.c delete mode 100644 c/src/tests/psxtests/psxhdrs/mutex08.c delete mode 100644 c/src/tests/psxtests/psxhdrs/mutex09.c delete mode 100644 c/src/tests/psxtests/psxhdrs/mutex10.c delete mode 100644 c/src/tests/psxtests/psxhdrs/mutex11.c delete mode 100644 c/src/tests/psxtests/psxhdrs/mutex12.c delete mode 100644 c/src/tests/psxtests/psxhdrs/mutex13.c delete mode 100644 c/src/tests/psxtests/psxhdrs/mutex14.c delete mode 100644 c/src/tests/psxtests/psxhdrs/mutex15.c delete mode 100644 c/src/tests/psxtests/psxhdrs/mutex16.c delete mode 100644 c/src/tests/psxtests/psxhdrs/proc01.c delete mode 100644 c/src/tests/psxtests/psxhdrs/proc02.c delete mode 100644 c/src/tests/psxtests/psxhdrs/proc03.c delete mode 100644 c/src/tests/psxtests/psxhdrs/proc04.c delete mode 100644 c/src/tests/psxtests/psxhdrs/proc05.c delete mode 100644 c/src/tests/psxtests/psxhdrs/proc06.c delete mode 100644 c/src/tests/psxtests/psxhdrs/proc07.c delete mode 100644 c/src/tests/psxtests/psxhdrs/proc08.c delete mode 100644 c/src/tests/psxtests/psxhdrs/proc09.c delete mode 100644 c/src/tests/psxtests/psxhdrs/proc10.c delete mode 100644 c/src/tests/psxtests/psxhdrs/proc11.c delete mode 100644 c/src/tests/psxtests/psxhdrs/proc12.c delete mode 100644 c/src/tests/psxtests/psxhdrs/proc13.c delete mode 100644 c/src/tests/psxtests/psxhdrs/proc14.c delete mode 100644 c/src/tests/psxtests/psxhdrs/pthread01.c delete mode 100644 c/src/tests/psxtests/psxhdrs/pthread02.c delete mode 100644 c/src/tests/psxtests/psxhdrs/pthread03.c delete mode 100644 c/src/tests/psxtests/psxhdrs/pthread04.c delete mode 100644 c/src/tests/psxtests/psxhdrs/pthread05.c delete mode 100644 c/src/tests/psxtests/psxhdrs/pthread06.c delete mode 100644 c/src/tests/psxtests/psxhdrs/pthread07.c delete mode 100644 c/src/tests/psxtests/psxhdrs/pthread08.c delete mode 100644 c/src/tests/psxtests/psxhdrs/pthread09.c delete mode 100644 c/src/tests/psxtests/psxhdrs/pthread10.c delete mode 100644 c/src/tests/psxtests/psxhdrs/pthread11.c delete mode 100644 c/src/tests/psxtests/psxhdrs/pthread12.c delete mode 100644 c/src/tests/psxtests/psxhdrs/pthread13.c delete mode 100644 c/src/tests/psxtests/psxhdrs/pthread14.c delete mode 100644 c/src/tests/psxtests/psxhdrs/pthread15.c delete mode 100644 c/src/tests/psxtests/psxhdrs/pthread16.c delete mode 100644 c/src/tests/psxtests/psxhdrs/pthread17.c delete mode 100644 c/src/tests/psxtests/psxhdrs/pthread18.c delete mode 100644 c/src/tests/psxtests/psxhdrs/pthread19.c delete mode 100644 c/src/tests/psxtests/psxhdrs/pthread20.c delete mode 100644 c/src/tests/psxtests/psxhdrs/pthread21.c delete mode 100644 c/src/tests/psxtests/psxhdrs/pthread22.c delete mode 100644 c/src/tests/psxtests/psxhdrs/pthread23.c delete mode 100644 c/src/tests/psxtests/psxhdrs/pthread24.c delete mode 100644 c/src/tests/psxtests/psxhdrs/pthread25.c delete mode 100644 c/src/tests/psxtests/psxhdrs/pthread26.c delete mode 100644 c/src/tests/psxtests/psxhdrs/pthread27.c delete mode 100644 c/src/tests/psxtests/psxhdrs/pthread28.c delete mode 100644 c/src/tests/psxtests/psxhdrs/pthread29.c delete mode 100644 c/src/tests/psxtests/psxhdrs/pthread30.c delete mode 100644 c/src/tests/psxtests/psxhdrs/pthread31.c delete mode 100644 c/src/tests/psxtests/psxhdrs/pthread32.c delete mode 100644 c/src/tests/psxtests/psxhdrs/pthread33.c delete mode 100644 c/src/tests/psxtests/psxhdrs/pthread34.c delete mode 100644 c/src/tests/psxtests/psxhdrs/pthread35.c delete mode 100644 c/src/tests/psxtests/psxhdrs/pthread36.c delete mode 100644 c/src/tests/psxtests/psxhdrs/sched01.c delete mode 100644 c/src/tests/psxtests/psxhdrs/sched02.c delete mode 100644 c/src/tests/psxtests/psxhdrs/sched03.c delete mode 100644 c/src/tests/psxtests/psxhdrs/sched04.c delete mode 100644 c/src/tests/psxtests/psxhdrs/sched05.c delete mode 100644 c/src/tests/psxtests/psxhdrs/sched06.c delete mode 100644 c/src/tests/psxtests/psxhdrs/sched07.c delete mode 100644 c/src/tests/psxtests/psxhdrs/sched08.c delete mode 100644 c/src/tests/psxtests/psxhdrs/signal01.c delete mode 100644 c/src/tests/psxtests/psxhdrs/signal02.c delete mode 100644 c/src/tests/psxtests/psxhdrs/signal03.c delete mode 100644 c/src/tests/psxtests/psxhdrs/signal04.c delete mode 100644 c/src/tests/psxtests/psxhdrs/signal05.c delete mode 100644 c/src/tests/psxtests/psxhdrs/signal06.c delete mode 100644 c/src/tests/psxtests/psxhdrs/signal07.c delete mode 100644 c/src/tests/psxtests/psxhdrs/signal08.c delete mode 100644 c/src/tests/psxtests/psxhdrs/signal09.c delete mode 100644 c/src/tests/psxtests/psxhdrs/signal10.c delete mode 100644 c/src/tests/psxtests/psxhdrs/signal11.c delete mode 100644 c/src/tests/psxtests/psxhdrs/signal12.c delete mode 100644 c/src/tests/psxtests/psxhdrs/signal13.c delete mode 100644 c/src/tests/psxtests/psxhdrs/signal14.c delete mode 100644 c/src/tests/psxtests/psxhdrs/signal15.c delete mode 100644 c/src/tests/psxtests/psxhdrs/signal16.c delete mode 100644 c/src/tests/psxtests/psxhdrs/signal17.c delete mode 100644 c/src/tests/psxtests/psxhdrs/signal18.c delete mode 100644 c/src/tests/psxtests/psxhdrs/signal19.c delete mode 100644 c/src/tests/psxtests/psxhdrs/signal20.c delete mode 100644 c/src/tests/psxtests/psxhdrs/signal21.c delete mode 100644 c/src/tests/psxtests/psxhdrs/signal22.c delete mode 100644 c/src/tests/psxtests/psxhdrs/signal23.c delete mode 100644 c/src/tests/psxtests/psxhdrs/sync01.c delete mode 100644 c/src/tests/psxtests/psxhdrs/sync02.c delete mode 100644 c/src/tests/psxtests/psxhdrs/sync03.c delete mode 100644 c/src/tests/psxtests/psxhdrs/time01.c delete mode 100644 c/src/tests/psxtests/psxhdrs/time02.c delete mode 100644 c/src/tests/psxtests/psxhdrs/time03.c delete mode 100644 c/src/tests/psxtests/psxhdrs/time04.c delete mode 100644 c/src/tests/psxtests/psxhdrs/time05.c delete mode 100644 c/src/tests/psxtests/psxhdrs/time06.c delete mode 100644 c/src/tests/psxtests/psxhdrs/time07.c delete mode 100644 c/src/tests/psxtests/psxhdrs/time08.c delete mode 100644 c/src/tests/psxtests/psxhdrs/time09.c delete mode 100644 c/src/tests/psxtests/psxhdrs/time10.c delete mode 100644 c/src/tests/psxtests/psxhdrs/time11.c delete mode 100644 c/src/tests/psxtests/psxhdrs/time12.c delete mode 100644 c/src/tests/psxtests/psxhdrs/time13.c delete mode 100644 c/src/tests/psxtests/psxhdrs/timer01.c delete mode 100644 c/src/tests/psxtests/psxhdrs/timer02.c delete mode 100644 c/src/tests/psxtests/psxhdrs/timer03.c delete mode 100644 c/src/tests/psxtests/psxhdrs/timer04.c delete mode 100644 c/src/tests/psxtests/psxhdrs/timer05.c delete mode 100644 c/src/tests/psxtests/psxhdrs/timer06.c delete mode 100644 c/src/tests/psxtests/psxhdrs/timer07.c delete mode 100644 c/src/tests/psxtests/psxmount/.cvsignore delete mode 100644 c/src/tests/psxtests/psxmount/Makefile.am delete mode 100644 c/src/tests/psxtests/psxmount/main.c delete mode 100644 c/src/tests/psxtests/psxmount/psxmount.scn delete mode 100644 c/src/tests/psxtests/psxmount/test.c delete mode 100644 c/src/tests/psxtests/psxmsgq01/.cvsignore delete mode 100644 c/src/tests/psxtests/psxmsgq01/Makefile.am delete mode 100644 c/src/tests/psxtests/psxmsgq01/init.c delete mode 100644 c/src/tests/psxtests/psxmsgq01/psxmsgq01.scn delete mode 100644 c/src/tests/psxtests/psxmsgq01/system.h delete mode 100644 c/src/tests/psxtests/psxreaddir/.cvsignore delete mode 100644 c/src/tests/psxtests/psxreaddir/Makefile.am delete mode 100644 c/src/tests/psxtests/psxreaddir/main.c delete mode 100644 c/src/tests/psxtests/psxreaddir/psxreaddir.scn delete mode 100644 c/src/tests/psxtests/psxreaddir/test.c delete mode 100644 c/src/tests/psxtests/psxsem01/.cvsignore delete mode 100644 c/src/tests/psxtests/psxsem01/Makefile.am delete mode 100644 c/src/tests/psxtests/psxsem01/init.c delete mode 100644 c/src/tests/psxtests/psxsem01/psxsem01.scn delete mode 100644 c/src/tests/psxtests/psxsem01/system.h delete mode 100644 c/src/tests/psxtests/psxstat/.cvsignore delete mode 100644 c/src/tests/psxtests/psxstat/Makefile.am delete mode 100644 c/src/tests/psxtests/psxstat/main.c delete mode 100644 c/src/tests/psxtests/psxstat/psxstat.scn delete mode 100644 c/src/tests/psxtests/psxstat/test.c delete mode 100644 c/src/tests/psxtests/psxtests.am delete mode 100644 c/src/tests/psxtests/psxtime/.cvsignore delete mode 100644 c/src/tests/psxtests/psxtime/Makefile.am delete mode 100644 c/src/tests/psxtests/psxtime/main.c delete mode 100644 c/src/tests/psxtests/psxtime/psxtime.scn delete mode 100644 c/src/tests/psxtests/psxtime/test.c delete mode 100644 c/src/tests/psxtests/psxtimer/.cvsignore delete mode 100644 c/src/tests/psxtests/psxtimer/Makefile.am delete mode 100644 c/src/tests/psxtests/psxtimer/psxtimer.c delete mode 100644 c/src/tests/psxtests/psxtimer/psxtimer.scn delete mode 100644 c/src/tests/psxtests/psxtimer/system.h (limited to 'c/src/tests/psxtests') diff --git a/c/src/tests/psxtests/.cvsignore b/c/src/tests/psxtests/.cvsignore deleted file mode 100644 index bfdfd995be..0000000000 --- a/c/src/tests/psxtests/.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/psxtests/ChangeLog b/c/src/tests/psxtests/ChangeLog deleted file mode 100644 index 92c8ceb2bf..0000000000 --- a/c/src/tests/psxtests/ChangeLog +++ /dev/null @@ -1,708 +0,0 @@ -2003-11-10 Ralf Corsepius - - * .cvsignore: Remove. - * ChangeLog: Remove. - * Makefile.am: Remove. - * configure.ac: Remove. - * psxtests.am: Remove. - * include/.cvsignore: Remove. - * include/Makefile.am: Remove. - * include/pmacros.h: Remove. - * psx01/.cvsignore: Remove. - * psx01/Makefile.am: Remove. - * psx01/init.c: Remove. - * psx01/psx01.scn: Remove. - * psx01/system.h: Remove. - * psx01/task.c: Remove. - * psx02/.cvsignore: Remove. - * psx02/Makefile.am: Remove. - * psx02/init.c: Remove. - * psx02/psx02.scn: Remove. - * psx02/system.h: Remove. - * psx02/task.c: Remove. - * psx03/.cvsignore: Remove. - * psx03/Makefile.am: Remove. - * psx03/init.c: Remove. - * psx03/psx03.scn: Remove. - * psx03/system.h: Remove. - * psx03/task.c: Remove. - * psx04/.cvsignore: Remove. - * psx04/Makefile.am: Remove. - * psx04/init.c: Remove. - * psx04/psx04.scn: Remove. - * psx04/system.h: Remove. - * psx04/task1.c: Remove. - * psx04/task2.c: Remove. - * psx04/task3.c: Remove. - * psx05/.cvsignore: Remove. - * psx05/Makefile.am: Remove. - * psx05/init.c: Remove. - * psx05/psx05.scn: Remove. - * psx05/system.h: Remove. - * psx05/task.c: Remove. - * psx05/task2.c: Remove. - * psx05/task3.c: Remove. - * psx06/.cvsignore: Remove. - * psx06/Makefile.am: Remove. - * psx06/init.c: Remove. - * psx06/psx06.scn: Remove. - * psx06/system.h: Remove. - * psx06/task.c: Remove. - * psx06/task2.c: Remove. - * psx07/.cvsignore: Remove. - * psx07/Makefile.am: Remove. - * psx07/init.c: Remove. - * psx07/psx07.scn: Remove. - * psx07/system.h: Remove. - * psx07/task.c: Remove. - * psx08/.cvsignore: Remove. - * psx08/Makefile.am: Remove. - * psx08/init.c: Remove. - * psx08/psx08.scn: Remove. - * psx08/system.h: Remove. - * psx08/task1.c: Remove. - * psx08/task2.c: Remove. - * psx08/task3.c: Remove. - * psx09/.cvsignore: Remove. - * psx09/Makefile.am: Remove. - * psx09/init.c: Remove. - * psx09/psx09.scn: Remove. - * psx09/system.h: Remove. - * psx10/.cvsignore: Remove. - * psx10/Makefile.am: Remove. - * psx10/init.c: Remove. - * psx10/psx10.scn: Remove. - * psx10/system.h: Remove. - * psx10/task.c: Remove. - * psx10/task2.c: Remove. - * psx10/task3.c: Remove. - * psx11/.cvsignore: Remove. - * psx11/Makefile.am: Remove. - * psx11/init.c: Remove. - * psx11/psx11.scn: Remove. - * psx11/system.h: Remove. - * psx11/task.c: Remove. - * psx12/.cvsignore: Remove. - * psx12/Makefile.am: Remove. - * psx12/init.c: Remove. - * psx12/psx12.scn: Remove. - * psx12/system.h: Remove. - * psx12/task.c: Remove. - * psx13/.cvsignore: Remove. - * psx13/Makefile.am: Remove. - * psx13/main.c: Remove. - * psx13/psx13.scn: Remove. - * psx13/test.c: Remove. - * psxcancel/.cvsignore: Remove. - * psxcancel/Makefile.am: Remove. - * psxcancel/init.c: Remove. - * psxcancel/psxcancel.scn: Remove. - * psxchroot01/.cvsignore: Remove. - * psxchroot01/Makefile.am: Remove. - * psxchroot01/main.c: Remove. - * psxchroot01/psxchroot01.scn: Remove. - * psxchroot01/test.c: Remove. - * psxfile01/.cvsignore: Remove. - * psxfile01/Makefile.am: Remove. - * psxfile01/main.c: Remove. - * psxfile01/psxfile01.scn: Remove. - * psxfile01/test.c: Remove. - * psxfile01/test_cat.c: Remove. - * psxfile01/test_extend.c: Remove. - * psxfile01/test_write.c: Remove. - * psxhdrs/.cvsignore: Remove. - * psxhdrs/Makefile.am: Remove. - * psxhdrs/clock01.c: Remove. - * psxhdrs/clock02.c: Remove. - * psxhdrs/clock03.c: Remove. - * psxhdrs/clock04.c: Remove. - * psxhdrs/clock05.c: Remove. - * psxhdrs/clock06.c: Remove. - * psxhdrs/cond01.c: Remove. - * psxhdrs/cond02.c: Remove. - * psxhdrs/cond03.c: Remove. - * psxhdrs/cond04.c: Remove. - * psxhdrs/cond05.c: Remove. - * psxhdrs/cond06.c: Remove. - * psxhdrs/cond07.c: Remove. - * psxhdrs/cond08.c: Remove. - * psxhdrs/cond09.c: Remove. - * psxhdrs/cond10.c: Remove. - * psxhdrs/key01.c: Remove. - * psxhdrs/key02.c: Remove. - * psxhdrs/key03.c: Remove. - * psxhdrs/key04.c: Remove. - * psxhdrs/mutex01.c: Remove. - * psxhdrs/mutex02.c: Remove. - * psxhdrs/mutex03.c: Remove. - * psxhdrs/mutex04.c: Remove. - * psxhdrs/mutex05.c: Remove. - * psxhdrs/mutex06.c: Remove. - * psxhdrs/mutex07.c: Remove. - * psxhdrs/mutex08.c: Remove. - * psxhdrs/mutex09.c: Remove. - * psxhdrs/mutex10.c: Remove. - * psxhdrs/mutex11.c: Remove. - * psxhdrs/mutex12.c: Remove. - * psxhdrs/mutex13.c: Remove. - * psxhdrs/mutex14.c: Remove. - * psxhdrs/mutex15.c: Remove. - * psxhdrs/mutex16.c: Remove. - * psxhdrs/proc01.c: Remove. - * psxhdrs/proc02.c: Remove. - * psxhdrs/proc03.c: Remove. - * psxhdrs/proc04.c: Remove. - * psxhdrs/proc05.c: Remove. - * psxhdrs/proc06.c: Remove. - * psxhdrs/proc07.c: Remove. - * psxhdrs/proc08.c: Remove. - * psxhdrs/proc09.c: Remove. - * psxhdrs/proc10.c: Remove. - * psxhdrs/proc11.c: Remove. - * psxhdrs/proc12.c: Remove. - * psxhdrs/proc13.c: Remove. - * psxhdrs/proc14.c: Remove. - * psxhdrs/pthread01.c: Remove. - * psxhdrs/pthread02.c: Remove. - * psxhdrs/pthread03.c: Remove. - * psxhdrs/pthread04.c: Remove. - * psxhdrs/pthread05.c: Remove. - * psxhdrs/pthread06.c: Remove. - * psxhdrs/pthread07.c: Remove. - * psxhdrs/pthread08.c: Remove. - * psxhdrs/pthread09.c: Remove. - * psxhdrs/pthread10.c: Remove. - * psxhdrs/pthread11.c: Remove. - * psxhdrs/pthread12.c: Remove. - * psxhdrs/pthread13.c: Remove. - * psxhdrs/pthread14.c: Remove. - * psxhdrs/pthread15.c: Remove. - * psxhdrs/pthread16.c: Remove. - * psxhdrs/pthread17.c: Remove. - * psxhdrs/pthread18.c: Remove. - * psxhdrs/pthread19.c: Remove. - * psxhdrs/pthread20.c: Remove. - * psxhdrs/pthread21.c: Remove. - * psxhdrs/pthread22.c: Remove. - * psxhdrs/pthread23.c: Remove. - * psxhdrs/pthread24.c: Remove. - * psxhdrs/pthread25.c: Remove. - * psxhdrs/pthread26.c: Remove. - * psxhdrs/pthread27.c: Remove. - * psxhdrs/pthread28.c: Remove. - * psxhdrs/pthread29.c: Remove. - * psxhdrs/pthread30.c: Remove. - * psxhdrs/pthread31.c: Remove. - * psxhdrs/pthread32.c: Remove. - * psxhdrs/pthread33.c: Remove. - * psxhdrs/pthread34.c: Remove. - * psxhdrs/pthread35.c: Remove. - * psxhdrs/pthread36.c: Remove. - * psxhdrs/sched01.c: Remove. - * psxhdrs/sched02.c: Remove. - * psxhdrs/sched03.c: Remove. - * psxhdrs/sched04.c: Remove. - * psxhdrs/sched05.c: Remove. - * psxhdrs/sched06.c: Remove. - * psxhdrs/sched07.c: Remove. - * psxhdrs/sched08.c: Remove. - * psxhdrs/signal01.c: Remove. - * psxhdrs/signal02.c: Remove. - * psxhdrs/signal03.c: Remove. - * psxhdrs/signal04.c: Remove. - * psxhdrs/signal05.c: Remove. - * psxhdrs/signal06.c: Remove. - * psxhdrs/signal07.c: Remove. - * psxhdrs/signal08.c: Remove. - * psxhdrs/signal09.c: Remove. - * psxhdrs/signal10.c: Remove. - * psxhdrs/signal11.c: Remove. - * psxhdrs/signal12.c: Remove. - * psxhdrs/signal13.c: Remove. - * psxhdrs/signal14.c: Remove. - * psxhdrs/signal15.c: Remove. - * psxhdrs/signal16.c: Remove. - * psxhdrs/signal17.c: Remove. - * psxhdrs/signal18.c: Remove. - * psxhdrs/signal19.c: Remove. - * psxhdrs/signal20.c: Remove. - * psxhdrs/signal21.c: Remove. - * psxhdrs/signal22.c: Remove. - * psxhdrs/signal23.c: Remove. - * psxhdrs/sync01.c: Remove. - * psxhdrs/sync02.c: Remove. - * psxhdrs/sync03.c: Remove. - * psxhdrs/time01.c: Remove. - * psxhdrs/time02.c: Remove. - * psxhdrs/time03.c: Remove. - * psxhdrs/time04.c: Remove. - * psxhdrs/time05.c: Remove. - * psxhdrs/time06.c: Remove. - * psxhdrs/time07.c: Remove. - * psxhdrs/time08.c: Remove. - * psxhdrs/time09.c: Remove. - * psxhdrs/time10.c: Remove. - * psxhdrs/time11.c: Remove. - * psxhdrs/time12.c: Remove. - * psxhdrs/time13.c: Remove. - * psxhdrs/timer01.c: Remove. - * psxhdrs/timer02.c: Remove. - * psxhdrs/timer03.c: Remove. - * psxhdrs/timer04.c: Remove. - * psxhdrs/timer05.c: Remove. - * psxhdrs/timer06.c: Remove. - * psxhdrs/timer07.c: Remove. - * psxmount/.cvsignore: Remove. - * psxmount/Makefile.am: Remove. - * psxmount/main.c: Remove. - * psxmount/psxmount.scn: Remove. - * psxmount/test.c: Remove. - * psxmsgq01/.cvsignore: Remove. - * psxmsgq01/Makefile.am: Remove. - * psxmsgq01/init.c: Remove. - * psxmsgq01/psxmsgq01.scn: Remove. - * psxmsgq01/system.h: Remove. - * psxreaddir/.cvsignore: Remove. - * psxreaddir/Makefile.am: Remove. - * psxreaddir/main.c: Remove. - * psxreaddir/psxreaddir.scn: Remove. - * psxreaddir/test.c: Remove. - * psxsem01/.cvsignore: Remove. - * psxsem01/Makefile.am: Remove. - * psxsem01/init.c: Remove. - * psxsem01/psxsem01.scn: Remove. - * psxsem01/system.h: Remove. - * psxstat/.cvsignore: Remove. - * psxstat/Makefile.am: Remove. - * psxstat/main.c: Remove. - * psxstat/psxstat.scn: Remove. - * psxstat/test.c: Remove. - * psxtime/.cvsignore: Remove. - * psxtime/Makefile.am: Remove. - * psxtime/main.c: Remove. - * psxtime/psxtime.scn: Remove. - * psxtime/test.c: Remove. - * psxtimer/.cvsignore: Remove. - * psxtimer/Makefile.am: Remove. - * psxtimer/psxtimer.c: Remove. - * psxtimer/psxtimer.scn: Remove. - * psxtimer/system.h: Remove. - -2003-10-22 Ralf Corsepius - - * configure.ac: Remove RTEMS_CANONICAL_HOST. - -2003-10-02 Ralf Corsepius - - * configure.ac:Remove RTEMS_CHECK_CPU. - -2003-09-15 Jennifer Averett - - * psxhdrs/sync01.c, psxhdrs/sync02.c: Correct fd creation - -2003-09-04 Joel Sherrill - - * psx01/init.c, psx01/system.h, psx01/task.c, psx02/init.c, - psx02/system.h, psx02/task.c, psx03/init.c, psx03/system.h, - psx03/task.c, psx04/init.c, psx04/system.h, psx04/task1.c, - psx04/task2.c, psx04/task3.c, psx05/init.c, psx05/system.h, - psx05/task.c, psx05/task2.c, psx05/task3.c, psx06/init.c, - psx06/system.h, psx06/task.c, psx06/task2.c, psx07/init.c, - psx07/system.h, psx07/task.c, psx08/init.c, psx08/system.h, - psx08/task1.c, psx08/task2.c, psx08/task3.c, psx09/init.c, - psx09/system.h, psx10/init.c, psx10/system.h, psx10/task.c, - psx10/task2.c, psx10/task3.c, psx11/init.c, psx11/system.h, - psx11/task.c, psx12/init.c, psx12/system.h, psx12/task.c, - psx13/main.c, psx13/test.c, psxcancel/init.c, psxfile01/main.c, - psxfile01/test.c, psxhdrs/clock01.c, psxhdrs/clock02.c, - psxhdrs/clock03.c, psxhdrs/clock04.c, psxhdrs/clock05.c, - psxhdrs/clock06.c, psxhdrs/cond01.c, psxhdrs/cond02.c, - psxhdrs/cond03.c, psxhdrs/cond04.c, psxhdrs/cond05.c, - psxhdrs/cond06.c, psxhdrs/cond07.c, psxhdrs/cond08.c, - psxhdrs/cond09.c, psxhdrs/cond10.c, psxhdrs/key01.c, psxhdrs/key02.c, - psxhdrs/key03.c, psxhdrs/key04.c, psxhdrs/mutex01.c, - psxhdrs/mutex02.c, psxhdrs/mutex03.c, psxhdrs/mutex04.c, - psxhdrs/mutex05.c, psxhdrs/mutex06.c, psxhdrs/mutex07.c, - psxhdrs/mutex08.c, psxhdrs/mutex09.c, psxhdrs/mutex10.c, - psxhdrs/mutex11.c, psxhdrs/mutex12.c, psxhdrs/mutex13.c, - psxhdrs/mutex14.c, psxhdrs/mutex15.c, psxhdrs/mutex16.c, - psxhdrs/proc01.c, psxhdrs/proc02.c, psxhdrs/proc03.c, - psxhdrs/proc04.c, psxhdrs/proc05.c, psxhdrs/proc06.c, - psxhdrs/proc07.c, psxhdrs/proc08.c, psxhdrs/proc09.c, - psxhdrs/proc10.c, psxhdrs/proc11.c, psxhdrs/proc12.c, - psxhdrs/proc13.c, psxhdrs/proc14.c, psxhdrs/pthread01.c, - psxhdrs/pthread02.c, psxhdrs/pthread03.c, psxhdrs/pthread04.c, - psxhdrs/pthread05.c, psxhdrs/pthread06.c, psxhdrs/pthread07.c, - psxhdrs/pthread08.c, psxhdrs/pthread09.c, psxhdrs/pthread10.c, - psxhdrs/pthread11.c, psxhdrs/pthread12.c, psxhdrs/pthread13.c, - psxhdrs/pthread14.c, psxhdrs/pthread15.c, psxhdrs/pthread16.c, - psxhdrs/pthread17.c, psxhdrs/pthread18.c, psxhdrs/pthread19.c, - psxhdrs/pthread20.c, psxhdrs/pthread21.c, psxhdrs/pthread22.c, - psxhdrs/pthread23.c, psxhdrs/pthread24.c, psxhdrs/pthread25.c, - psxhdrs/pthread26.c, psxhdrs/pthread27.c, psxhdrs/pthread28.c, - psxhdrs/pthread29.c, psxhdrs/pthread30.c, psxhdrs/pthread31.c, - psxhdrs/pthread32.c, psxhdrs/pthread33.c, psxhdrs/pthread34.c, - psxhdrs/pthread35.c, psxhdrs/pthread36.c, psxhdrs/sched01.c, - psxhdrs/sched02.c, psxhdrs/sched03.c, psxhdrs/sched04.c, - psxhdrs/sched05.c, psxhdrs/sched06.c, psxhdrs/sched07.c, - psxhdrs/sched08.c, psxhdrs/signal01.c, psxhdrs/signal02.c, - psxhdrs/signal03.c, psxhdrs/signal04.c, psxhdrs/signal05.c, - psxhdrs/signal06.c, psxhdrs/signal07.c, psxhdrs/signal08.c, - psxhdrs/signal09.c, psxhdrs/signal10.c, psxhdrs/signal11.c, - psxhdrs/signal12.c, psxhdrs/signal13.c, psxhdrs/signal14.c, - psxhdrs/signal15.c, psxhdrs/signal16.c, psxhdrs/signal17.c, - psxhdrs/signal18.c, psxhdrs/signal19.c, psxhdrs/signal20.c, - psxhdrs/signal21.c, psxhdrs/signal22.c, psxhdrs/signal23.c, - psxhdrs/sync01.c, psxhdrs/sync02.c, psxhdrs/sync03.c, - psxhdrs/time01.c, psxhdrs/time02.c, psxhdrs/time03.c, - psxhdrs/time04.c, psxhdrs/time05.c, psxhdrs/time06.c, - psxhdrs/time07.c, psxhdrs/time08.c, psxhdrs/time09.c, - psxhdrs/time10.c, psxhdrs/time11.c, psxhdrs/time12.c, - psxhdrs/time13.c, psxhdrs/timer01.c, psxhdrs/timer02.c, - psxhdrs/timer03.c, psxhdrs/timer04.c, psxhdrs/timer05.c, - psxhdrs/timer06.c, psxhdrs/timer07.c, psxmsgq01/init.c, - psxmsgq01/system.h, psxsem01/system.h, psxstat/main.c, - psxstat/test.c, psxtime/main.c, psxtime/test.c, psxtimer/psxtimer.c, - psxtimer/system.h: URL for license changed. - -2003-09-04 Joel Sherrill - - PR 462/tests - * psxhdrs/Makefile.am: Added ualarm.c - * psxhdrs/signal23.c: New file. - -2003-09-03 Joel Sherrill - - PR 463/tests - PR 465/tests - * psxhdrs/Makefile.am: Add new test cases. - * psxhdrs/sync01.c, psxhdrs/sync02.c, psxhdrs/sync03.c, - psxhdrs/timer07.c: New files. - -2003-08-18 Ralf Corsepius - - * Makefile.am: Reflect having moved aclocal/. - -2003-08-16 Ralf Corsepius - - * Makefile.am: Reflect having moved automake/. - * include/Makefile.am: Reflect having moved automake/. - * psx01/Makefile.am: Reflect having moved automake/. - * psx02/Makefile.am: Reflect having moved automake/. - * psx03/Makefile.am: Reflect having moved automake/. - * psx04/Makefile.am: Reflect having moved automake/. - * psx05/Makefile.am: Reflect having moved automake/. - * psx06/Makefile.am: Reflect having moved automake/. - * psx07/Makefile.am: Reflect having moved automake/. - * psx08/Makefile.am: Reflect having moved automake/. - * psx09/Makefile.am: Reflect having moved automake/. - * psx10/Makefile.am: Reflect having moved automake/. - * psx11/Makefile.am: Reflect having moved automake/. - * psx12/Makefile.am: Reflect having moved automake/. - * psx13/Makefile.am: Reflect having moved automake/. - * psxcancel/Makefile.am: Reflect having moved automake/. - * psxchroot01/Makefile.am: Reflect having moved automake/. - * psxfile01/Makefile.am: Reflect having moved automake/. - * psxhdrs/Makefile.am: Reflect having moved automake/. - * psxmount/Makefile.am: Reflect having moved automake/. - * psxmsgq01/Makefile.am: Reflect having moved automake/. - * psxreaddir/Makefile.am: Reflect having moved automake/. - * psxsem01/Makefile.am: Reflect having moved automake/. - * psxstat/Makefile.am: Reflect having moved automake/. - * psxtime/Makefile.am: Reflect having moved automake/. - * psxtimer/Makefile.am: Reflect having moved automake/. - -2003-08-14 Joel Sherrill - - PR 408/filesystem - * psx13/test.c: Added very rudimentary test of sync() service. - -2003-08-11 Ralf Corsepius - - * configure.ac: Use rtems-bugs@rtems.com as bug report email address. - -2003-06-12 Joel Sherrill - - * psxchroot01/test.c, psxreaddir/test.c: Removed warnings. - -2003-05-29 Joel Sherrill - - * psx02/init.c, psx04/init.c, psx13/test.c, psxchroot01/test.c, - psxhdrs/pthread07.c, psxmsgq01/init.c, psxreaddir/test.c, - psxtimer/psxtimer.c: Removed warnings. - -2003-05-27 Ralf Corsepius - - * configure.ac: Remove CC_CFLAGS_DEBUG_V. - CC_CFLAGS_DEFAULT (obsolete). - -2003-05-27 Ralf Corsepius - - * configure.ac: Remove CC_CFLAGS_PROFILE_V. - Remove CC_LDFLAGS_PROFILE_V. - -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). - -2002-11-14 Joel Sherrill - - * psx01/psx01.scn, psx02/psx02.scn, psx03/psx03.scn, psx04/psx04.scn, - psx05/psx05.scn, psx06/psx06.scn, psx07/psx07.scn, psx08/psx08.scn, - psx09/psx09.scn, psx10/psx10.scn, psx11/psx11.scn, psx12/psx12.scn: - Per PR239 update the IDs in the various screens. - -2002-10-21 Ralf Corsepius - - * .cvsignore: Reformat. - Add autom4te*cache. - Remove autom4te.cache. - -2002-08-11 Ralf Corsepius - - * psx01/Makefile.am: Use .$(OBJEXT) instead of .o. - * psx02/Makefile.am: Use .$(OBJEXT) instead of .o. - * psx03/Makefile.am: Use .$(OBJEXT) instead of .o. - * psx04/Makefile.am: Use .$(OBJEXT) instead of .o. - * psx05/Makefile.am: Use .$(OBJEXT) instead of .o. - * psx06/Makefile.am: Use .$(OBJEXT) instead of .o. - * psx07/Makefile.am: Use .$(OBJEXT) instead of .o. - * psx08/Makefile.am: Use .$(OBJEXT) instead of .o. - * psx09/Makefile.am: Use .$(OBJEXT) instead of .o. - * psx10/Makefile.am: Use .$(OBJEXT) instead of .o. - * psx11/Makefile.am: Use .$(OBJEXT) instead of .o. - * psx12/Makefile.am: Use .$(OBJEXT) instead of .o. - * psx13/Makefile.am: Use .$(OBJEXT) instead of .o. - * psxcancel/Makefile.am: Use .$(OBJEXT) instead of .o. - * psxchroot01/Makefile.am: Use .$(OBJEXT) instead of .o. - * psxfile01/Makefile.am: Use .$(OBJEXT) instead of .o. - * psxhdrs/Makefile.am: Use .$(OBJEXT) instead of .o. - * psxmount/Makefile.am: Use .$(OBJEXT) instead of .o. - * psxmsgq01/Makefile.am: Use .$(OBJEXT) instead of .o. - * psxreaddir/Makefile.am: Use .$(OBJEXT) instead of .o. - * psxsem01/Makefile.am: Use .$(OBJEXT) instead of .o. - * psxstat/Makefile.am: Use .$(OBJEXT) instead of .o. - * psxtime/Makefile.am: Use .$(OBJEXT) instead of .o. - * psxtimer/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. - * include/pmacros.h, psx01/task.c, psx02/init.c, psx02/task.c, - psx03/init.c, psx04/init.c, psx05/init.c, psx06/init.c, psx07/init.c, - psx08/task3.c, psx09/init.c, psx10/init.c, psx11/init.c, - psx12/init.c, psx13/Makefile.am, psx13/main.c, psx13/test.c, - psxcancel/init.c, psxchroot01/Makefile.am, psxchroot01/main.c, - psxchroot01/test.c, psxfile01/Makefile.am, psxfile01/main.c, - psxfile01/test.c, psxfile01/test_cat.c, psxfile01/test_extend.c, - psxfile01/test_write.c, psxmount/Makefile.am, psxmount/main.c, - psxmount/test.c, psxmsgq01/init.c, psxreaddir/Makefile.am, - psxreaddir/main.c, psxreaddir/test.c, psxsem01/init.c, - psxstat/Makefile.am, psxstat/main.c, psxstat/test.c, psxtime/main.c, - psxtime/test.c, psxtimer/psxtimer.c: Modified. - -2002-07-05 Joel Sherrill - - * psxcancel/Makefile.am, psxcancel/init.c, psxcancel/psxcancel.scn: - Updated as part of PR164 which reported problems with the RTEMS - implementation of pthread_cancel. - -2001-04-26 Joel Sherrill - - * psxmsgq01/init.c: Reflect changes made to address PR81 that - reworked POSIX message queues to add a descriptor separate from - the underlying message queue. This allows non-blocking to follow - the "open" not the underlying queue. - -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]). - * Makefile.am: Remove AUTOMAKE_OPTIONS. - * include/Makefile.am: Remove AUTOMAKE_OPTIONS. - * psx01/Makefile.am: Remove AUTOMAKE_OPTIONS. - * psx02/Makefile.am: Remove AUTOMAKE_OPTIONS. - * psx03/Makefile.am: Remove AUTOMAKE_OPTIONS. - * psx04/Makefile.am: Remove AUTOMAKE_OPTIONS. - * psx05/Makefile.am: Remove AUTOMAKE_OPTIONS. - * psx06/Makefile.am: Remove AUTOMAKE_OPTIONS. - * psx07/Makefile.am: Remove AUTOMAKE_OPTIONS. - * psx08/Makefile.am: Remove AUTOMAKE_OPTIONS. - * psx09/Makefile.am: Remove AUTOMAKE_OPTIONS. - * psx10/Makefile.am: Remove AUTOMAKE_OPTIONS. - * psx11/Makefile.am: Remove AUTOMAKE_OPTIONS. - * psx12/Makefile.am: Remove AUTOMAKE_OPTIONS. - * psx13/Makefile.am: Remove AUTOMAKE_OPTIONS. - * psxcancel/Makefile.am: Remove AUTOMAKE_OPTIONS. - * psxchroot01/Makefile.am: Remove AUTOMAKE_OPTIONS. - * psxfile01/Makefile.am: Remove AUTOMAKE_OPTIONS. - * psxhdrs/Makefile.am: Remove AUTOMAKE_OPTIONS. - * psxmount/Makefile.am: Remove AUTOMAKE_OPTIONS. - * psxmsgq01/Makefile.am: Remove AUTOMAKE_OPTIONS. - * psxreaddir/Makefile.am: Remove AUTOMAKE_OPTIONS. - * psxsem01/Makefile.am: Remove AUTOMAKE_OPTIONS. - * psxstat/Makefile.am: Remove AUTOMAKE_OPTIONS. - * psxtime/Makefile.am: Remove AUTOMAKE_OPTIONS. - * psxtimer/Makefile.am: Remove AUTOMAKE_OPTIONS. - -2001-11-07 Jennifer Averett - - Reported by Ibragimov Ilya and tracked as PR63. - * psxstat/test.c: Fix test ENOTDIR to correspond to chdir() change. - Since we check permissions before evaluating enough to see if it - a regular file or directory, this hack is needed to make the regular - file executable. - -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 - - * psxtests.am: Use TMPINSTALL_FILES = to make automake-1.5 happy. - -2001-09-19 Ralf Corsepius - - * psx01/Makefile.am: include leaf.am instead of leaf.cfg. - * psx11/Makefile.am: include leaf.am instead of leaf.cfg. - * psxcancel/Makefile.am: include leaf.am instead of leaf.cfg. - * psx02/Makefile.am: include leaf.am instead of leaf.cfg. - * psx13/Makefile.am: include leaf.am instead of leaf.cfg. - * psxtime/Makefile.am: include leaf.am instead of leaf.cfg. - * psxchroot01/Makefile.am: include leaf.am instead of leaf.cfg. - * psx07/Makefile.am: include leaf.am instead of leaf.cfg. - * psxmsgq01/Makefile.am: include leaf.am instead of leaf.cfg. - * psxtimer/Makefile.am: include leaf.am instead of leaf.cfg. - * psx10/Makefile.am: include leaf.am instead of leaf.cfg. - * psx08/Makefile.am: include leaf.am instead of leaf.cfg. - * psxhdrs/Makefile.am: include leaf.am instead of leaf.cfg. - * psxfile01/Makefile.am: include leaf.am instead of leaf.cfg. - * psx05/Makefile.am: include leaf.am instead of leaf.cfg. - * psx09/Makefile.am: include leaf.am instead of leaf.cfg. - * psxmount/Makefile.am: include leaf.am instead of leaf.cfg. - * psxstat/Makefile.am: include leaf.am instead of leaf.cfg. - * psx12/Makefile.am: include leaf.am instead of leaf.cfg. - * psxreaddir/Makefile.am: include leaf.am instead of leaf.cfg. - * psxsem01/Makefile.am: include leaf.am instead of leaf.cfg. - * psx03/Makefile.am: include leaf.am instead of leaf.cfg. - * psx04/Makefile.am: include leaf.am instead of leaf.cfg. - * psx06/Makefile.am: include leaf.am instead of leaf.cfg. - -2001-08-09 Fernando-Ruiz Casas - - * psxchroot01/.cvsignore, psxchroot01/Makefile.am, psxchroot01/main.c, - psxchroot01/psxchroot01.scn, psxchroot01/test.c: Implemented the - psxchroot01 test. - -2001-05-25 Joel Sherrill - - * Added once version of psxchroot01 test for user review. - * psxchroot01: New directory. - * psxchroot01/Makefile.am, psxchroot01/main.c, psxchroot01/test.c, - psxchroot01/psxchroot01.scn, psxchroot01/.cvsignore: New files. - * configure.in, Makefile.am: Modified to reflect above. - -2001-05-10 Ralf Corsepius - - * configure.in: Use RTEMS_PROG_CC_FOR_TARGET([-ansi -fasm]). - -2001-04-24 Joel Sherrill - - * psxfile01/test.c, psxfile01/psxfile01.scn : Added test case for - open, write, reopen, append twice from Andrew Bythell - that tripped an initialization - problem in the IMFS. - -2001-04-20 Joel Sherrill - - * psx04/init.c, psx04/psx04.scn, psx07/init.c, psx07/psx07.scn, - psxfile01/psxfile01.scn, psxmsgq01/psxmsgq01.scn, - psxreaddir/test.c, psxstat/psxstat.scn, psxstat/test.c, - psxtime/psxtime.scn, psxtimer/psxtimer.scn: - Various adjustments so test output matches screens more reliably. - -2001-01-25 Joel Sherrill - - * psx01/psx01.scn: Corrected to reflect clock_getres() now working. - -2000-11-17 Jennifer Averett - - * psxstat/test.c, psxstat/psxstat.scn: Forced inode numbers - to remain consistant across platforms and bsps by forcing - a mount point in front of all paths. - -2000-11-17 Jennifer Averret - - * psxmount/test.c, psxmount/psxmount.scn: Improve output to report - expected error condition in one case. - * psxreaddir/test.c, psxreaddir.scn: Added test cases to exercise - readdir() of root of mounted filesystem. Also corrected the screen - file for some mistakes noticed in this effort. - -2000-11-13 Joel Sherrill - - * psxmount/psxmount.scn, psxmount/test.c: Correct spelling. - -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-27 Ralf Corsepius - - * Makefile.am: ACLOCAL_AMFLAGS= -I $(RTEMS_TOPdir)/macros. - Switch to GNU canonicalization. - * psxtests.am: Remove DEFS. - -2000-10-24 Joel Sherrill - - * psxmount/test.c, psxstat/test.c: Include to get IMFS_ops. - It was formerly incorrectly prototyped in . - -2000-09-04 Ralf Corsepius - - * psx01/Makefile.am, psx02/Makefile.am, psx03/Makefile.am, - psx04/Makefile.am, psx05/Makefile.am, psx06/Makefile.am, - psx07/Makefile.am, psx08/Makefile.am, psx09/Makefile.am, - psx10/Makefile.am, psx11/Makefile.am, psx12/Makefile.am, - psx13/Makefile.am, psxcancel/Makefile.am, psxfile01/Makefile.am, - psxhdrs/Makefile.am, psxmount/Makefile.am, psxmsgq01/Makefile.am, - psxreaddir/Makefile.am, psxsem01/Makefile.am, psxstat/Makefile.am, - psxtime/Makefile.am, psxtimer/Makefile.am: Include compile.am - -2000-08-31 Ralf Corsepius - * psx01/Makefile.am, psx02/Makefile.am, psx03/Makefile.am, - psx04/Makefile.am, psx05/Makefile.am, psx06/Makefile.am, - psx07/Makefile.am, psx08/Makefile.am, psx09/Makefile.am, - psx10/Makefile.am, psx11/Makefile.am, psx11/Makefile.am, - psx12/Makefile.am, psxcancel/Makefile.am, psxmsgq01/Makefile.am, - psxsem01/Makefile.am, psxsem01/Makefile.am, psxtimer/Makefile.am: - Use AM_CPPFLAGS += instead of AM_CPPFLAGS = - -2000-08-10 Joel Sherrill - - * ChangeLog: New file. diff --git a/c/src/tests/psxtests/Makefile.am b/c/src/tests/psxtests/Makefile.am deleted file mode 100644 index 15690ca154..0000000000 --- a/c/src/tests/psxtests/Makefile.am +++ /dev/null @@ -1,21 +0,0 @@ -## -## $Id$ -## - -ACLOCAL_AMFLAGS = -I ../aclocal - -SHARED_DIRS = - -POSIX_DIRS = include psxhdrs psx01 psx02 psx03 psx04 psx05 psx06 psx07 psx08 \ - psx09 psx10 psx11 psx12 psxtime psxtimer psxcancel psxmsgq01 psxsem01 - -POSIX_FILES_DIRS = psxfile01 psxreaddir psxstat psxmount psx13 psxchroot01 - -UNUSED_DIRS = - -SUBDIRS = $(SHARED_DIRS) $(POSIX_DIRS) $(POSIX_FILES_DIRS) $(UNUSED_DIRS) - -EXTRA_DIST = psxtests.am - -include $(top_srcdir)/../automake/subdirs.am -include $(top_srcdir)/../automake/local.am diff --git a/c/src/tests/psxtests/configure.ac b/c/src/tests/psxtests/configure.ac deleted file mode 100644 index 6a3238d251..0000000000 --- a/c/src/tests/psxtests/configure.ac +++ /dev/null @@ -1,58 +0,0 @@ -## Process this file with autoconf to produce a configure script. -## -## $Id$ - -AC_PREREQ(2.57) -AC_INIT([rtems-c-src-tests-psxtests],[_RTEMS_VERSION],[rtems-bugs@rtems.com]) -AC_CONFIG_SRCDIR([psx01]) -RTEMS_TOP(../../../..) - -RTEMS_CANONICAL_TARGET_CPU - -AM_INIT_AUTOMAKE([no-define foreign 1.7.2]) -AM_MAINTAINER_MODE - -RTEMS_ENABLE_BARE - -RTEMS_ENV_RTEMSBSP - -RTEMS_PROJECT_ROOT - -RTEMS_PROG_CC_FOR_TARGET([-ansi -fasm]) - -RTEMS_CANONICALIZE_TOOLS - -RTEMS_CHECK_CUSTOM_BSP(RTEMS_BSP) - -AC_SUBST(BARE_CPU_CFLAGS) -AC_SUBST(BARE_CPU_MODEL) - -# Explicitly list all Makefiles here -AC_CONFIG_FILES([Makefile -include/Makefile -psx01/Makefile -psx02/Makefile -psx03/Makefile -psx04/Makefile -psx05/Makefile -psx06/Makefile -psx07/Makefile -psx08/Makefile -psx09/Makefile -psx10/Makefile -psx11/Makefile -psx12/Makefile -psx13/Makefile -psxcancel/Makefile -psxchroot01/Makefile -psxfile01/Makefile -psxhdrs/Makefile -psxmount/Makefile -psxmsgq01/Makefile -psxreaddir/Makefile -psxsem01/Makefile -psxstat/Makefile -psxtime/Makefile -psxtimer/Makefile -]) -AC_OUTPUT diff --git a/c/src/tests/psxtests/include/.cvsignore b/c/src/tests/psxtests/include/.cvsignore deleted file mode 100644 index 282522db03..0000000000 --- a/c/src/tests/psxtests/include/.cvsignore +++ /dev/null @@ -1,2 +0,0 @@ -Makefile -Makefile.in diff --git a/c/src/tests/psxtests/include/Makefile.am b/c/src/tests/psxtests/include/Makefile.am deleted file mode 100644 index a838fddb15..0000000000 --- a/c/src/tests/psxtests/include/Makefile.am +++ /dev/null @@ -1,8 +0,0 @@ -## -## $Id$ -## - - -noinst_HEADERS = pmacros.h - -include $(top_srcdir)/../automake/local.am diff --git a/c/src/tests/psxtests/include/pmacros.h b/c/src/tests/psxtests/include/pmacros.h deleted file mode 100644 index 0338038d51..0000000000 --- a/c/src/tests/psxtests/include/pmacros.h +++ /dev/null @@ -1,89 +0,0 @@ -/* - * $Id$ - */ - -#ifndef __POSIX_TEST_MACROS_h -#define __POSIX_TEST_MACROS_h - -#include -#include -#include -#include -#include -#include -#include - -#include - -/* - * These help manipulate the "struct tm" form of time - */ - -#define TM_SUNDAY 0 -#define TM_MONDAY 1 -#define TM_TUESDAY 2 -#define TM_WEDNESDAY 3 -#define TM_THURSDAY 4 -#define TM_FRIDAY 5 -#define TM_SATURDAY 6 - -#define TM_JANUARY 0 -#define TM_FEBRUARY 1 -#define TM_MARCH 2 -#define TM_APRIL 3 -#define TM_MAY 4 -#define TM_JUNE 5 -#define TM_JULY 6 -#define TM_AUGUST 7 -#define TM_SEPTEMBER 8 -#define TM_OCTOBER 10 -#define TM_NOVEMBER 12 -#define TM_DECEMBER 12 - -#ifndef build_time -#define build_time( TM, WEEKDAY, MON, DAY, YR, HR, MIN, SEC ) \ - { (TM)->tm_year = YR; \ - (TM)->tm_mon = MON; \ - (TM)->tm_mday = DAY; \ - (TM)->tm_wday = WEEKDAY; \ - (TM)->tm_hour = HR; \ - (TM)->tm_min = MIN; \ - (TM)->tm_sec = SEC; } -#endif - -#define set_time( WEEKDAY, MON, DAY, YR, HR, MIN, SEC ) \ - do { \ - struct tm tm; \ - struct timespec tv; \ - int status; \ - \ - build_time( &tm, WEEKDAY, MON, DAY, YR, HR, MIN, SEC ); \ - \ - tv.tv_sec = mktime( &tm ); \ - tv.tv_nsec = 0; \ - assert( tv.tv_sec != -1 ); \ - \ - status = clock_settime( CLOCK_REALTIME, &tv ); \ - assert( !status ); \ - } while ( 0 ) - -#define print_current_time(s1, s2) \ - do { \ - char _time_buffer[32]; \ - int _status; \ - struct timespec _tv; \ - \ - _status = clock_gettime( CLOCK_REALTIME, &_tv ); \ - assert( !_status ); \ - \ - (void) ctime_r( &_tv.tv_sec, _time_buffer ); \ - _time_buffer[ strlen( _time_buffer ) - 1 ] = 0; \ - printf( "%s%s%s\n", s1, _time_buffer, s2 ); \ - fflush(stdout); \ - } while ( 0 ) - -#define empty_line() puts( "" ) - -#endif - -/* end of file */ diff --git a/c/src/tests/psxtests/psx01/.cvsignore b/c/src/tests/psxtests/psx01/.cvsignore deleted file mode 100644 index 282522db03..0000000000 --- a/c/src/tests/psxtests/psx01/.cvsignore +++ /dev/null @@ -1,2 +0,0 @@ -Makefile -Makefile.in diff --git a/c/src/tests/psxtests/psx01/Makefile.am b/c/src/tests/psxtests/psx01/Makefile.am deleted file mode 100644 index acac58e29a..0000000000 --- a/c/src/tests/psxtests/psx01/Makefile.am +++ /dev/null @@ -1,44 +0,0 @@ -## -## $Id$ -## - - -TEST = psx01 - -MANAGERS = all - -C_FILES = init.c task.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/psx01/init.c b/c/src/tests/psxtests/psx01/init.c deleted file mode 100644 index a436e51b52..0000000000 --- a/c/src/tests/psxtests/psx01/init.c +++ /dev/null @@ -1,242 +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 -#include - -void *POSIX_Init( - void *argument -) -{ - struct timespec tv; - struct timespec tr; - int status; - int priority; - pthread_t thread_id; - time_t seconds; - time_t seconds1; - time_t remaining; - struct tm tm; - struct utsname uts; - - puts( "\n\n*** POSIX TEST 1 ***" ); - - build_time( &tm, TM_FRIDAY, TM_MAY, 24, 96, 11, 5, 0 ); - - /* print some system information */ - - puts( "Init: uname - EFAULT (invalid uts pointer argument)" ); - status = uname( NULL ); - assert( status == -1 ); - assert( errno == EFAULT ); - - status = uname( &uts ); - assert( !status ); - printf( "Init: uts.sysname: %s\n", uts.sysname ); - printf( "Init: uts.nodename: %s\n", uts.nodename ); - printf( "Init: uts.release: %s\n", uts.release ); - printf( "Init: uts.version: %s\n", uts.version ); - printf( "Init: uts.machine: %s\n", uts.machine ); - puts(""); - - /* error cases in clock_gettime and clock_settime */ - - puts( "Init: clock_gettime - EINVAL (invalid clockid)" ); - status = clock_settime( -1, &tv ); - assert( status == -1 ); - assert( errno == EINVAL ); - - puts( "Init: clock_settime - EINVAL (invalid clockid)" ); - status = clock_settime( -1, &tv ); - assert( status == -1 ); - assert( errno == EINVAL ); - - /* exercise clock_getres */ - - puts( "Init: clock_getres - EINVAL (invalid clockid)" ); - status = clock_getres( -1, &tv ); - assert( status == -1 ); - assert( errno == EINVAL ); - - puts( "Init: clock_getres - EINVAL (NULL resolution)" ); - status = clock_getres( CLOCK_REALTIME, NULL ); - assert( status == -1 ); - assert( errno == EINVAL ); - - puts( "Init: clock_getres - SUCCESSFUL" ); - status = clock_getres( CLOCK_REALTIME, &tv ); - printf( "Init: resolution = sec (%ld), nsec (%ld)\n", tv.tv_sec, tv.tv_nsec ); - assert( !status ); - - /* set the time of day, and print our buffer in multiple ways */ - - tv.tv_sec = mktime( &tm ); - assert( tv.tv_sec != -1 ); - - tv.tv_nsec = 0; - - /* now set the time of day */ - - empty_line(); - - printf( asctime( &tm ) ); - puts( "Init: clock_settime - SUCCESSFUL" ); - status = clock_settime( CLOCK_REALTIME, &tv ); - assert( !status ); - - printf( asctime( &tm ) ); - printf( ctime( &tv.tv_sec ) ); - - /* use sleep to delay */ - - remaining = sleep( 3 ); - assert( !remaining ); - - /* print new times to make sure it has changed and we can get the realtime */ - - status = clock_gettime( CLOCK_REALTIME, &tv ); - assert( !status ); - - printf( ctime( &tv.tv_sec ) ); - - seconds = time( NULL ); - printf( ctime( &seconds ) ); - - /* just to have the value copied out through the parameter */ - - seconds = time( &seconds1 ); - assert( seconds == seconds1 ); - - /* check the time remaining */ - - printf( "Init: seconds remaining (%d)\n", (int)remaining ); - assert( !remaining ); - - /* error cases in nanosleep */ - - empty_line(); - puts( "Init: nanosleep - EINVAL (NULL time)" ); - status = nanosleep ( NULL, &tr ); - assert( status == -1 ); - assert( errno == EINVAL ); - - tv.tv_sec = 0; - tv.tv_nsec = TOD_NANOSECONDS_PER_SECOND * 2; - puts( "Init: nanosleep - EINVAL (too many nanoseconds)" ); - status = nanosleep ( &tv, &tr ); - assert( status == -1 ); - assert( errno == EINVAL ); - - /* this is actually a small delay or yield */ - tv.tv_sec = -1; - tv.tv_nsec = 0; - puts( "Init: nanosleep - negative seconds small delay " ); - status = nanosleep ( &tv, &tr ); - assert( !status ); - - /* use nanosleep to yield */ - - tv.tv_sec = 0; - tv.tv_nsec = 0; - - puts( "Init: nanosleep - yield" ); - status = nanosleep ( &tv, &tr ); - assert( !status ); - assert( !tr.tv_sec ); - assert( !tr.tv_nsec ); - - /* use nanosleep to delay */ - - tv.tv_sec = 3; - tv.tv_nsec = 500000; - - puts( "Init: nanosleep - 3.05 seconds" ); - status = nanosleep ( &tv, &tr ); - assert( !status ); - - /* print the current real time again */ - - status = clock_gettime( CLOCK_REALTIME, &tv ); - assert( !status ); - - printf( ctime( &tv.tv_sec ) ); - - /* check the time remaining */ - - printf( "Init: sec (%ld), nsec (%ld) remaining\n", tr.tv_sec, tr.tv_nsec ); - assert( !tr.tv_sec && !tr.tv_nsec ); - - /* get id of this thread */ - - Init_id = pthread_self(); - printf( "Init: ID is 0x%08x\n", Init_id ); - - /* exercise get minimum priority */ - - priority = sched_get_priority_min( SCHED_FIFO ); - printf( "Init: sched_get_priority_min (SCHED_FIFO) -- %d\n", priority ); - assert( priority != -1 ); - - puts( "Init: sched_get_priority_min -- EINVAL (invalid policy)" ); - priority = sched_get_priority_min( -1 ); - assert( priority == -1 ); - assert( errno == EINVAL ); - - /* exercise get maximum priority */ - - priority = sched_get_priority_max( SCHED_FIFO ); - printf( "Init: sched_get_priority_max (SCHED_FIFO) -- %d\n", priority ); - assert( priority != -1 ); - - puts( "Init: sched_get_priority_min -- EINVAL (invalid policy)" ); - priority = sched_get_priority_min( -1 ); - assert( priority == -1 ); - assert( errno == EINVAL ); - - /* print the round robin time quantum */ - - status = sched_rr_get_interval( getpid(), &tr ); - printf( - "Init: Round Robin quantum is %ld seconds, %ld nanoseconds\n", - tr.tv_sec, - tr.tv_nsec - ); - assert( !status ); - - /* create a thread */ - - puts( "Init: pthread_create - SUCCESSFUL" ); - status = pthread_create( &thread_id, NULL, Task_1_through_3, NULL ); - assert( !status ); - - /* too may threads error */ - - puts( "Init: pthread_create - EAGAIN (too many threads)" ); - status = pthread_create( &thread_id, NULL, Task_1_through_3, NULL ); - assert( status == EAGAIN ); - - puts( "Init: sched_yield to Task_1" ); - status = sched_yield(); - assert( !status ); - - /* switch to Task_1 */ - - /* exit this thread */ - - puts( "Init: pthread_exit" ); - pthread_exit( NULL ); - - /* switch to Task_1 */ - - return NULL; /* just so the compiler thinks we returned something */ -} diff --git a/c/src/tests/psxtests/psx01/psx01.scn b/c/src/tests/psxtests/psx01/psx01.scn deleted file mode 100644 index 7633a05d89..0000000000 --- a/c/src/tests/psxtests/psx01/psx01.scn +++ /dev/null @@ -1,53 +0,0 @@ -*** POSIX TEST 1 *** -Init: uname - EFAULT (invalid uts pointer argument) -Init: uts.sysname: RTEMS -Init: uts.nodename: Node 1 -Init: uts.release: rtems-VERSION -NOTE: VERSION will vary. -Init: uts.version: -Init: uts.machine: CPU/CPU Model -NOTE: CPU/CPU Model will vary. -Init: clock_gettime - EINVAL (invalid clockid) -Init: clock_settime - EINVAL (invalid clockid) -Init: clock_getres - EINVAL (invalid clockid) -Init: clock_getres - EINVAL (NULL resolution) -Init: clock_getres - SUCCESSFUL -Init: resolution = sec (0), nsec (10000000) -Fri May 24 11:05:00 1996 -Init: clock_settime - SUCCESSFUL -Fri May 24 11:05:00 1996 -Fri May 24 11:05:00 1996 -Fri May 24 11:05:03 1996 -Fri May 24 11:05:03 1996 -Init: seconds remaining (0) - -Init: nanosleep - EINVAL (NULL time) -Init: nanosleep - EINVAL (too many nanoseconds) -Init: nanosleep - negative seconds small delay -Init: nanosleep - yield -Init: nanosleep - 3.05 seconds -Fri May 24 11:05:06 1996 -Init: sec (0), nsec (0) remaining -Init: ID is 0x0b010001 -Init: sched_get_priority_min (SCHED_FIFO) -- 1 -Init: sched_get_priority_min -- EINVAL (invalid policy) -Init: sched_get_priority_max (SCHED_FIFO) -- 254 -Init: sched_get_priority_min -- EINVAL (invalid policy) -Init: Round Robin quantum is 0 seconds, 500000000 nanoseconds -Init: pthread_create - SUCCESSFUL -Init: pthread_create - EAGAIN (too many threads) -Init: sched_yield to Task_1 -Task_1: sched_yield to Init -Init: pthread_exit - -Task_1: ID is 0x0b010002 -Task_1: pthread_equal - match case passed -Task_1: pthread_equal - different case passed -Task_1: pthread_equal - first id bad -Task_1: pthread_equal - second id bad -Task_1: pthread_once - EINVAL (NULL once_control) -Task_1: pthread_once - EINVAL (NULL init_routine) -Task_1: pthread_once - SUCCESSFUL (init_routine executes) -Test_init_routine: invoked -Task_1: pthread_once - SUCCESSFUL (init_routine does not execute) -*** END OF POSIX TEST 1 *** diff --git a/c/src/tests/psxtests/psx01/system.h b/c/src/tests/psxtests/psx01/system.h deleted file mode 100644 index 2819efd741..0000000000 --- a/c/src/tests/psxtests/psx01/system.h +++ /dev/null @@ -1,53 +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 -#include -#include -#include - -void *POSIX_Init( - void *argument -); - -void *Task_1_through_3( - void *argument -); - -/* configuration information */ - -#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER -#define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER - -#define CONFIGURE_MAXIMUM_POSIX_THREADS 2 - -#define CONFIGURE_POSIX_INIT_THREAD_TABLE - -#include - -/* global variables */ - -#ifdef CONFIGURE_INIT -#define TEST_EXTERN -#else -#define TEST_EXTERN extern -#endif - -TEST_EXTERN pthread_t Init_id; -TEST_EXTERN pthread_t Task_id; - -/* end of include file */ diff --git a/c/src/tests/psxtests/psx01/task.c b/c/src/tests/psxtests/psx01/task.c deleted file mode 100644 index 96c8f77676..0000000000 --- a/c/src/tests/psxtests/psx01/task.c +++ /dev/null @@ -1,93 +0,0 @@ -/* Task_1_through_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" - -void Test_init_routine( void ) -{ - puts( "Test_init_routine: invoked" ); -} - - -void *Task_1_through_3( - void *argument -) -{ - int status; - pthread_once_t once = PTHREAD_ONCE_INIT; - - puts( "Task_1: sched_yield to Init" ); - status = sched_yield(); - assert( !status ); - - /* switch to Task_1 */ - - /* now do some real testing */ - - empty_line(); - - /* get id of this thread */ - - Task_id = pthread_self(); - printf( "Task_1: ID is 0x%08x\n", Task_id ); - - /* exercise pthread_equal */ - - status = pthread_equal( Task_id, Task_id ); - if ( status ) - puts( "Task_1: pthread_equal - match case passed" ); - assert( status ); - - status = pthread_equal( Init_id, Task_id ); - if ( !status ) - puts( "Task_1: pthread_equal - different case passed" ); - assert( !status ); - - puts( "Task_1: pthread_equal - first id bad" ); - status = pthread_equal( -1, Task_id ); - assert( !status ); - - puts( "Task_1: pthread_equal - second id bad" ); - status = pthread_equal( Init_id, -1 ); - assert( !status ); - - /* exercise pthread_once */ - - puts( "Task_1: pthread_once - EINVAL (NULL once_control)" ); - status = pthread_once( NULL, Test_init_routine ); - assert( status == EINVAL ); - - puts( "Task_1: pthread_once - EINVAL (NULL init_routine)" ); - status = pthread_once( &once, NULL ); - assert( status == EINVAL ); - - puts( "Task_1: pthread_once - SUCCESSFUL (init_routine executes)" ); - status = pthread_once( &once, Test_init_routine ); - assert( !status ); - - puts( "Task_1: pthread_once - SUCCESSFUL (init_routine does not execute)" ); - status = pthread_once( &once, Test_init_routine ); - assert( !status ); - - puts( "*** END OF POSIX TEST 1 ***" ); - rtems_test_exit( 0 ); - - return NULL; /* just so the compiler thinks we returned something */ -} diff --git a/c/src/tests/psxtests/psx02/.cvsignore b/c/src/tests/psxtests/psx02/.cvsignore deleted file mode 100644 index 282522db03..0000000000 --- a/c/src/tests/psxtests/psx02/.cvsignore +++ /dev/null @@ -1,2 +0,0 @@ -Makefile -Makefile.in diff --git a/c/src/tests/psxtests/psx02/Makefile.am b/c/src/tests/psxtests/psx02/Makefile.am deleted file mode 100644 index d97dcfb121..0000000000 --- a/c/src/tests/psxtests/psx02/Makefile.am +++ /dev/null @@ -1,44 +0,0 @@ -## -## $Id$ -## - - -TEST = psx02 - -MANAGERS = all - -C_FILES = init.c task.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/psx02/init.c b/c/src/tests/psxtests/psx02/init.c deleted file mode 100644 index acc02bb880..0000000000 --- a/c/src/tests/psxtests/psx02/init.c +++ /dev/null @@ -1,145 +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 - -volatile int Signal_occurred; -volatile int Signal_count; - -void Signal_handler( - int signo -) -{ - Signal_count++; - printf( - "Signal: %d caught by 0x%x (%d)\n", - (int) signo, - (unsigned int) pthread_self(), - Signal_count - ); - Signal_occurred = 1; -} - -void *POSIX_Init( - void *argument -) -{ - int status; - struct timespec tv; - struct timespec tr; - struct sigaction act; - sigset_t mask; - sigset_t pending_set; - - puts( "\n\n*** POSIX TEST 2 ***" ); - - /* 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 ); - - /* install a signal handler */ - - status = sigemptyset( &act.sa_mask ); - assert( !status ); - - act.sa_handler = Signal_handler; - act.sa_flags = 0; - - sigaction( SIGUSR1, &act, NULL ); - - /* simple signal to self */ - - Signal_count = 0; - Signal_occurred = 0; - - status = pthread_kill( Init_id, SIGUSR1 ); - assert( !status ); - - Signal_occurred = 0; - - /* now block the signal, send it, see if it is pending, and unblock it */ - - status = sigemptyset( &mask ); - assert( !status ); - - status = sigaddset( &mask, SIGUSR1 ); - assert( !status ); - - printf( "Init: Block SIGUSR1\n" ); - status = sigprocmask( SIG_BLOCK, &mask, NULL ); - assert( !status ); - - status = sigpending( &pending_set ); - assert( !status ); - printf( "Init: Signals pending 0x%08x\n", (unsigned int) pending_set ); - - - printf( "Init: send SIGUSR1 to self\n" ); - status = pthread_kill( Init_id, SIGUSR1 ); - assert( !status ); - - status = sigpending( &pending_set ); - assert( !status ); - printf( "Init: Signals pending 0x%08x\n", (unsigned int) pending_set ); - - printf( "Init: Unblock SIGUSR1\n" ); - status = sigprocmask( SIG_UNBLOCK, &mask, NULL ); - assert( !status ); - - /* create a thread */ - - status = pthread_create( &Task_id, NULL, Task_1_through_3, NULL ); - assert( !status ); - - /* - * Loop for 5 seconds seeing how many signals we catch - */ - - tr.tv_sec = 5; - tr.tv_nsec = 0; - - do { - tv = tr; - - Signal_occurred = 0; - - status = nanosleep ( &tv, &tr ); - - if ( status == -1 ) { - assert( errno == EINTR ); - assert( tr.tv_nsec || tr.tv_sec ); - } else if ( !status ) { - assert( !tr.tv_nsec && !tr.tv_sec ); - } - - printf( - "Init: signal was %sprocessed with %d:%d time remaining\n", - (Signal_occurred) ? "" : "not ", - (int) tr.tv_sec, - (int) tr.tv_nsec - ); - - } while ( tr.tv_sec || tr.tv_nsec ); - - /* exit this thread */ - - puts( "*** END OF POSIX TEST 2 ***" ); - rtems_test_exit( 0 ); - - return NULL; /* just so the compiler thinks we returned something */ -} diff --git a/c/src/tests/psxtests/psx02/psx02.scn b/c/src/tests/psxtests/psx02/psx02.scn deleted file mode 100644 index 573bfee91a..0000000000 --- a/c/src/tests/psxtests/psx02/psx02.scn +++ /dev/null @@ -1,26 +0,0 @@ -*** POSIX TEST 2 *** -Init's ID is 0x0b010001 -Signal: 16 caught by 0xc010001 (1) -Init: Block SIGUSR1 -Init: Signals pending 0x00000000 -Init: send SIGUSR1 to self -Init: Signals pending 0x00008000 -Init: Unblock SIGUSR1 -Signal: 16 caught by 0xc010001 (2) -Task1: Fri May 24 11:05:00 1996 -Signal: 16 caught by 0xc010001 (3) -Init: signal was processed with 5:0 time remaining -Task1: Fri May 24 11:05:01 1996 -Signal: 16 caught by 0xc010001 (4) -Init: signal was processed with 3:990000000 time remaining -Task1: Fri May 24 11:05:02 1996 -Signal: 16 caught by 0xc010001 (5) -Init: signal was processed with 2:980000000 time remaining -Task1: Fri May 24 11:05:03 1996 -Signal: 16 caught by 0xc010001 (6) -Init: signal was processed with 1:970000000 time remaining -Task1: Fri May 24 11:05:04 1996 -Signal: 16 caught by 0xc010001 (7) -Init: signal was processed with 0:960000000 time remaining -Init: signal was not processed with 0:0 time remaining -*** END OF POSIX TEST 2 *** diff --git a/c/src/tests/psxtests/psx02/system.h b/c/src/tests/psxtests/psx02/system.h deleted file mode 100644 index a24f0d4ff4..0000000000 --- a/c/src/tests/psxtests/psx02/system.h +++ /dev/null @@ -1,51 +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 -#include - -void *POSIX_Init( - void *argument -); - -void *Task_1_through_3( - void *argument -); - -/* configuration information */ - -#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER -#define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER - -#define CONFIGURE_MAXIMUM_POSIX_THREADS 2 - -#define CONFIGURE_POSIX_INIT_THREAD_TABLE - -#include - -/* global variables */ - -#ifdef CONFIGURE_INIT -#define TEST_EXTERN -#else -#define TEST_EXTERN extern -#endif - -TEST_EXTERN pthread_t Init_id; -TEST_EXTERN pthread_t Task_id; - -/* end of include file */ diff --git a/c/src/tests/psxtests/psx02/task.c b/c/src/tests/psxtests/psx02/task.c deleted file mode 100644 index 260d6e63b4..0000000000 --- a/c/src/tests/psxtests/psx02/task.c +++ /dev/null @@ -1,44 +0,0 @@ -/* Task_1_through_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 - -void *Task_1_through_3( - void *argument -) -{ - int seconds; - int i; - int status; - - for ( i=0 ; i<5 ; i++ ) { - print_current_time( "Task1: ", "" ); - status = pthread_kill( Init_id, SIGUSR1 ); - assert( !status ); - - seconds = sleep( 1 ); - assert( !seconds ); - } - puts( "*** END OF POSIX TEST 2 ***" ); - rtems_test_exit( 0 ); - - return NULL; /* just so the compiler thinks we returned something */ -} diff --git a/c/src/tests/psxtests/psx03/.cvsignore b/c/src/tests/psxtests/psx03/.cvsignore deleted file mode 100644 index 282522db03..0000000000 --- a/c/src/tests/psxtests/psx03/.cvsignore +++ /dev/null @@ -1,2 +0,0 @@ -Makefile -Makefile.in diff --git a/c/src/tests/psxtests/psx03/Makefile.am b/c/src/tests/psxtests/psx03/Makefile.am deleted file mode 100644 index 7627df2071..0000000000 --- a/c/src/tests/psxtests/psx03/Makefile.am +++ /dev/null @@ -1,44 +0,0 @@ -## -## $Id$ -## - - -TEST = psx03 - -MANAGERS = all - -C_FILES = init.c task.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/psx03/init.c b/c/src/tests/psxtests/psx03/init.c deleted file mode 100644 index 0a28676296..0000000000 --- a/c/src/tests/psxtests/psx03/init.c +++ /dev/null @@ -1,203 +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 -#include - -volatile int Signal_occurred; -volatile int Signal_count; - -void Signal_handler( - int signo -) -{ - Signal_count++; - printf( - "Signal: %d caught by 0x%x (%d)\n", - signo, - pthread_self(), - Signal_count - ); - Signal_occurred = 1; -} - -void *POSIX_Init( - void *argument -) -{ - int status; - struct timespec timeout; - struct sigaction act; - sigset_t mask; - sigset_t waitset; - int signo; - siginfo_t siginfo; - - puts( "\n\n*** POSIX TEST 3 ***" ); - - /* 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 ); - - /* install a signal handler */ - - status = sigemptyset( &act.sa_mask ); - assert( !status ); - - act.sa_handler = Signal_handler; - act.sa_flags = 0; - - sigaction( SIGUSR1, &act, NULL ); - - /* initialize signal handler variables */ - - Signal_count = 0; - Signal_occurred = 0; - - /* - * wait on SIGUSR1 for 3 seconds, will timeout - */ - - /* initialize the signal set we will wait for to SIGUSR1 */ - - status = sigemptyset( &waitset ); - assert( !status ); - - status = sigaddset( &waitset, SIGUSR1 ); - assert( !status ); - - timeout.tv_sec = 3; - timeout.tv_nsec = 0; - - puts( "Init: waiting on any signal for 3 seconds." ); - signo = sigtimedwait( &waitset, &siginfo, &timeout ); - assert( signo == -1 ); - - if ( errno == EAGAIN ) - puts( "Init: correctly timed out waiting for SIGUSR1." ); - else - printf( "sigtimedwait returned wrong errno - %d\n", errno ); - - Signal_occurred = 0; - - /* - * wait on SIGUSR1 for 3 seconds, will timeout because Task_1 sends SIGUSR2 - */ - - empty_line(); - - /* initialize a mask to block SIGUSR2 */ - - status = sigemptyset( &mask ); - assert( !status ); - - status = sigaddset( &mask, SIGUSR2 ); - assert( !status ); - - printf( "Init: Block SIGUSR2\n" ); - status = sigprocmask( SIG_BLOCK, &mask, NULL ); - assert( !status ); - - /* create a thread */ - - status = pthread_create( &Task_id, NULL, Task_1, NULL ); - assert( !status ); - - /* signal handler is still installed, waitset is still set for SIGUSR1 */ - - timeout.tv_sec = 3; - timeout.tv_nsec = 0; - - puts( "Init: waiting on any signal for 3 seconds." ); - signo = sigtimedwait( &waitset, &siginfo, &timeout ); - - /* switch to Task 1 */ - - if ( errno == EAGAIN ) - puts( "Init: correctly timed out waiting for SIGUSR1." ); - else - printf( "sigtimedwait returned wrong errno - %d\n", errno ); - assert( signo == -1 ); - - /* - * wait on SIGUSR1 for 3 seconds, Task_2 will send it to us - */ - - empty_line(); - - /* create a thread */ - - status = pthread_create( &Task_id, NULL, Task_2, NULL ); - assert( !status ); - - /* signal handler is still installed, waitset is still set for SIGUSR1 */ - - /* wait on SIGUSR1 for 3 seconds, will receive SIGUSR1 from Task_2 */ - - timeout.tv_sec = 3; - timeout.tv_nsec = 0; - - /* just so we can check that these were altered */ - - siginfo.si_code = -1; - siginfo.si_signo = -1; - siginfo.si_value.sival_int = -1; - - puts( "Init: waiting on any signal for 3 seconds." ); - signo = sigtimedwait( &waitset, &siginfo, &timeout ); - printf( "Init: received (%d) SIGUSR1=%d\n", siginfo.si_signo, SIGUSR1 ); - assert( signo == SIGUSR1 ); - assert( siginfo.si_signo == SIGUSR1 ); - assert( siginfo.si_code == SI_USER ); - assert( siginfo.si_value.sival_int != -1 ); /* rtems does always set this */ - - /* try out a process signal */ - - empty_line(); - puts( "Init: kill with SIGUSR2." ); - status = kill( getpid(), SIGUSR2 ); - assert( !status ); - - siginfo.si_code = -1; - siginfo.si_signo = -1; - siginfo.si_value.sival_int = -1; - - status = sigemptyset( &waitset ); - assert( !status ); - - status = sigaddset( &waitset, SIGUSR1 ); - assert( !status ); - - status = sigaddset( &waitset, SIGUSR2 ); - assert( !status ); - - puts( "Init: waiting on any signal for 3 seconds." ); - signo = sigtimedwait( &waitset, &siginfo, &timeout ); - printf( "Init: received (%d) SIGUSR2=%d\n", siginfo.si_signo, SIGUSR2 ); - assert( signo == SIGUSR2 ); - assert( siginfo.si_signo == SIGUSR2 ); - assert( siginfo.si_code == SI_USER ); - assert( siginfo.si_value.sival_int != -1 ); /* rtems does always set this */ - - /* exit this thread */ - - puts( "*** END OF POSIX TEST 3 ***" ); - rtems_test_exit( 0 ); - - return NULL; /* just so the compiler thinks we returned something */ -} diff --git a/c/src/tests/psxtests/psx03/psx03.scn b/c/src/tests/psxtests/psx03/psx03.scn deleted file mode 100644 index 2436910302..0000000000 --- a/c/src/tests/psxtests/psx03/psx03.scn +++ /dev/null @@ -1,21 +0,0 @@ -*** POSIX TEST 3 *** -Init's ID is 0x0b010001 -Init: waiting on any signal for 3 seconds. -Init: correctly timed out waiting for SIGUSR1. - -Init: Block SIGUSR2 -Init: waiting on any signal for 3 seconds. -Task_1: Fri May 24 11:05:03 1996 -Task_1: pthread_kill - SIGUSR2 to Init -Init: correctly timed out waiting for SIGUSR1. - -Init: waiting on any signal for 3 seconds. -Task_2: Fri May 24 11:05:06 1996 -Task_1: pthread_kill - SIGUSR1 to Init -Signal: 16 caught by 0xc010001 (1) -Init: received (16) SIGUSR1=16 - -Init: kill with SIGUSR2. -Init: waiting on any signal for 3 seconds. -Init: received (17) SIGUSR2=17 -*** END OF POSIX TEST 3 *** diff --git a/c/src/tests/psxtests/psx03/system.h b/c/src/tests/psxtests/psx03/system.h deleted file mode 100644 index 2906cd8066..0000000000 --- a/c/src/tests/psxtests/psx03/system.h +++ /dev/null @@ -1,54 +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 - -void *POSIX_Init( - void *argument -); - -void *Task_1( - void *argument -); - -void *Task_2( - void *argument -); - -/* configuration information */ - -#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER -#define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER - -#define CONFIGURE_MAXIMUM_POSIX_THREADS 3 - -#define CONFIGURE_POSIX_INIT_THREAD_TABLE - -#include - -/* global variables */ - -#ifdef CONFIGURE_INIT -#define TEST_EXTERN -#else -#define TEST_EXTERN extern -#endif - -TEST_EXTERN pthread_t Init_id; -TEST_EXTERN pthread_t Task_id; - -/* end of include file */ diff --git a/c/src/tests/psxtests/psx03/task.c b/c/src/tests/psxtests/psx03/task.c deleted file mode 100644 index 6b41659cf3..0000000000 --- a/c/src/tests/psxtests/psx03/task.c +++ /dev/null @@ -1,64 +0,0 @@ -/* Task_1_through_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 - -void *Task_1( - void *argument -) -{ - int status; - - /* send SIGUSR2 to Init which is waiting on SIGUSR1 */ - - print_current_time( "Task_1: ", "" ); - - puts( "Task_1: pthread_kill - SIGUSR2 to Init" ); - status = pthread_kill( Init_id, SIGUSR2 ); - assert( !status ); - - pthread_exit( NULL ); - - /* switch to Init */ - - return NULL; /* just so the compiler thinks we returned something */ -} - -void *Task_2( - void *argument -) -{ - int status; - - /* send SIGUSR1 to Init which is waiting on SIGUSR1 */ - - print_current_time( "Task_2: ", "" ); - - puts( "Task_1: pthread_kill - SIGUSR1 to Init" ); - status = pthread_kill( Init_id, SIGUSR1 ); - assert( !status ); - - pthread_exit( NULL ); - - /* switch to Init */ - - return NULL; /* just so the compiler thinks we returned something */ -} diff --git a/c/src/tests/psxtests/psx04/.cvsignore b/c/src/tests/psxtests/psx04/.cvsignore deleted file mode 100644 index 282522db03..0000000000 --- a/c/src/tests/psxtests/psx04/.cvsignore +++ /dev/null @@ -1,2 +0,0 @@ -Makefile -Makefile.in diff --git a/c/src/tests/psxtests/psx04/Makefile.am b/c/src/tests/psxtests/psx04/Makefile.am deleted file mode 100644 index fa4d5a87c3..0000000000 --- a/c/src/tests/psxtests/psx04/Makefile.am +++ /dev/null @@ -1,44 +0,0 @@ -## -## $Id$ -## - - -TEST = psx04 - -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/psx04/init.c b/c/src/tests/psxtests/psx04/init.c deleted file mode 100644 index 78b5dae6a5..0000000000 --- a/c/src/tests/psxtests/psx04/init.c +++ /dev/null @@ -1,558 +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 -#include - -volatile int Signal_occurred; -volatile int Signal_count; - -void Signal_handler( - int signo -) -{ - Signal_count++; - printf( - "Signal: %d caught by 0x%x (%d)\n", - signo, - pthread_self(), - Signal_count - ); - Signal_occurred = 1; -} - -void Signal_info_handler( - int signo, - siginfo_t *info, - void *context -) -{ - Signal_count++; - printf( - "Signal_info: %d caught by 0x%x (%d) si_signo= %d si_code= %d value= %d\n", - signo, - pthread_self(), - Signal_count, - info->si_signo, - info->si_code, - info->si_value.sival_int - ); - Signal_occurred = 1; -} - -void *POSIX_Init( - void *argument -) -{ - int status; - struct sigaction act; - sigset_t mask; - sigset_t pending_set; - sigset_t oset; - struct timespec timeout; - siginfo_t info; - - puts( "\n\n*** POSIX TEST 4 ***" ); - - /* 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 ); - -/* install a signal handler for SIGUSR1 */ - - status = sigemptyset( &act.sa_mask ); - assert( !status ); - printf( "Init: sigemptyset - set= 0x%08x\n", (unsigned int) act.sa_mask ); - - /* test sigfillset following the above sigemptyset */ - - status = sigfillset( &act.sa_mask ); - assert( !status ); - printf( "Init: sigfillset - set= 0x%08x\n", (unsigned int) act.sa_mask ); - - /* test sigdelset */ - - status = sigdelset( &act.sa_mask, SIGUSR1 ); - assert( !status ); - printf( "Init: sigdelset - delete SIGUSR1 set= 0x%08x\n", - (unsigned int) act.sa_mask ); - - /* test sigismember - FALSE */ - - status = sigismember( &act.sa_mask, SIGUSR1 ); - assert( !status ); - puts( "Init: sigismember - FALSE since SIGUSR1 is not a member" ); - - /* test sigismember - TRUE */ - - status = sigismember( &act.sa_mask, SIGUSR2 ); - assert( status ); - puts( "Init: sigismember - TRUE since SIGUSR2 is a member" ); - - /* return the set to empty */ - - act.sa_handler = Signal_handler; - act.sa_flags = 0; - - sigaction( SIGUSR1, &act, NULL ); - - /* simple signal to process */ - - Signal_count = 0; - Signal_occurred = 0; - - puts( "Init: send SIGUSR1 to process" ); - status = kill( getpid(), SIGUSR1 ); - assert( !status ); - -/* end of install a signal handler for SIGUSR1 */ - - Signal_occurred = 0; - - /* now block the signal, send it, see if it is pending, and unblock it */ - - empty_line(); - - status = sigemptyset( &mask ); - assert( !status ); - - status = sigaddset( &mask, SIGUSR1 ); - assert( !status ); - - puts( "Init: Block SIGUSR1" ); - act.sa_handler = Signal_handler; - act.sa_flags = 0; - - sigaction( SIGUSR1, &act, NULL ); - - /* simple signal to process */ - - Signal_count = 0; - Signal_occurred = 0; - - puts( "Init: send SIGUSR1 to process" ); - status = kill( getpid(), SIGUSR1 ); - assert( !status ); - - Signal_occurred = 0; - - /* now block the signal, send it, see if it is pending, and unblock it */ - - empty_line(); - - status = sigemptyset( &mask ); - assert( !status ); - - status = sigaddset( &mask, SIGUSR1 ); - assert( !status ); - - puts( "Init: Block SIGUSR1" ); - status = sigprocmask( SIG_BLOCK, &mask, NULL ); - assert( !status ); - - status = sigpending( &pending_set ); - assert( !status ); - printf( "Init: Signals pending 0x%08x\n", (unsigned int) pending_set ); - - puts( "Init: send SIGUSR1 to process" ); - status = kill( getpid(), SIGUSR1 ); - assert( !status ); - - status = sigpending( &pending_set ); - assert( !status ); - printf( "Init: Signals pending 0x%08x\n", (unsigned int) pending_set ); - - puts( "Init: Unblock SIGUSR1" ); - status = sigprocmask( SIG_UNBLOCK, &mask, NULL ); - assert( !status ); - - /* now let another task get interrupted by a signal */ - - empty_line(); - - puts( "Init: create a thread interested in SIGUSR1" ); - status = pthread_create( &Task1_id, NULL, Task_1, NULL ); - assert( !status ); - - puts( "Init: Block SIGUSR1" ); - status = sigprocmask( SIG_BLOCK, &mask, NULL ); - assert( !status ); - - status = sigpending( &pending_set ); - assert( !status ); - printf( "Init: Signals pending 0x%08x\n", (unsigned int) pending_set ); - - puts( "Init: sleep so the other task can block" ); - status = sleep( 1 ); - assert( !status ); - - /* switch to task 1 */ - - puts( "Init: send SIGUSR1 to process" ); - status = kill( getpid(), SIGUSR1 ); - assert( !status ); - - status = sigpending( &pending_set ); - assert( !status ); - printf( "Init: Signals pending 0x%08x\n", (unsigned int) pending_set ); - - puts( "Init: sleep so the other task can catch signal" ); - status = sleep( 1 ); - assert( !status ); - - /* switch to task 1 */ - - /* test alarm */ - - empty_line(); - - /* install a signal handler for SIGALRM and unblock it */ - - status = sigemptyset( &act.sa_mask ); - assert( !status ); - - act.sa_handler = Signal_handler; - act.sa_flags = 0; - - sigaction( SIGALRM, &act, NULL ); - - status = sigemptyset( &mask ); - assert( !status ); - - status = sigaddset( &mask, SIGALRM ); - assert( !status ); - - puts( "Init: Unblock SIGALRM" ); - status = sigprocmask( SIG_UNBLOCK, &mask, NULL ); - assert( !status ); - - /* schedule the alarm */ - - puts( "Init: Firing alarm in 5 seconds" ); - status = alarm( 5 ); - printf( "Init: %d seconds left on previous alarm\n", status ); - assert( !status ); - - puts( "Init: Firing alarm in 2 seconds" ); - status = alarm( 2 ); - printf( "Init: %d seconds left on previous alarm\n", status ); - assert( status ); - - puts( "Init: Wait 4 seconds for alarm" ); - status = sleep( 4 ); - printf( "Init: %d seconds left in sleep\n", status ); - assert( status ); - - /* test SIG_SETMASK case and returning oset of pthread_sigmask */ - - empty_line(); - - status = sigemptyset( &mask ); - assert( !status ); - - status = sigaddset( &mask, SIGUSR1 ); - assert( !status ); - - status = sigaddset( &mask, SIGUSR2 ); - assert( !status ); - - puts( "Init: Block SIGUSR1 and SIGUSR2 only" ); - status = pthread_sigmask( SIG_SETMASK, &mask, &oset ); - printf( "Init: Previous blocked set was 0x%08x\n", (unsigned int) oset ); - assert( !status ); - - /* test inquiry about current blocked set with pthread_sigmask */ - - status = pthread_sigmask( 0, NULL, &oset ); - printf( "Init: Current blocked set is 0x%08x\n", (unsigned int) oset ); - assert( !status ); - - /* return blocked mask to no signals blocked */ - - status = sigemptyset( &mask ); - assert( !status ); - - puts( "Init: Unblock all signals" ); - status = pthread_sigmask( SIG_SETMASK, &mask, &oset ); - printf( "Init: Previous blocked set was 0x%08x\n", (unsigned int) oset ); - assert( !status ); - - /* test sigsuspend */ - - empty_line(); - - puts( "Init: create a thread to send Init SIGUSR1" ); - status = pthread_create( &Task2_id, NULL, Task_2, NULL ); - assert( !status ); - - status = sigemptyset( &mask ); - assert( !status ); - - puts( "Init: sigsuspend for any signal" ); - status = sigsuspend( &mask ); - assert( status ); - printf( "Init: awakended from sigsuspend status=%08d \n", status ); - - /* test a SIGINFO case, these are signals sent to a process only */ - - empty_line(); - - puts( "Init: create a thread to sent Process SIGUSR1 with SA_SIGINFO" ); - status = pthread_create( &Task3_id, NULL, Task_3, NULL ); - assert( !status ); - - /* set action on SIGUSR1 to an info case */ - act.sa_handler = Signal_handler; - act.sa_flags = SA_SIGINFO; - act.sa_sigaction = Signal_info_handler; - - sigaction( SIGUSR1, &act, NULL ); - - puts( "Init: sleep so the Task_3 can sigqueue SIGUSR1" ); - status = sleep( 1 ); - assert( !status ); - - /* switch to task 1 */ - - puts( "Init: sigqueue occurred" ); - - /* Send SIGUSR1, Task_3 has issued a sigwaitinfo */ - - status = sigemptyset( &mask ); - assert( !status ); - - status = sigaddset( &mask, SIGUSR1 ); - assert( !status ); - - puts( "Init: Block SIGUSR1" ); - status = sigprocmask( SIG_BLOCK, &mask, NULL ); - assert( !status ); - - puts( "Init: send SIGUSR1 to process" ); - status = kill( getpid(), SIGUSR1 ); - assert( !status ); - - puts( "Init: sleep so the Task_3 can receive SIGUSR1" ); - status = sleep( 1 ); - assert( !status ); - - /* Send SIGUSR1, Task_3 has issued a sigwait */ - - status = sigemptyset( &mask ); - assert( !status ); - - status = sigaddset( &mask, SIGUSR1 ); - assert( !status ); - - puts( "Init: Block SIGUSR1" ); - status = sigprocmask( SIG_BLOCK, &mask, NULL ); - assert( !status ); - - puts( "Init: send SIGUSR1 to process" ); - status = kill( getpid(), SIGUSR1 ); - assert( !status ); - - puts( "Init: sleep so the Task_3 can receive SIGUSR1" ); - status = sleep( 1 ); - assert( !status ); - - /* Send SIGUSR1, Task_3 has issued a sigwaitinfo */ - - status = sigemptyset( &mask ); - assert( !status ); - - status = sigaddset( &mask, SIGUSR2 ); - assert( !status ); - - puts( "Init: Block SIGUSR2" ); - status = sigprocmask( SIG_BLOCK, &mask, NULL ); - assert( !status ); - - puts( "Init: send SIGUSR2 to process" ); - status = kill( getpid(), SIGUSR2 ); - assert( !status ); - - puts( "Init: sleep so the Task_3 can receive SIGUSR2" ); - status = sleep( 1 ); - assert( !status ); - - /* Suspend for signal that has already be sent */ - - puts( "Init: sigsuspend for any signal" ); - status = sigsuspend( &mask ); - assert( status ); - printf( "Init: awakended from sigsuspend status=%d \n", status ); - - /* generate error cases for psignal */ - - empty_line(); - - status = sigemptyset( NULL ); - if ( status != -1 ) - printf( "status = %d\n", status ); - assert( errno == EINVAL ); - puts( "Init: sigemptyset - EINVAL (set invalid)" ); - - status = sigfillset( NULL ); - if ( status != -1 ) - printf( "status = %d\n", status ); - assert( errno == EINVAL ); - puts( "Init: sigfillset - EINVAL (set invalid)" ); - - status = sigaddset( NULL, SIGUSR1 ); - if ( status != -1 ) - printf( "status = %d\n", status ); - assert( errno == EINVAL ); - puts( "Init: sigaddset - EINVAL (set invalid)" ); - - status = sigaddset( &mask, 0 ); - assert( !status ); - puts( "Init: sigaddset - SUCCESSFUL (signal = 0)" ); - - status = sigaddset( &mask, 999 ); - if ( status != -1 ) - printf( "status = %d\n", status ); - assert( errno == EINVAL ); - puts( "Init: sigaddset - EINVAL (set invalid)" ); - - status = sigdelset( NULL, SIGUSR1 ); - if ( status != -1 ) - printf( "status = %d\n", status ); - assert( errno == EINVAL ); - puts( "Init: sigdelset - EINVAL (set invalid)" ); - - status = sigdelset( &mask, 0 ); - assert( !status ); - puts( "Init: sigdelset - SUCCESSFUL (signal = 0)" ); - - status = sigdelset( &mask, 999 ); - if ( status != -1 ) - printf( "status = %d\n", status ); - assert( errno == EINVAL ); - puts( "Init: sigdelset - EINVAL (set invalid)" ); - - status = sigismember( NULL, SIGUSR1 ); - if ( status != -1 ) - printf( "status = %d\n", status ); - assert( errno == EINVAL ); - puts( "Init: sigismember - EINVAL (set invalid)" ); - - status = sigismember( &mask, 0 ); - assert( !status ); - puts( "Init: sigismember - SUCCESSFUL (signal = 0)" ); - - status = sigismember( &mask, 999 ); - if ( status != -1 ) - printf( "status = %d\n", status ); - assert( errno == EINVAL ); - puts( "Init: sigismember - EINVAL (signal invalid)" ); - - status = sigaction( 0, &act, 0 ); - assert( !status ); - puts( "Init: sigaction - SUCCESSFUL (signal = 0)" ); - - status = sigaction( 999, &act, NULL ); - if ( status != -1 ) - printf( "status = %d\n", status ); - assert( errno == EINVAL ); - puts( "Init: sigaction - EINVAL (signal invalid)" ); - - status = sigaction( SIGKILL, &act, NULL ); - if ( status != -1 ) - printf( "status = %d\n", status ); - assert( errno == EINVAL ); - puts( "Init: sigaction - EINVAL (SIGKILL)" ); - - status = pthread_sigmask( SIG_BLOCK, NULL, NULL ); - if ( status != -1 ) - printf( "status = %d\n", status ); - assert( errno == EINVAL ); - puts( "Init: pthread_sigmask - EINVAL (set and oset invalid)" ); - - status = pthread_sigmask( 999, &pending_set, NULL ); - if ( status != -1 ) - printf( "status = %d\n", status ); - assert( errno == EINVAL ); - puts( "Init: pthread_sigmask - EINVAL (how invalid)" ); - - status = sigpending( NULL ); - if ( status != -1 ) - printf( "status = %d\n", status ); - assert( errno == EINVAL ); - puts( "Init: sigpending - EINVAL (set invalid)" ); - - timeout.tv_nsec = -1; - status = sigtimedwait( &mask, &info, &timeout ); - if ( status != -1 ) - printf( "status = %d\n", status ); - assert( errno == EINVAL ); - puts( "Init: pthread_sigmask - EINVAL (timout->nsec invalid < 0)" ); - - timeout.tv_nsec = 0x7fffffff; - status = sigtimedwait( &mask, &info, &timeout ); - if ( status != -1 ) - printf( "status = %d\n", status ); - assert( errno == EINVAL ); - puts( "Init: pthread_sigmask - EINVAL (timout->nsec invalid to large)" ); - - status = pthread_kill( Init_id, 999 ); - if ( status != -1 ) - printf( "status = %d\n", status ); - assert( errno == EINVAL ); - puts( "Init: pthread_kill - EINVAL (sig invalid)" ); - - status = pthread_kill( 0, SIGUSR2 ); - if ( status != -1 ) - printf( "status = %d\n", status ); - assert( errno == ESRCH ); - puts( "Init: pthread_kill - ESRCH (signal SA_SIGINFO)" ); - - status = pthread_kill( Init_id, 0 ); - assert( !status ); - puts( "Init: pthread_kill - SUCCESSFUL (signal = 0)" ); - - act.sa_handler = SIG_IGN; - act.sa_flags = 0; - sigaction( SIGUSR2, &act, NULL ); - status = pthread_kill( Init_id, SIGUSR2 ); - assert( !status ); - puts( "Init: pthread_kill - SUCCESSFUL (signal = SIG_IGN)" ); - - status = kill( 0x7fffffff, SIGUSR1 ); - if ( status != -1 ) - printf( "status = %d\n", status ); - assert( errno == ESRCH ); - puts( "Init: kill - ESRCH (pid invalid)" ); - - status = kill( getpid(), 0 ); - assert( !status ); - puts( "Init: kill - SUCCESSFUL (signal = 0)" ); - - status = kill( getpid(), 999 ); - if ( status != -1 ) - printf( "status = %d\n", status ); - assert( errno == EINVAL ); - puts( "Init: kill - EINVAL (sig invalid)" ); - - /* exit this thread */ - - puts( "*** END OF POSIX TEST 4 ***" ); - rtems_test_exit( 0 ); - - return NULL; /* just so the compiler thinks we returned something */ -} diff --git a/c/src/tests/psxtests/psx04/psx04.scn b/c/src/tests/psxtests/psx04/psx04.scn deleted file mode 100644 index 9c78c445ef..0000000000 --- a/c/src/tests/psxtests/psx04/psx04.scn +++ /dev/null @@ -1,99 +0,0 @@ -*** POSIX TEST 4 *** -Init's ID is 0x0b010001 -Init: sigemptyset - set= 0x00000000 -Init: sigfillset - set= 0xffffffff -Init: sigdelset - delete SIGUSR1 set= 0xffff7fff -Init: sigismember - FALSE since SIGUSR1 is not a member -Init: sigismember - TRUE since SIGUSR2 is a member -Init: send SIGUSR1 to process -Signal: 16 caught by 0xc010001 (1) -Init: Block SIGUSR1 -Init: send SIGUSR1 to process -Signal: 16 caught by 0xc010001 (1) -Init: Block SIGUSR1 -Init: Signals pending 0x00000000 -Init: send SIGUSR1 to process -Init: Signals pending 0x00008000 -Init: Unblock SIGUSR1 -Signal: 16 caught by 0xc010001 (2) -Init: create a thread interested in SIGUSR1 -Init: Block SIGUSR1 -Init: Signals pending 0x00000000 -Init: sleep so the other task can block -Task_1: sleeping for 5 seconds -Init: send SIGUSR1 to process -Init: Signals pending 0x00008000 -Init: sleep so the other task can catch signal -Signal: 16 caught by 0xc010002 (3) -Task_1: 4 seconds left -Task_1: exit -Init: Unblock SIGALRM -Init: Firing alarm in 5 seconds -Init: 0 seconds left on previous alarm -Init: Firing alarm in 2 seconds -Init: 4 seconds left on previous alarm - MAY BE 5 SECONDS ALSO -Init: Wait 4 seconds for alarm -Signal: 14 caught by 0xc010001 (4) -Init: 2 seconds left in sleep -Init: Block SIGUSR1 and SIGUSR2 only -Init: Previous blocked set was 0x00008000 -Init: Current blocked set is 0x00018000 -Init: Unblock all signals -Init: Previous blocked set was 0x00018000 -Init: create a thread to send Init SIGUSR1 -Init: sigsuspend for any signal -Task_2: sending SIGUSR1 -Task_2: exit -Signal: 16 caught by 0xc010001 (5) -Init: awakended from sigsuspend status=00000016 -Init: create a thread to sent Process SIGUSR1 with SA_SIGINFO -Init: sleep so the Task_3 can sigqueue SIGUSR1 -Task_3: sigqueue SIGUSR1 with value= 16 -Signal_info: 16 caught by 0xc010004 (6) si_signo= 16 si_code= 1 value= 16 -Task_3: sigwaitinfo SIGUSR1 with value= 16 -Init: sigqueue occurred -Init: Block SIGUSR1 -Init: send SIGUSR1 to process -Init: sleep so the Task_3 can receive SIGUSR1 -Task_3: si_signo= 16 si_code= 1 value= 0 -Task_3: sigwait SIGUSR1 -Init: Block SIGUSR1 -Init: send SIGUSR1 to process -Init: sleep so the Task_3 can receive SIGUSR1 -Task_3: signo= 16 -Task_3: pause -Init: Block SIGUSR2 -Init: send SIGUSR2 to process -Init: sleep so the Task_3 can receive SIGUSR2 -Task_3: pause= 17 -Task_3: sending SIGUSR2 -Task_3: sleep so the Init task can reguest a signal -Init: sigsuspend for any signal -Init: awakended from sigsuspend status=17 -Init: sigemptyset - EINVAL (set invalid) -Init: sigfillset - EINVAL (set invalid) -Init: sigaddset - EINVAL (set invalid) -Init: sigaddset - SUCCESSFUL (signal = 0) -Init: sigaddset - EINVAL (set invalid) -Init: sigdelset - EINVAL (set invalid) -Init: sigdelset - SUCCESSFUL (signal = 0) -Init: sigdelset - EINVAL (set invalid) -Init: sigismember - EINVAL (set invalid) -Init: sigismember - SUCCESSFUL (signal = 0) -Init: sigismember - EINVAL (signal invalid) -Init: sigaction - SUCCESSFUL (signal = 0) -Init: sigaction - EINVAL (signal invalid) -Init: sigaction - EINVAL (SIGKILL) -Init: pthread_sigmask - EINVAL (set and oset invalid) -Init: pthread_sigmask - EINVAL (how invalid) -Init: sigpending - EINVAL (set invalid) -Init: pthread_sigmask - EINVAL (timout->nsec invalid < 0) -Init: pthread_sigmask - EINVAL (timout->nsec invalid to large) -Init: pthread_kill - EINVAL (sig invalid) -Init: pthread_kill - ESRCH (signal SA_SIGINFO) -Init: pthread_kill - SUCCESSFUL (signal = 0) -Init: pthread_kill - SUCCESSFUL (signal = SIG_IGN) -Init: kill - ESRCH (pid invalid) -Init: kill - SUCCESSFUL (signal = 0) -Init: kill - EINVAL (sig invalid) -*** END OF POSIX TEST 4 *** diff --git a/c/src/tests/psxtests/psx04/system.h b/c/src/tests/psxtests/psx04/system.h deleted file mode 100644 index e5f72df295..0000000000 --- a/c/src/tests/psxtests/psx04/system.h +++ /dev/null @@ -1,63 +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 - -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_MAXIMUM_POSIX_QUEUED_SIGNALS 5 - -#define CONFIGURE_POSIX_INIT_THREAD_TABLE -#define CONFIGURE_POSIX_INIT_THREAD_STACK_SIZE \ - (RTEMS_MINIMUM_STACK_SIZE * 4) - -#include - -/* 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/psx04/task1.c b/c/src/tests/psxtests/psx04/task1.c deleted file mode 100644 index 930f3cb777..0000000000 --- a/c/src/tests/psxtests/psx04/task1.c +++ /dev/null @@ -1,43 +0,0 @@ -/* Task_1 - * - * This routine serves as a test task. - * - * 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 - -void *Task_1( - void *argument -) -{ - int seconds; - - printf( "Task_1: sleeping for 5 seconds\n" ); - - seconds = sleep( 5 ); - printf( "Task_1: %d seconds left\n", seconds ); - assert( seconds ); - - /* switch to Init */ - - printf( "Task_1: exit\n" ); - pthread_exit( NULL ); - - /* switch to Init */ - - return NULL; /* just so the compiler thinks we returned something */ -} diff --git a/c/src/tests/psxtests/psx04/task2.c b/c/src/tests/psxtests/psx04/task2.c deleted file mode 100644 index 82291b804a..0000000000 --- a/c/src/tests/psxtests/psx04/task2.c +++ /dev/null @@ -1,41 +0,0 @@ -/* Task_2 - * - * This routine serves as a test task. - * - * 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 - -void *Task_2( - void *argument -) -{ - int status; - - printf( "Task_2: sending SIGUSR1\n" ); - status = pthread_kill( Init_id, SIGUSR1 ); - assert( !status ); - - /* switch to Init */ - - printf( "Task_2: exit\n" ); - pthread_exit( NULL ); - - /* switch to Init */ - - return NULL; /* just so the compiler thinks we returned something */ -} diff --git a/c/src/tests/psxtests/psx04/task3.c b/c/src/tests/psxtests/psx04/task3.c deleted file mode 100644 index a465d2ace4..0000000000 --- a/c/src/tests/psxtests/psx04/task3.c +++ /dev/null @@ -1,118 +0,0 @@ -/* Task_3 - * - * This routine serves as a test task. - * - * 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 - -void *Task_3( - void *argument -) -{ - int status; - int sig; - union sigval value; - sigset_t mask; - siginfo_t info; - - value.sival_int = SIGUSR1; - - printf( "Task_3: sigqueue SIGUSR1 with value= %d\n", value.sival_int ); - status = sigqueue( getpid(), SIGUSR1, value ); - assert( !status ); - - /* catch signal with sigwaitinfo */ - - empty_line(); - - status = sigemptyset( &mask ); - assert( !status ); - - status = sigaddset( &mask, SIGUSR1 ); - assert( !status ); - - printf( "Task_3: sigwaitinfo SIGUSR1 with value= %d\n", value.sival_int ); - status = sigwaitinfo( &mask, &info ); - - /* switch to Init */ - - assert( !(status==-1) ); - printf( - "Task_3: si_signo= %d si_code= %d value= %d\n", - info.si_signo, - info.si_code, - info.si_value.sival_int - ); - - /* catch signal with sigwait */ - - empty_line(); - - status = sigemptyset( &mask ); - assert( !status ); - - status = sigaddset( &mask, SIGUSR1 ); - assert( !status ); - - printf( "Task_3: sigwait SIGUSR1\n" ); - status = sigwait( &mask, &sig ); - - /* switch to Init */ - - assert( !status ); - printf( "Task_3: signo= %d\n", sig ); - - /* catch signal with pause */ - - empty_line(); - - status = sigemptyset( &mask ); - assert( !status ); - - status = sigaddset( &mask, SIGUSR1 ); - assert( !status ); - - printf( "Task_3: pause\n" ); - status = pause( ); - - /* switch to Init */ - - assert( !(status==-1) ); - printf( "Task_3: pause= %d\n", status ); - - - /* send signal to Init task before it has pended for a signal */ - - empty_line(); - - printf( "Task_3: sending SIGUSR2\n" ); - status = pthread_kill( Init_id, SIGUSR2 ); - assert( !status ); - - printf( "Task_3: sleep so the Init task can reguest a signal\n" ); - status = sleep( 1 ); - assert( !status ); - - /* end of task 3 */ - printf( "Task_3: exit\n" ); - pthread_exit( NULL ); - - /* switch to Init */ - - return NULL; /* just so the compiler thinks we returned something */ -} diff --git a/c/src/tests/psxtests/psx05/.cvsignore b/c/src/tests/psxtests/psx05/.cvsignore deleted file mode 100644 index 282522db03..0000000000 --- a/c/src/tests/psxtests/psx05/.cvsignore +++ /dev/null @@ -1,2 +0,0 @@ -Makefile -Makefile.in diff --git a/c/src/tests/psxtests/psx05/Makefile.am b/c/src/tests/psxtests/psx05/Makefile.am deleted file mode 100644 index d659871673..0000000000 --- a/c/src/tests/psxtests/psx05/Makefile.am +++ /dev/null @@ -1,44 +0,0 @@ -## -## $Id$ -## - - -TEST = psx05 - -MANAGERS = all - -C_FILES = init.c task.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/psx05/init.c b/c/src/tests/psxtests/psx05/init.c deleted file mode 100644 index a8dff61a1d..0000000000 --- a/c/src/tests/psxtests/psx05/init.c +++ /dev/null @@ -1,583 +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 - -#define MUTEX_BAD_ID 0xfffffffe - -void Print_mutexattr( - char *msg, - pthread_mutexattr_t *attr -) -{ - int status; - int protocol; - int prioceiling; - int pshared; - - /* protocol */ - - status = pthread_mutexattr_getprotocol( attr, &protocol ); - assert( !status ); - - printf( "%smutex protocol is (%d) -- ", msg, protocol ); - switch ( protocol ) { - case PTHREAD_PRIO_NONE: - puts( "PTHREAD_PRIO_NONE" ); - break; - case PTHREAD_PRIO_INHERIT: - puts( "PTHREAD_PRIO_INHERIT" ); - break; - case PTHREAD_PRIO_PROTECT: - puts( "PTHREAD_PRIO_PROTECT" ); - break; - default: - puts( "UNKNOWN" ); - assert( 0 ); - break; - } - - /* priority ceiling */ - - status = pthread_mutexattr_getprioceiling( attr, &prioceiling ); - assert( !status ); - printf( "%smutex priority ceiling is %d\n", msg, prioceiling ); - - /* process shared */ - - status = pthread_mutexattr_getpshared( attr, &pshared ); - assert( !status ); - printf( "%smutex process shared is (%d) -- ", msg, pshared ); - switch ( pshared ) { - case PTHREAD_PROCESS_PRIVATE: - puts( "PTHREAD_PROCESS_PRIVATE" ); - break; - case PTHREAD_PROCESS_SHARED: - puts( "PTHREAD_PROCESS_SHARED" ); - break; - default: - puts( "UNKNOWN" ); - assert( 0 ); - break; - } -} - -void *POSIX_Init( - void *argument -) -{ - int status; - pthread_mutexattr_t attr; - pthread_mutexattr_t destroyed_attr; - struct timespec times; - struct sched_param param; - int pshared; - int policy; - int protocol; - int ceiling; - int old_ceiling; - - assert( MUTEX_BAD_ID != PTHREAD_MUTEX_INITIALIZER ); - Mutex_bad_id = MUTEX_BAD_ID; - - puts( "\n\n*** POSIX TEST 5 ***" ); - - /* 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 ); - - /* tes pthread_mutex_attr_init */ - - puts( "Init: pthread_mutexattr_init - EINVAL (NULL attr)" ); - status = pthread_mutexattr_init( NULL ); - assert( status == EINVAL ); - - puts( "Init: pthread_mutexattr_init - SUCCESSFUL" ); - status = pthread_mutexattr_init( &attr ); - assert( !status ); - - Print_mutexattr( "Init: ", &attr ); - - /* create an "uninitialized" attribute structure */ - - status = pthread_mutexattr_init( &destroyed_attr ); - assert( !status ); - - puts( "Init: pthread_mutexattr_destroy - SUCCESSFUL" ); - status = pthread_mutexattr_destroy( &destroyed_attr ); - assert( !status ); - - puts( "Init: pthread_mutexattr_destroy - EINVAL (NULL attr)" ); - status = pthread_mutexattr_destroy( NULL ); - assert( status == EINVAL ); - - puts( "Init: pthread_mutexattr_destroy - EINVAL (not initialized)" ); - status = pthread_mutexattr_destroy( &destroyed_attr ); - assert( status == EINVAL ); - - /* error cases for set and get pshared attribute */ - - empty_line(); - - puts( "Init: pthread_mutexattr_getpshared - EINVAL (NULL attr)" ); - status = pthread_mutexattr_getpshared( NULL, &pshared ); - assert( status == EINVAL ); - - puts( "Init: pthread_mutexattr_getpshared - EINVAL (NULL pshared)" ); - status = pthread_mutexattr_getpshared( &attr, NULL ); - assert( status == EINVAL ); - - puts( "Init: pthread_mutexattr_getpshared - EINVAL (not initialized)" ); - status = pthread_mutexattr_getpshared( &destroyed_attr, &pshared ); - assert( status == EINVAL ); - - pshared = PTHREAD_PROCESS_PRIVATE; - puts( "Init: pthread_mutexattr_setpshared - EINVAL (NULL attr)" ); - status = pthread_mutexattr_setpshared( NULL, pshared ); - assert( status == EINVAL ); - - pshared = PTHREAD_PROCESS_PRIVATE; - puts( "Init: pthread_mutexattr_setpshared - EINVAL (not initialized)" ); - status = pthread_mutexattr_setpshared( &destroyed_attr, pshared ); - assert( status == EINVAL ); - - /* error cases for set and get protocol attribute */ - - empty_line(); - - puts( "Init: pthread_mutexattr_getprotocol - EINVAL (NULL attr)" ); - status = pthread_mutexattr_getprotocol( NULL, &protocol ); - assert( status == EINVAL ); - - puts( "Init: pthread_mutexattr_getprotocol - EINVAL (NULL protocol)" ); - status = pthread_mutexattr_getprotocol( &attr, NULL ); - assert( status == EINVAL ); - - puts( "Init: pthread_mutexattr_getprotocol - EINVAL (not initialized)" ); - status = pthread_mutexattr_getprotocol( &destroyed_attr, &protocol ); - assert( status == EINVAL ); - - puts( "Init: pthread_mutexattr_setprotocol - EINVAL (NULL attr)" ); - status = pthread_mutexattr_setprotocol( NULL, PTHREAD_PRIO_NONE ); - assert( status == EINVAL ); - - puts( "Init: pthread_mutexattr_setprotocol - EINVAL (invalid protocol)" ); - status = pthread_mutexattr_setprotocol( &attr, -1 ); - assert( status == EINVAL ); - - puts( "Init: pthread_mutexattr_setprotocol - EINVAL (not initialized)" ); - status = pthread_mutexattr_setprotocol( &destroyed_attr, -1 ); - assert( status == EINVAL ); - - /* error cases for set and get prioceiling attribute */ - - empty_line(); - - puts( "Init: pthread_mutexattr_getprioceiling - EINVAL (NULL attr)" ); - status = pthread_mutexattr_getprioceiling( NULL, &ceiling ); - assert( status == EINVAL ); - - puts( "Init: pthread_mutexattr_getprioceiling - EINVAL (NULL prioceiling)" ); - status = pthread_mutexattr_getprioceiling( &attr, NULL ); - assert( status == EINVAL ); - - puts( "Init: pthread_mutexattr_getprioceiling - EINVAL (not initialized)" ); - status = pthread_mutexattr_getprioceiling( &destroyed_attr, &ceiling ); - assert( status == EINVAL ); - - puts( "Init: pthread_mutexattr_setprioceiling - EINVAL (NULL attr)" ); - status = pthread_mutexattr_setprioceiling( NULL, 128 ); - assert( status == EINVAL ); - - puts( "Init: pthread_mutexattr_setprioceiling - EINVAL (invalid priority)" ); - status = pthread_mutexattr_setprioceiling( &attr, 512 ); - if ( status != EINVAL ) - printf( "status = %d\n", status ); - assert( status == EINVAL ); - - puts( "Init: pthread_mutexattr_setprioceiling - EINVAL (not initialized)" ); - status = pthread_mutexattr_setprioceiling( &destroyed_attr, -1 ); - assert( status == EINVAL ); - - /* create a thread */ - - status = pthread_create( &Task_id, NULL, Task_1, NULL ); - assert( !status ); - - /* now try some basic mutex operations */ - - empty_line(); - - puts( "Init: pthread_mutex_init - EINVAL (NULL mutex_id)" ); - status = pthread_mutex_init( NULL, &attr ); - assert( status == EINVAL ); - - puts( "Init: pthread_mutex_init - EINVAL (not initialized attr)" ); - status = pthread_mutex_init( &Mutex_id, &destroyed_attr ); - assert( status == EINVAL ); - - /* must get around error checks in attribute set routines */ - attr.protocol = -1; - - puts( "Init: pthread_mutex_init - EINVAL (bad protocol)" ); - status = pthread_mutex_init( &Mutex_id, &attr ); - assert( status == EINVAL ); - - /* must get around error checks in attribute set routines */ - attr.protocol = PTHREAD_PRIO_INHERIT; - attr.prio_ceiling = -1; - - puts( "Init: pthread_mutex_init - EINVAL (bad priority ceiling)" ); - status = pthread_mutex_init( &Mutex_id, &attr ); - assert( status == EINVAL ); - - /* now set up for a success pthread_mutex_init */ - - puts( "Init: Resetting mutex attributes" ); - status = pthread_mutexattr_init( &attr ); - assert( !status ); - - puts( "Init: Changing mutex attributes" ); - status = pthread_mutexattr_setprotocol( &attr, PTHREAD_PRIO_INHERIT ); - assert( !status ); - - status = pthread_mutexattr_setprioceiling( &attr, 128 ); - assert( !status ); - - status = pthread_mutexattr_setpshared( &attr, PTHREAD_PROCESS_SHARED ); - assert( !status ); - - Print_mutexattr( "Init: ", &attr ); - - puts( "Init: Resetting mutex attributes" ); - status = pthread_mutexattr_init( &attr ); - assert( !status ); - - /* - * Set the protocol to priority ceiling so the owner check happens - * and the EPERM test (later) will work. - */ - - status = pthread_mutexattr_setprotocol( &attr, PTHREAD_PRIO_INHERIT ); - assert( !status ); - - puts( "Init: pthread_mutex_init - SUCCESSFUL" ); - status = pthread_mutex_init( &Mutex_id, &attr ); - if ( status ) - printf( "status = %d\n", status ); - assert( !status ); - - /* - * This is not required to be an error and when it is, there are - * behavioral conflicts with other implementations. - */ - puts( "Init: pthread_mutex_init - EBUSY (reinitialize an existing mutex) - skipped" ); - -#if 0 - status = pthread_mutex_init( &Mutex_id, &attr ); - if ( !status ) - printf( "status = %d\n", status ); - assert( status == EBUSY ); -#endif - - puts( "Init: pthread_mutex_trylock - EINVAL (illegal ID)" ); - status = pthread_mutex_trylock( &Mutex_bad_id ); - if ( status != EINVAL ) - printf( "status = %d\n", status ); - assert( status == EINVAL ); - - puts( "Init: pthread_mutex_trylock - SUCCESSFUL" ); - status = pthread_mutex_trylock( &Mutex_id ); - if ( status ) - printf( "status = %d\n", status ); - assert( !status ); - - puts( "Init: pthread_mutex_trylock - EDEADLK (already locked)" ); - status = pthread_mutex_trylock( &Mutex_id ); - if ( status != EDEADLK ) - printf( "status = %d\n", status ); - assert( status == EDEADLK ); - - puts( "Init: pthread_mutex_lock - EDEADLK (already locked)" ); - status = pthread_mutex_lock( &Mutex_id ); - if ( status != EDEADLK ) - printf( "status = %d\n", status ); - assert( status == EDEADLK ); - - puts( "Init: Sleep 1 second" ); - - sleep( 1 ); - - /* switch to task 1 */ - - puts( "Init: pthread_mutex_unlock - EINVAL (invalid id)" ); - status = pthread_mutex_unlock( &Mutex_bad_id ); - if ( status != EINVAL ) - printf( "status = %d\n", status ); - assert( status == EINVAL ); - - puts( "Init: pthread_mutex_unlock - SUCCESSFUL" ); - status = pthread_mutex_unlock( &Mutex_id ); - if ( status ) - printf( "status = %d\n", status ); - assert( !status ); - - puts( "Init: pthread_mutex_unlock - EPERM (not owner)" ); - status = pthread_mutex_unlock( &Mutex_id ); - if ( status != EPERM ) - printf( "status = %d\n", status ); - assert( status == EPERM ); - - times.tv_sec = 0; - times.tv_nsec = 500000000; - puts( "Init: pthread_mutex_timedlock - time out in 1/2 second" ); - status = pthread_mutex_timedlock( &Mutex_id, × ); - if ( status != EAGAIN ) - printf( "status = %d\n", status ); - assert( status == EAGAIN ); - - /* switch to idle */ - - puts( "Init: pthread_mutex_timedlock - EAGAIN (timeout)" ); - - /* destroy a mutex */ - - empty_line(); - - puts( "Init: pthread_mutex_init - SUCCESSFUL" ); - status = pthread_mutex_init( &Mutex2_id, &attr ); - if ( status ) - printf( "status = %d\n", status ); - assert( !status ); - - puts( "Init: pthread_mutex_init - EAGAIN (too many)" ); - status = pthread_mutex_init( &Mutex3_id, &attr ); - assert( status == EAGAIN ); - - puts( "Init: pthread_mutexattr_destroy - SUCCESSFUL" ); - status = pthread_mutexattr_destroy( &attr ); - assert( !status ); - - puts( "Init: pthread_mutex_destroy - SUCCESSFUL" ); - status = pthread_mutex_destroy( &Mutex2_id ); - assert( !status ); - - puts( "Init: pthread_mutex_destroy - EINVAL (invalid id)" ); - status = pthread_mutex_destroy( &Mutex_bad_id ); - assert( status == EINVAL ); - - /* destroy a busy mutex */ - - empty_line(); - - puts( "Init: pthread_mutexattr_init - SUCCESSFUL" ); - status = pthread_mutexattr_init( &attr ); - assert( !status ); - - puts( "Init: pthread_mutex_init - SUCCESSFUL" ); - status = pthread_mutex_init( &Mutex2_id, &attr ); - assert( !status ); - - puts( "Init: pthread_mutex_trylock - SUCCESSFUL" ); - status = pthread_mutex_trylock( &Mutex2_id ); - if ( status ) - printf( "status = %d\n", status ); - assert( !status ); - - puts( "Init: pthread_mutex_destroy - EBUSY (already locked)" ); - status = pthread_mutex_destroy( &Mutex2_id ); - if ( status != EBUSY ) - printf( "status = %d\n", status ); - assert( status == EBUSY ); - - puts( "Init: pthread_mutex_unlock - SUCCESSFUL" ); - status = pthread_mutex_unlock( &Mutex2_id ); - assert( !status ); - - puts( "Init: pthread_mutex_destroy - SUCCESSFUL" ); - status = pthread_mutex_destroy( &Mutex2_id ); - assert( !status ); - - /* priority inherit mutex */ - - empty_line(); - - puts( "Init: pthread_mutexattr_init - SUCCESSFUL" ); - status = pthread_mutexattr_init( &attr ); - assert( !status ); - - puts( - "Init: pthread_mutexattr_setprotocol - SUCCESSFUL (PTHREAD_PRIO_INHERIT)" - ); - status = pthread_mutexattr_setprotocol( &attr, PTHREAD_PRIO_INHERIT ); - assert( !status ); - - puts( "Init: pthread_mutex_init - SUCCESSFUL" ); - status = pthread_mutex_init( &Mutex2_id, &attr ); - assert( !status ); - - puts( "Init: pthread_mutex_trylock - SUCCESSFUL" ); - status = pthread_mutex_trylock( &Mutex2_id ); - assert( !status ); - - /* create a thread at a lower priority */ - - status = pthread_create( &Task2_id, NULL, Task_2, NULL ); - assert( !status ); - - /* set priority of Task2 to highest priority */ - - param.sched_priority = 254; - - puts( "Init: pthread_setschedparam - Setting Task2 priority to highest" ); - status = pthread_setschedparam( Task2_id, SCHED_FIFO, ¶m ); - assert( !status ); - - /* switching to Task2 */ - - status = pthread_getschedparam( pthread_self(), &policy, ¶m ); - assert( !status ); - printf( "Init: pthread_getschedparam - priority = %d\n", param.sched_priority); - - puts( "Init: pthread_mutex_unlock - SUCCESSFUL" ); - status = pthread_mutex_unlock( &Mutex2_id ); - assert( !status ); - - puts( "Init: pthread_mutexattr_destroy - SUCCESSFUL" ); - status = pthread_mutexattr_destroy( &attr ); - assert( !status ); - - puts( "Init: pthread_mutex_destroy - SUCCESSFUL" ); - status = pthread_mutex_destroy( &Mutex2_id ); - assert( !status ); - - /* priority ceiling mutex */ - - empty_line(); - - puts( "Init: pthread_mutexattr_init - SUCCESSFUL" ); - status = pthread_mutexattr_init( &attr ); - assert( !status ); - - puts( - "Init: pthread_mutexattr_setprotocol - SUCCESSFUL (PTHREAD_PRIO_PROTECT)" - ); - status = pthread_mutexattr_setprotocol( &attr, PTHREAD_PRIO_PROTECT ); - assert( !status ); - - puts( "Init: pthread_mutex_init - SUCCESSFUL" ); - status = pthread_mutex_init( &Mutex2_id, &attr ); - assert( !status ); - - puts( "Init: pthread_mutex_getprioceiling - EINVAL (invalid id)" ); - status = pthread_mutex_getprioceiling( &Mutex_bad_id, &ceiling ); - assert( status == EINVAL ); - - puts( "Init: pthread_mutex_getprioceiling - EINVAL (NULL ceiling)" ); - status = pthread_mutex_getprioceiling( &Mutex2_id, NULL ); - assert( status == EINVAL ); - - status = pthread_mutex_getprioceiling( &Mutex2_id, &ceiling ); - assert( !status ); - printf( "Init: pthread_mutex_getprioceiling - %d\n", ceiling ); - - puts( "Init: pthread_mutex_setprioceiling - EINVAL (invalid id)" ); - status = pthread_mutex_setprioceiling( &Mutex_bad_id, 200, &old_ceiling ); - assert( status == EINVAL ); - - puts( "Init: pthread_mutex_setprioceiling - EINVAL (illegal priority)" ); - status = pthread_mutex_setprioceiling( &Mutex2_id, 512, &old_ceiling ); - assert( status == EINVAL ); - - puts( "Init: pthread_mutex_setprioceiling - EINVAL (NULL ceiling)" ); - status = pthread_mutex_setprioceiling( &Mutex2_id, 128, NULL ); - assert( status == EINVAL ); - - /* normal cases of set priority ceiling */ - - puts( "Init: pthread_mutex_setprioceiling - new ceiling = 200" ); - status = pthread_mutex_setprioceiling( &Mutex2_id, 200, &old_ceiling ); - assert( !status ); - printf( - "Init: pthread_mutex_setprioceiling - old ceiling = %d\n",old_ceiling - ); - - status = pthread_getschedparam( pthread_self(), &policy, ¶m ); - assert( !status ); - printf( - "Init: pthread_getschedparam - priority = %d\n", param.sched_priority - ); - - puts( "Init: pthread_mutex_trylock - SUCCESSFUL" ); - status = pthread_mutex_trylock( &Mutex2_id ); - assert( !status ); - - status = pthread_getschedparam( pthread_self(), &policy, ¶m ); - assert( !status ); - printf( - "Init: pthread_getschedparam - priority = %d\n", param.sched_priority - ); - - /* create a thread at a higher priority */ - - status = pthread_create( &Task3_id, NULL, Task_3, NULL ); - assert( !status ); - - /* set priority of Task3 to highest priority */ - - param.sched_priority = 199; - - status = pthread_setschedparam( Task3_id, SCHED_FIFO, ¶m ); - assert( !status ); - puts( "Init: pthread_setschedparam - set Task3 priority to highest" ); - - /* DOES NOT SWITCH to Task3 */ - - puts( "Init: Sleep 1 second" ); - assert( !status ); - sleep( 1 ); - - /* switch to task 3 */ - - puts( "Init: pthread_mutex_unlock - SUCCESSFUL" ); - status = pthread_mutex_unlock( &Mutex2_id ); - assert( !status ); - - status = pthread_mutex_getprioceiling( &Mutex2_id, &ceiling ); - assert( !status ); - printf( "Init: pthread_mutex_getprioceiling- ceiling = %d\n", ceiling ); - - /* set priority of Init to highest priority */ - - param.sched_priority = 254; - - status = pthread_setschedparam( Init_id, SCHED_FIFO, ¶m ); - assert( !status ); - puts( "Init: pthread_setschedparam - set Init priority to highest" ); - - puts( "Init: pthread_mutex_lock - EINVAL (priority ceiling violation)" ); - status = pthread_mutex_lock( &Mutex2_id ); - if ( status != EINVAL ) - printf( "status = %d\n", status ); - assert( status == EINVAL ); - - puts( "*** END OF POSIX TEST 5 ***" ); - rtems_test_exit( 0 ); - - return NULL; /* just so the compiler thinks we returned something */ -} diff --git a/c/src/tests/psxtests/psx05/psx05.scn b/c/src/tests/psxtests/psx05/psx05.scn deleted file mode 100644 index bc93da60b8..0000000000 --- a/c/src/tests/psxtests/psx05/psx05.scn +++ /dev/null @@ -1,103 +0,0 @@ -*** POSIX TEST 5 *** -Init's ID is 0x0b010001 -Init: pthread_mutexattr_init - EINVAL (NULL attr) -Init: pthread_mutexattr_init - SUCCESSFUL -Init: mutex protocol is (0) -- PTHREAD_PRIO_NONE -Init: mutex priority ceiling is 254 -Init: mutex process shared is (0) -- PTHREAD_PROCESS_PRIVATE -Init: pthread_mutexattr_destroy - SUCCESSFUL -Init: pthread_mutexattr_destroy - EINVAL (NULL attr) -Init: pthread_mutexattr_destroy - EINVAL (not initialized) -Init: pthread_mutexattr_getpshared - EINVAL (NULL attr) -Init: pthread_mutexattr_getpshared - EINVAL (NULL pshared) -Init: pthread_mutexattr_getpshared - EINVAL (not initialized) -Init: pthread_mutexattr_setpshared - EINVAL (NULL attr) -Init: pthread_mutexattr_setpshared - EINVAL (not initialized) -Init: pthread_mutexattr_getprotocol - EINVAL (NULL attr) -Init: pthread_mutexattr_getprotocol - EINVAL (NULL protocol) -Init: pthread_mutexattr_getprotocol - EINVAL (not initialized) -Init: pthread_mutexattr_setprotocol - EINVAL (NULL attr) -Init: pthread_mutexattr_setprotocol - EINVAL (invalid protocol) -Init: pthread_mutexattr_setprotocol - EINVAL (not initialized) -Init: pthread_mutexattr_getprioceiling - EINVAL (NULL attr) -Init: pthread_mutexattr_getprioceiling - EINVAL (NULL prioceiling) -Init: pthread_mutexattr_getprioceiling - EINVAL (not initialized) -Init: pthread_mutexattr_setprioceiling - EINVAL (NULL attr) -Init: pthread_mutexattr_setprioceiling - EINVAL (invalid priority) -Init: pthread_mutexattr_setprioceiling - EINVAL (not initialized) -Init: pthread_mutex_init - EINVAL (NULL mutex_id) -Init: pthread_mutex_init - EINVAL (not initialized attr) -Init: pthread_mutex_init - EINVAL (bad protocol) -Init: pthread_mutex_init - EINVAL (bad priority ceiling) -Init: Resetting mutex attributes -Init: Changing mutex attributes -Init: mutex protocol is (1) -- PTHREAD_PRIO_INHERIT -Init: mutex priority ceiling is 128 -Init: mutex process shared is (1) -- PTHREAD_PROCESS_SHARED -Init: Resetting mutex attributes -Init: pthread_mutex_init - SUCCESSFUL -Init: pthread_mutex_init - EBUSY (reinitialize an existing mutex) - skipped -Init: pthread_mutex_trylock - EINVAL (illegal ID) -Init: pthread_mutex_trylock - SUCCESSFUL -Init: pthread_mutex_trylock - EDEADLK (already locked) -Init: pthread_mutex_lock - EDEADLK (already locked) -Init: Sleep 1 second -Task: pthread_mutex_trylock already locked -Task: pthread_mutex_lock unavailable -Init: pthread_mutex_unlock - EINVAL (invalid id) -Init: pthread_mutex_unlock - SUCCESSFUL -Init: pthread_mutex_unlock - EPERM (not owner) -Init: pthread_mutex_timedlock - time out in 1/2 second -Task: mutex acquired -Task: sleep for 2 seconds -Init: pthread_mutex_timedlock - EAGAIN (timeout) -Init: pthread_mutex_init - SUCCESSFUL -Init: pthread_mutex_init - EAGAIN (too many) -Init: pthread_mutexattr_destroy - SUCCESSFUL -Init: pthread_mutex_destroy - SUCCESSFUL -Init: pthread_mutex_destroy - EINVAL (invalid id) -Init: pthread_mutexattr_init - SUCCESSFUL -Init: pthread_mutex_init - SUCCESSFUL -Init: pthread_mutex_trylock - SUCCESSFUL -Init: pthread_mutex_destroy - EBUSY (already locked) -Init: pthread_mutex_unlock - SUCCESSFUL -Init: pthread_mutex_destroy - SUCCESSFUL -Init: pthread_mutexattr_init - SUCCESSFUL -Init: pthread_mutexattr_setprotocol - SUCCESSFUL (PTHREAD_PRIO_INHERIT) -Init: pthread_mutex_init - SUCCESSFUL -Init: pthread_mutex_trylock - SUCCESSFUL -Init: pthread_setschedparam - Setting Task2 priority to highest -Task 2: pthread_mutex_lock unavailable (inherit case) -Init: pthread_getschedparam - priority = 254 -Init: pthread_mutex_unlock - SUCCESSFUL -Task 2: mutex acquired -Task 2: unlock Mutex 2 -Task 2: exit -Init: pthread_mutexattr_destroy - SUCCESSFUL -Init: pthread_mutex_destroy - SUCCESSFUL -Init: pthread_mutexattr_init - SUCCESSFUL -Init: pthread_mutexattr_setprotocol - SUCCESSFUL (PTHREAD_PRIO_PROTECT) -Init: pthread_mutex_init - SUCCESSFUL -Init: pthread_mutex_getprioceiling - EINVAL (invalid id) -Init: pthread_mutex_getprioceiling - EINVAL (NULL ceiling) -Init: pthread_mutex_getprioceiling - 254 -Init: pthread_mutex_setprioceiling - EINVAL (invalid id) -Init: pthread_mutex_setprioceiling - EINVAL (illegal priority) -Init: pthread_mutex_setprioceiling - EINVAL (NULL ceiling) -Init: pthread_mutex_setprioceiling - new ceiling = 200 -Init: pthread_mutex_setprioceiling - old ceiling = 254 -Init: pthread_getschedparam - priority = 2 -Init: pthread_mutex_trylock - SUCCESSFUL -Init: pthread_getschedparam - priority = 200 -Init: pthread_setschedparam - set Task3 priority to highest -Init: Sleep 1 second -Task 3: pthread_mutex_lock unavailable (inherit case) -Init: pthread_mutex_unlock - SUCCESSFUL -Task 3: mutex acquired -Task 3: unlock Mutex 2 -Task 3: pthread_getschedparam priority = 199 -Task 3: exit -Init: pthread_mutex_getprioceiling- ceiling = 200 -Init: pthread_setschedparam - set Init priority to highest -Init: pthread_mutex_lock - EINVAL (priority ceiling violation) -*** END OF POSIX TEST 5 *** diff --git a/c/src/tests/psxtests/psx05/system.h b/c/src/tests/psxtests/psx05/system.h deleted file mode 100644 index 3cb40dffcb..0000000000 --- a/c/src/tests/psxtests/psx05/system.h +++ /dev/null @@ -1,65 +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 - -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_MAXIMUM_POSIX_MUTEXES 2 - -#define CONFIGURE_POSIX_INIT_THREAD_TABLE - -#include - -/* global variables */ - -#ifdef CONFIGURE_INIT -#define TEST_EXTERN -#else -#define TEST_EXTERN extern -#endif - -TEST_EXTERN pthread_t Init_id; -TEST_EXTERN pthread_t Task_id; -TEST_EXTERN pthread_t Task2_id; -TEST_EXTERN pthread_t Task3_id; -TEST_EXTERN pthread_mutex_t Mutex_id; -TEST_EXTERN pthread_mutex_t Mutex2_id; -TEST_EXTERN pthread_mutex_t Mutex3_id; -TEST_EXTERN pthread_mutex_t Mutex_bad_id; - -/* end of include file */ diff --git a/c/src/tests/psxtests/psx05/task.c b/c/src/tests/psxtests/psx05/task.c deleted file mode 100644 index b5d54aa96c..0000000000 --- a/c/src/tests/psxtests/psx05/task.c +++ /dev/null @@ -1,57 +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 - -void *Task_1( - void *argument -) -{ - int status; - - printf( "Task: pthread_mutex_trylock already locked\n" ); - status = pthread_mutex_trylock( &Mutex_id ); - if ( status != EBUSY ) - printf( "status = %d\n", status ); - assert( status == EBUSY ); - - printf( "Task: pthread_mutex_lock unavailable\n" ); - status = pthread_mutex_lock( &Mutex_id ); - if ( status ) - printf( "status = %d\n", status ); - assert( !status ); - - /* switch to init */ - - printf( "Task: mutex acquired\n" ); - - printf( "Task: sleep for 2 seconds\n" ); - sleep( 2 ); - - /* switch to init */ - - printf( "Task: exit\n" ); - pthread_exit( NULL ); - - /* switch to Init */ - - return NULL; /* just so the compiler thinks we returned something */ -} diff --git a/c/src/tests/psxtests/psx05/task2.c b/c/src/tests/psxtests/psx05/task2.c deleted file mode 100644 index 1c744b3660..0000000000 --- a/c/src/tests/psxtests/psx05/task2.c +++ /dev/null @@ -1,48 +0,0 @@ -/* Task_2 - * - * This routine serves as a test task. - * - * 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 - -void *Task_2( - void *argument -) -{ - int status; - - printf( "Task 2: pthread_mutex_lock unavailable (inherit case)\n" ); - status = pthread_mutex_lock( &Mutex2_id ); - if ( status ) - printf( "status =%d\n", status ); - assert( !status ); - printf( "Task 2: mutex acquired\n" ); - - /* switch to init */ - - printf( "Task 2: unlock Mutex 2\n" ); - status = pthread_mutex_unlock( &Mutex2_id ); - assert( !status ); - - printf( "Task 2: exit\n" ); - pthread_exit( NULL ); - - /* switch to Init */ - - return NULL; /* just so the compiler thinks we returned something */ -} diff --git a/c/src/tests/psxtests/psx05/task3.c b/c/src/tests/psxtests/psx05/task3.c deleted file mode 100644 index d5bb8bf30f..0000000000 --- a/c/src/tests/psxtests/psx05/task3.c +++ /dev/null @@ -1,50 +0,0 @@ -/* Task_3 - * - * This routine serves as a test task. - * - * 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 - -void *Task_3( - void *argument -) -{ - int status; - struct sched_param param; - int policy; - - printf( "Task 3: pthread_mutex_lock unavailable (inherit case)\n" ); - status = pthread_mutex_lock( &Mutex2_id ); - printf( "Task 3: mutex acquired\n" ); - assert( !status ); - - printf( "Task 3: unlock Mutex 2\n" ); - status = pthread_mutex_unlock( &Mutex2_id ); - assert( !status ); - - status = pthread_getschedparam( pthread_self(), &policy, ¶m ); - assert( !status ); - printf( "Task 3: pthread_getschedparam priority = %d\n", param.sched_priority ); - - printf( "Task 3: exit\n" ); - pthread_exit( NULL ); - - /* switch to Init */ - - return NULL; /* just so the compiler thinks we returned something */ -} diff --git a/c/src/tests/psxtests/psx06/.cvsignore b/c/src/tests/psxtests/psx06/.cvsignore deleted file mode 100644 index 282522db03..0000000000 --- a/c/src/tests/psxtests/psx06/.cvsignore +++ /dev/null @@ -1,2 +0,0 @@ -Makefile -Makefile.in diff --git a/c/src/tests/psxtests/psx06/Makefile.am b/c/src/tests/psxtests/psx06/Makefile.am deleted file mode 100644 index a5a9aaee90..0000000000 --- a/c/src/tests/psxtests/psx06/Makefile.am +++ /dev/null @@ -1,44 +0,0 @@ -## -## $Id$ -## - - -TEST = psx06 - -MANAGERS = all - -C_FILES = init.c task.c task2.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/psx06/init.c b/c/src/tests/psxtests/psx06/init.c deleted file mode 100644 index 42f3dc32df..0000000000 --- a/c/src/tests/psxtests/psx06/init.c +++ /dev/null @@ -1,120 +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 - -void Key_destructor( - void *key_data -) -{ - Destructor_invoked++; - - /* - * This checks out that we only run the destructor multiple times - * when the key data is non null. - */ - - if ( Destructor_invoked == 5 ) - (void) pthread_setspecific( Key_id, NULL ); -} - -void *POSIX_Init( - void *argument -) -{ - int status; - unsigned int remaining; - rtems_unsigned32 *key_data; - - puts( "\n\n*** POSIX TEST 6 ***" ); - - /* 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 ); - - /* create a couple of threads */ - - status = pthread_create( &Task_id, NULL, Task_1, NULL ); - assert( !status ); - - status = pthread_create( &Task2_id, NULL, Task_2, NULL ); - assert( !status ); - - /* create a key */ - - empty_line(); - - Destructor_invoked = 0; - puts( "Init: pthread_key_create - SUCCESSFUL" ); - status = pthread_key_create( &Key_id, Key_destructor ); - if ( status ) - printf( "status = %d\n", status ); - assert( !status ); - - printf( "Destructor invoked %d times\n", Destructor_invoked ); - - puts( "Init: pthread_key_create - EAGAIN (too many keys)" ); - status = pthread_key_create( &Key_id, Key_destructor ); - assert( status == EAGAIN ); - - puts( "Init: pthread_setspecific - EINVAL (invalid key)" ); - status = pthread_setspecific( -1, &Data_array[ 0 ] ); - assert( status == EINVAL ); - - puts( "Init: pthread_getspecific - EINVAL (invalid key)" ); - key_data = pthread_getspecific( -1 ); - assert( !key_data ); - - puts( "Init: pthread_key_delete - EINVAL (invalid key)" ); - status = pthread_key_delete( -1 ); - assert( status == EINVAL ); - - printf( "Init: Setting the key to %d\n", 0 ); - status = pthread_setspecific( Key_id, &Data_array[ 0 ] ); - if ( status ) - printf( "status = %d\n", status ); - assert( !status ); - - /* switch to task 1 */ - - key_data = pthread_getspecific( Key_id ); - printf( "Init: Got the key value of %ld\n", - (unsigned long) ((rtems_unsigned32 *)key_data - Data_array) ); - - remaining = sleep( 3 ); - if ( remaining ) - printf( "seconds remaining = %d\n", remaining ); - assert( !remaining ); - - /* switch to task 1 */ - - /* delete the key */ - - puts( "Init: pthread_key_delete - SUCCESSFUL" ); - status = pthread_key_delete( Key_id ); - if ( status ) - printf( "status = %d\n", status ); - assert( !status ); - - printf( "Destructor invoked %d times\n", Destructor_invoked ); - - puts( "*** END OF POSIX TEST 6 ***" ); - rtems_test_exit( 0 ); - - return NULL; /* just so the compiler thinks we returned something */ -} diff --git a/c/src/tests/psxtests/psx06/psx06.scn b/c/src/tests/psxtests/psx06/psx06.scn deleted file mode 100644 index 4e16ee4e37..0000000000 --- a/c/src/tests/psxtests/psx06/psx06.scn +++ /dev/null @@ -1,20 +0,0 @@ -*** POSIX TEST 6 *** -Init's ID is 0x0b010001 -Init: pthread_key_create - SUCCESSFUL -Destructor invoked 0 times -Init: pthread_key_create - EAGAIN (too many keys) -Init: pthread_setspecific - EINVAL (invalid key) -Init: pthread_getspecific - EINVAL (invalid key) -Init: pthread_key_delete - EINVAL (invalid key) -Init: Setting the key to 0 -Init: Got the key value of 0 -Task_1: Setting the key to 1 -Task_1: Got the key value of 1 -Task_1: exitting -Destructor invoked 4 times -Task_2: Setting the key to 2 -Task_2: Got the key value of 2 -Task2: exitting -Init: pthread_key_delete - SUCCESSFUL -Destructor invoked 5 times -*** END OF POSIX TEST 6 *** diff --git a/c/src/tests/psxtests/psx06/system.h b/c/src/tests/psxtests/psx06/system.h deleted file mode 100644 index 9e6ee07e20..0000000000 --- a/c/src/tests/psxtests/psx06/system.h +++ /dev/null @@ -1,59 +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 - -void *POSIX_Init( - void *argument -); - -void *Task_1( - void *argument -); - -void *Task_2( - void *argument -); - -/* configuration information */ - -#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER -#define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER - -#define CONFIGURE_MAXIMUM_POSIX_THREADS 3 -#define CONFIGURE_MAXIMUM_POSIX_KEYS 1 - -#define CONFIGURE_POSIX_INIT_THREAD_TABLE - -#include - -/* global variables */ - -#ifdef CONFIGURE_INIT -#define TEST_EXTERN -#else -#define TEST_EXTERN extern -#endif - -TEST_EXTERN pthread_t Init_id; -TEST_EXTERN pthread_t Task_id; -TEST_EXTERN pthread_t Task2_id; -TEST_EXTERN pthread_key_t Key_id; -TEST_EXTERN rtems_unsigned32 Data_array[ CONFIGURE_MAXIMUM_POSIX_THREADS ]; -TEST_EXTERN rtems_unsigned32 Destructor_invoked; - -/* end of include file */ diff --git a/c/src/tests/psxtests/psx06/task.c b/c/src/tests/psxtests/psx06/task.c deleted file mode 100644 index 51dc740ea5..0000000000 --- a/c/src/tests/psxtests/psx06/task.c +++ /dev/null @@ -1,50 +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 - -void *Task_1( - void *argument -) -{ - int status; - rtems_unsigned32 *key_data; - - printf( "Task_1: Setting the key to %d\n", 1 ); - status = pthread_setspecific( Key_id, &Data_array[ 1 ] ); - if ( status ) - printf( "status = %d\n", status ); - assert( !status ); - - key_data = pthread_getspecific( Key_id ); - printf( "Task_1: Got the key value of %ld\n", - (unsigned long) ((rtems_unsigned32 *)key_data - Data_array) ); - if ( status ) - printf( "status = %d\n", status ); - assert( !status ); - - puts( "Task_1: exitting" ); - pthread_exit( NULL ); - - /* switch to task 2 */ - - return NULL; /* just so the compiler thinks we returned something */ -} diff --git a/c/src/tests/psxtests/psx06/task2.c b/c/src/tests/psxtests/psx06/task2.c deleted file mode 100644 index 9556a3404d..0000000000 --- a/c/src/tests/psxtests/psx06/task2.c +++ /dev/null @@ -1,51 +0,0 @@ -/* Task_2 - * - * This routine serves as a test task. - * - * 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 - -void *Task_2( - void *argument -) -{ - int status; - rtems_unsigned32 *key_data; - - printf( "Destructor invoked %d times\n", Destructor_invoked ); - - printf( "Task_2: Setting the key to %d\n", 2 ); - status = pthread_setspecific( Key_id, &Data_array[ 2 ] ); - if ( status ) - printf( "status = %d\n", status ); - assert( !status ); - - key_data = pthread_getspecific( Key_id ); - printf( "Task_2: Got the key value of %ld\n", - (unsigned long) ((rtems_unsigned32 *)key_data - Data_array) ); - if ( status ) - printf( "status = %d\n", status ); - assert( !status ); - - puts( "Task2: exitting" ); - pthread_exit( NULL ); - - /* switch to init task */ - - return NULL; /* just so the compiler thinks we returned something */ -} diff --git a/c/src/tests/psxtests/psx07/.cvsignore b/c/src/tests/psxtests/psx07/.cvsignore deleted file mode 100644 index 282522db03..0000000000 --- a/c/src/tests/psxtests/psx07/.cvsignore +++ /dev/null @@ -1,2 +0,0 @@ -Makefile -Makefile.in diff --git a/c/src/tests/psxtests/psx07/Makefile.am b/c/src/tests/psxtests/psx07/Makefile.am deleted file mode 100644 index 89936486c1..0000000000 --- a/c/src/tests/psxtests/psx07/Makefile.am +++ /dev/null @@ -1,44 +0,0 @@ -## -## $Id$ -## - - -TEST = psx07 - -MANAGERS = all - -C_FILES = init.c task.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/psx07/init.c b/c/src/tests/psxtests/psx07/init.c deleted file mode 100644 index ef62680cf1..0000000000 --- a/c/src/tests/psxtests/psx07/init.c +++ /dev/null @@ -1,493 +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 - -void print_schedparam( - char *prefix, - struct sched_param *schedparam -) -{ - printf( "%ssched priority = %d\n", prefix, schedparam->sched_priority ); -#if defined(_POSIX_SPORADIC_SERVER) - printf( "%sss_low_priority = %d\n", prefix, schedparam->ss_low_priority ); - printf( "%sss_replenish_period = (%ld, %ld)\n", prefix, - schedparam->ss_replenish_period.tv_sec, - schedparam->ss_replenish_period.tv_nsec ); - printf( "%sss_initial_budget = (%ld, %ld)\n", prefix, - schedparam->ss_initial_budget.tv_sec, - schedparam->ss_initial_budget.tv_nsec ); -#else - printf( "%s_POSIX_SPORADIC_SERVER is not defined\n" ); -#endif -} - -void *POSIX_Init( - void *argument -) -{ - int status; - int scope; - int inheritsched; - int schedpolicy; - size_t stacksize; - void *stackaddr; - int detachstate; - struct sched_param schedparam; - pthread_attr_t attr; - pthread_attr_t destroyed_attr; - - puts( "\n\n*** POSIX TEST 7 ***" ); - - /* 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 ); - - /* exercise init and destroy */ - - puts( "Init: pthread_attr_init - EINVAL (NULL attr)" ); - status = pthread_attr_init( NULL ); - assert( status == EINVAL ); - - puts( "Init: pthread_attr_init - SUCCESSFUL" ); - status = pthread_attr_init( &attr ); - assert( !status ); - - puts( "Init: initialize and destroy an attribute - SUCCESSFUL" ); - status = pthread_attr_init( &destroyed_attr ); - assert( !status ); - - status = pthread_attr_destroy( &destroyed_attr ); - assert( !status ); - - puts( "Init: pthread_attr_destroy - EINVAL (NULL attr)" ); - status = pthread_attr_destroy( NULL ); - assert( status == EINVAL ); - - puts( "Init: pthread_attr_destroy - EINVAL (not initialized)" ); - status = pthread_attr_destroy( &destroyed_attr ); - assert( status == EINVAL ); - - /* check some errors in pthread_create */ - - puts( "Init: pthread_create - EINVAL (attr not initialized)" ); - status = pthread_create( &Task_id, &destroyed_attr, Task_1, NULL ); - assert( status == EINVAL ); - - /* junk stack address */ - status = pthread_attr_setstackaddr( &attr, (void *)&schedparam ); - assert( !status ); - - /* must go around pthread_attr_setstacksize to set a bad stack size */ - attr.stacksize = 0; - - puts( "Init: pthread_create - EINVAL (stacksize too small)" ); - status = pthread_create( &Task_id, &attr, Task_1, NULL ); - assert( status == EINVAL ); - - /* reset all the fields */ - status = pthread_attr_init( &attr ); - assert( !status ); - - attr.stacksize = rtems_configuration_get_work_space_size() * 10; - puts( "Init: pthread_create - EAGAIN (stacksize too large)" ); - status = pthread_create( &Task_id, &attr, Task_1, NULL ); - assert( status == EAGAIN ); - - status = pthread_attr_init( &attr ); - assert( !status ); - - /* must go around pthread_attr_set routines to set a bad value */ - attr.inheritsched = -1; - - puts( "Init: pthread_create - EINVAL (invalid inherit scheduler)" ); - status = pthread_create( &Task_id, &attr, Task_1, NULL ); - assert( status == EINVAL ); - - /* check out the error case for system scope not supported */ - - status = pthread_attr_init( &attr ); - assert( !status ); - - /* must go around pthread_attr_set routines to set a bad value */ - attr.contentionscope = PTHREAD_SCOPE_SYSTEM; - - puts( "Init: pthread_create - ENOTSUP (unsupported system contention scope)" ); - status = pthread_create( &Task_id, &attr, Task_1, NULL ); - assert( status == ENOTSUP ); - - status = pthread_attr_init( &attr ); - assert( !status ); - - /* now check out pthread_create for inherit scheduler */ - - status = pthread_attr_setinheritsched( &attr, PTHREAD_INHERIT_SCHED ); - assert( !status ); - - puts( "Init: pthread_create - SUCCESSFUL (inherit scheduler)" ); - status = pthread_create( &Task_id, &attr, Task_1, NULL ); - assert( !status ); - - status = pthread_join( Task_id, NULL ); - assert( !status ); - - /* switch to Task_1 */ - - /* exercise get and set scope */ - - empty_line(); - - status = pthread_attr_init( &attr ); - assert( !status ); - - puts( "Init: pthread_attr_setscope - EINVAL (NULL attr)" ); - status = pthread_attr_setscope( NULL, PTHREAD_SCOPE_PROCESS ); - assert( status == EINVAL ); - - puts( "Init: pthread_attr_setscope - ENOTSUP" ); - status = pthread_attr_setscope( &attr, PTHREAD_SCOPE_SYSTEM ); - assert( status == ENOTSUP ); - - puts( "Init: pthread_attr_setscope - EINVAL (not initialized attr)" ); - status = pthread_attr_setscope( &destroyed_attr, PTHREAD_SCOPE_PROCESS ); - assert( status == EINVAL ); - - puts( "Init: pthread_attr_setscope - EINVAL (invalid scope)" ); - status = pthread_attr_setscope( &attr, -1 ); - assert( status == EINVAL ); - - puts( "Init: pthread_attr_setscope - SUCCESSFUL" ); - status = pthread_attr_setscope( &attr, PTHREAD_SCOPE_PROCESS ); - assert( !status ); - - puts( "Init: pthread_attr_getscope - EINVAL (NULL attr)" ); - status = pthread_attr_getscope( NULL, &scope ); - assert( status == EINVAL ); - - puts( "Init: pthread_attr_getscope - EINVAL (NULL scope)" ); - status = pthread_attr_getscope( &attr, NULL ); - assert( status == EINVAL ); - - puts( "Init: pthread_attr_getscope - EINVAL (not initialized attr)" ); - status = pthread_attr_getscope( &destroyed_attr, &scope ); - assert( status == EINVAL ); - - puts( "Init: pthread_attr_getscope - SUCCESSFUL" ); - status = pthread_attr_getscope( &attr, &scope ); - assert( !status ); - printf( "Init: current scope attribute = %d\n", scope ); - - /* exercise get and set inherit scheduler */ - - empty_line(); - - puts( "Init: pthread_attr_setinheritsched - EINVAL (NULL attr)" ); - status = pthread_attr_setinheritsched( NULL, PTHREAD_INHERIT_SCHED ); - assert( status == EINVAL ); - - puts( "Init: pthread_attr_setinheritsched - EINVAL (not initialized attr)" ); - status = - pthread_attr_setinheritsched( &destroyed_attr, PTHREAD_INHERIT_SCHED ); - assert( status == EINVAL ); - - puts( "Init: pthread_attr_setinheritsched - ENOTSUP (invalid inheritsched)" ); - status = pthread_attr_setinheritsched( &attr, -1 ); - assert( status == ENOTSUP ); - - puts( "Init: pthread_attr_setinheritsched - SUCCESSFUL" ); - status = pthread_attr_setinheritsched( &attr, PTHREAD_INHERIT_SCHED ); - assert( !status ); - - puts( "Init: pthread_attr_getinheritsched - EINVAL (NULL attr)" ); - status = pthread_attr_getinheritsched( NULL, &inheritsched ); - assert( status == EINVAL ); - - puts( "Init: pthread_attr_getinheritsched - EINVAL (NULL inheritsched)" ); - status = pthread_attr_getinheritsched( &attr, NULL ); - assert( status == EINVAL ); - - puts( "Init: pthread_attr_getinheritsched - EINVAL (not initialized attr)" ); - status = pthread_attr_getinheritsched( &destroyed_attr, &inheritsched ); - assert( status == EINVAL ); - - puts( "Init: pthread_attr_getinheritsched - SUCCESSFUL" ); - status = pthread_attr_getinheritsched( &attr, &inheritsched ); - assert( !status ); - printf( "Init: current inherit scheduler attribute = %d\n", inheritsched ); - - /* exercise get and set inherit scheduler */ - - empty_line(); - - puts( "Init: pthread_attr_setschedpolicy - EINVAL (NULL attr)" ); - status = pthread_attr_setschedpolicy( NULL, SCHED_FIFO ); - assert( status == EINVAL ); - - puts( "Init: pthread_attr_setschedpolicy - EINVAL (not initialized attr)" ); - status = - pthread_attr_setschedpolicy( &destroyed_attr, SCHED_OTHER ); - assert( status == EINVAL ); - - puts( "Init: pthread_attr_setschedpolicy - ENOTSUP (invalid schedpolicy)" ); - status = pthread_attr_setschedpolicy( &attr, -1 ); - assert( status == ENOTSUP ); - - puts( "Init: pthread_attr_setschedpolicy - SUCCESSFUL" ); - status = pthread_attr_setschedpolicy( &attr, SCHED_RR ); - assert( !status ); - - puts( "Init: pthread_attr_getschedpolicy - EINVAL (NULL attr)" ); - status = pthread_attr_getschedpolicy( NULL, &schedpolicy ); - assert( status == EINVAL ); - - puts( "Init: pthread_attr_getschedpolicy - EINVAL (NULL schedpolicy)" ); - status = pthread_attr_getschedpolicy( &attr, NULL ); - assert( status == EINVAL ); - - puts( "Init: pthread_attr_getschedpolicy - EINVAL (not initialized attr)" ); - status = pthread_attr_getschedpolicy( &destroyed_attr, &schedpolicy ); - assert( status == EINVAL ); - - puts( "Init: pthread_attr_getschedpolicy - SUCCESSFUL" ); - status = pthread_attr_getschedpolicy( &attr, &schedpolicy ); - assert( !status ); - printf( "Init: current scheduler policy attribute = %d\n", schedpolicy ); - - /* exercise get and set stack size */ - - empty_line(); - - puts( "Init: pthread_attr_setstacksize - EINVAL (NULL attr)" ); - status = pthread_attr_setstacksize( NULL, 0 ); - assert( status == EINVAL ); - - puts( "Init: pthread_attr_setstacksize - EINVAL (not initialized attr)" ); - status = - pthread_attr_setstacksize( &destroyed_attr, 0 ); - assert( status == EINVAL ); - - puts( "Init: pthread_attr_setstacksize - SUCCESSFUL (low stacksize)" ); - status = pthread_attr_setstacksize( &attr, 0 ); - assert( !status ); - - puts( "Init: pthread_attr_setstacksize - SUCCESSFUL (high stacksize)" ); - status = pthread_attr_setstacksize( &attr, STACK_MINIMUM_SIZE * 2 ); - assert( !status ); - - puts( "Init: pthread_attr_getstacksize - EINVAL (NULL attr)" ); - status = pthread_attr_getstacksize( NULL, &stacksize ); - assert( status == EINVAL ); - - puts( "Init: pthread_attr_getstacksize - EINVAL (NULL stacksize)" ); - status = pthread_attr_getstacksize( &attr, NULL ); - assert( status == EINVAL ); - - puts( "Init: pthread_attr_getstacksize - EINVAL (not initialized attr)" ); - status = pthread_attr_getstacksize( &destroyed_attr, &stacksize ); - assert( status == EINVAL ); - - puts( "Init: pthread_attr_getstacksize - SUCCESSFUL" ); - status = pthread_attr_getstacksize( &attr, &stacksize ); - assert( !status ); - if ( stacksize == (STACK_MINIMUM_SIZE * 2) ) - printf( "Init: current stack size attribute is OK\n" ); - - /* exercise get and set stack address */ - - empty_line(); - - puts( "Init: pthread_attr_setstackaddr - EINVAL (NULL attr)" ); - status = pthread_attr_setstackaddr( NULL, NULL ); - assert( status == EINVAL ); - - puts( "Init: pthread_attr_setstackaddr - EINVAL (not initialized attr)" ); - status = - pthread_attr_setstackaddr( &destroyed_attr, NULL ); - assert( status == EINVAL ); - - puts( "Init: pthread_attr_setstackaddr - SUCCESSFUL" ); - status = pthread_attr_setstackaddr( &attr, 0 ); - assert( !status ); - - puts( "Init: pthread_attr_getstackaddr - EINVAL (NULL attr)" ); - status = pthread_attr_getstackaddr( NULL, &stackaddr ); - assert( status == EINVAL ); - - puts( "Init: pthread_attr_getstackaddr - EINVAL (NULL stackaddr)" ); - status = pthread_attr_getstackaddr( &attr, NULL ); - assert( status == EINVAL ); - - puts( "Init: pthread_attr_getstackaddr - EINVAL (not initialized attr)" ); - status = pthread_attr_getstackaddr( &destroyed_attr, &stackaddr ); - assert( status == EINVAL ); - - puts( "Init: pthread_attr_getstackaddr - SUCCESSFUL" ); - status = pthread_attr_getstackaddr( &attr, &stackaddr ); - assert( !status ); - printf( "Init: current stack address attribute = %p\n", stackaddr ); - - /* exercise get and set detach state */ - - empty_line(); - - puts( "Init: pthread_attr_setdetachstate - EINVAL (NULL attr)" ); - status = pthread_attr_setdetachstate( NULL, PTHREAD_CREATE_DETACHED ); - assert( status == EINVAL ); - - puts( "Init: pthread_attr_setdetachstate - EINVAL (not initialized attr)" ); - status = - pthread_attr_setdetachstate( &destroyed_attr, PTHREAD_CREATE_JOINABLE ); - assert( status == EINVAL ); - - puts( "Init: pthread_attr_setdetachstate - EINVAL (invalid detachstate)" ); - status = pthread_attr_setdetachstate( &attr, -1 ); - assert( status == EINVAL ); - - puts( "Init: pthread_attr_setdetachstate - SUCCESSFUL" ); - status = pthread_attr_setdetachstate( &attr, PTHREAD_CREATE_JOINABLE ); - assert( !status ); - - puts( "Init: pthread_attr_getdetachstate - EINVAL (NULL attr)" ); - status = pthread_attr_getdetachstate( NULL, &detachstate ); - assert( status == EINVAL ); - - puts( "Init: pthread_attr_getdetachstate - EINVAL (NULL detatchstate)" ); - status = pthread_attr_getdetachstate( &attr, NULL ); - assert( status == EINVAL ); - - puts( "Init: pthread_attr_getdetachstate - EINVAL (not initialized attr)" ); - status = pthread_attr_getdetachstate( &destroyed_attr, &detachstate ); - assert( status == EINVAL ); - - puts( "Init: pthread_attr_getdetachstate - SUCCESSFUL" ); - status = pthread_attr_getdetachstate( &attr, &detachstate ); - assert( !status ); - printf( "Init: current detach state attribute = %d\n", detachstate ); - - /* exercise get and set scheduling parameters */ - - empty_line(); - - puts( "Init: pthread_attr_getschedparam - SUCCESSFUL" ); - status = pthread_attr_getschedparam( &attr, &schedparam ); - assert( !status ); - - print_schedparam( "Init: ", &schedparam ); - - puts( "Init: pthread_attr_setschedparam - EINVAL (NULL attr)" ); - status = pthread_attr_setschedparam( NULL, &schedparam ); - assert( status == EINVAL ); - - puts( "Init: pthread_attr_setschedparam - EINVAL (not initialized attr)" ); - status = pthread_attr_setschedparam( &destroyed_attr, &schedparam ); - assert( status == EINVAL ); - - puts( "Init: pthread_attr_setschedparam - EINVAL (NULL schedparam)" ); - status = pthread_attr_setschedparam( &attr, NULL ); - assert( status == EINVAL ); - - puts( "Init: pthread_attr_setschedparam - SUCCESSFUL" ); - status = pthread_attr_setschedparam( &attr, &schedparam ); - assert( !status ); - - puts( "Init: pthread_attr_getschedparam - EINVAL (NULL attr)" ); - status = pthread_attr_getschedparam( NULL, &schedparam ); - assert( status == EINVAL ); - - puts( "Init: pthread_attr_getschedparam - EINVAL (not initialized attr)" ); - status = pthread_attr_getschedparam( &destroyed_attr, &schedparam ); - assert( status == EINVAL ); - - puts( "Init: pthread_attr_getschedparam - EINVAL (NULL schedparam)" ); - status = pthread_attr_getschedparam( &attr, NULL ); - assert( status == EINVAL ); - - /* exercise pthread_getschedparam */ - - empty_line(); - - puts( "Init: pthread_getschedparam - EINVAL (NULL policy)" ); - status = pthread_getschedparam( pthread_self(), NULL, &schedparam ); - assert( status == EINVAL ); - - puts( "Init: pthread_getschedparam - EINVAL (NULL schedparam)" ); - status = pthread_getschedparam( pthread_self(), &schedpolicy, NULL ); - assert( status == EINVAL ); - - puts( "Init: pthread_getschedparam - ESRCH (bad thread)" ); - status = pthread_getschedparam( -1, &schedpolicy, &schedparam ); - assert( status == ESRCH ); - - puts( "Init: pthread_getschedparam - SUCCESSFUL" ); - status = pthread_getschedparam( pthread_self(), &schedpolicy, &schedparam ); - assert( !status ); - - printf( "Init: policy = %d\n", schedpolicy ); - - print_schedparam( "Init: ", &schedparam ); - - /* exercise pthread_setschedparam */ - - empty_line(); - - puts( "Init: pthread_setschedparam - EINVAL (NULL schedparam)" ); - status = pthread_setschedparam( pthread_self(), SCHED_OTHER, NULL ); - assert( status == EINVAL ); - - schedparam.sched_priority = -1; - - puts( "Init: pthread_setschedparam - EINVAL (invalid priority)" ); - status = pthread_setschedparam( pthread_self(), SCHED_OTHER, NULL ); - assert( status == EINVAL ); - - schedparam.sched_priority = 128; - - puts( "Init: pthread_setschedparam - EINVAL (invalid policy)" ); - status = pthread_setschedparam( pthread_self(), -1, &schedparam ); - assert( status == EINVAL ); - - puts( "Init: pthread_setschedparam - ESRCH (invalid thread)" ); - status = pthread_setschedparam( -1, SCHED_OTHER, &schedparam ); - assert( status == ESRCH ); - - /* now get sporadic server errors */ - - schedparam.ss_replenish_period.tv_sec = 1; - schedparam.ss_replenish_period.tv_nsec = 0; - schedparam.ss_initial_budget.tv_sec = 1; - schedparam.ss_initial_budget.tv_nsec = 1; - - puts( "Init: pthread_setschedparam - EINVAL (replenish < budget)" ); - status = pthread_setschedparam( pthread_self(), SCHED_SPORADIC, &schedparam ); - assert( status == EINVAL ); - - schedparam.ss_replenish_period.tv_sec = 2; - schedparam.ss_replenish_period.tv_nsec = 0; - schedparam.ss_initial_budget.tv_sec = 1; - schedparam.ss_initial_budget.tv_nsec = 0; - schedparam.ss_low_priority = -1; - - puts( "Init: pthread_setschedparam - EINVAL (invalid priority)" ); - status = pthread_setschedparam( pthread_self(), SCHED_SPORADIC, &schedparam ); - assert( status == EINVAL ); - - puts( "*** END OF POSIX TEST 7 ***" ); - rtems_test_exit( 0 ); - - return NULL; /* just so the compiler thinks we returned something */ -} diff --git a/c/src/tests/psxtests/psx07/psx07.scn b/c/src/tests/psxtests/psx07/psx07.scn deleted file mode 100644 index 4237c4791b..0000000000 --- a/c/src/tests/psxtests/psx07/psx07.scn +++ /dev/null @@ -1,96 +0,0 @@ -*** POSIX TEST 7 *** -Init's ID is 0x0b010001 -Init: pthread_attr_init - EINVAL (NULL attr) -Init: pthread_attr_init - SUCCESSFUL -Init: initialize and destroy an attribute - SUCCESSFUL -Init: pthread_attr_destroy - EINVAL (NULL attr) -Init: pthread_attr_destroy - EINVAL (not initialized) -Init: pthread_create - EINVAL (attr not initialized) -Init: pthread_create - EINVAL (stacksize too small) -Init: pthread_create - EAGAIN (stacksize too large) -Init: pthread_create - EINVAL (invalid inherit scheduler) -Init: pthread_create - ENOTSUP (unsupported system contention scope) -Init: pthread_create - SUCCESSFUL (inherit scheduler) -Task_1: exitting -Init: pthread_attr_setscope - EINVAL (NULL attr) -Init: pthread_attr_setscope - ENOTSUP -Init: pthread_attr_setscope - EINVAL (not initialized attr) -Init: pthread_attr_setscope - EINVAL (invalid scope) -Init: pthread_attr_setscope - SUCCESSFUL -Init: pthread_attr_getscope - EINVAL (NULL attr) -Init: pthread_attr_getscope - EINVAL (NULL scope) -Init: pthread_attr_getscope - EINVAL (not initialized attr) -Init: pthread_attr_getscope - SUCCESSFUL -Init: current scope attribute = 0 -Init: pthread_attr_setinheritsched - EINVAL (NULL attr) -Init: pthread_attr_setinheritsched - EINVAL (not initialized attr) -Init: pthread_attr_setinheritsched - ENOTSUP (invalid inheritsched) -Init: pthread_attr_setinheritsched - SUCCESSFUL -Init: pthread_attr_getinheritsched - EINVAL (NULL attr) -Init: pthread_attr_getinheritsched - EINVAL (NULL inheritsched) -Init: pthread_attr_getinheritsched - EINVAL (not initialized attr) -Init: pthread_attr_getinheritsched - SUCCESSFUL -Init: current inherit scheduler attribute = 1 -Init: pthread_attr_setschedpolicy - EINVAL (NULL attr) -Init: pthread_attr_setschedpolicy - EINVAL (not initialized attr) -Init: pthread_attr_setschedpolicy - ENOTSUP (invalid schedpolicy) -Init: pthread_attr_setschedpolicy - SUCCESSFUL -Init: pthread_attr_getschedpolicy - EINVAL (NULL attr) -Init: pthread_attr_getschedpolicy - EINVAL (NULL schedpolicy) -Init: pthread_attr_getschedpolicy - EINVAL (not initialized attr) -Init: pthread_attr_getschedpolicy - SUCCESSFUL -Init: current scheduler policy attribute = 2 -Init: pthread_attr_setstacksize - EINVAL (NULL attr) -Init: pthread_attr_setstacksize - EINVAL (not initialized attr) -Init: pthread_attr_setstacksize - SUCCESSFUL (low stacksize) -Init: pthread_attr_setstacksize - SUCCESSFUL (high stacksize) -Init: pthread_attr_getstacksize - EINVAL (NULL attr) -Init: pthread_attr_getstacksize - EINVAL (NULL stacksize) -Init: pthread_attr_getstacksize - EINVAL (not initialized attr) -Init: pthread_attr_getstacksize - SUCCESSFUL -Init: current stack size attribute is OK -Init: pthread_attr_setstackaddr - EINVAL (NULL attr) -Init: pthread_attr_setstackaddr - EINVAL (not initialized attr) -Init: pthread_attr_setstackaddr - SUCCESSFUL -Init: pthread_attr_getstackaddr - EINVAL (NULL attr) -Init: pthread_attr_getstackaddr - EINVAL (NULL stackaddr) -Init: pthread_attr_getstackaddr - EINVAL (not initialized attr) -Init: pthread_attr_getstackaddr - SUCCESSFUL -Init: current stack address attribute = 0x0 -Init: pthread_attr_setdetachstate - EINVAL (NULL attr) -Init: pthread_attr_setdetachstate - EINVAL (not initialized attr) -Init: pthread_attr_setdetachstate - EINVAL (invalid detachstate) -Init: pthread_attr_setdetachstate - SUCCESSFUL -Init: pthread_attr_getdetachstate - EINVAL (NULL attr) -Init: pthread_attr_getdetachstate - EINVAL (NULL detatchstate) -Init: pthread_attr_getdetachstate - EINVAL (not initialized attr) -Init: pthread_attr_getdetachstate - SUCCESSFUL -Init: current detach state attribute = 1 -Init: pthread_attr_getschedparam - SUCCESSFUL -Init: sched priority = 2 -Init: ss_low_priority = 0 -Init: ss_replenish_period = (0, 0) -Init: ss_initial_budget = (0, 0) -Init: pthread_attr_setschedparam - EINVAL (NULL attr) -Init: pthread_attr_setschedparam - EINVAL (not initialized attr) -Init: pthread_attr_setschedparam - EINVAL (NULL schedparam) -Init: pthread_attr_setschedparam - SUCCESSFUL -Init: pthread_attr_getschedparam - EINVAL (NULL attr) -Init: pthread_attr_getschedparam - EINVAL (not initialized attr) -Init: pthread_attr_getschedparam - EINVAL (NULL schedparam) -Init: pthread_getschedparam - EINVAL (NULL policy) -Init: pthread_getschedparam - EINVAL (NULL schedparam) -Init: pthread_getschedparam - ESRCH (bad thread) -Init: pthread_getschedparam - SUCCESSFUL -Init: policy = 1 -Init: sched priority = 2 -Init: ss_low_priority = 0 -Init: ss_replenish_period = (0, 0) -Init: ss_initial_budget = (0, 0) -Init: pthread_setschedparam - EINVAL (NULL schedparam) -Init: pthread_setschedparam - EINVAL (invalid priority) -Init: pthread_setschedparam - EINVAL (invalid policy) -Init: pthread_setschedparam - ESRCH (invalid thread) -Init: pthread_setschedparam - EINVAL (replenish < budget) -Init: pthread_setschedparam - EINVAL (invalid priority) -*** END OF POSIX TEST 7 *** diff --git a/c/src/tests/psxtests/psx07/system.h b/c/src/tests/psxtests/psx07/system.h deleted file mode 100644 index c42cfbb7be..0000000000 --- a/c/src/tests/psxtests/psx07/system.h +++ /dev/null @@ -1,50 +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 - -void *POSIX_Init( - void *argument -); - -void *Task_1( - void *argument -); - -/* configuration information */ - -#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER -#define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER - -#define CONFIGURE_MAXIMUM_POSIX_THREADS 3 - -#define CONFIGURE_POSIX_INIT_THREAD_TABLE - -#include - -/* global variables */ - -#ifdef CONFIGURE_INIT -#define TEST_EXTERN -#else -#define TEST_EXTERN extern -#endif - -TEST_EXTERN pthread_t Init_id; -TEST_EXTERN pthread_t Task_id; - -/* end of include file */ diff --git a/c/src/tests/psxtests/psx07/task.c b/c/src/tests/psxtests/psx07/task.c deleted file mode 100644 index 67e5a68e40..0000000000 --- a/c/src/tests/psxtests/psx07/task.c +++ /dev/null @@ -1,33 +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 -#include - -void *Task_1( - void *argument -) -{ - puts( "Task_1: exitting" ); - pthread_exit( NULL ); - - return NULL; /* just so the compiler thinks we returned something */ -} 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 - -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 - -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 - -/* 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 - -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 - -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 - -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 */ -} diff --git a/c/src/tests/psxtests/psx09/.cvsignore b/c/src/tests/psxtests/psx09/.cvsignore deleted file mode 100644 index 282522db03..0000000000 --- a/c/src/tests/psxtests/psx09/.cvsignore +++ /dev/null @@ -1,2 +0,0 @@ -Makefile -Makefile.in diff --git a/c/src/tests/psxtests/psx09/Makefile.am b/c/src/tests/psxtests/psx09/Makefile.am deleted file mode 100644 index e5084cdc74..0000000000 --- a/c/src/tests/psxtests/psx09/Makefile.am +++ /dev/null @@ -1,44 +0,0 @@ -## -## $Id$ -## - - -TEST = psx09 - -MANAGERS = all - -C_FILES = init.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/psx09/init.c b/c/src/tests/psxtests/psx09/init.c deleted file mode 100644 index 47be091e6d..0000000000 --- a/c/src/tests/psxtests/psx09/init.c +++ /dev/null @@ -1,225 +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 - -void print_schedparam( - char *prefix, - struct sched_param *schedparam -) -{ - printf( "%ssched priority = %d\n", prefix, schedparam->sched_priority ); -#if defined(_POSIX_SPORADIC_SERVER) - printf( "%sss_low_priority = %d\n", prefix, schedparam->ss_low_priority ); - printf( "%sss_replenish_period = (%ld, %ld)\n", prefix, - schedparam->ss_replenish_period.tv_sec, - schedparam->ss_replenish_period.tv_nsec ); - printf( "%sss_initial_budget = (%ld, %ld)\n", prefix, - schedparam->ss_initial_budget.tv_sec, - schedparam->ss_initial_budget.tv_nsec ); -#else - printf( "%s_POSIX_SPORADIC_SERVER is not defined\n" ); -#endif -} - -void *POSIX_Init( - void *argument -) -{ - int status; - int passes; - int schedpolicy; - int priority; - struct sched_param schedparam; - char buffer[ 80 ]; - pthread_mutexattr_t attr; - - puts( "\n\n*** POSIX TEST 9 ***" ); - - /* 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 ); - - /* try to use this thread as a sporadic server */ - - puts( "Init: pthread_getschedparam - SUCCESSFUL" ); - status = pthread_getschedparam( pthread_self(), &schedpolicy, &schedparam ); - assert( !status ); - - priority = schedparam.sched_priority; - sprintf( buffer, " - current priority = %d", priority ); - print_current_time( "Init: ", buffer ); - - schedparam.ss_replenish_period.tv_sec = 0; - schedparam.ss_replenish_period.tv_nsec = 500000000; /* 1/2 second */ - schedparam.ss_initial_budget.tv_sec = 0; - schedparam.ss_initial_budget.tv_nsec = 250000000; /* 1/4 second */ - - schedparam.sched_priority = 200; - schedparam.ss_low_priority = 100; - - puts( "Init: pthread_setschedparam - SUCCESSFUL (sporadic server)" ); - status = pthread_setschedparam( pthread_self(), SCHED_SPORADIC, &schedparam ); - assert( !status ); - - status = pthread_getschedparam( pthread_self(), &schedpolicy, &schedparam ); - assert( !status ); - - priority = schedparam.sched_priority; - sprintf( buffer, " - new priority = %d", priority ); - print_current_time( "Init: ", buffer ); - - /* go into a loop consuming CPU time to watch our priority change */ - - for ( passes=0 ; passes <= 3 ; ) { - status = pthread_getschedparam( pthread_self(), &schedpolicy, &schedparam ); - assert( !status ); - - if ( priority != schedparam.sched_priority ) { - priority = schedparam.sched_priority; - sprintf( buffer, " - new priority = %d", priority ); - print_current_time( "Init: ", buffer ); - passes++; - } - } - - /* now see if this works if we are holding a priority ceiling mutex */ - - empty_line(); - - - status = pthread_getschedparam( pthread_self(), &schedpolicy, &schedparam ); - assert( !status ); - - schedparam.ss_replenish_period.tv_sec = 0; - schedparam.ss_replenish_period.tv_nsec = 500000000; /* 1/2 second */ - schedparam.ss_initial_budget.tv_sec = 0; - schedparam.ss_initial_budget.tv_nsec = 250000000; /* 1/4 second */ - -#define HIGH_PRIORITY 150 -#define MEDIUM_PRIORITY 131 -#define LOW_PRIORITY 100 - - schedparam.sched_priority = HIGH_PRIORITY; - schedparam.ss_low_priority = LOW_PRIORITY; - - puts( "Init: pthread_setschedparam - SUCCESSFUL (sporadic server)" ); - status = pthread_setschedparam( pthread_self(), SCHED_SPORADIC, &schedparam ); - assert( !status ); - - puts( "Init: Initializing mutex attributes for priority ceiling" ); - status = pthread_mutexattr_init( &attr ); - assert( !status ); - - status = pthread_mutexattr_setprotocol( &attr, PTHREAD_PRIO_PROTECT ); - assert( !status ); - - status = pthread_mutexattr_setprioceiling( &attr, MEDIUM_PRIORITY ); - assert( !status ); - - puts( "Init: Creating a mutex" ); - status = pthread_mutex_init( &Mutex_id, &attr ); - if ( status ) - printf( "status = %d\n", status ); - assert( !status ); - - status = pthread_getschedparam( pthread_self(), &schedpolicy, &schedparam ); - assert( !status ); - - priority = schedparam.sched_priority; - sprintf( buffer, " - new priority = %d", priority ); - print_current_time( "Init: ", buffer ); - - /* go into a loop consuming CPU time to watch our priority lower */ - - for ( ; ; ) { - status = pthread_getschedparam( pthread_self(), &schedpolicy, &schedparam ); - assert( !status ); - - if ( schedparam.sched_priority != LOW_PRIORITY ) - continue; - - priority = schedparam.sched_priority; - sprintf( buffer, " - new priority = %d", priority ); - print_current_time( "Init: ", buffer ); - - puts( "Init: pthread_mutex_lock acquire the lock" ); - status = pthread_mutex_lock( &Mutex_id ); - if ( status ) - printf( "status = %d\n", status ); - assert( !status ); - - status = pthread_getschedparam( pthread_self(), &schedpolicy, &schedparam ); - assert( !status ); - - priority = schedparam.sched_priority; - sprintf( buffer, " - new priority = %d", priority ); - print_current_time( "Init: ", buffer ); - - break; - } - - /* now spin waiting for our budget to be replenished */ - - for ( ; ; ) { - status = pthread_getschedparam( pthread_self(), &schedpolicy, &schedparam ); - assert( !status ); - - if ( schedparam.sched_priority == HIGH_PRIORITY ) - break; - } - - priority = schedparam.sched_priority; - sprintf( buffer, " - new priority = %d", priority ); - print_current_time( "Init: ", buffer ); - - /* with this unlock we should be able to go to low priority */ - - puts( "Init: unlock mutex" ); - status = pthread_mutex_unlock( &Mutex_id ); - if ( status ) - printf( "status = %d\n", status ); - assert( !status ); - - status = pthread_getschedparam( pthread_self(), &schedpolicy, &schedparam ); - assert( !status ); - - priority = schedparam.sched_priority; - sprintf( buffer, " - new priority = %d", priority ); - print_current_time( "Init: ", buffer ); - - for ( ; ; ) { - status = pthread_getschedparam( pthread_self(), &schedpolicy, &schedparam ); - assert( !status ); - - if ( schedparam.sched_priority == LOW_PRIORITY ) - break; - } - - status = pthread_getschedparam( pthread_self(), &schedpolicy, &schedparam ); - assert( !status ); - - priority = schedparam.sched_priority; - sprintf( buffer, " - new priority = %d", priority ); - print_current_time( "Init: ", buffer ); - - puts( "*** END OF POSIX TEST 9 ***" ); - rtems_test_exit( 0 ); - - return NULL; /* just so the compiler thinks we returned something */ -} diff --git a/c/src/tests/psxtests/psx09/psx09.scn b/c/src/tests/psxtests/psx09/psx09.scn deleted file mode 100644 index adf62c5ee3..0000000000 --- a/c/src/tests/psxtests/psx09/psx09.scn +++ /dev/null @@ -1,22 +0,0 @@ -*** POSIX TEST 9 *** -Init's ID is 0x0b010001 -Init: pthread_getschedparam - SUCCESSFUL -Init: Fri May 24 11:05:00 1996 - current priority = 2 -Init: pthread_setschedparam - SUCCESSFUL (sporadic server) -Init: Fri May 24 11:05:00 1996 - new priority = 200 -Init: Fri May 24 11:05:00 1996 - new priority = 100 -Init: Fri May 24 11:05:00 1996 - new priority = 200 -Init: Fri May 24 11:05:00 1996 - new priority = 100 -Init: Fri May 24 11:05:01 1996 - new priority = 200 -Init: pthread_setschedparam - SUCCESSFUL (sporadic server) -Init: Initializing mutex attributes for priority ceiling -Init: Creating a mutex -Init: Fri May 24 11:05:01 1996 - new priority = 150 -Init: Fri May 24 11:05:01 1996 - new priority = 100 -Init: pthread_mutex_lock acquire the lock -Init: Fri May 24 11:05:01 1996 - new priority = 131 -Init: Fri May 24 11:05:01 1996 - new priority = 150 -Init: unlock mutex -Init: Fri May 24 11:05:01 1996 - new priority = 150 -Init: Fri May 24 11:05:01 1996 - new priority = 100 -*** END OF POSIX TEST 9 *** diff --git a/c/src/tests/psxtests/psx09/system.h b/c/src/tests/psxtests/psx09/system.h deleted file mode 100644 index 9698521a63..0000000000 --- a/c/src/tests/psxtests/psx09/system.h +++ /dev/null @@ -1,56 +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 - -void *POSIX_Init( - void *argument -); - -void *Task_1( - void *argument -); - -void *Task_2( - void *argument -); - -/* configuration information */ - -#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER -#define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER - -#define CONFIGURE_MAXIMUM_POSIX_THREADS 1 -#define CONFIGURE_MAXIMUM_POSIX_KEYS 10 -#define CONFIGURE_MAXIMUM_POSIX_MUTEXES 10 - -#define CONFIGURE_POSIX_INIT_THREAD_TABLE - -#include - -/* global variables */ - -#ifdef CONFIGURE_INIT -#define TEST_EXTERN -#else -#define TEST_EXTERN extern -#endif - -TEST_EXTERN pthread_t Init_id; -TEST_EXTERN pthread_mutex_t Mutex_id; - -/* end of include file */ diff --git a/c/src/tests/psxtests/psx10/.cvsignore b/c/src/tests/psxtests/psx10/.cvsignore deleted file mode 100644 index 282522db03..0000000000 --- a/c/src/tests/psxtests/psx10/.cvsignore +++ /dev/null @@ -1,2 +0,0 @@ -Makefile -Makefile.in diff --git a/c/src/tests/psxtests/psx10/Makefile.am b/c/src/tests/psxtests/psx10/Makefile.am deleted file mode 100644 index 2b5f2e2be6..0000000000 --- a/c/src/tests/psxtests/psx10/Makefile.am +++ /dev/null @@ -1,44 +0,0 @@ -## -## $Id$ -## - - -TEST = psx10 - -MANAGERS = all - -C_FILES = init.c task.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/psx10/init.c b/c/src/tests/psxtests/psx10/init.c deleted file mode 100644 index 09cbabc3eb..0000000000 --- a/c/src/tests/psxtests/psx10/init.c +++ /dev/null @@ -1,311 +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 - - -void *POSIX_Init( - void *argument -) -{ - int status; - pthread_condattr_t attr; - pthread_condattr_t attr_error; - int pshared; - pthread_cond_t cond; - struct timespec timeout; - - puts( "\n\n*** POSIX TEST 10 ***" ); - - puts( "Init: pthread_condattr_init" ); - status = pthread_condattr_init( &attr ); - assert( !status ); - - puts( "Init: pthread_condattr_init - EINVAL (attribute invalid)" ); - status = pthread_condattr_init( NULL ); - if ( status != EINVAL ) - printf( "status = %d\n", status ); - assert( status == EINVAL ); - - puts( "Init: pthread_condattr_destroy" ); - status = pthread_condattr_destroy( &attr ); - assert( !status ); - - puts( "Init: pthread_condattr_destroy - EINVAL (attribute invalid)" ); - status = pthread_condattr_destroy( NULL ); - if ( status != EINVAL ) - printf( "status = %d\n", status ); - assert( status == EINVAL ); - - puts( "Init: pthread_condattr_init" ); - status = pthread_condattr_init( &attr ); - assert( !status ); - - puts( "Init: pthread_condattr_setpshared - PTHREAD_PROCESS_SHARED" ); - status = pthread_condattr_setpshared( &attr, PTHREAD_PROCESS_SHARED ); - assert( !status ); - - puts( "Init: pthread_condattr_setpshared - PTHREAD_PROCESS_PRIVATE" ); - status = pthread_condattr_setpshared( &attr, PTHREAD_PROCESS_PRIVATE ); - assert( !status ); - - status = pthread_condattr_setpshared( NULL, PTHREAD_PROCESS_PRIVATE ); - if ( status != EINVAL ) - printf( "status = %d\n", status ); - assert( status == EINVAL ); - puts( "Init: pthread_condattr_setpshared - EINVAL (attribute invalid)" ); - - status = pthread_condattr_setpshared( &attr, 0xFFFFFF ); - if ( status != EINVAL ) - printf( "status = %d\n", status ); - assert( status == EINVAL ); - puts( "Init: pthread_condattr_setpshared - EINVAL (pshared invalid)" ); - - status = pthread_condattr_getpshared( &attr, &pshared ); - assert( !status ); - printf( "Init: pthread_condattr_getpshared - %d\n", pshared ); - - status = pthread_condattr_getpshared( NULL, &pshared ); - if ( status != EINVAL ) - printf( "status = %d\n", status ); - assert( status == EINVAL ); - puts( "Init: pthread_condattr_getpshared - EINVAL (attribute invalid)" ); - - puts( "Init: pthread_cond_init - NULL attr" ); - status = pthread_cond_init( &cond, NULL ); - assert( !status ); - -/* error for attribute not initialized */ - - attr_error.is_initialized = FALSE; - status = pthread_cond_init( &cond, &attr_error ); - if ( status != EINVAL ) - printf( "status = %d\n", status ); - assert( status == EINVAL ); - puts( "Init: pthread_cond_init - EINVAL (attr not initialized)" ); - - status = pthread_cond_init( &cond, NULL ); - if ( status != ENOMEM ) - printf( "status = %d\n", status ); - assert( status == ENOMEM ); - puts( "Init: pthread_cond_init - ENOMEM (too many conds)" ); - - puts( "Init: pthread_cond_destroy" ); - status = pthread_cond_destroy( &cond ); - assert( !status ); - -/* error for bad condition variable passed */ - - status = pthread_cond_destroy( NULL ); - if ( status != EINVAL ) - printf( "status = %d\n", status ); - assert( status == EINVAL ); - puts( "Init: pthread_cond_destroy - EINVAL (cond invalid)" ); - -/* initiailize the attribute for the rest of the test */ - - puts( "Init: pthread_cond_init - attr" ); - status = pthread_cond_init( &Cond1_id, &attr ); - assert( !status ); - -/* signal task1 with a condition variable */ - - empty_line(); - - status = pthread_create( &Task_id, NULL, Task_1, NULL ); - assert( !status ); - -/* switch to task1 to allow it to wait for a condition variable */ - - puts( "Init: sleep to switch to Task_1" ); - sleep( 1 ); - - status = pthread_cond_destroy( &Cond1_id ); - if ( status != EBUSY ) - printf( "status = %d\n", status ); - assert( status == EBUSY ); - puts( "Init: pthread_cond_destroy - EBUSY (task1 waiting)" ); - - puts( "Init: pthread_cond_signal" ); - status = pthread_cond_signal( &Cond1_id ); - assert( !status ); - - empty_line(); - - status = pthread_create( &Task2_id, NULL, Task_2, NULL ); - assert( !status ); - -/* switch to task1 and task2 to allow them to wait for broadcast signal */ - - puts( "Init: sleep - switch to Task_1 and Task_2" ); - sleep( 1 ); - -/* broadcast a condition variable to task1 and task2 */ - - puts( "Init: pthread_cond_broadcast" ); - status = pthread_cond_broadcast( &Cond1_id ); - assert( !status ); - - puts( "Init: sleep - switch to Task_1" ); - sleep( 0 ); - -/* timedwait case - timeout */ - - status = pthread_mutex_lock( &Mutex_id ); - assert( !status ); - -/* set timeout to 3 seconds */ - - status = clock_gettime( CLOCK_REALTIME, &timeout ); - assert( !status ); - timeout.tv_sec += 3; - timeout.tv_nsec = 0; - - puts( "Init: pthread_cond_timedwait for 3 seconds" ); - status = pthread_cond_timedwait( &Cond1_id, &Mutex_id, &timeout ); - if ( status != ETIMEDOUT ) - printf( "status = %d\n", status ); - assert( status == ETIMEDOUT ); - puts( "Init: pthread_cond_timedwait - ETIMEDOUT - (mutex not acquired)" ); - - status = pthread_mutex_unlock( &Mutex_id ); - assert( !status ); - -/* remaining error messages */ - - empty_line(); - -/* errors for bad variable passed */ - - status = pthread_cond_signal( NULL ); - if ( status != EINVAL ) - printf( "status = %d\n", status ); - assert( status == EINVAL ); - puts( "Init: pthread_cond_signal - EINVAL (cond invalid)" ); - - status = pthread_cond_broadcast( NULL ); - if ( status != EINVAL ) - printf( "status = %d\n", status ); - assert( status == EINVAL ); - puts( "Init: pthread_cond_broadcast - EINVAL (cond invalid)" ); - -/* acquire mutex so errors will occur */ - - status = pthread_mutex_lock( &Mutex_id ); - assert( !status ); - - status = pthread_cond_wait( NULL, &Mutex_id ); - if ( status != EINVAL ) - printf( "status = %d\n", status ); - assert( status == EINVAL ); - puts( "Init: pthread_cond_wait - EINVAL (cond invalid)" ); - - status = pthread_cond_timedwait( NULL, &Mutex_id, &timeout ); - if ( status != EINVAL ) - printf( "status = %d\n", status ); - assert( status == EINVAL ); - puts( "Init: pthread_cond_timedwait - EINVAL (cond invalid)" ); - - status = pthread_cond_wait( &Cond1_id, NULL ); - if ( status != EINVAL ) - printf( "status = %d\n", status ); - assert( status == EINVAL ); - puts( "Init: pthread_cond_wait - EINVAL (mutex invalid)" ); - - status = pthread_cond_timedwait( &Cond1_id, NULL, &timeout ); - if ( status != EINVAL ) - printf( "status = %d\n", status ); - assert( status == EINVAL ); - puts( "Init: pthread_cond_timedwait - EINVAL (mutex invalid)" ); - - status = pthread_cond_timedwait( &Cond1_id, &Mutex_id, NULL ); - if ( status != EINVAL ) - printf( "status = %d\n", status ); - assert( status == EINVAL ); - puts( "Init: pthread_cond_timedwait - EINVAL (abstime NULL)" ); - - status = clock_gettime( CLOCK_REALTIME, &timeout ); - assert( !status ); - timeout.tv_sec -= 1; - status = pthread_cond_timedwait( &Cond1_id, &Mutex_id, &timeout ); - if ( status != ETIMEDOUT ) - printf( "status = %d\n", status ); - assert( status == ETIMEDOUT ); - puts( "Init: pthread_cond_timedwait - ETIMEDOUT (abstime->tv_sec < current time)" ); - status = pthread_mutex_unlock( &Mutex_id ); - assert( !status ); - - status = pthread_mutex_lock( &Mutex_id ); - assert( !status ); - status = clock_gettime( CLOCK_REALTIME, &timeout ); - assert( !status ); - timeout.tv_nsec -= 1; - status = pthread_cond_timedwait( &Cond1_id, &Mutex_id, &timeout ); - if ( status != ETIMEDOUT ) - printf( "status = %d\n", status ); - assert( status == ETIMEDOUT ); - puts( "Init: pthread_cond_timedwait - ETIMEDOUT (abstime->tv_nsec < current time)" ); - status = pthread_mutex_unlock( &Mutex_id ); - assert( !status ); - -/* wait and timedwait without mutex */ - -/* XXX - this case is commented out in the code pending review - * - * status = pthread_cond_wait( &Cond1_id, &Mutex_id ); - * if ( status != EINVAL ) - * printf( "status = %d\n", status ); - * assert( status == EINVAL ); - */ - puts( "Init: pthread_cond_wait - EINVAL (mutex not locked before call)" ); - -/* XXX - this case is commented out in the code pending review - * - * status = clock_gettime( CLOCK_REALTIME, &timeout ); - * assert( !status ); - * timeout.tv_sec += 1; - * status = pthread_cond_timedwait( &Cond1_id, &Mutex_id, &timeout ); - * if ( status != EINVAL ) - * printf( "status = %d\n", status ); - * assert( status == EINVAL ); - */ - puts( "Init: pthread_cond_timedwait - EINVAL (mutex not locked before call)"); - - empty_line(); - - status = pthread_create( &Task3_id, NULL, Task_3, NULL ); - assert( !status ); - -/* switch to task3 to allow it to wait for broadcast signal */ - - puts( "Init: sleep - switch to Task_3" ); - sleep( 1 ); - -/* destroy the mutex so Task3 can not acguire at the end of Wait_support */ - - status = pthread_mutex_destroy( &Mutex_id ); - assert( !status ); - -/* signal a condition variable to task3 */ - - puts( "Init: pthread_cond_signal" ); - status = pthread_cond_signal( &Cond1_id ); - - puts( "Init: sleep - switch to Task_3" ); - sleep( 1 ); - - puts( "*** END OF POSIX TEST 10 ***" ); - rtems_test_exit( 0 ); - - return NULL; /* just so the compiler thinks we returned something */ -} diff --git a/c/src/tests/psxtests/psx10/psx10.scn b/c/src/tests/psxtests/psx10/psx10.scn deleted file mode 100644 index 962540d6e4..0000000000 --- a/c/src/tests/psxtests/psx10/psx10.scn +++ /dev/null @@ -1,55 +0,0 @@ -*** POSIX TEST 10 *** -Init: pthread_condattr_init -Init: pthread_condattr_init - EINVAL (attribute invalid) -Init: pthread_condattr_destroy -Init: pthread_condattr_destroy - EINVAL (attribute invalid) -Init: pthread_condattr_init -Init: pthread_condattr_setpshared - PTHREAD_PROCESS_SHARED -Init: pthread_condattr_setpshared - PTHREAD_PROCESS_PRIVATE -Init: pthread_condattr_setpshared - EINVAL (attribute invalid) -Init: pthread_condattr_setpshared - EINVAL (pshared invalid) -Init: pthread_condattr_getpshared - 0 -Init: pthread_condattr_getpshared - EINVAL (attribute invalid) -Init: pthread_cond_init - NULL attr -Init: pthread_cond_init - EINVAL (attr not initialized) -Init: pthread_cond_init - ENOMEM (too many conds) -Init: pthread_cond_destroy -Init: pthread_cond_destroy - EINVAL (cond invalid) -Init: pthread_cond_init - attr -Init: sleep to switch to Task_1 -Task_1: ID is 0x0b010002 -Task_1: pthread_cond_wait -Init: pthread_cond_destroy - EBUSY (task1 waiting) -Init: pthread_cond_signal -Init: sleep - switch to Task_1 and Task_2 -Task_1: back from pthread_cond_wait release mutex -Task_1: pthread_cond_wait -Task_2: ID is 0x0b010003 -Task_2: pthread_cond_wait -Init: pthread_cond_broadcast -Init: sleep - switch to Task_1 -Task_1: back from pthread_cond_wait release mutex -Task_1: task exit -Task_2: back from pthread_cond_wait release mutex -Task_2: task exit -Init: pthread_cond_timedwait for 3 seconds -Init: pthread_cond_timedwait - ETIMEDOUT - (mutex not acquired) -Init: pthread_cond_signal - EINVAL (cond invalid) -Init: pthread_cond_broadcast - EINVAL (cond invalid) -Init: pthread_cond_wait - EINVAL (cond invalid) -Init: pthread_cond_timedwait - EINVAL (cond invalid) -Init: pthread_cond_wait - EINVAL (mutex invalid) -Init: pthread_cond_timedwait - EINVAL (mutex invalid) -Init: pthread_cond_timedwait - EINVAL (abstime NULL) -Init: pthread_cond_timedwait - ETIMEDOUT (abstime->tv_sec < current time) -Init: pthread_cond_timedwait - ETIMEDOUT (abstime->tv_nsec < current time) -Init: pthread_cond_wait - EINVAL (mutex not locked before call) -Init: pthread_cond_timedwait - EINVAL (mutex not locked before call) -Init: sleep - switch to Task_3 -Task_3: ID is 0x0b010004 -Task_3: pthread_cond_wait -Init: pthread_cond_signal -Init: sleep - switch to Task_3 -Task_3: pthread_cond_wait - EINVAL (mutex not locked after signal) -Task_3: task exit -*** END OF POSIX TEST 10 *** diff --git a/c/src/tests/psxtests/psx10/system.h b/c/src/tests/psxtests/psx10/system.h deleted file mode 100644 index 5d9db43941..0000000000 --- a/c/src/tests/psxtests/psx10/system.h +++ /dev/null @@ -1,66 +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 -#include -#include - -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_MAXIMUM_POSIX_CONDITION_VARIABLES 1 -#define CONFIGURE_MAXIMUM_POSIX_MUTEXES 2 - -#define CONFIGURE_POSIX_INIT_THREAD_TABLE - -#include - -/* global variables */ - -#ifdef CONFIGURE_INIT -#define TEST_EXTERN -#else -#define TEST_EXTERN extern -#endif - -TEST_EXTERN pthread_t Init_id; -TEST_EXTERN pthread_t Task_id; -TEST_EXTERN pthread_t Task2_id; -TEST_EXTERN pthread_t Task3_id; -TEST_EXTERN pthread_cond_t Cond1_id; -TEST_EXTERN pthread_mutex_t Mutex_id; - -/* end of include file */ diff --git a/c/src/tests/psxtests/psx10/task.c b/c/src/tests/psxtests/psx10/task.c deleted file mode 100644 index 7a1b5b9705..0000000000 --- a/c/src/tests/psxtests/psx10/task.c +++ /dev/null @@ -1,64 +0,0 @@ -/* Task_1 - * - * This routine serves as a test task. - * - * 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" - -void *Task_1( - void *argument -) -{ - int status; - -/* wait for a condition variable signal from Init */ - - Task_id = pthread_self(); - printf( "Task_1: ID is 0x%08x\n", Task_id ); - - status = pthread_mutex_init( &Mutex_id, NULL ); - assert( !status ); - - status = pthread_mutex_lock( &Mutex_id ); - assert( !status ); - - puts( "Task_1: pthread_cond_wait" ); - status = pthread_cond_wait( &Cond1_id, &Mutex_id ); - assert( !status ); - - puts( "Task_1: back from pthread_cond_wait release mutex" ); - status = pthread_mutex_unlock( &Mutex_id ); - assert( !status ); - -/* wait for a condition variable broadcast from Init */ - - status = pthread_mutex_lock( &Mutex_id ); - assert( !status ); - - puts( "Task_1: pthread_cond_wait" ); - status = pthread_cond_wait( &Cond1_id, &Mutex_id ); - assert( !status ); - - puts( "Task_1: back from pthread_cond_wait release mutex" ); - status = pthread_mutex_unlock( &Mutex_id ); - assert( !status ); - - puts( "Task_1: task exit" ); - pthread_exit( NULL ); - - return NULL; /* just so the compiler thinks we returned something */ -} diff --git a/c/src/tests/psxtests/psx10/task2.c b/c/src/tests/psxtests/psx10/task2.c deleted file mode 100644 index 081616f339..0000000000 --- a/c/src/tests/psxtests/psx10/task2.c +++ /dev/null @@ -1,46 +0,0 @@ -/* Task_2 - * - * This routine serves as a test task. - * - * 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" - -void *Task_2( - void *argument -) -{ - int status; - - Task_id = pthread_self(); - printf( "Task_2: ID is 0x%08x\n", Task_id ); - - status = pthread_mutex_lock( &Mutex_id ); - assert( !status ); - - puts( "Task_2: pthread_cond_wait" ); - status = pthread_cond_wait( &Cond1_id, &Mutex_id ); - assert( !status ); - - puts( "Task_2: back from pthread_cond_wait release mutex" ); - status = pthread_mutex_unlock( &Mutex_id ); - assert( !status ); - - puts( "Task_2: task exit" ); - pthread_exit( NULL ); - - return NULL; /* just so the compiler thinks we returned something */ -} diff --git a/c/src/tests/psxtests/psx10/task3.c b/c/src/tests/psxtests/psx10/task3.c deleted file mode 100644 index b56d736bf4..0000000000 --- a/c/src/tests/psxtests/psx10/task3.c +++ /dev/null @@ -1,45 +0,0 @@ -/* Task_3 - * - * This routine serves as a test task. - * - * 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" - -void *Task_3( - void *argument -) -{ - int status; - - Task_id = pthread_self(); - printf( "Task_3: ID is 0x%08x\n", Task_id ); - - status = pthread_mutex_lock( &Mutex_id ); - assert( !status ); - - puts( "Task_3: pthread_cond_wait" ); - status = pthread_cond_wait( &Cond1_id, &Mutex_id ); - if ( status != EINVAL ) - printf( "status = %d\n", status ); - assert( status == EINVAL ); - puts( "Task_3: pthread_cond_wait - EINVAL (mutex not locked after signal)"); - - puts( "Task_3: task exit" ); - pthread_exit( NULL ); - - return NULL; /* just so the compiler thinks we returned something */ -} diff --git a/c/src/tests/psxtests/psx11/.cvsignore b/c/src/tests/psxtests/psx11/.cvsignore deleted file mode 100644 index 282522db03..0000000000 --- a/c/src/tests/psxtests/psx11/.cvsignore +++ /dev/null @@ -1,2 +0,0 @@ -Makefile -Makefile.in diff --git a/c/src/tests/psxtests/psx11/Makefile.am b/c/src/tests/psxtests/psx11/Makefile.am deleted file mode 100644 index 2e0d9e99f2..0000000000 --- a/c/src/tests/psxtests/psx11/Makefile.am +++ /dev/null @@ -1,44 +0,0 @@ -## -## $Id$ -## - - -TEST = psx11 - -MANAGERS = all - -C_FILES = init.c task.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/psx11/init.c b/c/src/tests/psxtests/psx11/init.c deleted file mode 100644 index 766e1df382..0000000000 --- a/c/src/tests/psxtests/psx11/init.c +++ /dev/null @@ -1,107 +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 - -void *POSIX_Init( - void *argument -) -{ - int status; - struct sched_param param; - pthread_attr_t attr; - - puts( "\n\n*** POSIX TEST 11 ***" ); - - /* 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 ); - - /* exercise pthread_setschedparam */ - - param.sched_priority = 127; - - puts( "Init: Setting scheduling parameters to FIFO with priority 127" ); - status = pthread_setschedparam( Init_id, SCHED_FIFO, ¶m ); - assert( !status ); - - param.sched_priority = 125; - - puts( "Init: Setting scheduling parameters to RR with priority 125" ); - status = pthread_setschedparam( Init_id, SCHED_RR, ¶m ); - assert( !status ); - - param.sched_priority = 121; - - puts( "Init: Setting scheduling parameters to OTHER with priority 121" ); - status = pthread_setschedparam( Init_id, SCHED_OTHER, ¶m ); - assert( !status ); - - /* create a thread as SCHED_FIFO */ - - puts( "Init: create a thread of SCHED_FIFO with priority 120" ); - status = pthread_attr_init( &attr ); - assert( !status ); - - attr.schedpolicy = SCHED_FIFO; - attr.schedparam.sched_priority = 120; - - status = pthread_create( &Task_id, &attr, Task_1, NULL ); - assert( !status ); - - puts( "Init: join with the other thread" ); - status = pthread_join( Task_id, NULL ); - assert( !status ); - - /* create a thread as SCHED_RR */ - - puts( "Init: create a thread of SCHED_RR with priority 120" ); - status = pthread_attr_init( &attr ); - assert( !status ); - - attr.schedpolicy = SCHED_RR; - attr.schedparam.sched_priority = 120; - - status = pthread_create( &Task_id, &attr, Task_1, NULL ); - assert( !status ); - - puts( "Init: join with the other thread" ); - status = pthread_join( Task_id, NULL ); - assert( !status ); - - /* create a thread as SCHED_OTHER */ - - puts( "Init: create a thread of SCHED_OTHER with priority 120" ); - status = pthread_attr_init( &attr ); - assert( !status ); - - attr.schedpolicy = SCHED_OTHER; - attr.schedparam.sched_priority = 120; - - status = pthread_create( &Task_id, &attr, Task_1, NULL ); - assert( !status ); - - puts( "Init: join with the other thread" ); - status = pthread_join( Task_id, NULL ); - assert( !status ); - - puts( "*** END OF POSIX TEST 11 ***" ); - rtems_test_exit( 0 ); - - return NULL; /* just so the compiler thinks we returned something */ -} diff --git a/c/src/tests/psxtests/psx11/psx11.scn b/c/src/tests/psxtests/psx11/psx11.scn deleted file mode 100644 index ecf69edf61..0000000000 --- a/c/src/tests/psxtests/psx11/psx11.scn +++ /dev/null @@ -1,18 +0,0 @@ -*** POSIX TEST 11 *** -Init's ID is 0x0b010001 -Init: Setting scheduling parameters to FIFO with priority 127 -Init: Setting scheduling parameters to RR with priority 125 -Init: Setting scheduling parameters to OTHER with priority 121 -Init: create a thread of SCHED_FIFO with priority 120 -Init: join with the other thread -Task_1: killing time -Task_1: exitting -Init: create a thread of SCHED_RR with priority 120 -Init: join with the other thread -Task_1: killing time -Task_1: exitting -Init: create a thread of SCHED_OTHER with priority 120 -Init: join with the other thread -Task_1: killing time -Task_1: exitting -*** END OF POSIX TEST 11 *** diff --git a/c/src/tests/psxtests/psx11/system.h b/c/src/tests/psxtests/psx11/system.h deleted file mode 100644 index d7cf9c07c5..0000000000 --- a/c/src/tests/psxtests/psx11/system.h +++ /dev/null @@ -1,50 +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 - -void *POSIX_Init( - void *argument -); - -void *Task_1( - 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 - -/* global variables */ - -#ifdef CONFIGURE_INIT -#define TEST_EXTERN -#else -#define TEST_EXTERN extern -#endif - -TEST_EXTERN pthread_t Init_id; -TEST_EXTERN pthread_t Task_id; - -/* end of include file */ diff --git a/c/src/tests/psxtests/psx11/task.c b/c/src/tests/psxtests/psx11/task.c deleted file mode 100644 index 29ee014870..0000000000 --- a/c/src/tests/psxtests/psx11/task.c +++ /dev/null @@ -1,91 +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 -#include - -void diff_timespec( - struct timespec *start, - struct timespec *stop, - struct timespec *result -) -{ - int nsecs_per_sec = 1000000000; - - result->tv_sec = stop->tv_sec - start->tv_sec; - if ( stop->tv_nsec < start->tv_nsec ) { - result->tv_nsec = nsecs_per_sec - start->tv_nsec + stop->tv_nsec; - result->tv_sec--; - } else - result->tv_nsec = stop->tv_nsec - start->tv_nsec; - -} - -void *Task_1( - void *argument -) -{ - int status; - struct timespec start; - struct timespec current; - struct timespec difference; - struct timespec delay; - - status = clock_gettime( CLOCK_REALTIME, &start ); - assert( !status ); - - status = sched_rr_get_interval( getpid(), &delay ); - assert( !status ); - - /* double the rr interval for confidence */ - - delay.tv_sec *= 2; - delay.tv_nsec *= 2; - if ( delay.tv_nsec >= 1000000000 ) { /* handle overflow/carry */ - delay.tv_nsec -= 1000000000; - delay.tv_sec++; - } - - - puts( "Task_1: killing time" ); - for ( ; ; ) { - - status = clock_gettime( CLOCK_REALTIME, ¤t ); - assert( !status ); - - diff_timespec( &start, ¤t, &difference ); - - if ( difference.tv_sec < delay.tv_sec ) - continue; - - if ( difference.tv_sec > delay.tv_sec ) - break; - - if ( difference.tv_nsec > delay.tv_nsec ) - break; - - } - - puts( "Task_1: exitting" ); - pthread_exit( NULL ); - - return NULL; /* just so the compiler thinks we returned something */ -} diff --git a/c/src/tests/psxtests/psx12/.cvsignore b/c/src/tests/psxtests/psx12/.cvsignore deleted file mode 100644 index 282522db03..0000000000 --- a/c/src/tests/psxtests/psx12/.cvsignore +++ /dev/null @@ -1,2 +0,0 @@ -Makefile -Makefile.in diff --git a/c/src/tests/psxtests/psx12/Makefile.am b/c/src/tests/psxtests/psx12/Makefile.am deleted file mode 100644 index d8c5d599b5..0000000000 --- a/c/src/tests/psxtests/psx12/Makefile.am +++ /dev/null @@ -1,44 +0,0 @@ -## -## $Id$ -## - - -TEST = psx12 - -MANAGERS = all - -C_FILES = init.c task.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/psx12/init.c b/c/src/tests/psxtests/psx12/init.c deleted file mode 100644 index 142f429ebd..0000000000 --- a/c/src/tests/psxtests/psx12/init.c +++ /dev/null @@ -1,139 +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 - -void print_schedparam( - char *prefix, - struct sched_param *schedparam -) -{ - printf( "%ssched priority = %d\n", prefix, schedparam->sched_priority ); -#if defined(_POSIX_SPORADIC_SERVER) - printf( "%sss_low_priority = %d\n", prefix, schedparam->ss_low_priority ); - printf( "%sss_replenish_period = (%ld, %ld)\n", prefix, - schedparam->ss_replenish_period.tv_sec, - schedparam->ss_replenish_period.tv_nsec ); - printf( "%sss_initial_budget = (%ld, %ld)\n", prefix, - schedparam->ss_initial_budget.tv_sec, - schedparam->ss_initial_budget.tv_nsec ); -#else - printf( "%s_POSIX_SPORADIC_SERVER is not defined\n" ); -#endif -} - -void *POSIX_Init( - void *argument -) -{ - int status; - pthread_attr_t attr; - struct sched_param schedparam; - - puts( "\n\n*** POSIX TEST 12 ***" ); - - /* 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 ); - - /* invalid scheduling policy error */ - - puts( "Init: pthread_attr_init - SUCCESSFUL" ); - status = pthread_attr_init( &attr ); - assert( !status ); - - status = pthread_attr_setinheritsched( &attr, PTHREAD_EXPLICIT_SCHED ); - assert( !status ); - attr.schedpolicy = -1; - - puts( "Init: pthread_create - EINVAL (invalid scheduling policy)" ); - status = pthread_create( &Task_id, &attr, Task_1, NULL ); - assert( status == EINVAL ); - - /* replenish period < budget error */ - - puts( "Init: pthread_attr_init - SUCCESSFUL" ); - status = pthread_attr_init( &attr ); - assert( !status ); - - puts( "Init: set scheduling parameter attributes for sporadic server" ); - status = pthread_attr_setschedpolicy( &attr, SCHED_SPORADIC ); - assert( !status ); - - schedparam.ss_replenish_period.tv_sec = 1; - schedparam.ss_replenish_period.tv_nsec = 0; - schedparam.ss_initial_budget.tv_sec = 2; - schedparam.ss_initial_budget.tv_nsec = 0; - - schedparam.sched_priority = 200; - schedparam.ss_low_priority = 100; - - status = pthread_attr_setschedparam( &attr, &schedparam ); - assert( !status ); - - status = pthread_attr_setinheritsched( &attr, PTHREAD_EXPLICIT_SCHED ); - assert( !status ); - - puts( "Init: pthread_create - EINVAL (replenish < budget)" ); - status = pthread_create( &Task_id, &attr, Task_1, NULL ); - assert( status == EINVAL ); - - /* invalid ss_low_priority error */ - - schedparam.ss_replenish_period.tv_sec = 2; - schedparam.ss_replenish_period.tv_nsec = 0; - schedparam.ss_initial_budget.tv_sec = 1; - schedparam.ss_initial_budget.tv_nsec = 0; - - schedparam.sched_priority = 200; - schedparam.ss_low_priority = -1; - - status = pthread_attr_setschedparam( &attr, &schedparam ); - assert( !status ); - - puts( "Init: pthread_create - EINVAL (invalid ss_low_priority)" ); - status = pthread_create( &Task_id, &attr, Task_1, NULL ); - assert( status == EINVAL ); - - /* create a thread as a sporadic server */ - - schedparam.ss_replenish_period.tv_sec = 2; - schedparam.ss_replenish_period.tv_nsec = 0; - schedparam.ss_initial_budget.tv_sec = 1; - schedparam.ss_initial_budget.tv_nsec = 0; - - schedparam.sched_priority = 200; - schedparam.ss_low_priority = 100; - - status = pthread_attr_setschedparam( &attr, &schedparam ); - assert( !status ); - - puts( "Init: pthread_create - SUCCESSFUL" ); - status = pthread_create( &Task_id, &attr, Task_1, NULL ); - assert( !status ); - - status = pthread_join( Task_id, NULL ); - assert( status ); - - /* switch to Task_1 */ - - puts( "*** END OF POSIX TEST 12 ***" ); - rtems_test_exit( 0 ); - - return NULL; /* just so the compiler thinks we returned something */ -} diff --git a/c/src/tests/psxtests/psx12/psx12.scn b/c/src/tests/psxtests/psx12/psx12.scn deleted file mode 100644 index e35bdab6ae..0000000000 --- a/c/src/tests/psxtests/psx12/psx12.scn +++ /dev/null @@ -1,11 +0,0 @@ -*** POSIX TEST 12 *** -Init's ID is 0x0b010001 -Init: pthread_attr_init - SUCCESSFUL -Init: pthread_create - EINVAL (invalid scheduling policy) -Init: pthread_attr_init - SUCCESSFUL -Init: set scheduling parameter attributes for sporadic server -Init: pthread_create - EINVAL (replenish < budget) -Init: pthread_create - EINVAL (invalid ss_low_priority) -Init: pthread_create - SUCCESSFUL -Task_1: exitting -*** END OF POSIX TEST 12 *** diff --git a/c/src/tests/psxtests/psx12/system.h b/c/src/tests/psxtests/psx12/system.h deleted file mode 100644 index 4794446905..0000000000 --- a/c/src/tests/psxtests/psx12/system.h +++ /dev/null @@ -1,52 +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 - -void *POSIX_Init( - void *argument -); - -void *Task_1( - void *argument -); - -/* configuration information */ - -#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER -#define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER - -#define CONFIGURE_MAXIMUM_POSIX_THREADS 2 -#define CONFIGURE_MAXIMUM_POSIX_KEYS 10 -#define CONFIGURE_MAXIMUM_POSIX_MUTEXES 10 - -#define CONFIGURE_POSIX_INIT_THREAD_TABLE - -#include - -/* global variables */ - -#ifdef CONFIGURE_INIT -#define TEST_EXTERN -#else -#define TEST_EXTERN extern -#endif - -TEST_EXTERN pthread_t Init_id; -TEST_EXTERN pthread_t Task_id; - -/* end of include file */ diff --git a/c/src/tests/psxtests/psx12/task.c b/c/src/tests/psxtests/psx12/task.c deleted file mode 100644 index 67e5a68e40..0000000000 --- a/c/src/tests/psxtests/psx12/task.c +++ /dev/null @@ -1,33 +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 -#include - -void *Task_1( - void *argument -) -{ - puts( "Task_1: exitting" ); - pthread_exit( NULL ); - - return NULL; /* just so the compiler thinks we returned something */ -} diff --git a/c/src/tests/psxtests/psx13/.cvsignore b/c/src/tests/psxtests/psx13/.cvsignore deleted file mode 100644 index 282522db03..0000000000 --- a/c/src/tests/psxtests/psx13/.cvsignore +++ /dev/null @@ -1,2 +0,0 @@ -Makefile -Makefile.in diff --git a/c/src/tests/psxtests/psx13/Makefile.am b/c/src/tests/psxtests/psx13/Makefile.am deleted file mode 100644 index 492c101746..0000000000 --- a/c/src/tests/psxtests/psx13/Makefile.am +++ /dev/null @@ -1,41 +0,0 @@ -## -## $Id$ -## - - -TEST = psx13 - -MANAGERS = all - -C_FILES = main.c test.c -C_O_FILES = $(C_FILES:%.c=${ARCH}/%.$(OBJEXT)) - -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/psx13/main.c b/c/src/tests/psxtests/psx13/main.c deleted file mode 100644 index f83fb6eb9c..0000000000 --- a/c/src/tests/psxtests/psx13/main.c +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Simple test program -- simplified version of sample test hello. - * - * 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 TEST_INIT - -#include -#include - -void test_main( void ); - -rtems_task Init( - rtems_task_argument ignored -) -{ - test_main(); - rtems_test_exit( 0 ); -} - -/* configuration information */ - -#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER -#define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER - -#define CONFIGURE_USE_IMFS_AS_BASE_FILESYSTEM -#define CONFIGURE_LIBIO_MAXIMUM_FILE_DESCRIPTORS 6 - -#define CONFIGURE_MAXIMUM_TASKS 1 - -#define CONFIGURE_RTEMS_INIT_TASKS_TABLE - -#define CONFIGURE_INIT - -#include - -/* end of file */ diff --git a/c/src/tests/psxtests/psx13/psx13.scn b/c/src/tests/psxtests/psx13/psx13.scn deleted file mode 100644 index 4a012eceaa..0000000000 --- a/c/src/tests/psxtests/psx13/psx13.scn +++ /dev/null @@ -1,16 +0,0 @@ -*** POSIX TEST 13 *** - -Files initialized successfully. -Testing device_lseek()... Success. -Testing dup()............ Success. ( Add when dup flags resolved ) -Testing dup2()........... Success. -Testing fdatasync()...... Success. -Testing umask().......... Success. -Testing utime().......... Success. -Testing pipe()........... Success. -Testing fsync().......... Success. -Testing pathconf()....... Success. -Testing fpathconf()...... Success. - - -*** END OF TEST PSX13 *** diff --git a/c/src/tests/psxtests/psx13/test.c b/c/src/tests/psxtests/psx13/test.c deleted file mode 100644 index 82bf3c1e0a..0000000000 --- a/c/src/tests/psxtests/psx13/test.c +++ /dev/null @@ -1,690 +0,0 @@ -/* - * Psx13 - * Chris Bond (working under Jennifer's account) - * - * This test exercises the following routines: - * - * device_lseek - test implemented - * dup - test implemented - * dup2 - test implemented - * fdatasync - test implemented - * fsync - test implemented - * pathconf - test implemented - * fpathconf - test implemented - * pipe - test implemented - * umask - test implemented - * utime - test implemented - * - * 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 -#include -#include -#include -#include -#include - -#include -#include - -#include - -/*------------------------------------------------------------------- - * InitFiles function - * - * Initializes the three files to be used in the test. - * - * arguments: none - * assumptions: fopen, fprintf, fwrite, FILE are available - * actions: creates testfile1, a text file with 'a'..'z' listed 4 times. - * creates testfile2, a text file with 'a'..'z' listed 4 times. - * creates testfile3, a binary file with 0..9 listed 4 times. - * returns: TRUE if files opened successfully. - * FALSE if fail on file open for write. - * - * ------------------------------------------------------------------ - */ - -int InitFiles (void) { - - int count; - FILE *fp1, *fp2, *fp3; - char letter; - int number; - int retval; - - fp1 = fopen("testfile1.tst", "wt"); - fp2 = fopen("testfile2.tst", "wt"); - fp3 = fopen("testfile4.tst", "wb"); - - if ((fp1 != NULL) && (fp2 != NULL) && (fp3 !=NULL)) { - - letter = 'a'; - - for (count=0 ; count<(26*4); ++count) { - fprintf (fp1, "%c", letter); - fprintf (fp2, "%c", letter); - - ++letter; - if (letter > 'z') - letter = 'a'; - } - - number = 0; - - for (count = 0; count <40; ++count) { - - fwrite (&number, 1, sizeof(int), fp3); - - ++number; - if (number > 9) - number = 0; - } - - fclose(fp1); - fclose(fp2); - fclose(fp3); - - retval = TRUE; - } - - else - retval = FALSE; - - /* assert (retval == TRUE);*/ - - return (retval); -} - -/* --------------------------------------------------------------- - * DeviceLSeekTest function - * - * Hits the device_lseek code by lseeking on the console. - * - * arguments: none - * assumptions: lseek available - * actions: hits lseek with some dummy arguments. - * returns: value of return from lseek. - * - * --------------------------------------------------------------- - */ - -int DeviceLSeekTest (void) { - - int error = -1, retval = FALSE; - - int fd = open ("/dev/console", O_RDONLY); - - error = lseek(fd, 5, SEEK_SET); - - if (error == 0) - retval = TRUE; - else - retval = FALSE; - - /* assert (retval == TRUE);*/ - - return (retval); - -} - -/* --------------------------------------------------------------- - * DupTest function - * - * Hits the dup code. - * - * arguments: none - * assumptions: dup, open, close, fcntl available. - * actions: Gets a file descriptor(fd1) for test file1. - * dups fd1 to fd2. - * sets fd1 to append mode - * checks fd2 to ensure it's in append mode, also. - * returns: success if fd2 is indeed a copy of fd1. - * - * --------------------------------------------------------------- - */ - -int DupTest(void) { - - int fd1, fd2; - - int flags = 0, retval = FALSE; - - fd1 = open ("testfile1.tst", O_RDONLY); - fd2 = dup(fd1); - - if (fd2 != -1) { - - fcntl(fd1, F_SETFL, O_APPEND); - flags = fcntl(fd2, F_GETFL); - - close (fd1); - - flags = (flags & O_APPEND); - - retval = (flags == O_APPEND); - } - - else - retval = FALSE; - - /* assert (retval == TRUE);*/ - - return (retval); - -} - -/* --------------------------------------------------------------- - * Dup2Test function - * - * Hits the dup2 code. - * - * arguments: none - * assumptions: dup, dup2, open, close, fcntl available. - * actions: Gets a file descriptor(fd1) for test file1. - * dups fd1 to fd2. - * sets fd1 to append mode - * checks fd2 to ensure it's in append mode, also. - * sets fd1 to invalid value, fd2 to valid, tries to dup2. - * sets fd2 to invalid value, fd1 to valid tries to dup2. - * returns: success if fd2 is a copy of fd1, and invalid fd1 or fd2 produce errors. - * - * --------------------------------------------------------------- - */ - -int Dup2Test(void) { - - int fd1, fd2; - - int flags = 0, retval = FALSE; - - int error = 0; - - fd1 = open ("testfile1.tst", O_RDONLY); - fd2 = open ("testfile2.tst", O_RDONLY); - error = dup2(fd1, fd2); - - /* make sure dup2 works if both fd1 and fd2 are valid file descriptors. */ - - if (error != -1) { - - fcntl(fd1, F_SETFL, O_APPEND); - flags = fcntl(fd1, F_GETFL); - - flags = (flags & O_APPEND); - retval = (flags == O_APPEND); - } - - else { - retval = FALSE; - close(fd2); - } - - if (retval == TRUE) { - - /* make sure dup2 fails correctly if one or the other arguments are invalid. */ - /* this assumes -1 is an invalid value for a file descriptor!!! (POSIX book, p.135) */ - - fd1 = -1; - - if (dup2 (fd1, fd2) != -1) - retval = FALSE; - else { - fd1 = dup(fd2); - fd2 = -1; - - if (dup2(fd1, fd2) != -1) - retval = FALSE; - } - } - - close (fd1); - - /* assert (retval == TRUE);*/ - - return (retval); - -} - -/* --------------------------------------------------------------- - * FDataSyncTest function - * - * Hits the fdatasync code. Does NOT test the functionality of the - * underlying fdatasync entry in the IMFS op table. - * - * arguments: none - * assumptions: open, close, fdatasync functions available. - * actions: attempts to fdatasync a file descriptor flagged as read-only. - * attempts to fdatasync an invalid file descriptor (-1). - * attempts to fdatasync a perfectly valid fd opened as RDWR - * - * returns: TRUE if attempt to fdatasync invalid and read-only filed escriptor fail, and fdatasync succeeds on valid fd. - * FALSE otherwise. - * - * --------------------------------------------------------------- - */ - -int FDataSyncTest(void) { - - int fd = -1; - int error = 0, retval = TRUE; - - /* Try it with a RD_ONLY file. */ - - fd = open ("testfile1.tst", O_RDONLY); - - error = fdatasync(fd); - if ((error == -1) && (errno == EINVAL)) - retval = TRUE; - else - retval = FALSE; - - close (fd); - - if (retval == TRUE) { - - /* Try it with a bad file descriptor */ - - fd = -1; - - error = fdatasync(fd); - if ((errno == EBADF) && (error == -1)) - retval = TRUE; - else - retval = FALSE; - } - - /* Okay - now the success case... */ - - if (retval == TRUE) { - fd = open ("testfile1.tst", O_RDWR); - error = fdatasync(fd); - - if (error == 0) - retval = TRUE; - else - retval = FALSE; - - close (fd); - - } - - /* assert (retval == TRUE);*/ - - return (retval); -} - -/* --------------------------------------------------------------- - * UMaskTest function - * - * Hits the umask code. - * - * arguments: none - * assumptions: umask function available. - * actions: set umask to 0ctal 23. - * set umask to Octal 22, retrieve the old value. - * - * returns: TRUE if old value is 23, - * FALSE otherwise. - * - * --------------------------------------------------------------- - */ - -int UMaskTest (void) { - - int error = 0, retval = FALSE; - - umask (023); - error = umask(022); - - if (error == 023) - retval = TRUE; - else - retval = FALSE; - - /* assert (retval == TRUE);*/ - - return(retval); - -} - -/* --------------------------------------------------------------- - * UTimeTest function - * - * Hits the utime code. Does NOT test the functionality of the underlying utime - * entry in the IMFS op table. - * - * arguments: none - * assumptions: utime function available. - * actions: set utime for an invalid filename. - * set utime for a valid filename. - * - * returns: TRUE if time on valid file is set correctly and utime failed on an invaid filename. - * FALSE otherwise. - * - * --------------------------------------------------------------- - */ - -int UTimeTest (void) { - - int error = 0, retval = FALSE; - struct utimbuf time; - struct stat fstat; - - /* First, an invalid filename. */ - error = utime("!This is an =invalid p@thname!!! :)", NULL); - - if (error == -1) - retval = TRUE; - else - retval = FALSE; - - /* Now, the success test. */ - if (retval == TRUE) { - - time.actime = 12345; - time.modtime = 54321; - - error = utime("testfile1.tst", &time); - - if (error == 0) { - - /* But, did it set the time? */ - stat ("testfile1.tst", &fstat); - - if ((fstat.st_atime == 12345) && (fstat.st_mtime == 54321 )) - retval = TRUE; - else - retval = FALSE; - } - - else - retval = FALSE; - } - - /* assert (retval == TRUE);*/ - - return (retval); - -} - -/* --------------------------------------------------------------- - * PipeTest function - * - * Hits the pipe code. - * - * arguments: none - * assumptions: pipe function available. - * actions: call pipe. - * - * returns: TRUE if pipe retuens ENOSYS, - * FALSE otherwise. - * - * --------------------------------------------------------------- - */ - -int PipeTest (void) { - - int error = 0, retval = FALSE; - int fd[2]; - - error = pipe(fd); - - if ((error == -1) && (errno == ENOSYS)) - retval = TRUE; - else - retval = FALSE; - - /* assert (retval == TRUE);*/ - - return(retval); - -} - -/* --------------------------------------------------------------- - * PathConfTest function - * - * Hits the pathconf code. - * - * arguments: none - * assumptions: pathconf function available. - * actions: Try to pathconf a bad filename. - * Try to pathconf a good filename. - * - * returns: TRUE if pathconf fails on bad file, succeeds on good file. - * FALSE otherwise. - * - * --------------------------------------------------------------- - */ - -int PathConfTest (void) { - - int error = 0, retval = FALSE; - - error = pathconf("thisfiledoesnotexist", _PC_LINK_MAX); - - if (error == -1) { - error = pathconf("testfile1.tst", _PC_LINK_MAX); - - if (error != -1) - retval = TRUE; - else - retval = FALSE; - } - - else - retval = FALSE; - - /* assert (retval == TRUE);*/ - - return(retval); - -} - -/* --------------------------------------------------------------- - * FPathConfTest function - * - * Hits the fpathconf code. - * - * arguments: none - * assumptions: fpathconf function available. - * actions: Call fpathconf with all arguments, plus an invalid. - * - * returns: TRUE always. - * - * --------------------------------------------------------------- - */ - -int FPathConfTest (void) { - - int error = 0, retval = TRUE; - - int fd = -1; - - error = fpathconf(fd, _PC_LINK_MAX); - - if (error == -1) { - fd = open("testfile1.tst", O_RDWR); - - error = fpathconf(fd, _PC_LINK_MAX); - error = fpathconf(fd, _PC_MAX_CANON); - error = fpathconf(fd, _PC_MAX_INPUT); - error = fpathconf(fd, _PC_NAME_MAX); - error = fpathconf(fd, _PC_PATH_MAX); - error = fpathconf(fd, _PC_PIPE_BUF); - error = fpathconf(fd, _PC_CHOWN_RESTRICTED); - error = fpathconf(fd, _PC_NO_TRUNC); - error = fpathconf(fd, _PC_VDISABLE); - error = fpathconf(fd, _PC_ASYNC_IO); - error = fpathconf(fd, _PC_PRIO_IO); - error = fpathconf(fd, _PC_SYNC_IO); - error = fpathconf(fd, 255); - - retval = TRUE; - } - - else - retval = FALSE; - - /* assert (retval == TRUE);*/ - - return(retval); - -} - -/* --------------------------------------------------------------- - * FSyncTest function - * - * Hits the fsync code. - * - * arguments: none - * assumptions: open, fsync functions available. - * actions: open test file, - * try to fsync it. - * - * returns: TRUE if fsync doesn't return -1, - * FALSE otherwise. - * - * --------------------------------------------------------------- - */ - -int FSyncTest (void) { - - int error = 0, retval = FALSE; - int fd = -1; - - fd = open("testfile1.tst", O_RDWR); - - if (fd != -1) { - - error = fsync(fd); - - if (error != -1) - retval = TRUE; - else - retval = FALSE; - - close(fd); - } - - else - retval = FALSE; - - /* assert (retval == TRUE);*/ - - return(retval); - -} - -/* --------------------------------------------------------------- - * Main function - * - * main entry point to the test - * - * --------------------------------------------------------------- - */ - -#if defined(__rtems__) -int test_main(void) -#else -int main( - int argc, - char **argv -) -#endif -{ - puts( "*** POSIX TEST 13 ***" ); - - if (InitFiles() == TRUE) { - printf ("\nFiles initialized successfully.\n"); - - printf ("Testing device_lseek()... "); - if (DeviceLSeekTest() == TRUE) - printf ("Success.\n"); - else - printf ("Failed!!!\n"); - - printf ("Testing dup()............ "); - if (DupTest() == TRUE) - printf ("Success.\n"); - else - printf ("Failed!!!\n"); - - printf ("Testing dup2()........... "); - if (Dup2Test() == TRUE) - printf ("Success.\n"); - else - printf ("Failed!!!\n"); - - printf ("Testing fdatasync()...... "); - if (FDataSyncTest() == TRUE) - printf ("Success.\n"); - else - printf ("Failed!!!\n"); - - printf ("Testing umask().......... "); - if (UMaskTest() == TRUE) - printf ("Success.\n"); - else - printf ("Failed!!!\n"); - - printf ("Testing utime().......... "); - if (UTimeTest() == TRUE) - printf ("Success.\n"); - else - printf ("Failed!!!\n"); - - printf ("Testing pipe()........... "); - if (PipeTest() == TRUE) - printf ("Success.\n"); - else - printf ("Failed!!!\n"); - - printf ("Testing fsync().......... "); - if (FSyncTest() == TRUE) - printf ("Success.\n"); - else - printf ("Failed!!!\n"); - - printf ("Testing pathconf()....... "); - if (PathConfTest() == TRUE) - printf ("Success.\n"); - else - printf ("Failed!!!\n"); - - printf ("Testing fpathconf()...... "); - if (FPathConfTest() == TRUE) - printf ("Success.\n"); - else - printf ("Failed!!!\n"); - - printf ("Testing sync()...... "); - sync(); - } - else - printf ("\n\nError opening files for write!!!!\n"); - - printf( "\n\n*** END OF TEST PSX13 ***" ); - rtems_test_exit(0); -} - - - - - - - - - - - - - diff --git a/c/src/tests/psxtests/psxcancel/.cvsignore b/c/src/tests/psxtests/psxcancel/.cvsignore deleted file mode 100644 index 282522db03..0000000000 --- a/c/src/tests/psxtests/psxcancel/.cvsignore +++ /dev/null @@ -1,2 +0,0 @@ -Makefile -Makefile.in diff --git a/c/src/tests/psxtests/psxcancel/Makefile.am b/c/src/tests/psxtests/psxcancel/Makefile.am deleted file mode 100644 index ec6783c7be..0000000000 --- a/c/src/tests/psxtests/psxcancel/Makefile.am +++ /dev/null @@ -1,44 +0,0 @@ -## -## $Id$ -## - - -TEST = psxcancel - -MANAGERS = all - -C_FILES = init.c -C_O_FILES = $(C_FILES:%.c=${ARCH}/%.$(OBJEXT)) - -H_FILES = -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/psxcancel/init.c b/c/src/tests/psxtests/psxcancel/init.c deleted file mode 100644 index 3cf857fafa..0000000000 --- a/c/src/tests/psxtests/psxcancel/init.c +++ /dev/null @@ -1,127 +0,0 @@ -/* - * Thread Test Program - * - * - test of POSIX's pthread_init() function from rtemstask Init() - * - * ott@linux.thai.net - * - * 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 -#include -#include -#include - -#ifdef __rtems__ -#include -/* configuration information */ - -#define CONFIGURE_INIT - -#include -#include -#include - -#include /* for device driver prototypes */ -#include - -rtems_task Init( rtems_task_argument argument); - -/* configuration information */ - -#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER -#define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER - -#define CONFIGURE_MAXIMUM_TASKS 3 -#define CONFIGURE_RTEMS_INIT_TASKS_TABLE -#define CONFIGURE_EXTRA_TASK_STACKS (3 * RTEMS_MINIMUM_STACK_SIZE) - -#define CONFIGURE_MAXIMUM_POSIX_THREADS 5 -#define CONFIGURE_MAXIMUM_POSIX_MUTEXES 5 -#define CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES 5 - -#include -#include - -#endif /* __rtems__ */ - -void countTaskDeferred() { - int i=0; - int type,state; - - pthread_setcancelstate(PTHREAD_CANCEL_ENABLE, &type); - pthread_setcanceltype(PTHREAD_CANCEL_DEFERRED, &state); - while (1) { - printf("countTaskDeferred: elapsed time (second): %2d\n", i++ ); - sleep(1); - pthread_testcancel(); - } -} - -void countTaskAsync() { - int i=0; - int type,state; - - pthread_setcancelstate(PTHREAD_CANCEL_ENABLE, &type); - pthread_setcanceltype(PTHREAD_CANCEL_ASYNCHRONOUS, &state); - while (1) { - printf("countTaskAsync: elapsed time (second): %2d\n", i++ ); - sleep(1); - } -} - -#ifdef __linux__ -int main(){ -#else - rtems_task Init( rtems_task_argument ignored ) { -#endif - - pthread_t count; - int taskparameter = 0; - - puts( "\n\n*** POSIX CANCEL TEST ***" ); - - /* Start countTask deferred */ - { - int task_ret; - task_ret = pthread_create(&count, NULL, (void *) countTaskDeferred, (void *) &taskparameter); - if (task_ret) { - perror("pthread_create: countTask"); - rtems_test_exit(EXIT_FAILURE); - } - /* sleep for 5 seconds, then cancel it */ - sleep(5); - pthread_cancel(count); - pthread_join(count,NULL); - } - - /* Start countTask asynchronous */ - { - int task_ret; - task_ret = pthread_create(&count, NULL, (void *) countTaskAsync, (void *) &taskparameter); - if (task_ret) { - perror("pthread_create: countTask"); - rtems_test_exit(EXIT_FAILURE); - } - /* sleep for 5 seconds, then cancel it */ - sleep(5); - pthread_cancel(count); - pthread_join(count,NULL); - } - - - puts( "*** END OF POSIX CANCEL TEST ***" ); - -#ifdef __linux__ - return 0; -#else - rtems_test_exit(EXIT_SUCCESS); -#endif -} - diff --git a/c/src/tests/psxtests/psxcancel/psxcancel.scn b/c/src/tests/psxtests/psxcancel/psxcancel.scn deleted file mode 100644 index bb5c7d58e0..0000000000 --- a/c/src/tests/psxtests/psxcancel/psxcancel.scn +++ /dev/null @@ -1,14 +0,0 @@ - - -*** POSIX CANCEL TEST *** -countTaskDeferred: elapsed time (second): 0 -countTaskDeferred: elapsed time (second): 1 -countTaskDeferred: elapsed time (second): 2 -countTaskDeferred: elapsed time (second): 3 -countTaskDeferred: elapsed time (second): 4 -countTaskAsync: elapsed time (second): 0 -countTaskAsync: elapsed time (second): 1 -countTaskAsync: elapsed time (second): 2 -countTaskAsync: elapsed time (second): 3 -countTaskAsync: elapsed time (second): 4 -*** END OF POSIX CANCEL TEST *** diff --git a/c/src/tests/psxtests/psxchroot01/.cvsignore b/c/src/tests/psxtests/psxchroot01/.cvsignore deleted file mode 100644 index 282522db03..0000000000 --- a/c/src/tests/psxtests/psxchroot01/.cvsignore +++ /dev/null @@ -1,2 +0,0 @@ -Makefile -Makefile.in diff --git a/c/src/tests/psxtests/psxchroot01/Makefile.am b/c/src/tests/psxtests/psxchroot01/Makefile.am deleted file mode 100644 index 0d52362ea4..0000000000 --- a/c/src/tests/psxtests/psxchroot01/Makefile.am +++ /dev/null @@ -1,41 +0,0 @@ -## -## $Id$ -## - - -TEST = psxchroot01 - -MANAGERS = all - -C_FILES = main.c test.c -C_O_FILES = $(C_FILES:%.c=${ARCH}/%.$(OBJEXT)) - -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/psxchroot01/main.c b/c/src/tests/psxtests/psxchroot01/main.c deleted file mode 100644 index 4ce4bae422..0000000000 --- a/c/src/tests/psxtests/psxchroot01/main.c +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Simple test program -- simplified version of sample test hello. - */ - -#define TEST_INIT - -#include -#include - -void test_main( void ); - -rtems_task Init( - rtems_task_argument ignored -) -{ - test_main(); - rtems_test_exit( 0 ); -} - -/* configuration information */ - -#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER - -#define CONFIGURE_USE_IMFS_AS_BASE_FILESYSTEM -#define CONFIGURE_LIBIO_MAXIMUM_FILE_DESCRIPTORS 10 - -#define CONFIGURE_MAXIMUM_TASKS 1 - -#define CONFIGURE_RTEMS_INIT_TASKS_TABLE - -#define CONFIGURE_INIT - -#include - -/* end of file */ diff --git a/c/src/tests/psxtests/psxchroot01/psxchroot01.scn b/c/src/tests/psxtests/psxchroot01/psxchroot01.scn deleted file mode 100644 index 519f2735b8..0000000000 --- a/c/src/tests/psxtests/psxchroot01/psxchroot01.scn +++ /dev/null @@ -1,9 +0,0 @@ - - -*** CHROOT01 TEST *** -SUCCESS on /one/one.test -SUCCESS on /two/two.test -Reset the private environment -SUCCESS on /one/one.test -SUCCESS on /two/two.test -*** END OF CHROOT01 TEST *** diff --git a/c/src/tests/psxtests/psxchroot01/test.c b/c/src/tests/psxtests/psxchroot01/test.c deleted file mode 100644 index 2e2f87c09c..0000000000 --- a/c/src/tests/psxtests/psxchroot01/test.c +++ /dev/null @@ -1,121 +0,0 @@ -/* - * This is a native test to explore how the readdir() family works. - * Newlib supports the following readdir() family members: - * - * closedir() - - * readdir() - - * scandir() - - * opendir() - - * rewinddir() - - * telldir() - BSD not in POSIX - * seekdir() - BSD not in POSIX - * - * - * seekdir() takes an offset which is a byte offset. The Linux - * implementation of this appears to seek to the ((off/DIRENT_SIZE) + 1) - * record where DIRENT_SIZE seems to be 12 bytes. - * - * - * - * $Id$ - */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -void touch( char *file ) -{ - int fd; - - assert( file ); - - fd = open( file, O_RDWR|O_CREAT, 0777 ); - assert( fd != -1 ); - close( fd ); -} - -int fileexists( char *file ) -{ - int status; - struct stat statbuf; - - assert( file ); - - status = stat( file, &statbuf ); - - if ( status == -1 ) { - /* printf( ": %s\n", strerror( errno ) ); */ - return 0; - } - return 1; -} - -#if defined(__rtems__) -int test_main(void) -#else -int main( - int argc, - char **argv -) -#endif -{ - int status; - -/* - * This test is the C equivalent of this sequence. -#mkdir /one -#mkdir /one/one -#touch /one/one.test -#touch /one/two/two.test -#chroot /one -#if !fileexists(/one/one.test) echo "SUCCESSFUL" -#if fileexists(/two/two.test) echo "SUCCESSFUL" -#rtems_set_private_env() ! reset at the global environment -#if fileexists(/one/one.test) echo "SUCESSFUL" -#if !fileexists(/two/two.test) echo "SUCCESSFUL" -*/ - - printf( "\n\n*** CHROOT01 TEST ***\n" ); - - status = mkdir( "/one", 0777); - assert( status == 0 ); - - status = mkdir( "/one/one", 0777); - assert( status == 0 ); - - status = mkdir( "/one/two", 0777); - assert( status == 0 ); - - touch( "/one/one.test" ); - touch( "/one/two/two.test" ); - - status = chroot( "/one" ); - assert( status == 0 ); - - status = fileexists( "/one/one.test" ); - printf( "%s on /one/one.test\n", (!status) ? "SUCCESS" : "FAILURE" ); - - status = fileexists( "/two/two.test" ); - printf( "%s on /two/two.test\n", (status) ? "SUCCESS" : "FAILURE" ); - - puts( "Reset the private environment" ); - rtems_libio_set_private_env(); - - status = fileexists( "/one/one.test" ); - printf( "%s on /one/one.test\n", ( status) ? "SUCCESS" : "FAILURE" ); - - status = fileexists( "/two/two.test" ); - printf( "%s on /two/two.test\n", (!status) ? "SUCCESS" : "FAILURE" ); - - printf( "*** END OF CHROOT01 TEST ***\n" ); - rtems_test_exit(0); -} - diff --git a/c/src/tests/psxtests/psxfile01/.cvsignore b/c/src/tests/psxtests/psxfile01/.cvsignore deleted file mode 100644 index 282522db03..0000000000 --- a/c/src/tests/psxtests/psxfile01/.cvsignore +++ /dev/null @@ -1,2 +0,0 @@ -Makefile -Makefile.in diff --git a/c/src/tests/psxtests/psxfile01/Makefile.am b/c/src/tests/psxtests/psxfile01/Makefile.am deleted file mode 100644 index 53f4334303..0000000000 --- a/c/src/tests/psxtests/psxfile01/Makefile.am +++ /dev/null @@ -1,41 +0,0 @@ -## -## $Id$ -## - - -TEST = psxfile01 - -MANAGERS = all - -C_FILES = main.c test.c test_cat.c test_extend.c test_write.c -C_O_FILES = $(C_FILES:%.c=${ARCH}/%.$(OBJEXT)) - -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/psxfile01/main.c b/c/src/tests/psxtests/psxfile01/main.c deleted file mode 100644 index f83fb6eb9c..0000000000 --- a/c/src/tests/psxtests/psxfile01/main.c +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Simple test program -- simplified version of sample test hello. - * - * 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 TEST_INIT - -#include -#include - -void test_main( void ); - -rtems_task Init( - rtems_task_argument ignored -) -{ - test_main(); - rtems_test_exit( 0 ); -} - -/* configuration information */ - -#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER -#define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER - -#define CONFIGURE_USE_IMFS_AS_BASE_FILESYSTEM -#define CONFIGURE_LIBIO_MAXIMUM_FILE_DESCRIPTORS 6 - -#define CONFIGURE_MAXIMUM_TASKS 1 - -#define CONFIGURE_RTEMS_INIT_TASKS_TABLE - -#define CONFIGURE_INIT - -#include - -/* end of file */ diff --git a/c/src/tests/psxtests/psxfile01/psxfile01.scn b/c/src/tests/psxtests/psxfile01/psxfile01.scn deleted file mode 100644 index 6c4e7ef25b..0000000000 --- a/c/src/tests/psxtests/psxfile01/psxfile01.scn +++ /dev/null @@ -1,208 +0,0 @@ -NOTE: If you get the following assertion, then your target does not -have enough memory in the heap used by malloc to allocate all the -files used during this test: - -assertion "memory" failed: file "...../c/src/lib/libc/memfile.c", line 340 - -*** FILE TEST 1 *** -*************** Dump of Entire IMFS *************** -/ -....dev/ -........console (device 0, 0) -*************** End of Dump *************** -stat of /dev/console -....st_dev (0x0:0x0) -....st_ino 3 may vary by small amount -....mode = 00020771 -....nlink = 1 -....uid = 0 -....gid = 0 -....atime = Fri Jan 1 00:00:00 1988 -....mtime = Fri Jan 1 00:00:00 1988 -....ctime = Fri Jan 1 00:00:00 1988 - -mkdir /dev/tty - -mkdir /usr -mkdir /etc -mkdir /tmp -mkdir /tmp/.. -mkdir /tmp/ -mkdir /j/j1 -mkdir tmp - -rmdir /usr -rmdir /dev -rmdir /fred -mknod /dev/test_console -mknod /dev/tty/S3 -mknod /etc/passwd -mkdir /tmp/my_dir -mkfifo /c/my_dir -mkdir /etc/passwd/j -open /tmp/joel - should fail with ENOENT -open /tmp/j -open returned file descriptor 3 -close /tmp/j -close /tmp/j again -unlink /tmp/j -unlink /tmp -create and close /tmp/tom -Attempt to recreate /tmp/tom -create /tmp/john -tcdrain /tmp/john -mknod /tmp/joel -(0)the first write!!! - -(10)the first write!!! - -stat( /tmp/joel ) returned -....st_dev (0x0:0x0) -....st_ino 10 may vary by small amount -....mode = 00100700 -....nlink = 1 -....uid = 0 -....gid = 0 -....atime = Sat Dec 31 09:00:00 1988 -....mtime = Sat Dec 31 09:00:00 1988 -....ctime = Sat Dec 31 09:00:00 1988 -unlink /tmp/joel -unlink /tmp/joel -mknod /tmp/joel -(514)the first write!!! - -(513)the first write!!! - -(24)the first write!!! - -(2)the first write!!! - -(1)the first write!!! - -(0)the first write!!! - -(0)rst write!!! - -(513)the first write!!! - -(139743) -stat( /tmp/joel ) returned -....st_dev (0x0:0x0) -....st_ino 11 may vary by small amount -....mode = 00100700 -....nlink = 1 -....uid = 0 -....gid = 0 -....atime = Sat Dec 31 09:00:00 1988 -....mtime = Sat Dec 31 09:00:00 1988 -....ctime = Sat Dec 31 09:00:00 1988 -stat of /tmp/j -stat(/tmp/j) returned -1 (errno=2) -....st_dev (0x0:0x0) -....st_ino 3 may vary by small amount -....mode = 00020771 -....nlink = 1 -....uid = 0 -....gid = 0 -....atime = Fri Jan 1 00:00:00 1988 -....mtime = Fri Jan 1 00:00:00 1988 -....ctime = Fri Jan 1 00:00:00 1988 -fopen of /tmp/j -fprintf to /tmp/j -(1) 26 characters written to the file -(2) 26 characters written to the file -(3) 26 characters written to the file -(4) 26 characters written to the file -(5) 26 characters written to the file -....st_dev (0x0:0x0) -....st_ino 12 may vary by small amount -....mode = 00100660 -....nlink = 1 -....uid = 0 -....gid = 0 -....atime = Sat Dec 31 09:00:00 1988 -....mtime = Sat Dec 31 09:00:00 1988 -....ctime = Sat Dec 31 09:00:00 1988 -This is call 1 to fprintf -This is call 2 to fprintf -This is call 3 to fprintf -This is call 4 to fprintf -This is call 5 to fprintf -....st_dev (0x0:0x0) -....st_ino 12 may vary by small amount -....mode = 00100660 -....nlink = 1 -....uid = 0 -....gid = 0 -....atime = Sat Dec 31 09:00:01 1988 -....mtime = Sat Dec 31 09:00:00 1988 -....ctime = Sat Dec 31 09:00:00 1988 -*************** Dump of Entire IMFS *************** -/ -....dev/ -........console (device 0, 0) -........tty/ -............S3 (device 255, 128) -........test_console (device 0, 0) -....etc/ -........passwd (file 0) -....tmp/ -........my_dir/ -........tom (file 0) -........john (file 0) -........joel (file 279487) -........j (file 130) -*************** End of Dump *************** -truncate /tmp/j to length of 40 -....st_dev (0x0:0x0) -....st_ino 12 may vary by small amount -....mode = 00100660 -....nlink = 1 -....uid = 0 -....gid = 0 -....atime = Sat Dec 31 09:00:02 1988 -....mtime = Sat Dec 31 09:00:00 1988 -....ctime = Sat Dec 31 09:00:00 1988 -*************** Dump of Entire IMFS *************** -/ -....dev/ -........console (device 0, 0) -........tty/ -............S3 (device 255, 128) -........test_console (device 0, 0) -....etc/ -........passwd (file 0) -....tmp/ -........my_dir/ -........tom (file 0) -........john (file 0) -........j (file 40) -*************** End of Dump *************** -truncate /tmp/j to length of 0 -truncate /tmp to length of 0 should fail with EISDIR - -21: Is a directory -*************** Dump of Entire IMFS *************** -/ -....dev/ -........console (device 0, 0) -........tty/ -............S3 (device 255, 128) -........test_console (device 0, 0) -....etc/ -........passwd (file 0) -....tmp/ -........my_dir/ -........tom (file 0) -........john (file 0) -........j (file 0) -*************** End of Dump *************** -Writing First File -Writing Second File -(0)this is a test line -this is a test line - -(0)this is a test line -this is a test line -*** END OF FILE TEST 1 *** - diff --git a/c/src/tests/psxtests/psxfile01/test.c b/c/src/tests/psxtests/psxfile01/test.c deleted file mode 100644 index 1e61fef2b8..0000000000 --- a/c/src/tests/psxtests/psxfile01/test.c +++ /dev/null @@ -1,547 +0,0 @@ -/* - * Simple test program to exercise some of the basic functionality of - * POSIX Files and Directories Support. - * - * This test assumes that the file system is initialized with the - * following directory structure: - * - * XXXX fill this in. - * / - * /dev - * /dev/XXX [where XXX includes at least console] - * - * 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 - -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include - -void test_case_reopen_append(void); - -char test_write_buffer[ 1024 ]; - -/* - * File test support routines. - */ - -void test_cat( - char *file, - int offset_arg, - int length -); - -void test_write( - char *file, - off_t offset, - char *buffer -); - -void test_extend( - char *file, - off_t new_len -); - -void IMFS_dump( void ); -int IMFS_memfile_maximum_size( void ); - -/* - * dump_statbuf - */ - -void dump_statbuf( struct stat *buf ) -{ - int major1; - int minor1; - int major2; - int minor2; - - rtems_filesystem_split_dev_t( buf->st_dev, major1, minor1 ); - rtems_filesystem_split_dev_t( buf->st_rdev, major2, minor2 ); - - printf( "....st_dev (0x%x:0x%x)\n", major1, minor1 ); - printf( "....st_ino %x may vary by small amount\n", - (unsigned int) buf->st_ino ); - printf( "....mode = %08o\n", buf->st_mode ); - printf( "....nlink = %d\n", buf->st_nlink ); - - printf( "....uid = %d\n", buf->st_uid ); - printf( "....gid = %d\n", buf->st_gid ); - - printf( "....atime = %s", ctime(&buf->st_atime) ); - printf( "....mtime = %s", ctime(&buf->st_mtime) ); - printf( "....ctime = %s", ctime(&buf->st_ctime) ); - -#if defined(__svr4__) && !defined(__PPC__) && !defined(__sun__) - printf( "....st_blksize %x\n", buf.st_blksize ); - printf( "....st_blocks %x\n", buf.st_blocks ); -#endif - -} - -void stat_a_file( - const char *file -) -{ - int status; - struct stat statbuf; - - assert( file ); - - printf( "stat( %s ) returned ", file ); - fflush( stdout ); - - status = stat( file, &statbuf ); - - if ( status == -1 ) { - printf( ": %s\n", strerror( errno ) ); - } else { - puts(""); - dump_statbuf( &statbuf ); - } - -} - - -/* - * Main entry point of the test - */ - -#if defined(__rtems__) -int test_main(void) -#else -int main( - int argc, - char **argv -) -#endif -{ - int status; - int max_size; - int fd; - int i; - struct stat buf; - char buffer[128]; - FILE *file; - time_t atime1; - time_t mtime1; - time_t ctime1; - time_t atime2; - time_t mtime2; - time_t ctime2; - rtems_status_code rtems_status; - rtems_time_of_day time; - - printf( "\n\n*** FILE TEST 1 ***\n" ); - - /* - * Grab the maximum size of an in-memory file. - */ - - max_size = IMFS_memfile_maximum_size(); - - build_time( &time, 12, 31, 1988, 9, 0, 0, 0 ); - rtems_status = rtems_clock_set( &time ); - - /* - * Dump an empty file system - */ - - IMFS_dump(); - - /* - * Simple stat() of /dev/console. - */ - - puts( "stat of /dev/console" ); - status = stat( "/dev/console", &buf ); - assert( !status ); - - dump_statbuf( &buf ); - - /* - * Exercise mkdir() and some path evaluation. - */ - - puts( "" ); - puts( "mkdir /dev/tty" ); - status = mkdir( "/dev/tty", S_IRWXU ); - assert( !status ); - - puts( "" ); - puts( "mkdir /usr" ); - status = mkdir( "/usr", S_IRWXU ); - assert( !status ); - puts( "mkdir /etc" ); - status = mkdir( "/etc", S_IRWXU ); - assert( !status ); - - puts( "mkdir /tmp" ); - status = mkdir( "/tmp", S_IRWXU ); - assert( !status ); - - /* this tests the ".." path in path name evaluation */ - puts( "mkdir /tmp/.." ); - status = mkdir( "/tmp/..", S_IRWXU ); - assert( status == -1 ); - assert( errno == EEXIST ); - - /* now check out trailing separators */ - puts( "mkdir /tmp/" ); - status = mkdir( "/tmp/", S_IRWXU ); - assert( status == -1 ); - assert( errno == EEXIST ); - - /* try to make a directory under a non-existent subdirectory */ - puts( "mkdir /j/j1" ); - status = mkdir( "/j/j1", S_IRWXU ); - assert( status == -1 ); - assert( errno == ENOENT ); - - /* this tests the ability to make a directory in the current one */ - puts( "mkdir tmp" ); - status = mkdir( "tmp", S_IRWXU ); - assert( status == -1 ); - assert( errno == EEXIST ); - - /* test rtems_filesystem_evaluate_path by sending NULL path */ - status = chdir( NULL ); - assert( status == -1 ); - - /* - * Now switch gears and exercise rmdir(). - */ - - puts( "" ); - puts( "rmdir /usr" ); - status = rmdir( "/usr" ); - assert( !status ); - - puts( "rmdir /dev" ); - status = rmdir( "/dev" ); - assert( status == -1 ); - assert( errno == ENOTEMPTY); - - puts( "rmdir /fred" ); - status = rmdir ("/fred"); - assert (status == -1); - assert( errno == ENOENT ); - - puts( "mknod /dev/test_console" ); - status = mknod( "/dev/test_console", S_IFCHR, 0LL ); - assert( !status ); - - puts( "mknod /dev/tty/S3" ); - status = mknod( "/dev/tty/S3", S_IFCHR, 0xFF00000080LL ); - assert( !status ); - - puts ("mknod /etc/passwd"); - status = mknod( "/etc/passwd", (S_IFREG | S_IRWXU), 0LL ); - assert( !status ); - - puts( "mkdir /tmp/my_dir"); - status = mkdir( "/tmp/my_dir", S_IRWXU ); - assert( status == 0 ); - - puts("mkfifo /c/my_dir" ); - status = mkfifo( "/c/my_dir", S_IRWXU ); - assert( status == -1 ); - - /* - * Try to make a directory under a file -- ERROR - */ - - puts( "mkdir /etc/passwd/j" ); - status = mkdir( "/etc/passwd/j", S_IRWXU ); - assert( status == -1 ); - assert( errno == ENOTDIR ); - - /* - * Simple open failure case on non-existent file - */ - - puts( "open /tmp/joel - should fail with ENOENT" ); - fd = open( "/tmp/joel", O_RDONLY ); - assert( fd == -1 ); - assert( errno == ENOENT ); - - /* - * Simple open case where the file is created. - */ - - puts( "open /tmp/j" ); - fd = open( "/tmp/j", O_RDWR|O_CREAT, S_IRWXU|S_IRWXG|S_IRWXO ); - assert( fd != -1 ); - printf( "open returned file descriptor %d\n", fd ); - - puts( "close /tmp/j" ); - status = close( fd ); - assert( !status ); - - puts( "close /tmp/j again" ); - status = close( fd ); - assert( status == -1 ); - - puts( "unlink /tmp/j" ); - status = unlink( "/tmp/j" ); - assert( !status ); - - puts( "unlink /tmp" ); - status = unlink( "/tmp" ); - assert( status ); - - /* - * Simple open failure. Trying to create an existing file. - */ - - puts("create and close /tmp/tom"); - fd = open( "/tmp/tom", O_CREAT, S_IRWXU|S_IRWXG|S_IRWXO ); - assert( fd != -1 ); - status = close( fd ); - assert( status == 0 ); - - puts("Attempt to recreate /tmp/tom"); - fd = open( "/tmp/tom", O_CREAT | O_EXCL, S_IRWXU|S_IRWXG|S_IRWXO ); - assert( fd == -1 ); - assert( errno == EEXIST ); - - puts("create /tmp/john"); - fd = open( "/tmp/john", O_RDWR|O_CREAT, S_IRWXU|S_IRWXG|S_IRWXO ); - assert( fd != -1 ); - - puts("tcdrain /tmp/john" ); - status = tcdrain( fd ); - assert( status == 0 ); - - /* - * Test simple write to a file at offset 0 - */ - - puts( "mknod /tmp/joel" ); - status = mknod( "/tmp/joel", (S_IFREG | S_IRWXU), 0LL ); - test_write( "/tmp/joel", 0, "the first write!!!\n" ); - test_cat( "/tmp/joel", 0, 0 ); - - /* - * Test simple write to a file at a non-0 offset in the first block - */ - - status = unlink( "/tmp/joel" ); - assert( !status ); - - status = mknod( "/tmp/joel", (S_IFREG | S_IRWXU), 0LL ); - assert( !status ); - - test_write( "/tmp/joel", 10, "the first write!!!\n" ); - test_cat( "/tmp/joel", 0, 0 ); - stat_a_file( "/tmp/joel" ); - - /* - * Test simple write to a file at a non-0 offset in the second block. Then - * try to read from various offsets and lengths. - */ - - puts("unlink /tmp/joel"); - status = unlink( "/tmp/joel" ); - assert( !status ); - - /* Test a failure path */ - - puts( "unlink /tmp/joel" ); - status = unlink( "/tmp/joel" ); - assert( status == -1 ); - - puts( "mknod /tmp/joel"); - status = mknod( "/tmp/joel", (S_IFREG | S_IRWXU), 0LL ); - assert( !status ); - - test_write( "/tmp/joel", 514, "the first write!!!\n" ); - test_write( "/tmp/joel", 1, test_write_buffer ); - test_write( "/tmp/joel", 63, test_write_buffer ); - test_cat( "/tmp/joel", 0, 1 ); - test_cat( "/tmp/joel", 1, 1 ); - test_cat( "/tmp/joel", 490, 1 ); - test_cat( "/tmp/joel", 512, 1 ); - test_cat( "/tmp/joel", 513, 1 ); - test_cat( "/tmp/joel", 514, 1 ); - test_cat( "/tmp/joel", 520, 1 ); - test_cat( "/tmp/joel", 1, 1024 ); - - /* - * Read from a much longer file so we can descend into doubly and - * triply indirect blocks. - */ - - if ( max_size < 300 * 1024 ) { - test_extend( "/tmp/joel", max_size - 1 ); - test_cat( "/tmp/joel", max_size / 2, 1024 ); - } else { - printf( "Skipping maximum file size test since max_size is %d bytes\n", max_size ); - puts("That is likely to be bigger than the available RAM on many targets." ); - } - - stat_a_file( "/tmp/joel" ); - - /* - * Now try to use a FILE * descriptor - * - * /tmp/j should not exist at this point. - */ - - puts( "stat of /tmp/j" ); - errno = 0; - status = stat( "/tmp/j", &buf ); - printf( "stat(/tmp/j) returned %d (errno=%d)\n", status, errno ); - dump_statbuf( &buf ); - - puts( "fopen of /tmp/j" ); - file = fopen( "/tmp/j", "w+" ); - assert( file ); - - puts( "fprintf to /tmp/j" ); - for (i=1 ; i<=5 ; i++) { - status = fprintf( file, "This is call %d to fprintf\n", i ); - assert( status ); - printf( "(%d) %d characters written to the file\n", i, status ); - } - - fflush( file ); - - status = stat( "/tmp/j", &buf ); - assert( !status ); - dump_statbuf( &buf ); - atime2 = buf.st_atime; - mtime2 = buf.st_mtime; - ctime2 = buf.st_ctime; - - - status = rtems_task_wake_after( 1 * TICKS_PER_SECOND ); - rewind( file ); - while ( fgets(buffer, 128, file) ) - printf( "%s", buffer ); - - /* - * Verify only atime changed for a read. - */ - status = stat( "/tmp/j", &buf ); - assert( !status ); - dump_statbuf( &buf ); - atime1 = buf.st_atime; - mtime1 = buf.st_mtime; - ctime1 = buf.st_ctime; - assert( atime1 != atime2); - assert( mtime1 == mtime2); - assert( ctime1 == ctime2); - - IMFS_dump(); - - unlink( "/tmp/joel" ); - - /* - * Now truncate a file - */ - - status = rtems_task_wake_after( 1 * TICKS_PER_SECOND ); - puts( "truncate /tmp/j to length of 40" ); - status = truncate( "/tmp/j", 40 ); - assert( !status ); - - /* - * Verify truncate changed only atime. - */ - status = stat( "/tmp/j", &buf ); - assert( !status ); - dump_statbuf( &buf ); - atime2 = buf.st_atime; - mtime2 = buf.st_mtime; - ctime2 = buf.st_ctime; - assert( atime1 != atime2); - assert( mtime1 == mtime2); - assert( ctime1 == ctime2); - - IMFS_dump(); - - /* try to truncate the console and see what happens */ - status = truncate( "/dev/console", 40 ); - assert(status == -1 ); - - puts( "truncate /tmp/j to length of 0" ); - status = truncate( "/tmp/j", 0 ); - assert( !status ); - - puts( "truncate /tmp to length of 0 should fail with EISDIR\n"); - status = truncate( "/tmp", 0 ); - assert( status == -1 ); - printf( "%d: %s\n", errno, strerror( errno ) ); - assert( errno == EISDIR ); - - IMFS_dump(); - - status = truncate( "/tmp/fred", 10 ); - assert( status == -1); - - rtems_status = rtems_io_register_name( "/dev/console", 0, 0 ); - - test_case_reopen_append(); - - printf( "*** END OF FILE TEST 1 ***\n" ); - rtems_test_exit( 0 ); -} - -/* - * Open/Create a File and write to it - * - * Test case submitted by Andrew Bythell . - * - */ - -void test_file (char *filename, char *mode); - -void test_case_reopen_append(void) -{ - printf ("Writing First File\n"); - test_file ("/one.txt", "a"); - test_file ("/one.txt", "a"); - - /* but not the second time - this will insert junk. - the number of ^@'s seems to equal the number of - actual characters in the file */ - - printf ("Writing Second File\n"); - test_file ("/two.txt", "a"); - test_file ("/two.txt", "a"); - - test_cat( "/one.txt", 0, 1024 ); - test_cat( "/two.txt", 0, 1024 ); -} - -void test_file (char *filename, char *mode) -{ - FILE *fp; - fp = fopen (filename, mode); - if (!fp) - perror ("fopen"); - fprintf (fp, "this is a test line\n"); - if (fclose (fp)) - perror ("fclose"); -} - - diff --git a/c/src/tests/psxtests/psxfile01/test_cat.c b/c/src/tests/psxtests/psxfile01/test_cat.c deleted file mode 100644 index ea1e63ef7e..0000000000 --- a/c/src/tests/psxtests/psxfile01/test_cat.c +++ /dev/null @@ -1,83 +0,0 @@ -/* - * A test support function which performs a crude version of - * "cat" so you can look at specific parts of a file. - * - * $Id$ - */ - -#include - -#include -#include -#include -#include -#include -#include -#include - -#include - -#include - -/* - * test_cat routine - */ - -unsigned char test_cat_buffer[ 1024 ]; - -void test_cat( - char *file, - int offset_arg, - int length -) -{ - int fd; - int status; - int is_printable = 0; - int my_length; - int i; - unsigned char c; - int count = 0; - off_t offset = (off_t)offset_arg; - - my_length = (length) ? length : sizeof( test_cat_buffer ); - assert( my_length <= sizeof( test_cat_buffer ) ); - - fd = open( file, O_RDONLY ); - if ( fd == -1 ) { - printf( "test_cat: open( %s ) failed : %s\n", file, strerror( errno ) ); - rtems_test_exit( 0 ); - } - - for ( ;; ) { - status = lseek( fd, offset, SEEK_SET ); - assert( status != -1 ); - - status = read( fd, test_cat_buffer, sizeof(test_cat_buffer) ); - if ( status <= 0 ) { - if (!is_printable) - printf( "(%d)", count ); - puts( "" ); - break; - } - - for ( i=0 ; i - -#include -#include -#include -#include -#include -#include -#include - -#include - -#include - -/* - * test_extend routine - */ - -void test_extend( - char *file, - off_t offset -) -{ - int fd; - int status; - char c = 0; - - fd = open( file, O_WRONLY ); - if ( fd == -1 ) { - printf( "test_extend: open( %s ) failed : %s\n", file, strerror( errno ) ); - rtems_test_exit( 0 ); - } - - status = lseek( fd, offset - 1, SEEK_SET ); - assert( status != -1 ); - - status = write( fd, &c, 1 ); - if ( status == -1 ) { - printf( "test_extend: write( %s ) failed : %s\n", file, strerror( errno ) ); - rtems_test_exit( 0 ); - } - - if ( status != 1 ) { - printf( "test_extend: write( %s ) only wrote %d of %d bytes\n", - file, status, 1 ); - rtems_test_exit( 0 ); - } - - status = close( fd ); - assert( !status ); -} diff --git a/c/src/tests/psxtests/psxfile01/test_write.c b/c/src/tests/psxtests/psxfile01/test_write.c deleted file mode 100644 index b87ba06624..0000000000 --- a/c/src/tests/psxtests/psxfile01/test_write.c +++ /dev/null @@ -1,61 +0,0 @@ -/* - * A test support function which performs a write() and - * handles implied open(), lseek(), write(), and close() operations. - * - * $Id$ - */ - -#include - -#include -#include -#include -#include -#include -#include - -#include - -#include - -/* - * test_write routine - */ - -void test_write( - char *file, - off_t offset, - char *buffer -) -{ - int fd; - int status; - int length; - - - length = strlen( buffer ); - - fd = open( file, O_WRONLY ); - if ( fd == -1 ) { - printf( "test_write: open( %s ) failed : %s\n", file, strerror( errno ) ); - rtems_test_exit( 0 ); - } - - status = lseek( fd, offset, SEEK_SET ); - assert( status != -1 ); - - status = write( fd, buffer, length ); - if ( status == -1 ) { - printf( "test_write: write( %s ) failed : %s\n", file, strerror( errno ) ); - rtems_test_exit( 0 ); - } - - if ( status != length ) { - printf( "test_write: write( %s ) only wrote %d of %d bytes\n", - file, status, length ); - rtems_test_exit( 0 ); - } - - status = close( fd ); - assert( !status ); -} diff --git a/c/src/tests/psxtests/psxhdrs/.cvsignore b/c/src/tests/psxtests/psxhdrs/.cvsignore deleted file mode 100644 index 282522db03..0000000000 --- a/c/src/tests/psxtests/psxhdrs/.cvsignore +++ /dev/null @@ -1,2 +0,0 @@ -Makefile -Makefile.in diff --git a/c/src/tests/psxtests/psxhdrs/Makefile.am b/c/src/tests/psxtests/psxhdrs/Makefile.am deleted file mode 100644 index 033681de6c..0000000000 --- a/c/src/tests/psxtests/psxhdrs/Makefile.am +++ /dev/null @@ -1,40 +0,0 @@ -## -## $Id$ -## - - -C_FILES = clock01.c clock02.c clock03.c clock04.c clock05.c clock06.c \ - cond01.c cond02.c cond03.c cond04.c cond05.c cond06.c cond07.c cond08.c \ - cond09.c cond10.c key01.c key02.c key03.c key04.c mutex01.c mutex02.c \ - mutex03.c mutex04.c mutex05.c mutex06.c mutex07.c mutex08.c mutex09.c \ - mutex10.c mutex11.c mutex12.c mutex13.c mutex14.c mutex15.c mutex16.c \ - pthread01.c pthread02.c pthread03.c pthread04.c pthread05.c pthread06.c \ - pthread07.c pthread08.c pthread09.c pthread10.c pthread11.c pthread12.c \ - pthread13.c pthread14.c pthread15.c pthread16.c pthread17.c pthread18.c \ - pthread19.c pthread20.c pthread21.c pthread22.c pthread23.c pthread24.c \ - pthread25.c pthread26.c pthread27.c pthread28.c pthread29.c pthread30.c \ - pthread31.c pthread32.c pthread33.c pthread34.c pthread35.c pthread36.c \ - proc01.c proc02.c proc03.c proc04.c proc05.c proc06.c proc07.c proc08.c \ - proc09.c proc10.c proc11.c proc12.c proc13.c proc14.c sched01.c \ - sched02.c sched03.c sched04.c sched05.c sched06.c sched07.c sched08.c \ - signal01.c signal02.c signal03.c signal04.c signal05.c signal06.c \ - signal07.c signal08.c signal09.c signal10.c signal11.c signal12.c \ - signal13.c signal14.c signal15.c signal16.c signal17.c signal18.c \ - signal19.c signal20.c signal21.c signal22.c signal23.c sync01.c sync02.c \ - sync03.c time01.c time02.c time03.c time04.c time05.c time06.c time07.c \ - time08.c time09.c time10.c time11.c time12.c time13.c timer01.c timer02.c \ - timer03.c timer04.c timer05.c timer06.c timer07.c -C_O_FILES = $(C_FILES:%.c=${ARCH}/%.$(OBJEXT)) - -SRCS = $(C_FILES) -OBJS = $(C_O_FILES) - -include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg -include $(top_srcdir)/../automake/compile.am -include $(top_srcdir)/../automake/leaf.am - -all-local: ${ARCH} ${OBJS} - -EXTRA_DIST = $(C_FILES) - -include $(top_srcdir)/../automake/local.am diff --git a/c/src/tests/psxtests/psxhdrs/clock01.c b/c/src/tests/psxtests/psxhdrs/clock01.c deleted file mode 100644 index da3a18635d..0000000000 --- a/c/src/tests/psxtests/psxhdrs/clock01.c +++ /dev/null @@ -1,28 +0,0 @@ -/* - * This test file is used to verify that the header files associated with - * invoking this function are correct. - * - * 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 - -#ifndef _POSIX_TIMERS -#error "rtems is supposed to have clock_gettime" -#endif - -void test( void ) -{ - clockid_t clock_id = 0; - struct timespec tp; - int result; - - result = clock_gettime( clock_id, &tp ); -} diff --git a/c/src/tests/psxtests/psxhdrs/clock02.c b/c/src/tests/psxtests/psxhdrs/clock02.c deleted file mode 100644 index a3d6849b6c..0000000000 --- a/c/src/tests/psxtests/psxhdrs/clock02.c +++ /dev/null @@ -1,28 +0,0 @@ -/* - * This test file is used to verify that the header files associated with - * invoking this function are correct. - * - * 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 - -#ifndef _POSIX_TIMERS -#error "rtems is supposed to have clock_settime" -#endif - -void test( void ) -{ - clockid_t clock_id = 0; - struct timespec tp; - int result; - - result = clock_settime( clock_id, &tp ); -} diff --git a/c/src/tests/psxtests/psxhdrs/clock03.c b/c/src/tests/psxtests/psxhdrs/clock03.c deleted file mode 100644 index a3e48bf402..0000000000 --- a/c/src/tests/psxtests/psxhdrs/clock03.c +++ /dev/null @@ -1,28 +0,0 @@ -/* - * This test file is used to verify that the header files associated with - * invoking this function are correct. - * - * 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 - -#ifndef _POSIX_TIMERS -#error "rtems is supposed to have clock_getres" -#endif - -void test( void ) -{ - clockid_t clock_id = 0; - struct timespec res; - int result; - - result = clock_getres( clock_id, &res ); -} diff --git a/c/src/tests/psxtests/psxhdrs/clock04.c b/c/src/tests/psxtests/psxhdrs/clock04.c deleted file mode 100644 index 722be53066..0000000000 --- a/c/src/tests/psxtests/psxhdrs/clock04.c +++ /dev/null @@ -1,28 +0,0 @@ -/* - * This test file is used to verify that the header files associated with - * invoking this function are correct. - * - * 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 - -#ifndef _POSIX_CPUTIME -#error "rtems is supposed to have clock_getcpuclockid" -#endif - -void test( void ) -{ - pid_t pid = 0; - clockid_t clock_id; - int result; - - result = clock_getcpuclockid( pid, &clock_id ); -} diff --git a/c/src/tests/psxtests/psxhdrs/clock05.c b/c/src/tests/psxtests/psxhdrs/clock05.c deleted file mode 100644 index 53d3753935..0000000000 --- a/c/src/tests/psxtests/psxhdrs/clock05.c +++ /dev/null @@ -1,34 +0,0 @@ -/* - * This test file is used to verify that the header files associated with - * invoking this function are correct. - * - * 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 - -#ifndef _POSIX_CPUTIME -#error "rtems is supposed to have clock_setenable_attr" -#endif -#ifndef _POSIX_THREAD_CPUTIME -#error "rtems is supposed to have clock_setenable_attr" -#endif - -void test( void ) -{ - clockid_t clock_id = 0; - int attr; - int result; - - attr = CLOCK_ENABLED; - attr = CLOCK_DISABLED; - - result = clock_setenable_attr( clock_id, attr ); -} diff --git a/c/src/tests/psxtests/psxhdrs/clock06.c b/c/src/tests/psxtests/psxhdrs/clock06.c deleted file mode 100644 index 4e7f8104bc..0000000000 --- a/c/src/tests/psxtests/psxhdrs/clock06.c +++ /dev/null @@ -1,31 +0,0 @@ -/* - * This test file is used to verify that the header files associated with - * invoking this function are correct. - * - * 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 - -#ifndef _POSIX_CPUTIME -#error "rtems is supposed to have clock_getenable_attr" -#endif -#ifndef _POSIX_THREAD_CPUTIME -#error "rtems is supposed to have clock_getenable_attr" -#endif - -void test( void ) -{ - clockid_t clock_id = 0; - int attr; - int result; - - result = clock_getenable_attr( clock_id, &attr ); -} diff --git a/c/src/tests/psxtests/psxhdrs/cond01.c b/c/src/tests/psxtests/psxhdrs/cond01.c deleted file mode 100644 index 26077b8718..0000000000 --- a/c/src/tests/psxtests/psxhdrs/cond01.c +++ /dev/null @@ -1,27 +0,0 @@ -/* - * This test file is used to verify that the header files associated with - * invoking this function are correct. - * - * 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 - -#ifndef _POSIX_THREADS -#error "rtems is supposed to have pthread_condattr_init" -#endif - -void test( void ) -{ - pthread_condattr_t attribute; - int result; - - result = pthread_condattr_init( &attribute ); -} diff --git a/c/src/tests/psxtests/psxhdrs/cond02.c b/c/src/tests/psxtests/psxhdrs/cond02.c deleted file mode 100644 index 05842bd7f0..0000000000 --- a/c/src/tests/psxtests/psxhdrs/cond02.c +++ /dev/null @@ -1,27 +0,0 @@ -/* - * This test file is used to verify that the header files associated with - * invoking this function are correct. - * - * 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 - -#ifndef _POSIX_THREADS -#error "rtems is supposed to have pthread_condattr_destroy" -#endif - -void test( void ) -{ - pthread_condattr_t attribute; - int result; - - result = pthread_condattr_destroy( &attribute ); -} diff --git a/c/src/tests/psxtests/psxhdrs/cond03.c b/c/src/tests/psxtests/psxhdrs/cond03.c deleted file mode 100644 index f12457ea10..0000000000 --- a/c/src/tests/psxtests/psxhdrs/cond03.c +++ /dev/null @@ -1,28 +0,0 @@ -/* - * This test file is used to verify that the header files associated with - * invoking this function are correct. - * - * 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 - -#ifndef _POSIX_THREADS -#error "rtems is supposed to have pthread_cond_init" -#endif - -void test( void ) -{ - pthread_cond_t cond = PTHREAD_COND_INITIALIZER; - pthread_condattr_t attribute; - int result; - - result = pthread_cond_init( &cond, &attribute ); -} diff --git a/c/src/tests/psxtests/psxhdrs/cond04.c b/c/src/tests/psxtests/psxhdrs/cond04.c deleted file mode 100644 index cd8e7e26a9..0000000000 --- a/c/src/tests/psxtests/psxhdrs/cond04.c +++ /dev/null @@ -1,27 +0,0 @@ -/* - * This test file is used to verify that the header files associated with - * invoking this function are correct. - * - * 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 - -#ifndef _POSIX_THREADS -#error "rtems is supposed to have pthread_cond_destroy" -#endif - -void test( void ) -{ - pthread_cond_t cond = PTHREAD_COND_INITIALIZER; - int result; - - result = pthread_cond_destroy( &cond ); -} diff --git a/c/src/tests/psxtests/psxhdrs/cond05.c b/c/src/tests/psxtests/psxhdrs/cond05.c deleted file mode 100644 index 08b35b4473..0000000000 --- a/c/src/tests/psxtests/psxhdrs/cond05.c +++ /dev/null @@ -1,27 +0,0 @@ -/* - * This test file is used to verify that the header files associated with - * invoking this function are correct. - * - * 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 - -#ifndef _POSIX_THREADS -#error "rtems is supposed to have pthread_cond_signal" -#endif - -void test( void ) -{ - pthread_cond_t cond = PTHREAD_COND_INITIALIZER; - int result; - - result = pthread_cond_signal( &cond ); -} diff --git a/c/src/tests/psxtests/psxhdrs/cond06.c b/c/src/tests/psxtests/psxhdrs/cond06.c deleted file mode 100644 index 7bd3078789..0000000000 --- a/c/src/tests/psxtests/psxhdrs/cond06.c +++ /dev/null @@ -1,28 +0,0 @@ -/* - * This test file is used to verify that the header files associated with - * invoking this function are correct. - * - * 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 - -#ifndef _POSIX_THREADS -#error "rtems is supposed to have pthread_cond_wait" -#endif - -void test( void ) -{ - pthread_cond_t cond = PTHREAD_COND_INITIALIZER; - pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER; - int result; - - result = pthread_cond_wait( &cond, &mutex ); -} diff --git a/c/src/tests/psxtests/psxhdrs/cond07.c b/c/src/tests/psxtests/psxhdrs/cond07.c deleted file mode 100644 index dadcae1494..0000000000 --- a/c/src/tests/psxtests/psxhdrs/cond07.c +++ /dev/null @@ -1,29 +0,0 @@ -/* - * This test file is used to verify that the header files associated with - * invoking this function are correct. - * - * 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 - -#ifndef _POSIX_THREADS -#error "rtems is supposed to have pthread_cond_timedwait" -#endif - -void test( void ) -{ - pthread_cond_t cond = PTHREAD_COND_INITIALIZER; - pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER; - struct timespec abstime; - int result; - - result = pthread_cond_timedwait( &cond, &mutex, &abstime ); -} diff --git a/c/src/tests/psxtests/psxhdrs/cond08.c b/c/src/tests/psxtests/psxhdrs/cond08.c deleted file mode 100644 index adae781984..0000000000 --- a/c/src/tests/psxtests/psxhdrs/cond08.c +++ /dev/null @@ -1,31 +0,0 @@ -/* - * This test file is used to verify that the header files associated with - * invoking this function are correct. - * - * 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 - -#ifndef _POSIX_THREADS -#error "rtems is supposed to have pthread_condattr_getpshared" -#endif -#ifndef _POSIX_THREAD_PROCESS_SHARED -#error "rtems is supposed to have pthread_condattr_setpshared" -#endif - -void test( void ) -{ - pthread_condattr_t attribute; - int pshared; - int result; - - result = pthread_condattr_getpshared( &attribute, &pshared ); -} diff --git a/c/src/tests/psxtests/psxhdrs/cond09.c b/c/src/tests/psxtests/psxhdrs/cond09.c deleted file mode 100644 index 30f053f04d..0000000000 --- a/c/src/tests/psxtests/psxhdrs/cond09.c +++ /dev/null @@ -1,34 +0,0 @@ -/* - * This test file is used to verify that the header files associated with - * invoking this function are correct. - * - * 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 - -#ifndef _POSIX_THREADS -#error "rtems is supposed to have pthread_condattr_setpshared" -#endif -#ifndef _POSIX_THREAD_PROCESS_SHARED -#error "rtems is supposed to have pthread_condattr_setpshared" -#endif - -void test( void ) -{ - pthread_condattr_t attribute; - int pshared; - int result; - - pshared = PTHREAD_PROCESS_SHARED; - pshared = PTHREAD_PROCESS_PRIVATE; - - result = pthread_condattr_setpshared( &attribute, pshared ); -} diff --git a/c/src/tests/psxtests/psxhdrs/cond10.c b/c/src/tests/psxtests/psxhdrs/cond10.c deleted file mode 100644 index 4560c2a6a9..0000000000 --- a/c/src/tests/psxtests/psxhdrs/cond10.c +++ /dev/null @@ -1,27 +0,0 @@ -/* - * This test file is used to verify that the header files associated with - * invoking this function are correct. - * - * 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 - -#ifndef _POSIX_THREADS -#error "rtems is supposed to have pthread_cond_broadcast" -#endif - -void test( void ) -{ - pthread_cond_t cond = PTHREAD_COND_INITIALIZER; - int result; - - result = pthread_cond_broadcast( &cond ); -} diff --git a/c/src/tests/psxtests/psxhdrs/key01.c b/c/src/tests/psxtests/psxhdrs/key01.c deleted file mode 100644 index 907838d4c0..0000000000 --- a/c/src/tests/psxtests/psxhdrs/key01.c +++ /dev/null @@ -1,33 +0,0 @@ -/* - * This test file is used to verify that the header files associated with - * invoking this function are correct. - * - * 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 - -#ifndef _POSIX_THREADS -#error "rtems is supposed to have pthread_key_create" -#endif - -void key_destructor( - void *argument -) -{ -} - -void test( void ) -{ - pthread_key_t key; - int result; - - result = pthread_key_create( &key, key_destructor ); -} diff --git a/c/src/tests/psxtests/psxhdrs/key02.c b/c/src/tests/psxtests/psxhdrs/key02.c deleted file mode 100644 index 538bbd88c3..0000000000 --- a/c/src/tests/psxtests/psxhdrs/key02.c +++ /dev/null @@ -1,31 +0,0 @@ -/* - * This test file is used to verify that the header files associated with - * invoking this function are correct. - * - * 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 - -#ifndef _POSIX_THREADS -#error "rtems is supposed to have pthread_setspecific" -#endif - -void test( void ) -{ - pthread_key_t key; - int value; - int result; - - key = 0; - value = 0; - - result = pthread_setspecific( key, &value ); -} diff --git a/c/src/tests/psxtests/psxhdrs/key03.c b/c/src/tests/psxtests/psxhdrs/key03.c deleted file mode 100644 index 38addb1964..0000000000 --- a/c/src/tests/psxtests/psxhdrs/key03.c +++ /dev/null @@ -1,29 +0,0 @@ -/* - * This test file is used to verify that the header files associated with - * invoking this function are correct. - * - * 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 - -#ifndef _POSIX_THREADS -#error "rtems is supposed to have pthread_getspecific" -#endif - -void test( void ) -{ - pthread_key_t key; - void *value; - - key = 0; - - value = pthread_getspecific( key ); -} diff --git a/c/src/tests/psxtests/psxhdrs/key04.c b/c/src/tests/psxtests/psxhdrs/key04.c deleted file mode 100644 index 3e1cc4e3c1..0000000000 --- a/c/src/tests/psxtests/psxhdrs/key04.c +++ /dev/null @@ -1,27 +0,0 @@ -/* - * This test file is used to verify that the header files associated with - * invoking this function are correct. - * - * 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 - -#ifndef _POSIX_THREADS -#error "rtems is supposed to have pthread_key_delete" -#endif - -void test( void ) -{ - pthread_key_t key = 0; - int result; - - result = pthread_key_delete( key ); -} diff --git a/c/src/tests/psxtests/psxhdrs/mutex01.c b/c/src/tests/psxtests/psxhdrs/mutex01.c deleted file mode 100644 index 675015206f..0000000000 --- a/c/src/tests/psxtests/psxhdrs/mutex01.c +++ /dev/null @@ -1,27 +0,0 @@ -/* - * This test file is used to verify that the header files associated with - * invoking this function are correct. - * - * 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 - -#ifndef _POSIX_THREADS -#error "rtems is supposed to have pthread_mutexattr_init" -#endif - -void test( void ) -{ - pthread_mutexattr_t attribute; - int result; - - result = pthread_mutexattr_init( &attribute ); -} diff --git a/c/src/tests/psxtests/psxhdrs/mutex02.c b/c/src/tests/psxtests/psxhdrs/mutex02.c deleted file mode 100644 index 7bab4ac31e..0000000000 --- a/c/src/tests/psxtests/psxhdrs/mutex02.c +++ /dev/null @@ -1,27 +0,0 @@ -/* - * This test file is used to verify that the header files associated with - * invoking this function are correct. - * - * 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 - -#ifndef _POSIX_THREADS -#error "rtems is supposed to have pthread_mutexattr_destroy" -#endif - -void test( void ) -{ - pthread_mutexattr_t attribute; - int result; - - result = pthread_mutexattr_destroy( &attribute ); -} diff --git a/c/src/tests/psxtests/psxhdrs/mutex03.c b/c/src/tests/psxtests/psxhdrs/mutex03.c deleted file mode 100644 index beb59ad5db..0000000000 --- a/c/src/tests/psxtests/psxhdrs/mutex03.c +++ /dev/null @@ -1,28 +0,0 @@ -/* - * This test file is used to verify that the header files associated with - * invoking this function are correct. - * - * 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 - -#ifndef _POSIX_THREADS -#error "rtems is supposed to have pthread_mutex_init" -#endif - -void test( void ) -{ - pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER; - pthread_mutexattr_t attribute; - int result; - - result = pthread_mutex_init( &mutex, &attribute ); -} diff --git a/c/src/tests/psxtests/psxhdrs/mutex04.c b/c/src/tests/psxtests/psxhdrs/mutex04.c deleted file mode 100644 index 2afe0997a3..0000000000 --- a/c/src/tests/psxtests/psxhdrs/mutex04.c +++ /dev/null @@ -1,27 +0,0 @@ -/* - * This test file is used to verify that the header files associated with - * invoking this function are correct. - * - * 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 - -#ifndef _POSIX_THREADS -#error "rtems is supposed to have pthread_mutex_destroy" -#endif - -void test( void ) -{ - pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER; - int result; - - result = pthread_mutex_destroy( &mutex ); -} diff --git a/c/src/tests/psxtests/psxhdrs/mutex05.c b/c/src/tests/psxtests/psxhdrs/mutex05.c deleted file mode 100644 index 5b75d4c6f0..0000000000 --- a/c/src/tests/psxtests/psxhdrs/mutex05.c +++ /dev/null @@ -1,27 +0,0 @@ -/* - * This test file is used to verify that the header files associated with - * invoking this function are correct. - * - * 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 - -#ifndef _POSIX_THREADS -#error "rtems is supposed to have pthread_mutex_lock" -#endif - -void test( void ) -{ - pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER; - int result; - - result = pthread_mutex_lock( &mutex ); -} diff --git a/c/src/tests/psxtests/psxhdrs/mutex06.c b/c/src/tests/psxtests/psxhdrs/mutex06.c deleted file mode 100644 index 01ada9e875..0000000000 --- a/c/src/tests/psxtests/psxhdrs/mutex06.c +++ /dev/null @@ -1,27 +0,0 @@ -/* - * This test file is used to verify that the header files associated with - * invoking this function are correct. - * - * 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 - -#ifndef _POSIX_THREADS -#error "rtems is supposed to have pthread_mutex_unlock" -#endif - -void test( void ) -{ - pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER; - int result; - - result = pthread_mutex_unlock( &mutex ); -} diff --git a/c/src/tests/psxtests/psxhdrs/mutex07.c b/c/src/tests/psxtests/psxhdrs/mutex07.c deleted file mode 100644 index ec5f880cc6..0000000000 --- a/c/src/tests/psxtests/psxhdrs/mutex07.c +++ /dev/null @@ -1,35 +0,0 @@ -/* - * This test file is used to verify that the header files associated with - * invoking this function are correct. - * - * 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 - -#ifndef _POSIX_THREAD_PRIO_INHERIT -#error "rtems is supposed to have pthread_mutexattr_setprotocol" -#endif -#ifndef _POSIX_THREAD_PRIO_PROTECT -#error "rtems is supposed to have pthread_mutexattr_setprotocol" -#endif - -void test( void ) -{ - pthread_mutexattr_t attribute; - int protocol; - int result; - - protocol = PTHREAD_PRIO_NONE; - protocol = PTHREAD_PRIO_INHERIT; - protocol = PTHREAD_PRIO_PROTECT; - - result = pthread_mutexattr_setprotocol( &attribute, protocol ); -} diff --git a/c/src/tests/psxtests/psxhdrs/mutex08.c b/c/src/tests/psxtests/psxhdrs/mutex08.c deleted file mode 100644 index d17b7b871f..0000000000 --- a/c/src/tests/psxtests/psxhdrs/mutex08.c +++ /dev/null @@ -1,31 +0,0 @@ -/* - * This test file is used to verify that the header files associated with - * invoking this function are correct. - * - * 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 - -#ifndef _POSIX_THREAD_PRIO_INHERIT -#error "rtems is supposed to have pthread_mutexattr_getprioceiling" -#endif -#ifndef _POSIX_THREAD_PRIO_PROTECT -#error "rtems is supposed to have pthread_mutexattr_getprioceiling" -#endif - -void test( void ) -{ - pthread_mutexattr_t attribute; - int prioceiling = 0; - int result; - - result = pthread_mutexattr_getprioceiling( &attribute, &prioceiling ); -} diff --git a/c/src/tests/psxtests/psxhdrs/mutex09.c b/c/src/tests/psxtests/psxhdrs/mutex09.c deleted file mode 100644 index 28fc878344..0000000000 --- a/c/src/tests/psxtests/psxhdrs/mutex09.c +++ /dev/null @@ -1,31 +0,0 @@ -/* - * This test file is used to verify that the header files associated with - * invoking this function are correct. - * - * 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 - -#ifndef _POSIX_THREAD_PRIO_INHERIT -#error "rtems is supposed to have pthread_mutexattr_setprioceiling" -#endif -#ifndef _POSIX_THREAD_PRIO_PROTECT -#error "rtems is supposed to have pthread_mutexattr_setprioceiling" -#endif - -void test( void ) -{ - pthread_mutexattr_t attribute; - int prioceiling = 0; - int result; - - result = pthread_mutexattr_setprioceiling( &attribute, prioceiling ); -} diff --git a/c/src/tests/psxtests/psxhdrs/mutex10.c b/c/src/tests/psxtests/psxhdrs/mutex10.c deleted file mode 100644 index 40852dd51b..0000000000 --- a/c/src/tests/psxtests/psxhdrs/mutex10.c +++ /dev/null @@ -1,31 +0,0 @@ -/* - * This test file is used to verify that the header files associated with - * invoking this function are correct. - * - * 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 - -#ifndef _POSIX_THREADS -#error "rtems is supposed to have pthread_mutexattr_getpshared" -#endif -#ifndef _POSIX_THREAD_PROCESS_SHARED -#error "rtems is supposed to have pthread_mutexattr_setpshared" -#endif - -void test( void ) -{ - pthread_mutexattr_t attribute; - int pshared; - int result; - - result = pthread_mutexattr_getpshared( &attribute, &pshared ); -} diff --git a/c/src/tests/psxtests/psxhdrs/mutex11.c b/c/src/tests/psxtests/psxhdrs/mutex11.c deleted file mode 100644 index 0b9e4a580c..0000000000 --- a/c/src/tests/psxtests/psxhdrs/mutex11.c +++ /dev/null @@ -1,34 +0,0 @@ -/* - * This test file is used to verify that the header files associated with - * invoking this function are correct. - * - * 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 - -#ifndef _POSIX_THREADS -#error "rtems is supposed to have pthread_mutexattr_setpshared" -#endif -#ifndef _POSIX_THREAD_PROCESS_SHARED -#error "rtems is supposed to have pthread_mutexattr_setpshared" -#endif - -void test( void ) -{ - pthread_mutexattr_t attribute; - int pshared; - int result; - - pshared = PTHREAD_PROCESS_SHARED; - pshared = PTHREAD_PROCESS_PRIVATE; - - result = pthread_mutexattr_setpshared( &attribute, pshared ); -} diff --git a/c/src/tests/psxtests/psxhdrs/mutex12.c b/c/src/tests/psxtests/psxhdrs/mutex12.c deleted file mode 100644 index 23a76eb5cb..0000000000 --- a/c/src/tests/psxtests/psxhdrs/mutex12.c +++ /dev/null @@ -1,27 +0,0 @@ -/* - * This test file is used to verify that the header files associated with - * invoking this function are correct. - * - * 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 - -#ifndef _POSIX_THREADS -#error "rtems is supposed to have pthread_mutex_trylock" -#endif - -void test( void ) -{ - pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER; - int result; - - result = pthread_mutex_trylock( &mutex ); -} diff --git a/c/src/tests/psxtests/psxhdrs/mutex13.c b/c/src/tests/psxtests/psxhdrs/mutex13.c deleted file mode 100644 index 255c5d18c9..0000000000 --- a/c/src/tests/psxtests/psxhdrs/mutex13.c +++ /dev/null @@ -1,31 +0,0 @@ -/* - * This test file is used to verify that the header files associated with - * invoking this function are correct. - * - * 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 - -#ifndef _POSIX_THREADS -#error "rtems is supposed to have pthread_mutex_timedlock" -#endif -#ifndef _POSIX_TIMEOUTS -#error "rtems is supposed to have pthread_mutex_timedlock" -#endif - -void test( void ) -{ - pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER; - struct timespec timeout; - int result; - - result = pthread_mutex_timedlock( &mutex, &timeout ); -} diff --git a/c/src/tests/psxtests/psxhdrs/mutex14.c b/c/src/tests/psxtests/psxhdrs/mutex14.c deleted file mode 100644 index 01b453de05..0000000000 --- a/c/src/tests/psxtests/psxhdrs/mutex14.c +++ /dev/null @@ -1,31 +0,0 @@ -/* - * This test file is used to verify that the header files associated with - * invoking this function are correct. - * - * 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 - -#ifndef _POSIX_THREAD_PRIO_INHERIT -#error "rtems is supposed to have pthread_mutexattr_getprotocol" -#endif -#ifndef _POSIX_THREAD_PRIO_PROTECT -#error "rtems is supposed to have pthread_mutexattr_getprotocol" -#endif - -void test( void ) -{ - pthread_mutexattr_t attribute; - int protocol; - int result; - - result = pthread_mutexattr_getprotocol( &attribute, &protocol ); -} diff --git a/c/src/tests/psxtests/psxhdrs/mutex15.c b/c/src/tests/psxtests/psxhdrs/mutex15.c deleted file mode 100644 index 8cac42f8f1..0000000000 --- a/c/src/tests/psxtests/psxhdrs/mutex15.c +++ /dev/null @@ -1,31 +0,0 @@ -/* - * This test file is used to verify that the header files associated with - * invoking this function are correct. - * - * 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 - -#ifndef _POSIX_THREAD_PRIO_INHERIT -#error "rtems is supposed to have pthread_mutex_getprioceiling" -#endif -#ifndef _POSIX_THREAD_PRIO_PROTECT -#error "rtems is supposed to have pthread_mutex_getprioceiling" -#endif - -void test( void ) -{ - pthread_mutex_t mutex; - int prioceiling; - int result; - - result = pthread_mutex_getprioceiling( &mutex, &prioceiling ); -} diff --git a/c/src/tests/psxtests/psxhdrs/mutex16.c b/c/src/tests/psxtests/psxhdrs/mutex16.c deleted file mode 100644 index f4aa8e657f..0000000000 --- a/c/src/tests/psxtests/psxhdrs/mutex16.c +++ /dev/null @@ -1,34 +0,0 @@ -/* - * This test file is used to verify that the header files associated with - * invoking this function are correct. - * - * 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 - -#ifndef _POSIX_THREAD_PRIO_INHERIT -#error "rtems is supposed to have pthread_mutex_setprioceiling" -#endif -#ifndef _POSIX_THREAD_PRIO_PROTECT -#error "rtems is supposed to have pthread_mutex_setprioceiling" -#endif - -void test( void ) -{ - pthread_mutex_t mutex; - int prioceiling; - int oldceiling; - int result; - - prioceiling = 0; - - result = pthread_mutex_setprioceiling( &mutex, prioceiling, &oldceiling ); -} diff --git a/c/src/tests/psxtests/psxhdrs/proc01.c b/c/src/tests/psxtests/psxhdrs/proc01.c deleted file mode 100644 index 7e8d47b153..0000000000 --- a/c/src/tests/psxtests/psxhdrs/proc01.c +++ /dev/null @@ -1,22 +0,0 @@ -/* - * This test file is used to verify that the header files associated with - * invoking this function are correct. - * - * 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 - -void test( void ) -{ - pid_t pid; - - pid = getpid(); -} diff --git a/c/src/tests/psxtests/psxhdrs/proc02.c b/c/src/tests/psxtests/psxhdrs/proc02.c deleted file mode 100644 index f4632be272..0000000000 --- a/c/src/tests/psxtests/psxhdrs/proc02.c +++ /dev/null @@ -1,22 +0,0 @@ -/* - * This test file is used to verify that the header files associated with - * invoking this function are correct. - * - * 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 - -void test( void ) -{ - pid_t pid; - - pid = getppid(); -} diff --git a/c/src/tests/psxtests/psxhdrs/proc03.c b/c/src/tests/psxtests/psxhdrs/proc03.c deleted file mode 100644 index 79ceee5deb..0000000000 --- a/c/src/tests/psxtests/psxhdrs/proc03.c +++ /dev/null @@ -1,23 +0,0 @@ -/* - * This test file is used to verify that the header files associated with - * invoking this function are correct. - * - * 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 -#include - -void test( void ) -{ - uid_t uid; - - uid = getuid(); -} diff --git a/c/src/tests/psxtests/psxhdrs/proc04.c b/c/src/tests/psxtests/psxhdrs/proc04.c deleted file mode 100644 index bb4e9f698d..0000000000 --- a/c/src/tests/psxtests/psxhdrs/proc04.c +++ /dev/null @@ -1,23 +0,0 @@ -/* - * This test file is used to verify that the header files associated with - * invoking this function are correct. - * - * 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 -#include - -void test( void ) -{ - uid_t uid; - - uid = geteuid(); -} diff --git a/c/src/tests/psxtests/psxhdrs/proc05.c b/c/src/tests/psxtests/psxhdrs/proc05.c deleted file mode 100644 index a5a46fa7bb..0000000000 --- a/c/src/tests/psxtests/psxhdrs/proc05.c +++ /dev/null @@ -1,23 +0,0 @@ -/* - * This test file is used to verify that the header files associated with - * invoking this function are correct. - * - * 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 -#include - -void test( void ) -{ - gid_t gid; - - gid = getgid(); -} diff --git a/c/src/tests/psxtests/psxhdrs/proc06.c b/c/src/tests/psxtests/psxhdrs/proc06.c deleted file mode 100644 index 833b597b17..0000000000 --- a/c/src/tests/psxtests/psxhdrs/proc06.c +++ /dev/null @@ -1,23 +0,0 @@ -/* - * This test file is used to verify that the header files associated with - * invoking this function are correct. - * - * 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 -#include - -void test( void ) -{ - gid_t gid; - - gid = getegid(); -} diff --git a/c/src/tests/psxtests/psxhdrs/proc07.c b/c/src/tests/psxtests/psxhdrs/proc07.c deleted file mode 100644 index f1fce7af2a..0000000000 --- a/c/src/tests/psxtests/psxhdrs/proc07.c +++ /dev/null @@ -1,25 +0,0 @@ -/* - * This test file is used to verify that the header files associated with - * invoking this function are correct. - * - * 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 - -void test( void ) -{ - uid_t uid; - int result; - - uid = 0; - - result = setuid( uid ); -} diff --git a/c/src/tests/psxtests/psxhdrs/proc08.c b/c/src/tests/psxtests/psxhdrs/proc08.c deleted file mode 100644 index d43ebe53e3..0000000000 --- a/c/src/tests/psxtests/psxhdrs/proc08.c +++ /dev/null @@ -1,25 +0,0 @@ -/* - * This test file is used to verify that the header files associated with - * invoking this function are correct. - * - * 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 - -void test( void ) -{ - gid_t gid; - int result; - - gid = 0; - - result = setgid( gid ); -} diff --git a/c/src/tests/psxtests/psxhdrs/proc09.c b/c/src/tests/psxtests/psxhdrs/proc09.c deleted file mode 100644 index cbe197c8fa..0000000000 --- a/c/src/tests/psxtests/psxhdrs/proc09.c +++ /dev/null @@ -1,26 +0,0 @@ -/* - * This test file is used to verify that the header files associated with - * invoking this function are correct. - * - * 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 - -void test( void ) -{ - gid_t grouplist[ 20 ]; - int gidsetsize; - int result; - - gidsetsize = 20; - - result = getgroups( gidsetsize, grouplist ); -} diff --git a/c/src/tests/psxtests/psxhdrs/proc10.c b/c/src/tests/psxtests/psxhdrs/proc10.c deleted file mode 100644 index 96ad638198..0000000000 --- a/c/src/tests/psxtests/psxhdrs/proc10.c +++ /dev/null @@ -1,22 +0,0 @@ -/* - * This test file is used to verify that the header files associated with - * invoking this function are correct. - * - * 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 - -void test( void ) -{ - char *loginname; - - loginname = getlogin(); -} diff --git a/c/src/tests/psxtests/psxhdrs/proc11.c b/c/src/tests/psxtests/psxhdrs/proc11.c deleted file mode 100644 index 24eab9c2e3..0000000000 --- a/c/src/tests/psxtests/psxhdrs/proc11.c +++ /dev/null @@ -1,24 +0,0 @@ -/* - * This test file is used to verify that the header files associated with - * invoking this function are correct. - * - * 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 -#include /* for LOGIN_NAME_MAX */ - -void test( void ) -{ - char loginnamebuffer[ LOGIN_NAME_MAX ]; - int result; - - result = getlogin_r( loginnamebuffer, LOGIN_NAME_MAX ); -} diff --git a/c/src/tests/psxtests/psxhdrs/proc12.c b/c/src/tests/psxtests/psxhdrs/proc12.c deleted file mode 100644 index f226062fdd..0000000000 --- a/c/src/tests/psxtests/psxhdrs/proc12.c +++ /dev/null @@ -1,22 +0,0 @@ -/* - * This test file is used to verify that the header files associated with - * invoking this function are correct. - * - * 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 - -void test( void ) -{ - pid_t pgrp; - - pgrp = getpgrp(); -} diff --git a/c/src/tests/psxtests/psxhdrs/proc13.c b/c/src/tests/psxtests/psxhdrs/proc13.c deleted file mode 100644 index e8cdaa4d83..0000000000 --- a/c/src/tests/psxtests/psxhdrs/proc13.c +++ /dev/null @@ -1,22 +0,0 @@ -/* - * This test file is used to verify that the header files associated with - * invoking this function are correct. - * - * 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 - -void test( void ) -{ - pid_t pid; - - pid = setsid(); -} diff --git a/c/src/tests/psxtests/psxhdrs/proc14.c b/c/src/tests/psxtests/psxhdrs/proc14.c deleted file mode 100644 index dfb497d075..0000000000 --- a/c/src/tests/psxtests/psxhdrs/proc14.c +++ /dev/null @@ -1,24 +0,0 @@ -/* - * This test file is used to verify that the header files associated with - * invoking this function are correct. - * - * 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 - -void test( void ) -{ - pid_t pid = 0; - pid_t pgid = 0; - int result; - - result = setpgid( pid, pgid ); -} diff --git a/c/src/tests/psxtests/psxhdrs/pthread01.c b/c/src/tests/psxtests/psxhdrs/pthread01.c deleted file mode 100644 index f0e397ae2d..0000000000 --- a/c/src/tests/psxtests/psxhdrs/pthread01.c +++ /dev/null @@ -1,27 +0,0 @@ -/* - * This test file is used to verify that the header files associated with - * invoking this function are correct. - * - * 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 - -#ifndef _POSIX_THREADS -#error "rtems is supposed to have pthread_attr_init" -#endif - -void test( void ) -{ - pthread_attr_t attribute; - int result; - - result = pthread_attr_init( &attribute ); -} diff --git a/c/src/tests/psxtests/psxhdrs/pthread02.c b/c/src/tests/psxtests/psxhdrs/pthread02.c deleted file mode 100644 index 4cb7692868..0000000000 --- a/c/src/tests/psxtests/psxhdrs/pthread02.c +++ /dev/null @@ -1,27 +0,0 @@ -/* - * This test file is used to verify that the header files associated with - * invoking this function are correct. - * - * 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 - -#ifndef _POSIX_THREADS -#error "rtems is supposed to have pthread_attr_destroy" -#endif - -void test( void ) -{ - pthread_attr_t attribute; - int result; - - result = pthread_attr_destroy( &attribute ); -} diff --git a/c/src/tests/psxtests/psxhdrs/pthread03.c b/c/src/tests/psxtests/psxhdrs/pthread03.c deleted file mode 100644 index 1ad5913e67..0000000000 --- a/c/src/tests/psxtests/psxhdrs/pthread03.c +++ /dev/null @@ -1,31 +0,0 @@ -/* - * This test file is used to verify that the header files associated with - * invoking this function are correct. - * - * 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 - -#ifndef _POSIX_THREADS -#error "rtems is supposed to have pthread_attr_setdetachstate" -#endif - -void test( void ) -{ - pthread_attr_t attribute; - int state; - int result; - - state = PTHREAD_CREATE_DETACHED; - state = PTHREAD_CREATE_JOINABLE; - - result = pthread_attr_setdetachstate( &attribute, state ); -} diff --git a/c/src/tests/psxtests/psxhdrs/pthread04.c b/c/src/tests/psxtests/psxhdrs/pthread04.c deleted file mode 100644 index 881ef3a7c9..0000000000 --- a/c/src/tests/psxtests/psxhdrs/pthread04.c +++ /dev/null @@ -1,28 +0,0 @@ -/* - * This test file is used to verify that the header files associated with - * invoking this function are correct. - * - * 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 - -#ifndef _POSIX_THREADS -#error "rtems is supposed to have pthread_attr_getdetachstate" -#endif - -void test( void ) -{ - pthread_attr_t attribute; - int state; - int result; - - result = pthread_attr_getdetachstate( &attribute, &state ); -} diff --git a/c/src/tests/psxtests/psxhdrs/pthread05.c b/c/src/tests/psxtests/psxhdrs/pthread05.c deleted file mode 100644 index 1f02dc0f29..0000000000 --- a/c/src/tests/psxtests/psxhdrs/pthread05.c +++ /dev/null @@ -1,35 +0,0 @@ -/* - * This test file is used to verify that the header files associated with - * invoking this function are correct. - * - * 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 -#include /* only for PTHREAD_STACK_MIN */ - -#ifndef _POSIX_THREADS -#error "rtems is supposed to have pthread_setstacksize" -#endif - -#ifndef _POSIX_THREAD_ATTR_STACKSIZE -#error "rtems is supposed to have pthread_setstacksize" -#endif - -void test( void ) -{ - pthread_attr_t attribute; - size_t size; - int result; - - size = PTHREAD_STACK_MIN; - - result = pthread_attr_setstacksize( &attribute, size ); -} diff --git a/c/src/tests/psxtests/psxhdrs/pthread06.c b/c/src/tests/psxtests/psxhdrs/pthread06.c deleted file mode 100644 index afc74ebfbc..0000000000 --- a/c/src/tests/psxtests/psxhdrs/pthread06.c +++ /dev/null @@ -1,32 +0,0 @@ -/* - * This test file is used to verify that the header files associated with - * invoking this function are correct. - * - * 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 - -#ifndef _POSIX_THREADS -#error "rtems is supposed to have pthread_getstacksize" -#endif - -#ifndef _POSIX_THREAD_ATTR_STACKSIZE -#error "rtems is supposed to have pthread_getstacksize" -#endif - -void test( void ) -{ - pthread_attr_t attribute; - size_t size; - int result; - - result = pthread_attr_getstacksize( &attribute, &size ); -} diff --git a/c/src/tests/psxtests/psxhdrs/pthread07.c b/c/src/tests/psxtests/psxhdrs/pthread07.c deleted file mode 100644 index 399a928c56..0000000000 --- a/c/src/tests/psxtests/psxhdrs/pthread07.c +++ /dev/null @@ -1,38 +0,0 @@ -/* - * This test file is used to verify that the header files associated with - * invoking this function are correct. - * - * 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 - -#ifndef _POSIX_THREADS -#error "rtems is supposed to have pthread_create" -#endif - -void *test_task( - void * arg -) -{ - for ( ; ; ) - ; - return NULL; -} - -void test( void ) -{ - pthread_t thread; - pthread_attr_t attribute; - void *arg = NULL; - int result; - - result = pthread_create( &thread, &attribute, test_task, arg ); -} diff --git a/c/src/tests/psxtests/psxhdrs/pthread08.c b/c/src/tests/psxtests/psxhdrs/pthread08.c deleted file mode 100644 index 072833ae5b..0000000000 --- a/c/src/tests/psxtests/psxhdrs/pthread08.c +++ /dev/null @@ -1,26 +0,0 @@ -/* - * This test file is used to verify that the header files associated with - * invoking this function are correct. - * - * 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 - -#ifndef _POSIX_THREADS -#error "rtems is supposed to have pthread_exit" -#endif - -void test( void ) -{ - void *status = NULL; - - pthread_exit( status ); -} diff --git a/c/src/tests/psxtests/psxhdrs/pthread09.c b/c/src/tests/psxtests/psxhdrs/pthread09.c deleted file mode 100644 index 4252d17ee7..0000000000 --- a/c/src/tests/psxtests/psxhdrs/pthread09.c +++ /dev/null @@ -1,26 +0,0 @@ -/* - * This test file is used to verify that the header files associated with - * invoking this function are correct. - * - * 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 - -#ifndef _POSIX_THREADS -#error "rtems is supposed to have pthread_self" -#endif - -void test( void ) -{ - pthread_t self; - - self = pthread_self(); -} diff --git a/c/src/tests/psxtests/psxhdrs/pthread10.c b/c/src/tests/psxtests/psxhdrs/pthread10.c deleted file mode 100644 index 5e2967492f..0000000000 --- a/c/src/tests/psxtests/psxhdrs/pthread10.c +++ /dev/null @@ -1,28 +0,0 @@ -/* - * This test file is used to verify that the header files associated with - * invoking this function are correct. - * - * 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 - -#ifndef _POSIX_THREADS -#error "rtems is supposed to have pthread_equal" -#endif - -void test( void ) -{ - pthread_t id_1 = 0; - pthread_t id_2 = 0; - int result; - - result = pthread_equal( id_1, id_2 ); -} diff --git a/c/src/tests/psxtests/psxhdrs/pthread11.c b/c/src/tests/psxtests/psxhdrs/pthread11.c deleted file mode 100644 index 2fc3263614..0000000000 --- a/c/src/tests/psxtests/psxhdrs/pthread11.c +++ /dev/null @@ -1,51 +0,0 @@ -/* - * This test file is used to verify that the header files associated with - * invoking this function are correct. - * - * 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 - -#ifndef _POSIX_THREAD_PRIORITY_SCHEDULING -#error "RTEMS is supposed to have pthread_setschedparam" -#endif - -void test( void ) -{ - pthread_t thread; - int policy; - struct sched_param param; - int result; - - thread = 0; - - policy = SCHED_OTHER; - policy = SCHED_FIFO; - policy = SCHED_RR; -#ifdef _POSIX_SPORADIC_SERVER - policy = SCHED_SPORADIC; -#endif - - /* - * really should use sched_get_priority_min() and sched_get_priority_max() - */ - - param.sched_priority = 0; -#ifdef _POSIX_SPORADIC_SERVER - param.ss_low_priority = 0; - param.ss_replenish_period.tv_sec = 0; - param.ss_replenish_period.tv_nsec = 0; - param.ss_initial_budget.tv_sec = 0; - param.ss_initial_budget.tv_nsec = 0; -#endif - - result = pthread_setschedparam( thread, policy, ¶m ); -} diff --git a/c/src/tests/psxtests/psxhdrs/pthread12.c b/c/src/tests/psxtests/psxhdrs/pthread12.c deleted file mode 100644 index 44c2f5eeeb..0000000000 --- a/c/src/tests/psxtests/psxhdrs/pthread12.c +++ /dev/null @@ -1,31 +0,0 @@ -/* - * This test file is used to verify that the header files associated with - * invoking this function are correct. - * - * 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 - -#ifndef _POSIX_THREAD_PRIORITY_SCHEDULING -#error "RTEMS is supposed to have pthread_getschedparam" -#endif - -void test( void ) -{ - pthread_t thread; - int policy; - struct sched_param param; - int result; - - thread = 0; - - result = pthread_getschedparam( thread, &policy, ¶m ); -} diff --git a/c/src/tests/psxtests/psxhdrs/pthread13.c b/c/src/tests/psxtests/psxhdrs/pthread13.c deleted file mode 100644 index 717bc49356..0000000000 --- a/c/src/tests/psxtests/psxhdrs/pthread13.c +++ /dev/null @@ -1,31 +0,0 @@ -/* - * This test file is used to verify that the header files associated with - * invoking this function are correct. - * - * 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 - -#ifndef _POSIX_THREAD_PRIORITY_SCHEDULING -#error "RTEMS is supposed to have pthread_attr_setscope" -#endif - -void test( void ) -{ - pthread_attr_t attr; - int contentionscope; - int result; - - contentionscope = PTHREAD_SCOPE_SYSTEM; - contentionscope = PTHREAD_SCOPE_PROCESS; - - result = pthread_attr_setscope( &attr, contentionscope ); -} diff --git a/c/src/tests/psxtests/psxhdrs/pthread14.c b/c/src/tests/psxtests/psxhdrs/pthread14.c deleted file mode 100644 index a20bc30a00..0000000000 --- a/c/src/tests/psxtests/psxhdrs/pthread14.c +++ /dev/null @@ -1,28 +0,0 @@ -/* - * This test file is used to verify that the header files associated with - * invoking this function are correct. - * - * 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 - -#ifndef _POSIX_THREAD_PRIORITY_SCHEDULING -#error "RTEMS is supposed to have pthread_attr_getscope" -#endif - -void test( void ) -{ - pthread_attr_t attr; - int contentionscope; - int result; - - result = pthread_attr_getscope( &attr, &contentionscope ); -} diff --git a/c/src/tests/psxtests/psxhdrs/pthread15.c b/c/src/tests/psxtests/psxhdrs/pthread15.c deleted file mode 100644 index e5b0d7f6dd..0000000000 --- a/c/src/tests/psxtests/psxhdrs/pthread15.c +++ /dev/null @@ -1,31 +0,0 @@ -/* - * This test file is used to verify that the header files associated with - * invoking this function are correct. - * - * 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 - -#ifndef _POSIX_THREAD_PRIORITY_SCHEDULING -#error "RTEMS is supposed to have pthread_attr_setinheritsched" -#endif - -void test( void ) -{ - pthread_attr_t attr; - int inheritsched; - int result; - - inheritsched = PTHREAD_INHERIT_SCHED; - inheritsched = PTHREAD_EXPLICIT_SCHED; - - result = pthread_attr_setinheritsched( &attr, inheritsched ); -} diff --git a/c/src/tests/psxtests/psxhdrs/pthread16.c b/c/src/tests/psxtests/psxhdrs/pthread16.c deleted file mode 100644 index 1d360b6ea6..0000000000 --- a/c/src/tests/psxtests/psxhdrs/pthread16.c +++ /dev/null @@ -1,28 +0,0 @@ -/* - * This test file is used to verify that the header files associated with - * invoking this function are correct. - * - * 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 - -#ifndef _POSIX_THREAD_PRIORITY_SCHEDULING -#error "RTEMS is supposed to have pthread_attr_getinheritsched" -#endif - -void test( void ) -{ - pthread_attr_t attr; - int inheritsched; - int result; - - result = pthread_attr_getinheritsched( &attr, &inheritsched ); -} diff --git a/c/src/tests/psxtests/psxhdrs/pthread17.c b/c/src/tests/psxtests/psxhdrs/pthread17.c deleted file mode 100644 index 89dff22436..0000000000 --- a/c/src/tests/psxtests/psxhdrs/pthread17.c +++ /dev/null @@ -1,35 +0,0 @@ -/* - * This test file is used to verify that the header files associated with - * invoking this function are correct. - * - * 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 - -#ifndef _POSIX_THREAD_PRIORITY_SCHEDULING -#error "RTEMS is supposed to have pthread_attr_setschedpolicy" -#endif - -void test( void ) -{ - pthread_attr_t attr; - int policy; - int result; - - policy = SCHED_FIFO; - policy = SCHED_RR; - policy = SCHED_OTHER; -#ifdef _POSIX_SPORADIC_SERVER - policy = SCHED_SPORADIC; -#endif - - result = pthread_attr_setschedpolicy( &attr, policy ); -} diff --git a/c/src/tests/psxtests/psxhdrs/pthread18.c b/c/src/tests/psxtests/psxhdrs/pthread18.c deleted file mode 100644 index 9f6eec7051..0000000000 --- a/c/src/tests/psxtests/psxhdrs/pthread18.c +++ /dev/null @@ -1,28 +0,0 @@ -/* - * This test file is used to verify that the header files associated with - * invoking this function are correct. - * - * 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 - -#ifndef _POSIX_THREAD_PRIORITY_SCHEDULING -#error "RTEMS is supposed to have pthread_attr_getschedpolicy" -#endif - -void test( void ) -{ - pthread_attr_t attr; - int policy; - int result; - - result = pthread_attr_getschedpolicy( &attr, &policy ); -} diff --git a/c/src/tests/psxtests/psxhdrs/pthread19.c b/c/src/tests/psxtests/psxhdrs/pthread19.c deleted file mode 100644 index b1f1f98ff6..0000000000 --- a/c/src/tests/psxtests/psxhdrs/pthread19.c +++ /dev/null @@ -1,28 +0,0 @@ -/* - * This test file is used to verify that the header files associated with - * invoking this function are correct. - * - * 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 - -#ifndef _POSIX_THREAD_PRIORITY_SCHEDULING -#error "RTEMS is supposed to have pthread_attr_setschedparam" -#endif - -void test( void ) -{ - pthread_attr_t attr; - struct sched_param param; - int result; - - result = pthread_attr_setschedparam( &attr, ¶m ); -} diff --git a/c/src/tests/psxtests/psxhdrs/pthread20.c b/c/src/tests/psxtests/psxhdrs/pthread20.c deleted file mode 100644 index bd3cb7305d..0000000000 --- a/c/src/tests/psxtests/psxhdrs/pthread20.c +++ /dev/null @@ -1,28 +0,0 @@ -/* - * This test file is used to verify that the header files associated with - * invoking this function are correct. - * - * 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 - -#ifndef _POSIX_THREAD_PRIORITY_SCHEDULING -#error "RTEMS is supposed to have pthread_attr_getschedparam" -#endif - -void test( void ) -{ - pthread_attr_t attr; - struct sched_param param; - int result; - - result = pthread_attr_getschedparam( &attr, ¶m ); -} diff --git a/c/src/tests/psxtests/psxhdrs/pthread21.c b/c/src/tests/psxtests/psxhdrs/pthread21.c deleted file mode 100644 index dd16a2406b..0000000000 --- a/c/src/tests/psxtests/psxhdrs/pthread21.c +++ /dev/null @@ -1,28 +0,0 @@ -/* - * This test file is used to verify that the header files associated with - * invoking this function are correct. - * - * 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 - -#ifndef _POSIX_THREADS -#error "rtems is supposed to have pthread_detach" -#endif - -void test( void ) -{ - pthread_t thread; - int result; - - thread = 0; - result = pthread_detach( thread ); -} diff --git a/c/src/tests/psxtests/psxhdrs/pthread22.c b/c/src/tests/psxtests/psxhdrs/pthread22.c deleted file mode 100644 index 46587d12e3..0000000000 --- a/c/src/tests/psxtests/psxhdrs/pthread22.c +++ /dev/null @@ -1,49 +0,0 @@ -/* - * This test file is used to verify that the header files associated with - * invoking this function are correct. - * - * 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 - -#ifndef _POSIX_THREAD_PRIORITY_SCHEDULING -#error "RTEMS is supposed to have pthread_setschedparam" -#endif - -void test( void ) -{ - pthread_t thread = 0; - int policy; - struct sched_param param; - int result; - - policy = SCHED_OTHER; - policy = SCHED_FIFO; - policy = SCHED_RR; -#ifdef _POSIX_SPORADIC_SERVER - policy = SCHED_SPORADIC; -#endif - - /* - * really should use sched_get_priority_min() and sched_get_priority_max() - */ - - param.sched_priority = 0; -#ifdef _POSIX_SPORADIC_SERVER - param.ss_low_priority = 0; - param.ss_replenish_period.tv_sec = 0; - param.ss_replenish_period.tv_nsec = 0; - param.ss_initial_budget.tv_sec = 0; - param.ss_initial_budget.tv_nsec = 0; -#endif - - result = pthread_setschedparam( thread, policy, ¶m ); -} diff --git a/c/src/tests/psxtests/psxhdrs/pthread23.c b/c/src/tests/psxtests/psxhdrs/pthread23.c deleted file mode 100644 index 4d2dd99665..0000000000 --- a/c/src/tests/psxtests/psxhdrs/pthread23.c +++ /dev/null @@ -1,29 +0,0 @@ -/* - * This test file is used to verify that the header files associated with - * invoking this function are correct. - * - * 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 - -#ifndef _POSIX_THREAD_PRIORITY_SCHEDULING -#error "RTEMS is supposed to have pthread_getschedparam" -#endif - -void test( void ) -{ - pthread_t thread = 0; - int policy; - struct sched_param param; - int result; - - result = pthread_getschedparam( thread, &policy, ¶m ); -} diff --git a/c/src/tests/psxtests/psxhdrs/pthread24.c b/c/src/tests/psxtests/psxhdrs/pthread24.c deleted file mode 100644 index ce62367ca1..0000000000 --- a/c/src/tests/psxtests/psxhdrs/pthread24.c +++ /dev/null @@ -1,35 +0,0 @@ -/* - * This test file is used to verify that the header files associated with - * invoking this function are correct. - * - * 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 -#include /* only for PTHREAD_STACK_MIN */ - -#ifndef _POSIX_THREADS -#error "rtems is supposed to have pthread_setstackaddr" -#endif - -#ifndef _POSIX_THREAD_ATTR_STACKADDR -#error "rtems is supposed to have pthread_setstackaddr" -#endif - -void test( void ) -{ - pthread_attr_t attribute; - void *stackaddr; - int result; - - stackaddr = NULL; - - result = pthread_attr_setstackaddr( &attribute, stackaddr ); -} diff --git a/c/src/tests/psxtests/psxhdrs/pthread25.c b/c/src/tests/psxtests/psxhdrs/pthread25.c deleted file mode 100644 index bab821b625..0000000000 --- a/c/src/tests/psxtests/psxhdrs/pthread25.c +++ /dev/null @@ -1,33 +0,0 @@ -/* - * This test file is used to verify that the header files associated with - * invoking this function are correct. - * - * 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 -#include /* only for PTHREAD_STACK_MIN */ - -#ifndef _POSIX_THREADS -#error "rtems is supposed to have pthread_getstackaddr" -#endif - -#ifndef _POSIX_THREAD_ATTR_STACKADDR -#error "rtems is supposed to have pthread_getstackaddr" -#endif - -void test( void ) -{ - pthread_attr_t attribute; - void *stackaddr; - int result; - - result = pthread_attr_getstackaddr( &attribute, &stackaddr ); -} diff --git a/c/src/tests/psxtests/psxhdrs/pthread26.c b/c/src/tests/psxtests/psxhdrs/pthread26.c deleted file mode 100644 index dd3e8f1500..0000000000 --- a/c/src/tests/psxtests/psxhdrs/pthread26.c +++ /dev/null @@ -1,30 +0,0 @@ -/* - * This test file is used to verify that the header files associated with - * invoking this function are correct. - * - * 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 - -#ifndef _POSIX_THREADS -#error "rtems is supposed to have pthread_join" -#endif - -void test( void ) -{ - pthread_t thread; - void *value_ptr; - int result; - - thread = 0; - - result = pthread_join( thread, &value_ptr ); -} diff --git a/c/src/tests/psxtests/psxhdrs/pthread27.c b/c/src/tests/psxtests/psxhdrs/pthread27.c deleted file mode 100644 index 51e5cfde46..0000000000 --- a/c/src/tests/psxtests/psxhdrs/pthread27.c +++ /dev/null @@ -1,31 +0,0 @@ -/* - * This test file is used to verify that the header files associated with - * invoking this function are correct. - * - * 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 - -#ifndef _POSIX_THREADS -#error "rtems is supposed to have pthread_once" -#endif - -void init_routine( void ) -{ -} - -void test( void ) -{ - pthread_once_t once_control = PTHREAD_ONCE_INIT; - int result; - - result = pthread_once( &once_control, init_routine ); -} diff --git a/c/src/tests/psxtests/psxhdrs/pthread28.c b/c/src/tests/psxtests/psxhdrs/pthread28.c deleted file mode 100644 index e1e72520b0..0000000000 --- a/c/src/tests/psxtests/psxhdrs/pthread28.c +++ /dev/null @@ -1,32 +0,0 @@ -/* - * This test file is used to verify that the header files associated with - * invoking this function are correct. - * - * 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 - -#ifndef _POSIX_THREADS -#error "rtems is supposed to have pthread_cancel" -#endif - -void init_routine( void ) -{ -} - -void test( void ) -{ - pthread_t thread; - int result; - - thread = 0; - result = pthread_cancel( thread ); -} diff --git a/c/src/tests/psxtests/psxhdrs/pthread29.c b/c/src/tests/psxtests/psxhdrs/pthread29.c deleted file mode 100644 index 206260540b..0000000000 --- a/c/src/tests/psxtests/psxhdrs/pthread29.c +++ /dev/null @@ -1,35 +0,0 @@ -/* - * This test file is used to verify that the header files associated with - * invoking this function are correct. - * - * 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 - -#ifndef _POSIX_THREADS -#error "rtems is supposed to have pthread_setcancelstate" -#endif - -void init_routine( void ) -{ -} - -void test( void ) -{ - int state; - int oldstate; - int result; - - state = PTHREAD_CANCEL_ENABLE; - state = PTHREAD_CANCEL_DISABLE; - - result = pthread_setcancelstate( state, &oldstate ); -} diff --git a/c/src/tests/psxtests/psxhdrs/pthread30.c b/c/src/tests/psxtests/psxhdrs/pthread30.c deleted file mode 100644 index 32b4ac94f4..0000000000 --- a/c/src/tests/psxtests/psxhdrs/pthread30.c +++ /dev/null @@ -1,35 +0,0 @@ -/* - * This test file is used to verify that the header files associated with - * invoking this function are correct. - * - * 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 - -#ifndef _POSIX_THREADS -#error "rtems is supposed to have pthread_setcanceltype" -#endif - -void init_routine( void ) -{ -} - -void test( void ) -{ - int type; - int oldtype; - int result; - - type = PTHREAD_CANCEL_DEFERRED; - type = PTHREAD_CANCEL_ASYNCHRONOUS; - - result = pthread_setcanceltype( type, &oldtype ); -} diff --git a/c/src/tests/psxtests/psxhdrs/pthread31.c b/c/src/tests/psxtests/psxhdrs/pthread31.c deleted file mode 100644 index d2f399dda3..0000000000 --- a/c/src/tests/psxtests/psxhdrs/pthread31.c +++ /dev/null @@ -1,28 +0,0 @@ -/* - * This test file is used to verify that the header files associated with - * invoking this function are correct. - * - * 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 - -#ifndef _POSIX_THREADS -#error "rtems is supposed to have pthread_testcancel" -#endif - -void init_routine( void ) -{ -} - -void test( void ) -{ - pthread_testcancel(); -} diff --git a/c/src/tests/psxtests/psxhdrs/pthread32.c b/c/src/tests/psxtests/psxhdrs/pthread32.c deleted file mode 100644 index be193ae31e..0000000000 --- a/c/src/tests/psxtests/psxhdrs/pthread32.c +++ /dev/null @@ -1,34 +0,0 @@ -/* - * This test file is used to verify that the header files associated with - * invoking this function are correct. - * - * 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 - -#ifndef _POSIX_THREADS -#error "rtems is supposed to have pthread_cleanup_push" -#endif - -void cleanup_routine( - void *argument -) -{ -} - -void test( void ) -{ - int argument; - - argument = 0; - - pthread_cleanup_push( cleanup_routine, &argument ); -} diff --git a/c/src/tests/psxtests/psxhdrs/pthread33.c b/c/src/tests/psxtests/psxhdrs/pthread33.c deleted file mode 100644 index 122e276815..0000000000 --- a/c/src/tests/psxtests/psxhdrs/pthread33.c +++ /dev/null @@ -1,24 +0,0 @@ -/* - * This test file is used to verify that the header files associated with - * invoking this function are correct. - * - * 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 - -#ifndef _POSIX_THREADS -#error "rtems is supposed to have pthread_cleanup_pop" -#endif - -void test( void ) -{ - pthread_cleanup_pop( 1 ); -} diff --git a/c/src/tests/psxtests/psxhdrs/pthread34.c b/c/src/tests/psxtests/psxhdrs/pthread34.c deleted file mode 100644 index 096561f951..0000000000 --- a/c/src/tests/psxtests/psxhdrs/pthread34.c +++ /dev/null @@ -1,30 +0,0 @@ -/* - * This test file is used to verify that the header files associated with - * invoking this function are correct. - * - * 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 - -#ifndef _POSIX_THREAD_CPUTIME -#error "rtems is supposed to have pthread_getcpuclockid" -#endif - -void test( void ) -{ - pthread_t thread; - clockid_t clock_id; - int result; - - thread = 0; - - result = pthread_getcpuclockid( thread, &clock_id ); -} diff --git a/c/src/tests/psxtests/psxhdrs/pthread35.c b/c/src/tests/psxtests/psxhdrs/pthread35.c deleted file mode 100644 index 698cdfcf20..0000000000 --- a/c/src/tests/psxtests/psxhdrs/pthread35.c +++ /dev/null @@ -1,31 +0,0 @@ -/* - * This test file is used to verify that the header files associated with - * invoking this function are correct. - * - * 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 - -#ifndef _POSIX_THREAD_CPUTIME -#error "rtems is supposed to have pthread_attr_setcputime" -#endif - -void test( void ) -{ - pthread_attr_t attr; - int clock_allowed; - int result; - - clock_allowed = CLOCK_ALLOWED; - clock_allowed = CLOCK_DISALLOWED; - - result = pthread_attr_setcputime( &attr, clock_allowed ); -} diff --git a/c/src/tests/psxtests/psxhdrs/pthread36.c b/c/src/tests/psxtests/psxhdrs/pthread36.c deleted file mode 100644 index 9e38bee279..0000000000 --- a/c/src/tests/psxtests/psxhdrs/pthread36.c +++ /dev/null @@ -1,28 +0,0 @@ -/* - * This test file is used to verify that the header files associated with - * invoking this function are correct. - * - * 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 - -#ifndef _POSIX_THREAD_CPUTIME -#error "rtems is supposed to have pthread_attr_getcputime" -#endif - -void test( void ) -{ - pthread_attr_t attr; - int clock_allowed; - int result; - - result = pthread_attr_getcputime( &attr, &clock_allowed ); -} diff --git a/c/src/tests/psxtests/psxhdrs/sched01.c b/c/src/tests/psxtests/psxhdrs/sched01.c deleted file mode 100644 index 6b92a3cf77..0000000000 --- a/c/src/tests/psxtests/psxhdrs/sched01.c +++ /dev/null @@ -1,43 +0,0 @@ -/* - * This test file is used to verify that the header files associated with - * invoking this function are correct. - * - * 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 - -#ifndef _POSIX_PRIORITY_SCHEDULING -#error "rtems is supposed to have sched_setparam" -#endif - -void test( void ) -{ - pid_t pid; - struct sched_param param; - int result; - - pid = 0; - - /* - * really should use sched_get_priority_min() and sched_get_priority_max() - */ - - param.sched_priority = 0; -#ifdef _POSIX_SPORADIC_SERVER - param.ss_low_priority = 0; - param.ss_replenish_period.tv_sec = 0; - param.ss_replenish_period.tv_nsec = 0; - param.ss_initial_budget.tv_sec = 0; - param.ss_initial_budget.tv_nsec = 0; -#endif - - result = sched_setparam( pid, ¶m ); -} diff --git a/c/src/tests/psxtests/psxhdrs/sched02.c b/c/src/tests/psxtests/psxhdrs/sched02.c deleted file mode 100644 index da7b668857..0000000000 --- a/c/src/tests/psxtests/psxhdrs/sched02.c +++ /dev/null @@ -1,30 +0,0 @@ -/* - * This test file is used to verify that the header files associated with - * invoking this function are correct. - * - * 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 - -#ifndef _POSIX_PRIORITY_SCHEDULING -#error "rtems is supposed to have sched_getparam" -#endif - -void test( void ) -{ - pid_t pid; - struct sched_param param; - int result; - - pid = 0; - - result = sched_getparam( pid, ¶m ); -} diff --git a/c/src/tests/psxtests/psxhdrs/sched03.c b/c/src/tests/psxtests/psxhdrs/sched03.c deleted file mode 100644 index 2e7f5b3d47..0000000000 --- a/c/src/tests/psxtests/psxhdrs/sched03.c +++ /dev/null @@ -1,51 +0,0 @@ -/* - * This test file is used to verify that the header files associated with - * invoking this function are correct. - * - * 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 - -#ifndef _POSIX_PRIORITY_SCHEDULING -#error "rtems is supposed to have sched_setscheduler" -#endif - -void test( void ) -{ - pid_t pid; - int policy; - struct sched_param param; - int result; - - pid = 0; - - policy = SCHED_RR; - policy = SCHED_FIFO; - policy = SCHED_OTHER; -#ifdef _POSIX_SPORADIC_SERVER - policy = SCHED_SPORADIC; -#endif - - /* - * really should use sched_get_priority_min() and sched_get_priority_max() - */ - - param.sched_priority = 0; -#ifdef _POSIX_SPORADIC_SERVER - param.ss_low_priority = 0; - param.ss_replenish_period.tv_sec = 0; - param.ss_replenish_period.tv_nsec = 0; - param.ss_initial_budget.tv_sec = 0; - param.ss_initial_budget.tv_nsec = 0; -#endif - - result = sched_setscheduler( pid, policy, ¶m ); -} diff --git a/c/src/tests/psxtests/psxhdrs/sched04.c b/c/src/tests/psxtests/psxhdrs/sched04.c deleted file mode 100644 index e5adda719a..0000000000 --- a/c/src/tests/psxtests/psxhdrs/sched04.c +++ /dev/null @@ -1,29 +0,0 @@ -/* - * This test file is used to verify that the header files associated with - * invoking this function are correct. - * - * 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 - -#ifndef _POSIX_PRIORITY_SCHEDULING -#error "rtems is supposed to have sched_getscheduler" -#endif - -void test( void ) -{ - pid_t pid; - int result; - - pid = 0; - - result = sched_getscheduler( pid ); -} diff --git a/c/src/tests/psxtests/psxhdrs/sched05.c b/c/src/tests/psxtests/psxhdrs/sched05.c deleted file mode 100644 index 1d483866d1..0000000000 --- a/c/src/tests/psxtests/psxhdrs/sched05.c +++ /dev/null @@ -1,26 +0,0 @@ -/* - * This test file is used to verify that the header files associated with - * invoking this function are correct. - * - * 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 - -#ifndef _POSIX_PRIORITY_SCHEDULING -#error "rtems is supposed to have sched_yield" -#endif - -void test( void ) -{ - int result; - - result = sched_yield(); -} diff --git a/c/src/tests/psxtests/psxhdrs/sched06.c b/c/src/tests/psxtests/psxhdrs/sched06.c deleted file mode 100644 index 7b85230594..0000000000 --- a/c/src/tests/psxtests/psxhdrs/sched06.c +++ /dev/null @@ -1,34 +0,0 @@ -/* - * This test file is used to verify that the header files associated with - * invoking this function are correct. - * - * 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 - -#ifndef _POSIX_PRIORITY_SCHEDULING -#error "rtems is supposed to have sched_get_priority_max" -#endif - -void test( void ) -{ - int policy; - int result; - - policy = SCHED_RR; - policy = SCHED_FIFO; - policy = SCHED_OTHER; -#ifdef _POSIX_SPORADIC_SERVER - policy = SCHED_SPORADIC; -#endif - - result = sched_get_priority_max( policy ); -} diff --git a/c/src/tests/psxtests/psxhdrs/sched07.c b/c/src/tests/psxtests/psxhdrs/sched07.c deleted file mode 100644 index b00056e2e6..0000000000 --- a/c/src/tests/psxtests/psxhdrs/sched07.c +++ /dev/null @@ -1,34 +0,0 @@ -/* - * This test file is used to verify that the header files associated with - * invoking this function are correct. - * - * 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 - -#ifndef _POSIX_PRIORITY_SCHEDULING -#error "rtems is supposed to have sched_get_priority_min" -#endif - -void test( void ) -{ - int policy; - int result; - - policy = SCHED_RR; - policy = SCHED_FIFO; - policy = SCHED_OTHER; -#ifdef _POSIX_SPORADIC_SERVER - policy = SCHED_SPORADIC; -#endif - - result = sched_get_priority_min( policy ); -} diff --git a/c/src/tests/psxtests/psxhdrs/sched08.c b/c/src/tests/psxtests/psxhdrs/sched08.c deleted file mode 100644 index 56f89df3a0..0000000000 --- a/c/src/tests/psxtests/psxhdrs/sched08.c +++ /dev/null @@ -1,30 +0,0 @@ -/* - * This test file is used to verify that the header files associated with - * invoking this function are correct. - * - * 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 - -#ifndef _POSIX_PRIORITY_SCHEDULING -#error "rtems is supposed to have sched_rr_get_interval" -#endif - -void test( void ) -{ - pid_t pid; - struct timespec interval; - int result; - - pid = 0; - - result = sched_rr_get_interval( pid, &interval ); -} diff --git a/c/src/tests/psxtests/psxhdrs/signal01.c b/c/src/tests/psxtests/psxhdrs/signal01.c deleted file mode 100644 index f897b36211..0000000000 --- a/c/src/tests/psxtests/psxhdrs/signal01.c +++ /dev/null @@ -1,26 +0,0 @@ -/* - * This test file is used to verify that the header files associated with - * invoking this function are correct. - * - * 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 - -void test( void ) -{ - sigset_t signal_set; - int signal_number; - int result; - - signal_number = SIGALRM; - - result = sigaddset( &signal_set, signal_number ); -} diff --git a/c/src/tests/psxtests/psxhdrs/signal02.c b/c/src/tests/psxtests/psxhdrs/signal02.c deleted file mode 100644 index c9e8c0a0d6..0000000000 --- a/c/src/tests/psxtests/psxhdrs/signal02.c +++ /dev/null @@ -1,26 +0,0 @@ -/* - * This test file is used to verify that the header files associated with - * invoking this function are correct. - * - * 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 - -void test( void ) -{ - sigset_t signal_set; - int signal_number; - int result; - - signal_number = SIGALRM; - - result = sigdelset( &signal_set, signal_number ); -} diff --git a/c/src/tests/psxtests/psxhdrs/signal03.c b/c/src/tests/psxtests/psxhdrs/signal03.c deleted file mode 100644 index 672dff6761..0000000000 --- a/c/src/tests/psxtests/psxhdrs/signal03.c +++ /dev/null @@ -1,23 +0,0 @@ -/* - * This test file is used to verify that the header files associated with - * invoking this function are correct. - * - * 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 - -void test( void ) -{ - sigset_t signal_set; - int result; - - result = sigfillset( &signal_set ); -} diff --git a/c/src/tests/psxtests/psxhdrs/signal04.c b/c/src/tests/psxtests/psxhdrs/signal04.c deleted file mode 100644 index 58c9c54900..0000000000 --- a/c/src/tests/psxtests/psxhdrs/signal04.c +++ /dev/null @@ -1,26 +0,0 @@ -/* - * This test file is used to verify that the header files associated with - * invoking this function are correct. - * - * 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 - -void test( void ) -{ - sigset_t signal_set; - int signal_number; - int result; - - signal_number = SIGALRM; - - result = sigismember( &signal_set, signal_number ); -} diff --git a/c/src/tests/psxtests/psxhdrs/signal05.c b/c/src/tests/psxtests/psxhdrs/signal05.c deleted file mode 100644 index a6bf097830..0000000000 --- a/c/src/tests/psxtests/psxhdrs/signal05.c +++ /dev/null @@ -1,23 +0,0 @@ -/* - * This test file is used to verify that the header files associated with - * invoking this function are correct. - * - * 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 - -void test( void ) -{ - sigset_t signal_set; - int result; - - result = sigemptyset( &signal_set ); -} diff --git a/c/src/tests/psxtests/psxhdrs/signal06.c b/c/src/tests/psxtests/psxhdrs/signal06.c deleted file mode 100644 index 4ab7bbcdb5..0000000000 --- a/c/src/tests/psxtests/psxhdrs/signal06.c +++ /dev/null @@ -1,38 +0,0 @@ -/* - * This test file is used to verify that the header files associated with - * invoking this function are correct. - * - * 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 - -void test( void ) -{ - int signal_number; - struct sigaction act; - struct sigaction oact; - int result; - - signal_number = SIGALRM; - - /* - * Really should not reference sa_handler and sa_signction simultaneously. - */ - - act.sa_handler = SIG_DFL; - act.sa_handler = SIG_IGN; - act.sa_mask = 0; - act.sa_flags = SA_NOCLDSTOP; - act.sa_flags = SA_SIGINFO; - act.sa_sigaction = NULL; - - result = sigaction( signal_number, &act, &oact ); -} diff --git a/c/src/tests/psxtests/psxhdrs/signal07.c b/c/src/tests/psxtests/psxhdrs/signal07.c deleted file mode 100644 index c40cf71db4..0000000000 --- a/c/src/tests/psxtests/psxhdrs/signal07.c +++ /dev/null @@ -1,31 +0,0 @@ -/* - * This test file is used to verify that the header files associated with - * invoking this function are correct. - * - * 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 - -#ifndef _POSIX_THREADS -#error "rtems is supposed to have pthread_kill" -#endif - -void test( void ) -{ - pthread_t thread; - int signal_number; - int result; - - thread = 0; - signal_number = SIGALRM; - - result = pthread_kill( thread, signal_number ); -} diff --git a/c/src/tests/psxtests/psxhdrs/signal08.c b/c/src/tests/psxtests/psxhdrs/signal08.c deleted file mode 100644 index 9cb959aea9..0000000000 --- a/c/src/tests/psxtests/psxhdrs/signal08.c +++ /dev/null @@ -1,33 +0,0 @@ -/* - * This test file is used to verify that the header files associated with - * invoking this function are correct. - * - * 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 - -#ifndef _POSIX_THREADS -#error "rtems is supposed to have pthread_sigmask" -#endif - -void test( void ) -{ - int how; - sigset_t set; - sigset_t oset; - int result; - - how = SIG_BLOCK; - how = SIG_UNBLOCK; - how = SIG_SETMASK; - - result = pthread_sigmask( how, &set, &oset ); -} diff --git a/c/src/tests/psxtests/psxhdrs/signal09.c b/c/src/tests/psxtests/psxhdrs/signal09.c deleted file mode 100644 index 902fb519cd..0000000000 --- a/c/src/tests/psxtests/psxhdrs/signal09.c +++ /dev/null @@ -1,28 +0,0 @@ -/* - * This test file is used to verify that the header files associated with - * invoking this function are correct. - * - * 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 -#include - -void test( void ) -{ - pid_t pid; - int signal_number; - int result; - - pid = 0; - signal_number = SIGALRM; - - result = kill( pid, signal_number ); -} diff --git a/c/src/tests/psxtests/psxhdrs/signal10.c b/c/src/tests/psxtests/psxhdrs/signal10.c deleted file mode 100644 index a366e74650..0000000000 --- a/c/src/tests/psxtests/psxhdrs/signal10.c +++ /dev/null @@ -1,24 +0,0 @@ -/* - * This test file is used to verify that the header files associated with - * invoking this function are correct. - * - * 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 - -void test( void ) -{ - sigset_t set; - int sig; - int result; - - result = sigwait( &set, &sig ); -} diff --git a/c/src/tests/psxtests/psxhdrs/signal11.c b/c/src/tests/psxtests/psxhdrs/signal11.c deleted file mode 100644 index 3afc6347e8..0000000000 --- a/c/src/tests/psxtests/psxhdrs/signal11.c +++ /dev/null @@ -1,25 +0,0 @@ -/* - * This test file is used to verify that the header files associated with - * invoking this function are correct. - * - * 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 - -void test( void ) -{ - int signal_number; - int result; - - signal_number = SIGALRM; - - result = raise( signal_number ); -} diff --git a/c/src/tests/psxtests/psxhdrs/signal12.c b/c/src/tests/psxtests/psxhdrs/signal12.c deleted file mode 100644 index 8533359b17..0000000000 --- a/c/src/tests/psxtests/psxhdrs/signal12.c +++ /dev/null @@ -1,25 +0,0 @@ -/* - * This test file is used to verify that the header files associated with - * invoking this function are correct. - * - * 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 - -void test( void ) -{ - void (*signal_function_pointer)(); - int signal_number; - - signal_number = SIGALRM; - - signal_function_pointer = signal( signal_number, SIG_IGN ); -} diff --git a/c/src/tests/psxtests/psxhdrs/signal13.c b/c/src/tests/psxtests/psxhdrs/signal13.c deleted file mode 100644 index 89f8f4586d..0000000000 --- a/c/src/tests/psxtests/psxhdrs/signal13.c +++ /dev/null @@ -1,31 +0,0 @@ -/* - * This test file is used to verify that the header files associated with - * invoking this function are correct. - * - * 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 - -void test( void ) -{ - int how; - sigset_t set; - sigset_t oset; - int result; - - how = SIG_BLOCK; - how = SIG_UNBLOCK; - how = SIG_SETMASK; - - (void) sigemptyset( &set ); - - result = sigprocmask( how, &set, &oset ); -} diff --git a/c/src/tests/psxtests/psxhdrs/signal14.c b/c/src/tests/psxtests/psxhdrs/signal14.c deleted file mode 100644 index 8f40b0c489..0000000000 --- a/c/src/tests/psxtests/psxhdrs/signal14.c +++ /dev/null @@ -1,25 +0,0 @@ -/* - * This test file is used to verify that the header files associated with - * invoking this function are correct. - * - * 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 - -void test( void ) -{ - sigset_t set; - int result; - - (void) sigemptyset( &set ); - - result = sigpending( &set ); -} diff --git a/c/src/tests/psxtests/psxhdrs/signal15.c b/c/src/tests/psxtests/psxhdrs/signal15.c deleted file mode 100644 index 365dc97030..0000000000 --- a/c/src/tests/psxtests/psxhdrs/signal15.c +++ /dev/null @@ -1,25 +0,0 @@ -/* - * This test file is used to verify that the header files associated with - * invoking this function are correct. - * - * 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 - -void test( void ) -{ - sigset_t sigmask; - int result; - - (void) sigemptyset( &sigmask ); - - result = sigsuspend( &sigmask ); -} diff --git a/c/src/tests/psxtests/psxhdrs/signal16.c b/c/src/tests/psxtests/psxhdrs/signal16.c deleted file mode 100644 index 90b159b02d..0000000000 --- a/c/src/tests/psxtests/psxhdrs/signal16.c +++ /dev/null @@ -1,35 +0,0 @@ -/* - * This test file is used to verify that the header files associated with - * invoking this function are correct. - * - * 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 - -#ifndef _POSIX_THREADS -#define "rtems is supposed to have pthread_sigmask" -#endif - -void test( void ) -{ - int how; - sigset_t set; - sigset_t oset; - int result; - - how = SIG_BLOCK; - how = SIG_UNBLOCK; - how = SIG_SETMASK; - - (void) sigemptyset( &set ); - - result = pthread_sigmask( how, &set, &oset ); -} diff --git a/c/src/tests/psxtests/psxhdrs/signal17.c b/c/src/tests/psxtests/psxhdrs/signal17.c deleted file mode 100644 index fe367d0d88..0000000000 --- a/c/src/tests/psxtests/psxhdrs/signal17.c +++ /dev/null @@ -1,26 +0,0 @@ -/* - * This test file is used to verify that the header files associated with - * invoking this function are correct. - * - * 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 - -void test( void ) -{ - sigset_t set; - siginfo_t info; - int result; - - (void) sigemptyset( &set ); - - result = sigwaitinfo( &set, &info ); -} diff --git a/c/src/tests/psxtests/psxhdrs/signal18.c b/c/src/tests/psxtests/psxhdrs/signal18.c deleted file mode 100644 index 69cd84b52a..0000000000 --- a/c/src/tests/psxtests/psxhdrs/signal18.c +++ /dev/null @@ -1,27 +0,0 @@ -/* - * This test file is used to verify that the header files associated with - * invoking this function are correct. - * - * 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 - -void test( void ) -{ - sigset_t set; - siginfo_t info; - struct timespec timeout; - int result; - - (void) sigemptyset( &set ); - - result = sigtimedwait( &set, &info, &timeout ); -} diff --git a/c/src/tests/psxtests/psxhdrs/signal19.c b/c/src/tests/psxtests/psxhdrs/signal19.c deleted file mode 100644 index fdc0558417..0000000000 --- a/c/src/tests/psxtests/psxhdrs/signal19.c +++ /dev/null @@ -1,26 +0,0 @@ -/* - * This test file is used to verify that the header files associated with - * invoking this function are correct. - * - * 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 - -void test( void ) -{ - sigset_t set; - int sig; - int result; - - (void) sigemptyset( &set ); - - result = sigwait( &set, &sig ); -} diff --git a/c/src/tests/psxtests/psxhdrs/signal20.c b/c/src/tests/psxtests/psxhdrs/signal20.c deleted file mode 100644 index 639738e1c6..0000000000 --- a/c/src/tests/psxtests/psxhdrs/signal20.c +++ /dev/null @@ -1,25 +0,0 @@ -/* - * This test file is used to verify that the header files associated with - * invoking this function are correct. - * - * 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 - -void test( void ) -{ - unsigned int seconds; - unsigned int result; - - seconds = 10; - - result = alarm( seconds ); -} diff --git a/c/src/tests/psxtests/psxhdrs/signal21.c b/c/src/tests/psxtests/psxhdrs/signal21.c deleted file mode 100644 index c981ab217c..0000000000 --- a/c/src/tests/psxtests/psxhdrs/signal21.c +++ /dev/null @@ -1,22 +0,0 @@ -/* - * This test file is used to verify that the header files associated with - * invoking this function are correct. - * - * 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 - -void test( void ) -{ - int result; - - result = pause(); -} diff --git a/c/src/tests/psxtests/psxhdrs/signal22.c b/c/src/tests/psxtests/psxhdrs/signal22.c deleted file mode 100644 index 547faa51a7..0000000000 --- a/c/src/tests/psxtests/psxhdrs/signal22.c +++ /dev/null @@ -1,25 +0,0 @@ -/* - * This test file is used to verify that the header files associated with - * invoking this function are correct. - * - * 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 - -void test( void ) -{ - unsigned int seconds; - unsigned int result; - - seconds = 10; - - result = sleep( seconds ); -} diff --git a/c/src/tests/psxtests/psxhdrs/signal23.c b/c/src/tests/psxtests/psxhdrs/signal23.c deleted file mode 100644 index 4a6af9b6cd..0000000000 --- a/c/src/tests/psxtests/psxhdrs/signal23.c +++ /dev/null @@ -1,28 +0,0 @@ -/* - * This test file is used to verify that the header files associated with - * invoking this function are correct. - * - * COPYRIGHT (c) 1989-2003. - * 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 - -useconds_t _EXFUN(ualarm, (useconds_t __useconds, useconds_t __interval)); -void test( void ) -{ - useconds_t useconds; - useconds_t interval; - useconds_t result; - - useconds = 10; - interval = 10; - - result = ualarm( useconds, interval ); -} diff --git a/c/src/tests/psxtests/psxhdrs/sync01.c b/c/src/tests/psxtests/psxhdrs/sync01.c deleted file mode 100644 index 7ebb18509c..0000000000 --- a/c/src/tests/psxtests/psxhdrs/sync01.c +++ /dev/null @@ -1,24 +0,0 @@ -/* - * This test file is used to verify that the header files associated with - * invoking this function are correct. - * - * COPYRIGHT (c) 1989-2003. - * 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 - -void test( void ) -{ - int fd; - int result; - - fd = 4; - result = fsync( fd ); -} diff --git a/c/src/tests/psxtests/psxhdrs/sync02.c b/c/src/tests/psxtests/psxhdrs/sync02.c deleted file mode 100644 index 425feb10fd..0000000000 --- a/c/src/tests/psxtests/psxhdrs/sync02.c +++ /dev/null @@ -1,24 +0,0 @@ -/* - * This test file is used to verify that the header files associated with - * invoking this function are correct. - * - * COPYRIGHT (c) 1989-2003. - * 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 - -void test( void ) -{ - int fd; - int result; - - fd = 4; - result = fdatasync( fd ); -} diff --git a/c/src/tests/psxtests/psxhdrs/sync03.c b/c/src/tests/psxtests/psxhdrs/sync03.c deleted file mode 100644 index 44564c0715..0000000000 --- a/c/src/tests/psxtests/psxhdrs/sync03.c +++ /dev/null @@ -1,20 +0,0 @@ -/* - * This test file is used to verify that the header files associated with - * invoking this function are correct. - * - * COPYRIGHT (c) 1989-2003. - * 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 - -void test( void ) -{ - sync(); -} diff --git a/c/src/tests/psxtests/psxhdrs/time01.c b/c/src/tests/psxtests/psxhdrs/time01.c deleted file mode 100644 index 3e77c3f405..0000000000 --- a/c/src/tests/psxtests/psxhdrs/time01.c +++ /dev/null @@ -1,22 +0,0 @@ -/* - * This test file is used to verify that the header files associated with - * invoking this function are correct. - * - * 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 - -void test( void ) -{ - clock_t clock_ticks; - - clock_ticks = clock(); -} diff --git a/c/src/tests/psxtests/psxhdrs/time02.c b/c/src/tests/psxtests/psxhdrs/time02.c deleted file mode 100644 index 4065559845..0000000000 --- a/c/src/tests/psxtests/psxhdrs/time02.c +++ /dev/null @@ -1,27 +0,0 @@ -/* - * This test file is used to verify that the header files associated with - * invoking this function are correct. - * - * 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 - -void test( void ) -{ - time_t time1; - time_t time2; - double difference; - - time1 = 0; - time2 = 0; - - difference = difftime( time1, time2 ); -} diff --git a/c/src/tests/psxtests/psxhdrs/time03.c b/c/src/tests/psxtests/psxhdrs/time03.c deleted file mode 100644 index 329dfe89ec..0000000000 --- a/c/src/tests/psxtests/psxhdrs/time03.c +++ /dev/null @@ -1,33 +0,0 @@ -/* - * This test file is used to verify that the header files associated with - * invoking this function are correct. - * - * 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 - -void test( void ) -{ - struct tm timestruct; - time_t time_encoded; - - timestruct.tm_sec = 0; - timestruct.tm_min = 0; - timestruct.tm_hour = 0; - timestruct.tm_mday = 1; - timestruct.tm_mon = 0; - timestruct.tm_year = 0; - timestruct.tm_wday = 0; - timestruct.tm_yday = 0; - timestruct.tm_isdst = 0; - - time_encoded = mktime( ×truct ); -} diff --git a/c/src/tests/psxtests/psxhdrs/time04.c b/c/src/tests/psxtests/psxhdrs/time04.c deleted file mode 100644 index 2ff1b4f145..0000000000 --- a/c/src/tests/psxtests/psxhdrs/time04.c +++ /dev/null @@ -1,22 +0,0 @@ -/* - * This test file is used to verify that the header files associated with - * invoking this function are correct. - * - * 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 - -void test( void ) -{ - time_t new_time; - - new_time = time( &new_time ); -} diff --git a/c/src/tests/psxtests/psxhdrs/time05.c b/c/src/tests/psxtests/psxhdrs/time05.c deleted file mode 100644 index b8e492a0e9..0000000000 --- a/c/src/tests/psxtests/psxhdrs/time05.c +++ /dev/null @@ -1,27 +0,0 @@ -/* - * This test file is used to verify that the header files associated with - * invoking this function are correct. - * - * 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 - -void test( void ) -{ - size_t length; - size_t max_length; - char buffer[ 80 ]; - struct tm timestruct; - - max_length = sizeof( buffer ); - - length = strftime( buffer, max_length, "%A", ×truct ); -} diff --git a/c/src/tests/psxtests/psxhdrs/time06.c b/c/src/tests/psxtests/psxhdrs/time06.c deleted file mode 100644 index 42fdadc394..0000000000 --- a/c/src/tests/psxtests/psxhdrs/time06.c +++ /dev/null @@ -1,23 +0,0 @@ -/* - * This test file is used to verify that the header files associated with - * invoking this function are correct. - * - * 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 - -void test( void ) -{ - char *buffer; - struct tm timestruct; - - buffer = asctime( ×truct ); -} diff --git a/c/src/tests/psxtests/psxhdrs/time07.c b/c/src/tests/psxtests/psxhdrs/time07.c deleted file mode 100644 index 9928ae9a9d..0000000000 --- a/c/src/tests/psxtests/psxhdrs/time07.c +++ /dev/null @@ -1,23 +0,0 @@ -/* - * This test file is used to verify that the header files associated with - * invoking this function are correct. - * - * 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 - -void test( void ) -{ - char *buffer; - time_t time; - - buffer = ctime( &time ); -} diff --git a/c/src/tests/psxtests/psxhdrs/time08.c b/c/src/tests/psxtests/psxhdrs/time08.c deleted file mode 100644 index 62daec0726..0000000000 --- a/c/src/tests/psxtests/psxhdrs/time08.c +++ /dev/null @@ -1,23 +0,0 @@ -/* - * This test file is used to verify that the header files associated with - * invoking this function are correct. - * - * 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 - -void test( void ) -{ - time_t time; - struct tm *timestruct; - - timestruct = gmtime( &time ); -} diff --git a/c/src/tests/psxtests/psxhdrs/time09.c b/c/src/tests/psxtests/psxhdrs/time09.c deleted file mode 100644 index c0377dd873..0000000000 --- a/c/src/tests/psxtests/psxhdrs/time09.c +++ /dev/null @@ -1,23 +0,0 @@ -/* - * This test file is used to verify that the header files associated with - * invoking this function are correct. - * - * 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 - -void test( void ) -{ - time_t time; - struct tm *timestruct; - - timestruct = localtime( &time ); -} diff --git a/c/src/tests/psxtests/psxhdrs/time10.c b/c/src/tests/psxtests/psxhdrs/time10.c deleted file mode 100644 index 75325851dd..0000000000 --- a/c/src/tests/psxtests/psxhdrs/time10.c +++ /dev/null @@ -1,24 +0,0 @@ -/* - * This test file is used to verify that the header files associated with - * invoking this function are correct. - * - * 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 - -void test( void ) -{ - char *buffer_pointer; - struct tm timestruct; - char buffer[ 80 ]; - - buffer_pointer = asctime_r( ×truct, buffer ); -} diff --git a/c/src/tests/psxtests/psxhdrs/time11.c b/c/src/tests/psxtests/psxhdrs/time11.c deleted file mode 100644 index 575e662568..0000000000 --- a/c/src/tests/psxtests/psxhdrs/time11.c +++ /dev/null @@ -1,24 +0,0 @@ -/* - * This test file is used to verify that the header files associated with - * invoking this function are correct. - * - * 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 - -void test( void ) -{ - char *buffer_pointer; - char buffer[ 80 ]; - time_t time; - - buffer_pointer = ctime_r( &time, buffer ); -} diff --git a/c/src/tests/psxtests/psxhdrs/time12.c b/c/src/tests/psxtests/psxhdrs/time12.c deleted file mode 100644 index 26683b5c5a..0000000000 --- a/c/src/tests/psxtests/psxhdrs/time12.c +++ /dev/null @@ -1,24 +0,0 @@ -/* - * This test file is used to verify that the header files associated with - * invoking this function are correct. - * - * 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 - -void test( void ) -{ - time_t time; - struct tm *timestruct_pointer; - struct tm timestruct; - - timestruct_pointer = gmtime_r( &time, ×truct ); -} diff --git a/c/src/tests/psxtests/psxhdrs/time13.c b/c/src/tests/psxtests/psxhdrs/time13.c deleted file mode 100644 index e571e24f68..0000000000 --- a/c/src/tests/psxtests/psxhdrs/time13.c +++ /dev/null @@ -1,24 +0,0 @@ -/* - * This test file is used to verify that the header files associated with - * invoking this function are correct. - * - * 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 - -void test( void ) -{ - time_t time; - struct tm *timestruct_pointer; - struct tm timestruct; - - timestruct_pointer = localtime_r( &time, ×truct ); -} diff --git a/c/src/tests/psxtests/psxhdrs/timer01.c b/c/src/tests/psxtests/psxhdrs/timer01.c deleted file mode 100644 index 8f71a30055..0000000000 --- a/c/src/tests/psxtests/psxhdrs/timer01.c +++ /dev/null @@ -1,36 +0,0 @@ -/* - * This test file is used to verify that the header files associated with - * invoking this function are correct. - * - * 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 - -#ifndef _POSIX_TIMERS -#error "rtems is supposed to have timer_create" -#endif - -void test( void ) -{ - clockid_t clock_id = 0; - timer_t timerid = 0; - struct sigevent evp; - int result; - - evp.sigev_notify = SIGEV_NONE; - evp.sigev_notify = SIGEV_SIGNAL; - evp.sigev_notify = SIGEV_THREAD; - evp.sigev_signo = SIGALRM; - evp.sigev_value.sival_int = 0; - evp.sigev_value.sival_ptr = NULL; - - result = timer_create( clock_id, &evp, &timerid ); -} diff --git a/c/src/tests/psxtests/psxhdrs/timer02.c b/c/src/tests/psxtests/psxhdrs/timer02.c deleted file mode 100644 index 5949300b52..0000000000 --- a/c/src/tests/psxtests/psxhdrs/timer02.c +++ /dev/null @@ -1,27 +0,0 @@ -/* - * This test file is used to verify that the header files associated with - * invoking this function are correct. - * - * 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 - -#ifndef _POSIX_TIMERS -#error "rtems is supposed to have timer_delete" -#endif - -void test( void ) -{ - timer_t timerid = 0; - int result; - - result = timer_delete( timerid ); -} diff --git a/c/src/tests/psxtests/psxhdrs/timer03.c b/c/src/tests/psxtests/psxhdrs/timer03.c deleted file mode 100644 index f30bb3047d..0000000000 --- a/c/src/tests/psxtests/psxhdrs/timer03.c +++ /dev/null @@ -1,38 +0,0 @@ -/* - * This test file is used to verify that the header files associated with - * invoking this function are correct. - * - * 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 - -#ifndef _POSIX_TIMERS -#error "rtems is supposed to have timer_settime" -#endif - -void test( void ) -{ - timer_t timerid = 0; - int flags; - struct itimerspec value; - struct itimerspec ovalue; - int result; - - value.it_interval.tv_sec = 0; - value.it_interval.tv_nsec = 0; - value.it_value.tv_sec = 0; - value.it_value.tv_nsec = 0; - - flags = TIMER_ABSTIME; - flags = CLOCK_REALTIME; - - result = timer_settime( timerid, flags, &value, &ovalue ); -} diff --git a/c/src/tests/psxtests/psxhdrs/timer04.c b/c/src/tests/psxtests/psxhdrs/timer04.c deleted file mode 100644 index 7de072d58c..0000000000 --- a/c/src/tests/psxtests/psxhdrs/timer04.c +++ /dev/null @@ -1,28 +0,0 @@ -/* - * This test file is used to verify that the header files associated with - * invoking this function are correct. - * - * 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 - -#ifndef _POSIX_TIMERS -#error "rtems is supposed to have timer_gettime" -#endif - -void test( void ) -{ - timer_t timerid = 0; - struct itimerspec value; - int result; - - result = timer_gettime( timerid, &value ); -} diff --git a/c/src/tests/psxtests/psxhdrs/timer05.c b/c/src/tests/psxtests/psxhdrs/timer05.c deleted file mode 100644 index 71f5a7a211..0000000000 --- a/c/src/tests/psxtests/psxhdrs/timer05.c +++ /dev/null @@ -1,27 +0,0 @@ -/* - * This test file is used to verify that the header files associated with - * invoking this function are correct. - * - * 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 - -#ifndef _POSIX_TIMERS -#error "rtems is supposed to have timer_getoverrun" -#endif - -void test( void ) -{ - timer_t timerid = 0; - int result; - - result = timer_getoverrun( timerid ); -} diff --git a/c/src/tests/psxtests/psxhdrs/timer06.c b/c/src/tests/psxtests/psxhdrs/timer06.c deleted file mode 100644 index 833aece2c9..0000000000 --- a/c/src/tests/psxtests/psxhdrs/timer06.c +++ /dev/null @@ -1,30 +0,0 @@ -/* - * This test file is used to verify that the header files associated with - * invoking this function are correct. - * - * 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 - -#ifndef _POSIX_TIMERS -#error "rtems is supposed to have nanosleep" -#endif - -void test( void ) -{ - struct timespec rqtp; - struct timespec rmtp; - int result; - - rqtp.tv_sec = 0; - rqtp.tv_nsec = 0; - result = nanosleep( &rqtp, &rmtp ); -} diff --git a/c/src/tests/psxtests/psxhdrs/timer07.c b/c/src/tests/psxtests/psxhdrs/timer07.c deleted file mode 100644 index 47016934e9..0000000000 --- a/c/src/tests/psxtests/psxhdrs/timer07.c +++ /dev/null @@ -1,24 +0,0 @@ -/* - * This test file is used to verify that the header files associated with - * invoking this function are correct. - * - * COPYRIGHT (c) 1989-2003. - * 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 - -void test( void ) -{ - unsigned long usec; - unsigned result; - - usec = 0; - result = usleep( usec ); -} diff --git a/c/src/tests/psxtests/psxmount/.cvsignore b/c/src/tests/psxtests/psxmount/.cvsignore deleted file mode 100644 index 282522db03..0000000000 --- a/c/src/tests/psxtests/psxmount/.cvsignore +++ /dev/null @@ -1,2 +0,0 @@ -Makefile -Makefile.in diff --git a/c/src/tests/psxtests/psxmount/Makefile.am b/c/src/tests/psxtests/psxmount/Makefile.am deleted file mode 100644 index 348025aa7a..0000000000 --- a/c/src/tests/psxtests/psxmount/Makefile.am +++ /dev/null @@ -1,41 +0,0 @@ -## -## $Id$ -## - - -TEST = psxmount - -MANAGERS = all - -C_FILES = main.c test.c -C_O_FILES = $(C_FILES:%.c=${ARCH}/%.$(OBJEXT)) - -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/psxmount/main.c b/c/src/tests/psxtests/psxmount/main.c deleted file mode 100644 index 8bf5f72b7f..0000000000 --- a/c/src/tests/psxtests/psxmount/main.c +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Simple test program -- check out of the basic file system mounting - * capabilities - * Attempt to mount the IMFS file system on a mount point in the base IMFS - */ - -#define TEST_INIT - -#include -#include - -void test_main( void ); - -rtems_task Init( - rtems_task_argument ignored -) -{ - test_main(); - rtems_test_exit( 0 ); -} - -/* configuration information */ - -#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER - -#define CONFIGURE_USE_IMFS_AS_BASE_FILESYSTEM -#define CONFIGURE_LIBIO_MAXIMUM_FILE_DESCRIPTORS 10 - -#define CONFIGURE_MAXIMUM_TASKS 1 - -#define CONFIGURE_RTEMS_INIT_TASKS_TABLE - -#define CONFIGURE_INIT - -#include - -/* end of file */ diff --git a/c/src/tests/psxtests/psxmount/psxmount.scn b/c/src/tests/psxtests/psxmount/psxmount.scn deleted file mode 100644 index 88c1fa9fbe..0000000000 --- a/c/src/tests/psxtests/psxmount/psxmount.scn +++ /dev/null @@ -1,86 +0,0 @@ - - -*** MOUNT/UNMOUNT TEST *** - -chdir to the root directory -chdir() status : 0 - - -Creating a series of directories under / -Creating : a 0 0 Success -Creating : b 0 0 Success -Creating : c 0 0 Success -Creating : d 0 0 Success -Creating : e 0 0 Success -Creating : f 0 0 Success -Creating : c/y 0 0 Success -Creating : c/z 0 0 Success -Creating : c/x 0 0 Success -Creating : c/y/a3333 0 0 Success -Creating : c/y/j123 0 0 Success -Creating : c/y/my_mount_point 0 0 Success -Creating : c/y/my_mount_point/my_dir 0 0 Success -Creating : c/z/my_mount_point 0 0 Success -create /b/my_file -Verify /b/my_file -create c/y/my_mount_point/my_dir/d -Verify c/y/my_mount_point/my_dir/d -Attempting to mount IMFS file system at /c/z/my_mount_point -2nd file system successfully mounted at /c/z/my_mount_point - -chdir to /c/z/my_mount_point. -chdir() status : 0 - - -Creating a series of directories under /c/z/my_mount_point -Creating: a 0 2 Success -Creating: b 0 2 Success -Creating: c 0 2 Success -Creating: d 0 2 Success -Creating: e 0 2 Success -Creating: f 0 2 Success -Creating: c/y 0 2 Success -Creating: c/z 0 2 Success -Creating: c/x 0 2 Success -Creating: c/y/a3333 0 2 Success -Creating: c/y/j123 0 2 Success -Creating: c/y/my_mount_point 0 2 Success -Creating: c/y/my_mount_point/my_dir 0 2 Success -Creating: c/y/my_mount_point/my_dir/d 0 2 Success -Creating: c/z/my_mount_point 0 2 Success -Creating: /c/z/my_mount_point/a/../../my_mount_point/a/g 0 2 Success - -chdir to / -chdir() status : 0 - -Unmount status: 0 -Mount a NULL file system and verify EINVAL -mount with option of -62 should fail with EINVAL -Mount a Read Only filesystem at /c/y/my_mount_point -Read only file system successfully mounted at /c/y/my_mount_point -create c/y/my_mount_point/../../y/my_mount_point/new_dir -Verify a mount point returns EBUSY for another mount -Mount on a file should fail with ENOTDIR -Create and chdir to /c/y/my_mount_point/mydir -unmount of /c/y/my_mount_point should fail with EBUSY -chdir to / and verify we can unmount /c/y/my_mount_point -unmount /c/y/my_mount_point -unmount /b/mount_point should fail with EINVAL -Mount /c/y/my_mount_point -Create and open /c/y/my_mount_point/my_file - -mkdir /c/y/my_mount_point/my_dir -Open /c/y/my_mount_point/my_dir -Unmount /c/y/my_mount_point should fail with EBUSY -Close /c/y/my_mount_point/my_dir -Unmount /c/y/my_mount_point/my_dir should fail with EACCES -Mount a file system at /c/y/my_mount_point/my_dir -unmount /c/y/my_mount_point should fail with EBUSY -Verify a hard link across filesystems fails with EXDEV -Verify a symbolic link across file systems works -unmount /c/y/my_mount_point/my_dir -Verify the symbolic link now fails -unmount /c/y/my_mount_point - - -*** END OF MOUNT/UNMOUNT TEST *** diff --git a/c/src/tests/psxtests/psxmount/test.c b/c/src/tests/psxtests/psxmount/test.c deleted file mode 100644 index bf4a704c26..0000000000 --- a/c/src/tests/psxtests/psxmount/test.c +++ /dev/null @@ -1,447 +0,0 @@ -/* - * This is a native test to explore how the readdir() family works. - * Newlib supports the following readdir() family members: - * - * closedir() - - * readdir() - - * scandir() - - * opendir() - - * rewinddir() - - * telldir() - BSD not in POSIX - * seekdir() - BSD not in POSIX - * - * - * seekdir() takes an offset which is a byte offset. The Linux - * implementation of this appears to seek to the ((off/DIRENT_SIZE) + 1) - * record where DIRENT_SIZE seems to be 12 bytes. - * - * - * - * $Id$ - */ -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -extern rtems_filesystem_location_info_t rtems_filesystem_current; - -DIR *directory; -DIR *directory2; -DIR *directory3; -DIR *directory_not; - -#ifndef __P -#define __P(args)() -#endif - -char *dnames[] = { - "a", - "b", - "c", - "d", - "e", - "f", - "c/y", - "c/z", - "c/x", - "c/y/a3333", - "c/y/j123", - "c/y/my_mount_point", - "c/y/my_mount_point/my_dir", - "c/z/my_mount_point", - "END" -}; - -char *fnames[] = { - "a", - "b", - "c", - "d", - "e", - "f", - "c/y", - "c/z", - "c/x", - "c/y/a3333", - "c/y/j123", - "c/y/my_mount_point", - "c/y/my_mount_point/my_dir", - "c/y/my_mount_point/my_dir/d", - "c/z/my_mount_point", - "/c/z/my_mount_point/a/../../my_mount_point/a/g", - "END" -}; - -#if defined(__rtems__) -int test_main(void) -#else -int main( - int argc, - char **argv -) -#endif -{ - int i; - int fd; - int status; - struct stat statbuf; - rtems_filesystem_mount_table_entry_t *mt_entry; - static char mount_point_string[25] = { "/c/z/my_mount_point" }; - - - printf( "\n\n*** MOUNT/UNMOUNT TEST ***\n" ); - - /* - * Change directory to the root and create files under - * the base file system. - */ - - printf( "\nchdir to the root directory\n" ); - status = chdir( "/" ); - printf( "chdir() status : %d\n\n", status ); - - printf( "\nCreating a series of directories under /\n" ); - i=0; - while ( strcmp(dnames[i], "END") != 0 ) - { - status = mkdir( dnames[i], 0777 ); - printf("Creating : %25s %d %d ", dnames[i], status, errno ); - if ( status == 0 ) - printf(" Success\n"); - else - printf(" Failure\n"); - - i++; - } - - /* - * Create a Files with all rwx for others group and user. Verify - * the created file. - */ - - printf("create /b/my_file\n"); - fd = open ("/b/my_file", O_CREAT, S_IRWXU|S_IRWXG|S_IRWXO); - assert( fd != 0 ); - close (fd); - - printf("Verify /b/my_file\n"); - fd = open("/b/my_file", S_IRWXU|S_IRWXG|S_IRWXO); - assert( fd != 0 ); - close( fd ); - - - printf("create c/y/my_mount_point/my_dir/d\n"); - fd = open ("c/y/my_mount_point/my_dir/d", O_CREAT, S_IRWXU|S_IRWXG|S_IRWXO); - assert( fd != 0 ); - close (fd); - - printf("Verify c/y/my_mount_point/my_dir/d\n"); - fd = open("c/y/my_mount_point/my_dir/d", S_IRWXU|S_IRWXG|S_IRWXO); - assert( fd != 0 ); - close( fd ); - - /* - * Mount an the IMFS file system on the base file system. - */ - - printf("Attempting to mount IMFS file system at /c/z/my_mount_point \n"); - status = mount( - &mt_entry, - &IMFS_ops, - RTEMS_FILESYSTEM_READ_WRITE, - NULL, - mount_point_string ); - assert( status == 0 ); - if( mt_entry == NULL ){ - printf(" NULL mount table entry was returned\n"); - } - else { - printf("2nd file system successfully mounted at /c/z/my_mount_point \n"); - } - - /* - * Change directory to the mount point and create a group of files under - * the mounted file system. - */ - - printf( "\nchdir to /c/z/my_mount_point.\n" ); - status = chdir( "/c/z/my_mount_point" ); - printf( "chdir() status : %d\n\n", status ); - - printf( "\nCreating a series of directories under /c/z/my_mount_point\n" ); - i=0; - while ( strcmp(fnames[i], "END") != 0 ) - { - status = mkdir( fnames[i], 0777 ); - printf("Creating: %46s %d %d ", fnames[i], status, errno ); - if ( status == 0 ) - printf(" Success\n"); - else { - printf(" Failure\n"); - perror("errno"); - } - - status = stat( fnames[i], &statbuf ); - if ( status == -1 ) - printf( ": %s\n", strerror( errno ) ); - - i++; - } - - printf( "\nchdir to /\n" ); - status = chdir( "/" ); - printf( "chdir() status : %d\n\n", status ); - - /* - * Unmount the first file system we mounted - */ - - printf( "Unmount status:"); - status = unmount( "/c/z/my_mount_point" ); - printf( " %d\n", status ); - - - /* - * Mount a NULL filesystem and verify it fails. - */ - - printf("Mount a NULL file system and verify EINVAL\n"); - status = mount( - &mt_entry, - NULL, - RTEMS_FILESYSTEM_READ_WRITE, - NULL, - mount_point_string ); - assert( status == -1 ); - assert( errno == EINVAL ); - - /* - * Verify mount with option of -62 fails with EINVAL - */ - - printf("mount with option of -62 should fail with EINVAL\n"); - status = mount( - &mt_entry, - &IMFS_ops, - -62, - NULL, - "/c/y/my_mount_point" ); - assert( status == -1 ); - assert( errno == EINVAL ); - - /* - * Mount a Read Only File system. - */ - - printf("Mount a Read Only filesystem at /c/y/my_mount_point \n"); - status = mount( - &mt_entry, - &IMFS_ops, - RTEMS_FILESYSTEM_READ_ONLY, - NULL, - "/c/y/my_mount_point" ); - assert( status == 0 ); - if( mt_entry == NULL ){ - printf(" NULL mount table entry was returned\n"); - } - else { - printf("Read only file system successfully mounted at /c/y/my_mount_point \n"); - } - - /* - * Create a directory that passes through the read only file system. - */ - - printf("create c/y/my_mount_point/../../y/my_mount_point/new_dir\n"); - status = mkdir("c/y/my_mount_point/../../y/my_mount_point/new_dir",S_IRWXU ); - assert( status == 0 ); - status = stat("c/y/my_mount_point/../../y/my_mount_point/new_dir",&statbuf ); - assert( status == 0 ); - status = stat("c/y/my_mount_point/new_dir/..", &statbuf ); - assert( status == 0 ); - - /* - * Attempt to mount a second file system at a used mount point. - */ - - printf("Verify a mount point returns EBUSY for another mount\n"); - status = mount( - &mt_entry, - &IMFS_ops, - RTEMS_FILESYSTEM_READ_ONLY, - NULL, - "/c/y/my_mount_point" ); - assert( status == -1 ); - assert( errno == EBUSY); - - /* - * Attempt to mount at a file. - */ - - printf("Mount on a file should fail with ENOTDIR\n"); - status = mount( - &mt_entry, - &IMFS_ops, - RTEMS_FILESYSTEM_READ_ONLY, - NULL, - "/b/my_file" ); - assert( status == -1 ); - assert( errno == ENOTDIR ); - - - /* - * Verify we cannot unmount a file system while we are in it. - */ - - printf("Create and chdir to /c/y/my_mount_point/mydir\n"); - status = mkdir( "/c/y/my_mount_point/mydir", 0777); - assert( status == 0 ); - - status = chdir( "/c/y/my_mount_point/mydir" ); - assert( status == 0 ); - - printf("unmount of /c/y/my_mount_point should fail with EBUSY\n"); - status = unmount( "/c/y/my_mount_point" ); - assert( status == -1 ); - assert( errno == EBUSY ); - - /* - * Chdir to root and verify we can unmount the file system now. - */ - - printf("chdir to / and verify we can unmount /c/y/my_mount_point\n"); - status = chdir( "/" ); - assert( status == 0 ); - - printf("unmount /c/y/my_mount_point \n"); - status = unmount( "/c/y/my_mount_point" ); - assert( status == 0 ); - - /* - * Attempt to unmount a directory that does not exist. - */ - - printf("unmount /b/mount_point should fail with EINVAL\n"); - status = unmount( "/b/mount_point" ); - assert( status == -1 ); - assert( errno == ENOENT ); - - /* - * Remount the filesystem. - */ - - printf("Mount /c/y/my_mount_point\n"); - status = mount( - &mt_entry, - &IMFS_ops, - RTEMS_FILESYSTEM_READ_ONLY, - NULL, - "/c/y/my_mount_point" ); - assert( status == 0 ); - - /* - * Create a file and directory then open the directory. - * Verify unmount will return EBUSY while directory is open. - */ - - printf("Create and open /c/y/my_mount_point/my_file\n"); - fd = open( "/c/y/my_mount_point/my_file", O_CREAT, S_IRWXU|S_IRWXG|S_IRWXO); - assert( fd != -1 ); - status = close( fd ); - assert( status == 0 ); - - printf("\nmkdir /c/y/my_mount_point/my_dir\n"); - status = mkdir( "/c/y/my_mount_point/my_dir", 0x1c0 ); - printf("Open /c/y/my_mount_point/my_dir\n"); - directory = opendir( "/c/y/my_mount_point/my_dir" ); - assert( directory ); - - printf("Unmount /c/y/my_mount_point should fail with EBUSY\n"); - status = unmount( "/c/y/my_mount_point" ); - assert( status == -1 ); - assert( errno == EBUSY ); - - printf("Close /c/y/my_mount_point/my_dir\n"); - status = closedir( directory ); - assert( status == 0 ); - - /* - * Attempt to unmount a directory that is not a mount point. - */ - - printf("Unmount /c/y/my_mount_point/my_dir should fail with EACCES\n"); - status = unmount( "/c/y/my_mount_point/my_dir" ); - assert( status == -1 ); - assert( errno == EACCES ); - - /* - * Verify a file system can not be unmounted with a mounted file system - * in it. - */ - - printf("Mount a file system at /c/y/my_mount_point/my_dir\n"); - status = mount( - &mt_entry, - &IMFS_ops, - RTEMS_FILESYSTEM_READ_WRITE, - NULL, - "/c/y/my_mount_point/my_dir"); - assert( status == 0 ); - - printf("unmount /c/y/my_mount_point should fail with EBUSY\n"); - status = unmount( "/c/y/my_mount_point" ); - assert( status == -1 ); - assert( errno == EBUSY ); - - /* - * Verify you cannot create a hard link across mounted file systems. - */ - - printf("Verify a hard link across filesystems fails with EXDEV\n"); - status = mkdir( "/c/y/my_mount_point/my_dir2", S_IRWXU ); - assert( status == 0 ); - - status = link( "/c/y/my_mount_point/my_dir2", "/c/y/my_mount_point/my_dir/my_link" ); - assert( status == -1 ); - assert( errno == EXDEV ); - - /* - * Create a symbolic link across mountpoints. - */ - - printf("Verify a symbolic link across file systems works\n"); - status = symlink( "/c/y/my_mount_point/my_dir2", "/c/y/my_mount_point/my_dir/my_link" ); - assert( status == 0 ); - status = stat( "/c/y/my_mount_point/my_dir/my_link", &statbuf ); - assert( status == 0 ); - - printf("unmount /c/y/my_mount_point/my_dir\n"); - status = unmount( "/c/y/my_mount_point/my_dir" ); - assert( status == 0 ); - - /* - * Verify symblic link no longer works. - */ - - printf("Verify the symbolic link now fails\n"); - status = stat( "/c/y/my_mount_point/my_dir/my_link", &statbuf ); - assert( status != 0 ); - - printf("unmount /c/y/my_mount_point\n"); - status = unmount( "/c/y/my_mount_point" ); - assert( status == 0 ); - - printf( "\n\n*** END OF MOUNT/UNMOUNT TEST ***\n" ); - rtems_test_exit(0); -} - diff --git a/c/src/tests/psxtests/psxmsgq01/.cvsignore b/c/src/tests/psxtests/psxmsgq01/.cvsignore deleted file mode 100644 index 282522db03..0000000000 --- a/c/src/tests/psxtests/psxmsgq01/.cvsignore +++ /dev/null @@ -1,2 +0,0 @@ -Makefile -Makefile.in diff --git a/c/src/tests/psxtests/psxmsgq01/Makefile.am b/c/src/tests/psxtests/psxmsgq01/Makefile.am deleted file mode 100644 index ae8e8e247a..0000000000 --- a/c/src/tests/psxtests/psxmsgq01/Makefile.am +++ /dev/null @@ -1,44 +0,0 @@ -## -## $Id$ -## - - -TEST = psxmsgq01 - -MANAGERS = all - -C_FILES = init.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/psxmsgq01/init.c b/c/src/tests/psxtests/psxmsgq01/init.c deleted file mode 100644 index 26fca6c738..0000000000 --- a/c/src/tests/psxtests/psxmsgq01/init.c +++ /dev/null @@ -1,1315 +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 -#include -#include -#include -#include /* signal facilities */ - -typedef struct { - char msg[ 50 ]; - int size; - unsigned int priority; -}Test_Message_t; -Test_Message_t Predefined_Msgs[MAXMSG+1]; -Test_Message_t Predefined_Msgs[MAXMSG+1] = { - { "12345678", 9, MQ_PRIO_MAX-1 }, /* Max Length Message med */ - { "", 1, 1 }, /* NULL Message low */ - { "Last", 5, MQ_PRIO_MAX }, /* Queue Full Message hi */ - { "No Message", 0, MQ_PRIO_MAX-1 }, /* 0 length Message med */ - { "1", 2, 0 }, /* Cause Overflow Behavior */ -}; -int Priority_Order[MAXMSG+1] = { 2, 0, 3, 1, MAXMSG }; - - -typedef struct { - mqd_t mq; - Test_Queue_Types index; - char *name; - int oflag; - int maxmsg; - int msgsize; - int count; -} Test_queue_type; - -Test_queue_type Test_q[ NUMBER_OF_TEST_QUEUES ] = -{ - { 0, 0, "Qread", ( O_CREAT | O_RDONLY | O_NONBLOCK ), MAXMSG, MSGSIZE, 0 }, - { 0, 1, "Qwrite", ( O_CREAT | O_WRONLY | O_NONBLOCK ), MAXMSG, MSGSIZE, 0 }, - { 0, 2, "Qnoblock", ( O_CREAT | O_RDWR | O_NONBLOCK ), MAXMSG, MSGSIZE, 0 }, - { 0, 3, "Qblock", ( O_CREAT | O_RDWR ) , MAXMSG, MSGSIZE, 0 }, - { 0, 4, "Qdefault", ( O_CREAT | O_RDWR ) , 10, 16, 0 }, - { 0, 5, "mq6", ( O_CREAT | O_WRONLY | O_NONBLOCK ), MAXMSG, MSGSIZE, 0 }, -}; - -#define RW_NAME Test_q[ RW_QUEUE ].name -#define DEFAULT_NAME Test_q[ DEFAULT_RW ].name -#define RD_NAME Test_q[ RD_QUEUE ].name -#define WR_NAME Test_q[ WR_QUEUE ].name -#define BLOCKING_NAME Test_q[ BLOCKING ].name -#define CLOSED_NAME Test_q[ CLOSED ].name - -#define RW_ATTR Test_q[ RW_QUEUE ].oflag -#define DEFAULT_ATTR Test_q[ DEFAULT_RW ].oflag -#define RD_ATTR Test_q[ RD_QUEUE ].oflag -#define WR_ATTR Test_q[ WR_QUEUE ].oflag -#define BLOCK_ATTR Test_q[ BLOCKING ].oflag -#define CLOSED_ATTR Test_q[ CLOSED ].oflag - -/* - * Outputs a header at each test section. - */ -void Start_Test( - char *description -) -{ - printf( "_______________%s\n", description ); -} - - -void Validate_attributes( - mqd_t mq, - int oflag, - int msg_count -) -{ - int status; - struct mq_attr attr; - - status = mq_getattr( mq, &attr ); - fatal_posix_service_status( status, 0, "mq_getattr valid return status"); - - if ( mq != Test_q[ DEFAULT_RW ].mq ){ - fatal_int_service_status((int)attr.mq_maxmsg, MAXMSG, "maxmsg attribute" ); - fatal_int_service_status((int)attr.mq_msgsize,MSGSIZE,"msgsize attribute"); - } - - fatal_int_service_status((int)attr.mq_curmsgs, msg_count, "count attribute" ); - fatal_int_service_status((int)attr.mq_flags, oflag, "flag attribute" ); -} - -char Queue_Name[PATH_MAX + 2]; -#define Get_Queue_Name( i ) Test_q[i].name - -char *Build_Queue_Name( int i ) { - sprintf(Queue_Name,"mq%d", i+1 ); - return Queue_Name; -} - -char *Get_Too_Long_Name() -{ - int i; - - for ( i=0; i< PATH_MAX+1; i++ ) - Queue_Name[i] = 'N'; - Queue_Name[i] = '\0'; - return Queue_Name; -} - - -void open_test_queues() -{ - struct mq_attr attr; - int status; - Test_queue_type *tq; - int que; - - attr.mq_maxmsg = MAXMSG; - attr.mq_msgsize = MSGSIZE; - - puts( "Init: Open Test Queues" ); - - for( que = 0; que < NUMBER_OF_TEST_QUEUES; que++ ) { - - tq = &Test_q[ que ]; - if ( que == DEFAULT_RW) - Test_q[que].mq = mq_open( tq->name, tq->oflag, 0x777, NULL ); - else - Test_q[que].mq = mq_open( tq->name, tq->oflag, 0x777, &attr ); - - assert( Test_q[que].mq != (-1) ); - } - - status = mq_close( Test_q[CLOSED].mq ); - fatal_posix_service_status( status, 0, "mq_close message queue"); - status = mq_unlink( CLOSED_NAME ); - fatal_posix_service_status( status, 0, "mq_unlink message queue"); -} - -/* - * Opens CONFIGURE_MAXIMUM_POSIX_MESSAGE_QUEUES then leaves size queues - * opened but closes the rest. - */ - -void validate_mq_open_error_codes() -{ - int i; - mqd_t n_mq2; - struct mq_attr attr; - int status; - mqd_t open_mq[CONFIGURE_MAXIMUM_POSIX_MESSAGE_QUEUES + 1]; - - attr.mq_maxmsg = MAXMSG; - attr.mq_msgsize = MSGSIZE; - - Start_Test( "mq_open errors" ); - - /* - * XXX EINVAL - inappropriate name was given for the message queue - */ - - /* - * EINVAL - Create with negative maxmsg. - */ - - attr.mq_maxmsg = -1; - puts( "Init: mq_open - Create with maxmsg (-1) (EINVAL)" ); - n_mq2 = mq_open( "mq2", O_CREAT | O_RDONLY, 0x777, &attr); - fatal_posix_service_status( - (int) n_mq2, (int ) (-1), "mq_open error return status" ); - fatal_posix_service_status( errno, EINVAL, "mq_open errno EINVAL"); - attr.mq_maxmsg = MAXMSG; - - /* - * EINVAL - Create withnegative msgsize. - */ - - attr.mq_msgsize = -1; - puts( "Init: mq_open - Create with msgsize (-1) (EINVAL)" ); - n_mq2 = mq_open( "mq2", O_CREAT | O_RDONLY, 0x777, &attr); - fatal_posix_service_status( - (int) n_mq2, (int ) (-1), "mq_open error return status" ); - fatal_posix_service_status( errno, EINVAL, "mq_open errno EINVAL"); - attr.mq_msgsize = MSGSIZE; - - /* - * ENOENT - Open a non-created file. - */ - - puts( "Init: mq_open - Open new mq without create flag (ENOENT)" ); - n_mq2 = mq_open( "mq3", O_EXCL | O_RDONLY, 0x777, NULL); - fatal_posix_service_status( - (int) n_mq2, (int ) (-1), "mq_open error return status" ); - fatal_posix_service_status( errno, ENOENT, "mq_open errno ENOENT"); - - /* - * XXX EINTR - call was interrupted by a signal - */ - - /* - * ENAMETOOLONG - Give a name greater than PATH_MAX. - */ - - puts( "Init: mq_open - Open with too long of a name (ENAMETOOLONG)" ); - n_mq2 = mq_open( Get_Too_Long_Name(), O_CREAT | O_RDONLY, 0x777, NULL ); - fatal_posix_service_status( - (int) n_mq2, (int ) (-1), "mq_open error return status" ); - fatal_posix_service_status( errno, ENAMETOOLONG, "mq_open errno ENAMETOOLONG"); - - /* - * XXX - ENAMETOOLONG - Give a name greater than NAME_MAX - * Per implementation not possible. - */ - - /* - * EEXIST - Create an existing queue. - */ - - puts( "Init: mq_open - Create an Existing mq (EEXIST)" ); - open_mq[0] = mq_open( - Build_Queue_Name(0), O_CREAT | O_RDWR | O_NONBLOCK, 0x777, NULL ); - assert( open_mq[0] != (-1) ); - - n_mq2 = mq_open( - Build_Queue_Name(0), O_CREAT | O_EXCL | O_RDONLY, 0x777, NULL); - fatal_posix_service_status( - (int) n_mq2, (int ) (-1), "mq_open error return status" ); - fatal_posix_service_status( errno, EEXIST, "mq_open errno EEXIST"); - - status = mq_unlink( Build_Queue_Name(0) ); - fatal_posix_service_status( status, 0, "mq_unlink message queue"); - - status = mq_close( open_mq[0]); - fatal_posix_service_status( status, 0, "mq_close message queue"); - - /* - * Open maximum number of message queues - */ - - puts( "Init: mq_open - SUCCESSFUL" ); - for (i = 0; i < CONFIGURE_MAXIMUM_POSIX_MESSAGE_QUEUES; i++) { - open_mq[i] = mq_open( - Build_Queue_Name(i), O_CREAT | O_RDWR | O_NONBLOCK, 0x777, NULL ); - assert( open_mq[i] != (-1) ); - assert( open_mq[i] ); - /*XXX - Isn't there a more general check */ -/* JRS printf( "mq_open 0x%x %s\n", open_mq[i], Build_Queue_Name(i) ); */ - } - - /* - * XXX EACCES - permission to create is denied. - */ - - /* - * XXX EACCES - queue exists permissions specified by o_flag are denied. - */ - - /* - * XXX EMFILE - Too many message queues in use by the process - */ - - /* - * ENFILE - Too many message queues open in the system - */ - - puts( "Init: mq_open - system is out of resources (ENFILE)" ); - n_mq2 = mq_open( Build_Queue_Name(i), O_CREAT | O_RDONLY, 0x777, NULL ); - fatal_posix_service_status( - (int) n_mq2, (int ) (-1), "mq_open error return status" ); - fatal_posix_service_status( errno, ENFILE, "mq_open errno ENFILE"); - - /* - * Unlink and Close all queues. - */ - - puts( "Init: mq_close and mq_unlink (mq3...mqn) - SUCCESSFUL" ); - for (i = 0; i < CONFIGURE_MAXIMUM_POSIX_MESSAGE_QUEUES; i++) { - - status = mq_close( open_mq[i]); - fatal_posix_service_status( status, 0, "mq_close message queue"); - - status = mq_unlink( Build_Queue_Name(i) ); - if ( status == -1 ) - perror( "mq_unlink" ); - fatal_posix_service_status( status, 0, "mq_unlink message queue"); - /* JRS printf( "mq_close/mq_unlink 0x%x %s\n", open_mq[i], Build_Queue_Name(i) ); */ - } -} - -void validate_mq_unlink_error_codes() -{ - int status; - - Start_Test( "mq_unlink errors" ); - - /* - * XXX - EACCES Permission Denied - */ - - /* - * ENAMETOOLONG - Give a name greater than PATH_MAX. - */ - - puts( "Init: mq_unlink - mq_unlink with too long of a name (ENAMETOOLONG)" ); - status = mq_unlink( Get_Too_Long_Name() ); - fatal_posix_service_status( status, -1, "mq_unlink error return status"); - fatal_posix_service_status( errno, ENAMETOOLONG, "mq_unlink errno ENAMETOOLONG"); - - /* - * XXX - ENAMETOOLONG - Give a name greater than NAME_MAX - * Per implementation not possible. - */ - - /* - * ENOENT - Unlink an unopened queue - */ - - puts( "Init: mq_unlink - A Queue not opened (ENOENT)" ); - status = mq_unlink( CLOSED_NAME ); - fatal_posix_service_status( status, -1, "mq_unlink error return status"); - fatal_posix_service_status( errno, ENOENT, "mq_unlink errno ENOENT"); - - /* - * XXX - The following were not listed in the POSIX document as - * possible errors. Under other commands the EINVAL is - * given for these conditions. - */ - - /* - * EINVAL - Unlink a queue with no name - */ - - puts( "Init: mq_unlink (NULL) - EINVAL" ); - status = mq_unlink( NULL ); - fatal_posix_service_status( status, -1, "mq_unlink error return status"); - fatal_posix_service_status( errno, EINVAL, "mq_unlink errno value"); - - /* - * EINVAL - Unlink a queue with a null name - */ - - puts( "Init: mq_unlink (\"\") - EINVAL" ); - status = mq_unlink( "" ); - fatal_posix_service_status( status, -1, "mq_unlink error return status"); - fatal_posix_service_status( errno, EINVAL, "mq_unlink errno value"); -} - -void validate_mq_close_error_codes() -{ - int status; - - Start_Test( "mq_close errors" ); - - /* - * EBADF - Close a queue that is not open. - */ - - puts( "Init: mq_close - unopened queue (EBADF)" ); - status = mq_close( Test_q[CLOSED].mq ); - fatal_posix_service_status( status, -1, "mq_close error return status"); - fatal_posix_service_status( errno, EBADF, "mq_close errno EBADF"); -} - - -void validate_mq_getattr_error_codes() -{ - struct mq_attr attr; - int status; - - Start_Test( "mq_getattr errors" ); - - /* - * EBADF - Get the attributes from a closed queue. - */ - - puts( "Init: mq_getattr - unopened queue (EBADF)" ); - status = mq_getattr( Test_q[CLOSED].mq, &attr ); - fatal_posix_service_status( status, -1, "mq_close error return status"); - fatal_posix_service_status( errno, EBADF, "mq_close errno EBADF"); - - /* - * XXX - The following are not listed in the POSIX manual but - * may occur. - */ - - /* - * EINVAL - NULL attributes - */ - - puts( "Init: mq_getattr - NULL attributes (EINVAL)" ); - status = mq_getattr( Test_q[RW_QUEUE].mq, NULL ); - fatal_posix_service_status( status, -1, "mq_close error return status"); - fatal_posix_service_status( errno, EINVAL, "mq_close errno EINVAL"); - -} - - -void Send_msg_to_que( - int que, - int msg -) -{ - Test_Message_t *ptr = &Predefined_Msgs[msg]; - int status; - - status = mq_send( Test_q[que].mq, ptr->msg, ptr->size , ptr->priority ); - fatal_posix_service_status( status, 0, "mq_send valid return status"); - Test_q[que].count++; -} - -void Show_send_msg_to_que( - char *task_name, - int que, - int msg -) -{ - Test_Message_t *ptr = &Predefined_Msgs[msg]; - printf( "%s mq_send - to %s msg: %s priority %d\n", - task_name, Test_q[que].name, ptr->msg, ptr->priority); - Send_msg_to_que( que, msg ); -} - -void verify_queues_full( - char *task_name -) -{ - int que; - - /* - * Validate that the queues are full. - */ - - printf( "%s Verify Queues are full\n", task_name ); - for( que = RW_QUEUE; que < CLOSED; que++ ) - Validate_attributes( Test_q[que].mq, Test_q[que].oflag, Test_q[que].count ); - -} -void verify_queues_empty( - char *task_name -) -{ - int que; - - printf( "%s Verify Queues are empty\n", task_name ); - for( que = RW_QUEUE; que < CLOSED; que++ ) - Validate_attributes( Test_q[que].mq, Test_q[que].oflag, 0 ); -} - -int fill_message_queues( - char *task_name -) -{ - int msg; - int que; - - - verify_queues_empty( task_name ); - - /* - * Fill Queue with predefined messages. - */ - - printf( "%s Fill Queues with messages\n", task_name ); - for(msg=0; msgmsg ); - fatal_int_service_status( status, ptr->size, err_msg ); - - assert( !strcmp( message, ptr->msg ) ); - strcpy( message, "No Message" ); - - sprintf( err_msg,"%s msg %s size failure", Test_q[ que ].name, ptr->msg ); - fatal_int_service_status(priority, ptr->priority, err_msg ); -} - -int empty_message_queues( - char *task_name -) -{ - int que; - int i; - - printf( "%s Empty all Queues\n", task_name ); - for( que = RW_QUEUE; que < CLOSED; que++ ) { - for(i=0; Test_q[que].count != 0; i++ ) - Read_msg_from_que( que, Priority_Order[i] ); - - Validate_attributes( Test_q[ que].mq, Test_q[ que ].oflag, 0 ); - } - return 0; -} - -/* - * Returns the number of messages queued after the test on the - * first queue. - */ - -int validate_mq_send_error_codes( ) -{ - int status; - int i; - char *str; - - Start_Test( "mq_send errors" ); - - /* - * EBADF - Write to a closed queue. - */ - - puts( "Init: mq_send - Closed message queue (EBADF)" ); - status = mq_send( Test_q[CLOSED].mq, "", 1, 0 ); - fatal_posix_service_status( status, -1, "mq_send error return status"); - fatal_posix_service_status( errno, EBADF, "mq_send errno EBADF"); - - /* - * EBADF - Write to a read only queue. - */ - - puts( "Init: mq_send - Read only message queue (EBADF)" ); - status = mq_send( Test_q[ RD_QUEUE ].mq, "", 1, 0 ); - fatal_posix_service_status( status, -1, "mq_send error return status"); - fatal_posix_service_status( errno, EBADF, "mq_send errno EBADF"); - - /* - * XXX - EINTR Signal interrupted the call. - * - puts( "Init: mq_send - UNSUCCESSFUL (EINTR)" ); - status = mq_send( Test_q, "", 0xffff, 0 ); - fatal_posix_service_status( status, -1, "mq_send error return status"); - fatal_posix_service_status( errno, E, "mq_send errno E"); - */ - - /* - * EINVAL priority is out of range. - */ - - puts( "Init: mq_send - Priority out of range (EINVAL)" ); - status = mq_send( Test_q[ RW_QUEUE ].mq, "", 1, MQ_PRIO_MAX + 1 ); - fatal_posix_service_status( status, -1, "mq_send error return status"); - fatal_posix_service_status( errno, EINVAL, "mq_send errno EINVAL"); - - /* - * EMSGSIZE - Message size larger than msg_len - * Validates that msgsize is stored correctly. - */ - - puts( "Init: mq_send - Message longer than msg_len (EMSGSIZE)" ); - status = mq_send( Test_q[ RW_QUEUE ].mq, "", MSGSIZE+1, 0 ); - fatal_posix_service_status( status, -1, "mq_send error return status"); - fatal_posix_service_status( errno, EMSGSIZE, "mq_send errno EMSGSIZE"); - - i = fill_message_queues( "Init:" ); - - /* - * ENOSYS - send not supported - puts( "Init: mq_send - Blocking Queue overflow (ENOSYS)" ); - status = mq_send( n_mq1, Predefined_Msgs[i], 0, 0 ); - fatal_posix_service_status( status, -1, "mq_send error return status"); - fatal_posix_service_status( errno, EBADF, "mq_send errno EBADF"); - - status = mq_close( n_mq1 ); - fatal_posix_service_status( status, 0, "mq_close message queue"); - - status = mq_unlink( "read_only" ); - fatal_posix_service_status( status, 0, "mq_unlink message queue"); - */ - - /* - * EAGAIN - O_NONBLOCK and message queue is full. - */ - - puts( "Init: mq_send - on a FULL non-blocking queue with (EAGAIN)" ); - str = Predefined_Msgs[i].msg; - status = mq_send(Test_q[RW_QUEUE].mq, str, 0, 0 ); - fatal_posix_service_status( status, -1, "mq_send error return status"); - fatal_posix_service_status( errno, EAGAIN, "mq_send errno EAGAIN"); - - return i-1; -} - -void validate_mq_receive_error_codes( ) -{ - int status; - char message[100]; - unsigned int priority; - - Start_Test( "mq_receive errors" ); - - /* - * EBADF - Not A Valid Message Queue - */ - - puts( "Init: mq_receive - Unopened message queue (EBADF)" ); - status = mq_receive( Test_q[CLOSED].mq, message, 100, &priority ); - fatal_posix_service_status( status, -1, "mq_ error return status"); - fatal_posix_service_status( errno, EBADF, "mq_receive errno EBADF"); - - /* - * EBADF - Queue not opened to read - */ - - puts( "Init: mq_receive - Write only queue (EBADF)" ); - status = mq_receive( Test_q[WR_QUEUE].mq, message, 100, &priority ); - fatal_posix_service_status( status, -1, "mq_ error return status"); - fatal_posix_service_status( errno, EBADF, "mq_receive errno EBADF"); - - /* - * EMSGSIZE - Size is less than the message size attribute - */ - - puts( "Init: mq_receive - Size is less than the message (EMSGSIZE)" ); - status = mq_receive( - Test_q[RW_QUEUE].mq, message, Predefined_Msgs[0].size-1, &priority ); - fatal_posix_service_status( status, -1, "mq_ error return status"); - fatal_posix_service_status( errno, EMSGSIZE, "mq_receive errno EMSGSIZE"); - - - /* - * EAGAIN - O_NONBLOCK and Queue is empty - */ - verify_queues_full( "Init:" ); - empty_message_queues( "Init:" ); - - puts( "Init: mq_receive - Queue is empty (EAGAIN)" ); - status = mq_receive( Test_q[RW_QUEUE].mq, message, 100, &priority ); - fatal_posix_service_status( status, -1, "mq_ error return status"); - fatal_posix_service_status( errno, EAGAIN, "mq_receive errno EAGAIN"); - - /* - * XXX - EINTR - Interrupted by a signal - */ - - /* - * XXX - EBADMSG - a data corruption problem. - */ - - /* - * XXX - ENOSYS - mq_receive not supported - */ -} - -void verify_open_functionality() -{ -#if 0 - mqd_t n_mq; -#endif - - Start_Test( "mq_open functionality" ); - - /* - * Validate a second open returns the same message queue. - */ - -#if 0 - puts( "Init: mq_open - Open an existing mq ( same id )" ); - n_mq = mq_open( RD_NAME, 0 ); - fatal_posix_service_status( - (int) n_mq, (int ) Test_q[RD_QUEUE].mq, "mq_open error return status" ); -#endif -} - -void verify_unlink_functionality() -{ - mqd_t n_mq; - int status; - - Start_Test( "mq_unlink functionality" ); - - /* - * Unlink the message queue, then verify an open of the same name produces a - * different message queue. - */ - - puts( "Init: Unlink and Open without closing SUCCESSFUL" ); - status = mq_unlink( DEFAULT_NAME ); - fatal_posix_service_status( status, 0, "mq_unlink locked message queue"); - - n_mq = mq_open( DEFAULT_NAME, DEFAULT_ATTR, 0x777, NULL ); - assert( n_mq != (-1) ); - assert( n_mq != Test_q[ DEFAULT_RW ].mq ); - - - status = mq_unlink( DEFAULT_NAME ); - fatal_posix_service_status( status, 0, "mq_unlink locked message queue"); - status = mq_close( Test_q[ DEFAULT_RW ].mq ); - fatal_posix_service_status( status, 0, "mq_close message queue"); - - Test_q[ DEFAULT_RW ].mq = n_mq; -} - -void verify_close_functionality() -{ - int i; - int status; - Start_Test( "Unlink and Close All Files" ); - for (i=0; imsg, ptr->size , ptr->priority ); - fatal_posix_service_status( status, -1, "mq_send error return status"); - fatal_posix_service_status( errno, EBADF, "mq_send errno EBADF"); - -} - -void validate_mq_setattr() -{ - struct mq_attr attr; - struct mq_attr save_attr[ NUMBER_OF_TEST_QUEUES ]; - int status; - int i; - - /* - * EBADF - Get the attributes from a closed queue. - */ - - puts( "Task1:mq_setattr - unopened queue (EBADF)" ); - status = mq_setattr( Test_q[CLOSED].mq, &attr, NULL ); - fatal_posix_service_status( status, -1, "mq_setattr error return status"); - fatal_posix_service_status( errno, EBADF, "mq_setattr errno EBADF"); - - /* - * XXX - The following are not listed in the POSIX manual but - * may occur. - */ - - /* - * EINVAL - NULL attributes - */ - - puts( "Task1:mq_setattr - NULL attributes (EINVAL)" ); - status = mq_setattr( Test_q[RW_QUEUE].mq, NULL, NULL ); - fatal_posix_service_status( status, -1, "mq_setattr error return status"); - fatal_posix_service_status( errno, EINVAL, "mq_setattr errno EINVAL"); - - /* - * Verify change queues to blocking, by verifying all queues block - * for a timed receive. - */ - - puts( "Init: set_attr all queues to blocking" ); - for(i=0; i -#include -#include -#include -#include - -void *POSIX_Init( - void *argument -); - -void *Task_1_through_3( - void *argument -); - -/* configuration information */ - -#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER -#define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER - -#define CONFIGURE_POSIX_INIT_THREAD_TABLE - -#define CONFIGURE_MAXIMUM_POSIX_THREADS 5 -#define CONFIGURE_MAXIMUM_POSIX_MESSAGE_QUEUES 10 -#define CONFIGURE_MAXIMUM_POSIX_TIMERS 4 -#define CONFIGURE_MAXIMUM_TIMERS 4 - -#define CONFIGURE_POSIX_INIT_THREAD_TABLE -#define CONFIGURE_POSIX_INIT_THREAD_STACK_SIZE \ - (RTEMS_MINIMUM_STACK_SIZE * 10) - -#include - -/* global variables */ - -TEST_EXTERN pthread_t Init_id; -TEST_EXTERN pthread_t Task_id; - -#define MSGSIZE 9 -#define MAXMSG 4 - -typedef enum { - RD_QUEUE, /* Read only queue */ - WR_QUEUE, /* Write only queue */ - RW_QUEUE, /* Read Write non-blocking queue */ - BLOCKING, /* Read Write blocking queue */ - DEFAULT_RW, /* default must be last */ - CLOSED, /* Created and closed queue */ - NUMBER_OF_TEST_QUEUES -} Test_Queue_Types; -extern int Priority_Order[MAXMSG+1]; -void *Task_1 ( void *argument ); -void *Task_2( void *argument ); -void *Task_3( void *argument ); -void *Task_4( void *argument ); - -/* end of include file */ - - diff --git a/c/src/tests/psxtests/psxreaddir/.cvsignore b/c/src/tests/psxtests/psxreaddir/.cvsignore deleted file mode 100644 index 282522db03..0000000000 --- a/c/src/tests/psxtests/psxreaddir/.cvsignore +++ /dev/null @@ -1,2 +0,0 @@ -Makefile -Makefile.in diff --git a/c/src/tests/psxtests/psxreaddir/Makefile.am b/c/src/tests/psxtests/psxreaddir/Makefile.am deleted file mode 100644 index 1145a5960d..0000000000 --- a/c/src/tests/psxtests/psxreaddir/Makefile.am +++ /dev/null @@ -1,41 +0,0 @@ -## -## $Id$ -## - - -TEST = psxreaddir - -MANAGERS = all - -C_FILES = main.c test.c -C_O_FILES = $(C_FILES:%.c=${ARCH}/%.$(OBJEXT)) - -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/psxreaddir/main.c b/c/src/tests/psxtests/psxreaddir/main.c deleted file mode 100644 index 4ce4bae422..0000000000 --- a/c/src/tests/psxtests/psxreaddir/main.c +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Simple test program -- simplified version of sample test hello. - */ - -#define TEST_INIT - -#include -#include - -void test_main( void ); - -rtems_task Init( - rtems_task_argument ignored -) -{ - test_main(); - rtems_test_exit( 0 ); -} - -/* configuration information */ - -#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER - -#define CONFIGURE_USE_IMFS_AS_BASE_FILESYSTEM -#define CONFIGURE_LIBIO_MAXIMUM_FILE_DESCRIPTORS 10 - -#define CONFIGURE_MAXIMUM_TASKS 1 - -#define CONFIGURE_RTEMS_INIT_TASKS_TABLE - -#define CONFIGURE_INIT - -#include - -/* end of file */ diff --git a/c/src/tests/psxtests/psxreaddir/psxreaddir.scn b/c/src/tests/psxtests/psxreaddir/psxreaddir.scn deleted file mode 100644 index 5259773924..0000000000 --- a/c/src/tests/psxtests/psxreaddir/psxreaddir.scn +++ /dev/null @@ -1,236 +0,0 @@ -*** READDIR TEST *** -chdir to the root directory -chdir() status : 0 -Creating a series of directories under / -Creating directory: a 0 0 Success -Creating directory: b 0 0 Success -Creating directory: c 0 0 Success -Creating directory: d 0 0 Success -Creating directory: e 0 0 Success -Creating directory: f 0 0 Success -Creating directory: c/y 0 0 Success -Creating directory: c/z 0 0 Success -Creating directory: c/x 0 0 Success -Creating directory: c/y/a3333 0 0 Success -Creating directory: c/y/j123 0 0 Success -Create a lot of files -Create a -Create b -Create c -Create d -Create e -Create f -Create g -Create h -Create i -Create j -Create k -Create l -Create m -Create n -Create o -Create p -Create q -Create r -Create s -Create t -Create u -Create v -Create w -Create x -Create y -Create z -Create aa -Create ab -Create ac -Create ad -Create ae -Create af -Create ag -Create ah -Create ai -Create aj -Create ak -Create al -Create am -Create an -Create ao -Create ap -Create aq -Create ar -Open /many and print the directory -name inode offset reclen type -a 17 0 268 0x010c -b 18 268 268 0x010c -c 19 536 268 0x010c -d 20 804 268 0x010c -e 21 1072 268 0x010c -f 22 1340 268 0x010c -g 23 1608 268 0x010c -h 24 1876 268 0x010c -i 25 2144 268 0x010c -j 26 2412 268 0x010c -k 27 2680 268 0x010c -l 28 2948 268 0x010c -m 29 3216 268 0x010c -n 30 3484 268 0x010c -o 31 3752 268 0x010c -p 32 4020 268 0x010c -q 33 4288 268 0x010c -r 34 4556 268 0x010c -s 35 4824 268 0x010c -t 36 5092 268 0x010c -u 37 5360 268 0x010c -v 38 5628 268 0x010c -w 39 5896 268 0x010c -x 40 6164 268 0x010c -y 41 6432 268 0x010c -z 42 6700 268 0x010c -aa 43 6968 268 0x010c -ab 44 7236 268 0x010c -ac 45 7504 268 0x010c -ad 46 7772 268 0x010c -ae 47 8040 268 0x010c -af 48 8308 268 0x010c -ag 49 8576 268 0x010c -ah 50 8844 268 0x010c -ai 51 9112 268 0x010c -aj 52 9380 268 0x010c -ak 53 9648 268 0x010c -al 54 9916 268 0x010c -am 55 10184 268 0x010c -an 56 10452 268 0x010c -ao 57 10720 268 0x010c -ap 58 10988 268 0x010c -aq 59 11256 268 0x010c -ar 60 11524 268 0x010c -open /b/myfile -scandir a file status: -1 -Open /b/new_file -fcntl F_SETFD should return 0 -fcntl F_SETFD should return 1 -fcntl F_DUPFD should return 0 -- skip until implemented -fcntl F_GETFL returns current flags -fcntl F_GETFL returned 0x200 -fcntl F_SETFL to add O_APPEND and O_NONBLOCK -fcntl F_GETFL return current flags to see changes -fcntl F_GETFL returned 0x1208 -fcntl F_GETLK should return -1 -fcntl F_SETLK should return -1 -fcntl F_SETLKW should return -1 -fcntl F_SETOWN should return -1 -fcntl F_GETOWN should return -1 -fcntl invalid argument should return -1 -Status -1 -opendir and readdir /b/myfile -opendir and readdir -chdir to /b/myfile -Performing stat of directory / -status for stat : 0, size of directory: 2144 -Open and print directory / -name inode offset reclen type -dev 2 0 268 0x010c -a 5 268 268 0x010c -b 6 536 268 0x010c -c 7 804 268 0x010c -d 8 1072 268 0x010c -e 9 1340 268 0x010c -f 10 1608 268 0x010c -many 16 1876 268 0x010c -mkdir /d/my_dir -Open /d/my_dir -remove /d/my_dir. -close /d/my_dir. -Opening directory /c -name inode offset reclen type -y 11 0 268 0x010c -z 12 268 268 0x010c -x 13 536 268 0x010c -Opening directory /c/y -name inode offset reclen type -a3333 14 0 268 0x010c -j123 15 268 268 0x010c -LSEEK to the start of the open directory -name inode offset reclen type -dev 2 0 268 0x010c -a 5 268 268 0x010c -b 6 536 268 0x010c -c 7 804 268 0x010c -d 8 1072 268 0x010c -e 9 1340 268 0x010c -f 10 1608 268 0x010c -many 16 1876 268 0x010c -Rewinding directory -name inode offset reclen type -dev 2 0 268 0x010c -a 5 268 268 0x010c -b 6 536 268 0x010c -c 7 804 268 0x010c -d 8 1072 268 0x010c -e 9 1340 268 0x010c -f 10 1608 268 0x010c -many 16 1876 268 0x010c -Send rewinddir a NULL pointer -Seek directory -telldir() should report only sizeof(struct dirent) increments -in position. Sizeof(struct dirent): 268 -seeked to 0 -- currently at 0 -seeked to 67 -- currently at 0 -seeked to 134 -- currently at 0 -Send seekdir a NULL pointer -Closing directory -SCANDIR TEST -selection rule 1 -scanning for any entry under directory /c -SCANDIR SELECT1 accepts nodename: y -SCANDIR SELECT1 accepts nodename: z -SCANDIR SELECT1 accepts nodename: x -scandir status: 3 -Selected Node Name: y -Selected Node Name: z -Selected Node Name: x -selection rule 2 -scanning for any entry under directory /c whose name = y -SCANDIR SELECT accepted nodename: y -SCANDIR SELECT rejected nodename: z -SCANDIR SELECT rejected nodename: x -scandir status: 1 -Selected Node Name: y -SCANDIR with sorting -selection rule 1 -scanning for any entry under directory /c -sort in ascending order -SCANDIR SELECT1 accepts nodename: y -SCANDIR SELECT1 accepts nodename: z -SCANDIR SELECT1 accepts nodename: x -scandir status: 3 -Selected and Sorted Node Name: x -Selected and Sorted Node Name: y -Selected and Sorted Node Name: z -SCANDIR with sorting -selection rule 1 -scanning for any entry under directory /c -sort in descending order -SCANDIR SELECT1 accepts nodename: y -SCANDIR SELECT1 accepts nodename: z -SCANDIR SELECT1 accepts nodename: x -scandir status: 3 -Selected and Sorted Node Name: z -Selected and Sorted Node Name: y -Selected and Sorted Node Name: x -Validate readdir across mount point -name inode offset reclen type -should_be_hidden 65 0 268 0x010c -Attempting to mount IMFS file system at /imfs -create /imfs/testdir and /imfs/testdir/testsubdir -name inode offset reclen type -testdir 2 0 268 0x010c -name inode offset reclen type -testdir 2 0 268 0x010c -name inode offset reclen type -testdir 2 0 268 0x010c -name inode offset reclen type -testsubdir 3 0 268 0x010c -name inode offset reclen type -testdir 2 0 268 0x010c -*** END OF READDIR TEST *** diff --git a/c/src/tests/psxtests/psxreaddir/test.c b/c/src/tests/psxtests/psxreaddir/test.c deleted file mode 100644 index bc790c5233..0000000000 --- a/c/src/tests/psxtests/psxreaddir/test.c +++ /dev/null @@ -1,503 +0,0 @@ -/* - * This is a native test to explore how the readdir() family works. - * Newlib supports the following readdir() family members: - * - * closedir() - - * readdir() - - * scandir() - - * opendir() - - * rewinddir() - - * telldir() - BSD not in POSIX - * seekdir() - BSD not in POSIX - * - * - * seekdir() takes an offset which is a byte offset. The Linux - * implementation of this appears to seek to the ((off/DIRENT_SIZE) + 1) - * record where DIRENT_SIZE seems to be 12 bytes. - * - * - * - * $Id$ - */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -DIR *directory; -DIR *directory2; -DIR *directory3; -DIR *directory_not; - -#ifndef __P -#define __P(args)() -#endif - -/* -int scandir ( const char *dirname, - struct dirent *** namelist, - int (*select) __P((struct dirent *)), - int (*dcomp) __P((const struct dirent **, const struct dirent **)) -); -*/ - -#if defined(__rtems__) -#define d_type d_reclen -#include -#endif - -void printdir( DIR *directory ) -{ - struct dirent *d; - - printf( "%-20s %8s %8s %8s %4s\n", - "name", " inode", " offset", "reclen", " type" ); - d = readdir(directory); - - while (d) { - printf( "%-20s %8d %8d %6d 0x%04x\n", - d->d_name, (int)d->d_ino, (int)d->d_off, d->d_reclen, d->d_type ); - d = readdir(directory); - - } -} - -void complete_printdir( char *path ) -{ - DIR *the_dir; - int status; - - the_dir = opendir( path ); - assert( the_dir ); - printdir( the_dir ); - status = closedir( the_dir ); -} - -char *many_files[] = { - "a", - "b", - "c", - "d", - "e", - "f", - "g", - "h", - "i", - "j", - "k", - "l", - "m", - "n", - "o", - "p", - "q", - "r", - "s", - "t", - "u", - "v", - "w", - "x", - "y", - "z", - "aa", - "ab", - "ac", - "ad", - "ae", - "af", - "ag", - "ah", - "ai", - "aj", - "ak", - "al", - "am", - "an", - "ao", - "ap", - "aq", - "ar" -}; - -char *dnames[] = { - "a", - "b", - "c", - "d", - "e", - "f", - "c/y", - "c/z", - "c/x", - "c/y/a3333", - "c/y/j123", - "END" -}; - -int select1 ( struct dirent *entry ) -{ - printf("SCANDIR SELECT1 accepts nodename: %s\n", entry->d_name ); - return 1; -} - -int select2 ( struct dirent *entry ) -{ - if( strcmp( entry->d_name, "y") == 0 ) { - printf("SCANDIR SELECT accepted nodename: %s\n", entry->d_name ); - return 1; - } - printf("SCANDIR SELECT rejected nodename: %s\n", entry->d_name ); - return 0; -} - -int compare_ascending(const struct dirent **a, const struct dirent **b ) -{ - int i; - - i = strcmp ( - (char *)((struct dirent *)(*a)->d_name), - (char *)((struct dirent *)(*b)->d_name) - ); - return i; -} - - -int compare_descending( const struct dirent **a, const struct dirent **b ) -{ - int i; - - i = strcmp ( - (char *)((const struct dirent *)(*b)->d_name), - (char *)((const struct dirent *)(*a)->d_name) - ); - - return i; -} - -void test_across_mount() -{ - rtems_filesystem_mount_table_entry_t *mt_entry; - int status; - - /* - * Verify Readdir works correctly over mount points. - */ - - printf("Validate readdir across mount point\n"); - assert( mkdir( "/imfs", 0777 ) == 0 ); - assert( mkdir( "/imfs/should_be_hidden", 0777 ) == 0 ); - complete_printdir("/imfs" ); - printf("Attempting to mount IMFS file system at /imfs \n"); - status = mount( - &mt_entry, - &IMFS_ops, - RTEMS_FILESYSTEM_READ_WRITE, - NULL, - "/imfs" ); - assert( status == 0 ); - if( mt_entry == NULL ){ - printf(" NULL mount table entry was returned\n"); - } - printf( "create /imfs/testdir and /imfs/testdir/testsubdir\n"); - - status = mkdir( "/imfs/testdir", 0777 ); - assert( status == 0 ); - status = mkdir( "/imfs/testdir/testsubdir", 0777 ); - assert( status == 0 ); - - complete_printdir("/imfs" ); - complete_printdir("/imfs/" ); - complete_printdir("/imfs/." ); - complete_printdir("/imfs/testdir" ); - complete_printdir("/imfs/testdir/.." ); -} - -#if defined(__rtems__) -int test_main(void) -#else -int main( - int argc, - char **argv -) -#endif -{ - int fd; - int i; - int status; - off_t off; - struct dirent *d_not; - struct dirent **namelist; - struct stat s; - - - printf( "\n\n*** READDIR TEST ***\n" ); - - printf( "\nchdir to the root directory\n" ); - status = chdir( "/" ); - printf( "chdir() status : %d\n\n", status ); - - printf( "\nCreating a series of directories under /\n" ); - i=0; - while ( strcmp(dnames[i], "END") != 0 ) - { - status = mkdir( dnames[i], 0x1c0 ); - printf("Creating directory: %s %d %d ", dnames[i], status, errno ); - if ( errno == 0 ) - printf(" Success\n"); - else - printf(" Failure\n"); - - i++; - } - - /* - * Create files under many and open the directory. - */ - - printf("Create a lot of files\n"); - status = mkdir( "/many", 0x1c0 ); - status = chdir( "/many" ); - for (i = 0; i<44; i++) { - printf("Create %s\n", many_files[i]); - fd = open (many_files[i], O_CREAT, S_IRWXU); - close (fd); - } - printf("Open /many and print the directory\n"); - directory_not = opendir( "/many" ); - printdir ( directory_not ); - d_not = readdir( directory_not ); - - printf("open /b/myfile\n"); - fd = open ("/b/my_file", O_CREAT, S_IRWXU); - assert( fd != -1 ); - close (fd); - - printf("scandir a file status: "); - status = scandir( - "/b/my_file", - &namelist, - select1, - NULL - ); - printf("%d\n", status); - - printf("Open /b/new_file\n"); - fd = open( "/b/new_file", O_CREAT, S_IRWXU ); - assert( fd != -1 ); - - printf("fcntl F_SETFD should return 0\n"); - status = fcntl( fd, F_SETFD, 1 ); - assert( status == 0 ); - - printf("fcntl F_SETFD should return 1\n"); - status = fcntl( fd, F_GETFD, 1 ); - assert( status == 1 ); - -#if 0 - printf("fcntl F_DUPFD should return 0\n"); - status = fcntl( fd, F_DUPFD, 0 ); - assert ( status == 0 ); -#else - printf("fcntl F_DUPFD should return 0 -- skip until implemented\n"); -#endif - - printf("fcntl F_GETFL returns current flags\n"); - status = fcntl( fd, F_GETFL, 1 ); - printf("fcntl F_GETFL returned 0x%x\n", status ); - assert( status != -1 ); - - printf("fcntl F_SETFL to add O_APPEND and O_NONBLOCK\n"); - status = fcntl( fd, F_SETFL, O_APPEND|O_NONBLOCK ); - assert ( status != -1 ); - - printf("fcntl F_GETFL return current flags to see changes\n"); - status = fcntl( fd, F_GETFL, 1 ); - printf("fcntl F_GETFL returned 0x%x\n", status ); - assert( status != -1 ); - - printf("fcntl F_GETLK should return -1\n"); - status = fcntl( fd, F_GETLK, 1 ); - assert ( status == -1 ); - - printf("fcntl F_SETLK should return -1\n"); - status = fcntl( fd, F_SETLK, 1 ); - assert ( status == -1 ); - - printf("fcntl F_SETLKW should return -1\n"); - status = fcntl( fd, F_SETLKW, 1 ); - assert ( status == -1 ); - - printf("fcntl F_SETOWN should return -1\n"); - status = fcntl( fd, F_SETOWN, 1 ); - assert ( status == -1 ); - - printf("fcntl F_GETOWN should return -1\n"); - status = fcntl( fd, F_GETOWN, 1 ); - assert ( status == -1 ); - - printf("fcntl invalid argument should return -1\n"); - status = fcntl( fd, 0xb, 1 ); - printf("Status %d\n",status); - assert( status == -1 ); - - printf("opendir and readdir /b/myfile\n"); - directory_not = opendir ("/b/my_file"); - d_not = readdir(directory_not); - - printf("opendir and readdir\n"); - directory_not = opendir ("/a"); - d_not = readdir (directory_not); - - printf("chdir to /b/myfile\n"); - status = chdir ("/b/my_file"); - assert (status == -1); - - printf( "\nPerforming stat of directory /\n"); - status = stat( "/", &s ); - printf("status for stat : %d, size of directory: %d\n\n", - status,(int)s.st_size); - - puts( "\nOpen and print directory /" ); - directory = opendir("/"); - assert( directory ); - printdir(directory); - - printf("\nmkdir /d/my_dir\n"); - status = mkdir( "/d/my_dir", 0x1c0 ); - printf("Open /d/my_dir\n"); - directory_not = opendir( "/d/my_dir" ); - assert( directory_not ); - - printf( "remove /d/my_dir.\n" ); - status = rmdir( "/d/my_dir" ); - assert( status == 0 ); - - printf( "close /d/my_dir.\n" ); - closedir( directory_not ); - - printf( "\nOpening directory /c\n" ); - directory2 = opendir("/c"); - - assert( directory2 ); - - printdir(directory2); - status = closedir( directory2 ); - - printf( "\nOpening directory /c/y\n" ); - directory3 = opendir("/c/y"); - assert( directory3 ); - printdir(directory3); - status = closedir( directory3 ); - - printf( "\nLSEEK to the start of the open directory\n" ); - lseek( directory->dd_fd, 0, SEEK_SET ); - printdir(directory); - - lseek( directory->dd_fd, 0, SEEK_CUR ); - - lseek( directory->dd_fd, 0, SEEK_END ); - - lseek( directory->dd_fd, 0, -99 ); - - printf( "\nRewinding directory\n" ); - rewinddir( directory ); - printdir(directory); - -/* Don't know how to check this one automatically. */ - printf( "Send rewinddir a NULL pointer\n"); - rewinddir( NULL ); - - printf( "\nSeek directory\n" ); - printf( "telldir() should report only sizeof(struct dirent) increments \n" ); - printf( "in position. Sizeof(struct dirent): %d\n", sizeof(struct dirent) ); - rewinddir( directory ); - for( off=0 ; off<=200 ; off=off + sizeof(struct dirent) / 4 ) { - seekdir( directory, off ); - printf( - "seeked to %2d -- currently at %2d\n", - (int)off, - (int)telldir(directory) - ); - } - - printf( "Send seekdir a NULL pointer\n"); - seekdir( NULL, off ); - - printf( "\nClosing directory\n" ); - status = closedir( directory ); - - printf( "\nSCANDIR TEST\n"); - printf( "\nselection rule 1\n"); - printf( "scanning for any entry under directory /c\n\n"); - status = scandir( - "/c", - &namelist, - select1, - NULL - ); - printf("\nscandir status: %d\n", status ); - for ( i=0; id_name ); - } - - printf( "\nselection rule 2\n"); - printf( "scanning for any entry under directory /c whose name = y\n\n"); - status = scandir( - "/c", - &namelist, - select2, - NULL - ); - printf("\nscandir status: %d\n", status ); - for ( i=0; id_name ); - } - - printf( "\nSCANDIR with sorting\n" ); - printf( "\nselection rule 1\n"); - printf( "scanning for any entry under directory /c\n"); - printf( "sort in ascending order\n\n"); - status = scandir( - "/c", - &namelist, - select1, - compare_ascending - ); - printf("\nscandir status: %d\n", status ); - for ( i=0; id_name ); - } - - - printf( "\nSCANDIR with sorting\n" ); - printf( "\nselection rule 1\n"); - printf( "scanning for any entry under directory /c\n"); - printf( "sort in descending order\n\n"); - status = scandir( - "/c", - &namelist, - select1, - compare_descending - ); - printf("scandir status: %d\n", status ); - for ( i=0; id_name ); - } - - test_across_mount(); - printf( "\n\n*** END OF READDIR TEST ***\n" ); - rtems_test_exit(0); -} - diff --git a/c/src/tests/psxtests/psxsem01/.cvsignore b/c/src/tests/psxtests/psxsem01/.cvsignore deleted file mode 100644 index 282522db03..0000000000 --- a/c/src/tests/psxtests/psxsem01/.cvsignore +++ /dev/null @@ -1,2 +0,0 @@ -Makefile -Makefile.in diff --git a/c/src/tests/psxtests/psxsem01/Makefile.am b/c/src/tests/psxtests/psxsem01/Makefile.am deleted file mode 100644 index ca23429e6c..0000000000 --- a/c/src/tests/psxtests/psxsem01/Makefile.am +++ /dev/null @@ -1,44 +0,0 @@ -## -## $Id$ -## - - -TEST = psxsem01 - -MANAGERS = all - -C_FILES = init.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/psxsem01/init.c b/c/src/tests/psxtests/psxsem01/init.c deleted file mode 100644 index 4985c3a148..0000000000 --- a/c/src/tests/psxtests/psxsem01/init.c +++ /dev/null @@ -1,246 +0,0 @@ -#define CONFIGURE_INIT -#include "system.h" -#include -#include -#include -#include - -void *POSIX_Init( - void *argument -) -{ - int status; - int value; - int i; - sem_t sems[CONFIGURE_MAXIMUM_POSIX_SEMAPHORES]; - sem_t sem2; - sem_t *n_sem1; - sem_t *n_sem2; - struct timespec waittime; - char failure_msg[80]; - - puts( "\n\n*** POSIX SEMAPHORE MANAGER TEST 1 ***" ); - - puts( "Init: sem_init - SUCCESSFUL" ); - for (i = 0; i < CONFIGURE_MAXIMUM_POSIX_SEMAPHORES; i++) { - status = sem_init(&sems[i], 0, i); - sprintf(failure_msg, "sem_init %d", i ); - fatal_posix_service_status( status, 0, failure_msg); - } - puts( "Init: sem_init - UNSUCCESSFUL (ENOSPC)" ); - status = sem_init(&sem2, 0, 1); - fatal_posix_service_status( status, -1, "sem_init error return status"); - fatal_posix_service_status( errno, ENOSPC, "sem_init errorno ENOSPC" ); - - puts( "Init: sem_init - UNSUCCESSFUL (ENOSYS -- pshared not supported)" ); - status = sem_init(&sem2, 1, 1); - fatal_posix_service_status( status, -1, "sem_init error return status"); - fatal_posix_service_status( errno, ENOSYS, "sem_init errno set to ENOSYS"); - - puts( "Init: sem_getvalue - SUCCESSFUL "); - for (i = 0; i < CONFIGURE_MAXIMUM_POSIX_SEMAPHORES; i++) { - status = sem_getvalue(&sems[i], &value); - sprintf( failure_msg, "sem_getvalue %d", i ); - fatal_posix_service_status( status, 0, failure_msg ); - fatal_posix_service_status( value, i, "sem_getvalue correct value" ); - } - puts( "Init: sem_getvalue - UNSUCCESSFUL "); - status = sem_getvalue(&sem2, &value); - fatal_posix_service_status( status, -1, "sem_getvalue error return status"); - fatal_posix_service_status( errno, EINVAL, "sem_getvalue errno EINVAL"); - - puts( "Init: sem_destroy - SUCCESSFUL" ); - status = sem_destroy(&sems[0]); - fatal_posix_service_status( status, 0, "sem_destroy semaphore 0"); - - puts( "Init: sem_destroy - UNSUCCESSFUL (EINVAL)" ); - status = sem_destroy(&sem2); - fatal_posix_service_status( status, -1, "sem_destroy error return status"); - fatal_posix_service_status( errno, EINVAL, "sem_destroy errno EINVAL"); - - puts( "Init: sem_wait - SUCCESSFUL" ); - status = sem_wait(&sems[1]); - fatal_posix_service_status( status, 0, "sem_wait semaphore 1"); - - puts( "Init: sem_wait - UNSUCCESSFUL (EINVAL)" ); - status = sem_wait(&sem2); - fatal_posix_service_status( status, -1, "sem_wait error return status"); - fatal_posix_service_status( errno, EINVAL, "sem_wait errno EINVAL"); - - puts( "Init: sem_post - SUCCESSFUL" ); - status = sem_post(&sems[1]); - fatal_posix_service_status( status, 0, "sem_post semaphore 1"); - - puts( "Init: sem_wait - SUCCESSFUL (after a sem_post)" ); - status = sem_wait(&sems[1]); - fatal_posix_service_status( status, 0, "sem_wait semaphore 1"); - - puts( "Init: sem_trywait - SUCCESSFUL" ); - status = sem_trywait(&sems[2]); - fatal_posix_service_status( status, 0, "sem_trywait semaphore 2"); - - puts( "Init: sem_trywait - UNSUCCESSFUL (EAGAIN)" ); - status = sem_trywait(&sems[1]); - fatal_posix_service_status( status, -1, "sem_trywait error return status"); - fatal_posix_service_status( errno, EAGAIN, "sem_trywait errno EAGAIN"); - - puts( "Init: sem_trywait - UNSUCCESSFUL (EINVAL)" ); - status = sem_trywait(&sem2); - fatal_posix_service_status( status, -1, "sem_trywait error return status"); - fatal_posix_service_status( errno, EINVAL, "sem_trywait errno EINVAL"); - - puts( "Init: sem_timedwait - SUCCESSFUL" ); - waittime.tv_sec = 0; - waittime.tv_nsec = 100; - status = sem_timedwait(&sems[2], &waittime); - fatal_posix_service_status( status, 0, "sem_timedwait semaphore 2"); - - puts( "Init: sem_timedwait - UNSUCCESSFUL (ETIMEDOUT)" ); - status = sem_timedwait(&sems[1], &waittime); - fatal_posix_service_status( status, -1, "sem_timedwait error return status"); - fatal_posix_service_status( errno, ETIMEDOUT, "sem_timedwait errno ETIMEDOUT"); - - puts( "Init: sem_timedwait - UNSUCCESSFUL (EINVAL)" ); - status = sem_timedwait(&sem2, &waittime); - fatal_posix_service_status( status, -1, "sem_timedwait error return status"); - fatal_posix_service_status( errno, EINVAL, "sem_init errno EINVAL"); - - puts( "Init: sem_post - UNSUCCESSFUL (EINVAL)" ); - status = sem_post(&sem2); - fatal_posix_service_status( status, -1, "sem_post error return status"); - fatal_posix_service_status( errno, EINVAL, "sem_post errno EINVAL"); - - puts( "Init: sem_destroy - SUCCESSFUL" ); - for (i = 1; i < CONFIGURE_MAXIMUM_POSIX_SEMAPHORES; i++) { - status = sem_destroy(&sems[i]); - sprintf( failure_msg, "sem_destroy %d", i ); - fatal_posix_service_status( status, 0, failure_msg ); - } - - /* Modes are currently unsupported */ - - /* - * Validate all sem_open return paths. - */ - - puts( "Init: sem_open - sem1 SUCCESSFUL" ); - n_sem1 = sem_open( "sem1", O_CREAT, 00777, 1 ); - assert( n_sem1 != SEM_FAILED ); - - puts( "Init: sem_open - Create an Existing sem (EEXIST)" ); - n_sem2 = sem_open("sem1", O_CREAT | O_EXCL, 00777, 1); - fatal_posix_service_status( - (int) n_sem2, (int ) SEM_FAILED, "sem_open error return status" ); - fatal_posix_service_status( errno, EEXIST, "sem_open errno EEXIST"); - - puts( "Init: sem_open - Open new sem without create flag (ENOENT)" ); - n_sem2 = sem_open("sem3", O_EXCL, 00777, 1); - fatal_posix_service_status( - (int) n_sem2, (int ) SEM_FAILED, "sem_open error return status" ); - fatal_posix_service_status( errno, ENOENT, "sem_open errno EEXIST"); - - /* - * XXX - Could not hit the following errors: - * E_POSIX_Semaphore_Create_support only fails if - * ENOSYS - When semaphore is shared between processes. - * ENOSPC - When out of memory. - */ - - /* - * Validate we can wait on a semaphore opened with sem_open. - */ - - puts( "Init: sem_wait on sem1" ); - status = sem_wait(n_sem1); - fatal_posix_service_status( status, 0, "sem_wait opened semaphore"); - - /* - * Validate a second open returns the same semaphore. - */ - - puts( "Init: sem_open - Open an existing sem ( same id )" ); - n_sem2 = sem_open("sem1", 0 ); - fatal_posix_service_status( - (int) n_sem2, (int ) n_sem1, "sem_open error return status" ); - - /* - * Unlink the semaphore, then verify an open of the same name produces a - * different semaphore. - */ - - puts( "Init: sem_unlink - sem1 SUCCESSFUL" ); - status = sem_unlink( "sem1" ); - fatal_posix_service_status( status, 0, "sem_unlink locked semaphore"); - - puts( "Init: sem_open - Reopen sem1 SUCCESSFUL with a different id" ); - n_sem2 = sem_open( "sem1", O_CREAT | O_EXCL, 00777, 1); - assert( n_sem2 != SEM_FAILED ); - assert( n_sem2 != n_sem1 ); - - /* - * Validate we can call close on a semaphore opened with sem_open. - */ - - puts( "Init: sem_close (1) - SUCCESSFUL" ); - status = sem_close( n_sem1 ); - fatal_posix_service_status( status, 0, "sem_close semaphore"); - - - /* - * Validate it n_sem2 (the last open for sem1 name can be - * correctly closed and unlinked. - */ - - puts( "Init: sem_close (2) - SUCCESSFUL" ); - status = sem_close( n_sem2 ); - fatal_posix_service_status( status, 0, "sem_close semaphore"); - - puts( "Init: sem_unlink - sem1 (2) SUCCESSFUL" ); - status = sem_unlink( "sem1" ); - fatal_posix_service_status( status, 0, "sem_unlink locked semaphore"); - - puts( "Init: sem_close - UNSUCCESSFUL (EINVAL)" ); - status = sem_close(n_sem2); - fatal_posix_service_status( status, -1, "sem_close error return status"); - fatal_posix_service_status( errno, EINVAL, "sem_close errno EINVAL"); - - puts( "Init: sem_unlink - UNSUCCESSFUL (ENOENT)" ); - status = sem_unlink("sem1"); - fatal_posix_service_status( status, -1, "sem_unlink error return status"); - fatal_posix_service_status( errno, ENOENT, "sem_close errno EINVAL"); - - - /* - * Validate we can unlink (2) - */ - - puts( "Init: sem_unlink (NULL) - EINVAL" ); - status = sem_unlink( NULL ); - fatal_posix_service_status( status, -1, "sem_unlink error return status"); - fatal_posix_service_status( errno, EINVAL, "sem_unlink errno value"); - - puts( "Init: sem_unlink (\"\") - EINVAL" ); - status = sem_unlink( "" ); - fatal_posix_service_status( status, -1, "sem_unlink error return status"); - fatal_posix_service_status( errno, EINVAL, "sem_unlink errno value"); - - /* - * XXX - Cant' create location OBJECTS_ERROR or OBJECTS_REMOTE. - * sem_close and sem_unlink. - */ - - puts( "Init: sem_unlink - UNSUCCESSFUL (ENOENT)" ); - status = sem_unlink("sem2"); - fatal_posix_service_status( status, -1, "sem_unlink error return status"); - fatal_posix_service_status( errno, ENOENT, "sem_unlink errno ENOENT"); - assert( (status == -1) && (errno == ENOENT) ); - - - /* Try adding in unlinking before closing... (can we still open?) */ - - puts( "*** POSIX SEMAPHORE MANAGER TEST 1 COMPLETED ***" ); - rtems_test_exit(0); - - return NULL; /* just so the compiler thinks we returned something */ -} - diff --git a/c/src/tests/psxtests/psxsem01/psxsem01.scn b/c/src/tests/psxtests/psxsem01/psxsem01.scn deleted file mode 100644 index cf8cf13fb1..0000000000 --- a/c/src/tests/psxtests/psxsem01/psxsem01.scn +++ /dev/null @@ -1,37 +0,0 @@ -*** POSIX SEMAPHORE MANAGER TEST 1 *** -Init: sem_init - SUCCESSFUL -Init: sem_init - UNSUCCESSFUL (ENOSPC) -Init: sem_init - UNSUCCESSFUL (ENOSYS -- pshared not supported) -Init: sem_getvalue - SUCCESSFUL -Init: sem_getvalue - UNSUCCESSFUL -Init: sem_destroy - SUCCESSFUL -Init: sem_destroy - UNSUCCESSFUL (EINVAL) -Init: sem_wait - SUCCESSFUL -Init: sem_wait - UNSUCCESSFUL (EINVAL) -Init: sem_post - SUCCESSFUL -Init: sem_wait - SUCCESSFUL (after a sem_post) -Init: sem_trywait - SUCCESSFUL -Init: sem_trywait - UNSUCCESSFUL (EAGAIN) -Init: sem_trywait - UNSUCCESSFUL (EINVAL) -Init: sem_timedwait - SUCCESSFUL -Init: sem_timedwait - UNSUCCESSFUL (ETIMEDOUT) -Init: sem_timedwait - UNSUCCESSFUL (EINVAL) -Init: sem_post - UNSUCCESSFUL (EINVAL) -Init: sem_destroy - SUCCESSFUL -Init: sem_open - sem1 SUCCESSFUL -Init: sem_open - Create an Existing sem (EEXIST) -Init: sem_open - Open new sem without create flag (ENOENT) -Init: sem_wait on sem1 -Init: sem_open - Open an existing sem ( same id ) -Init: sem_unlink - sem1 SUCCESSFUL -Init: sem_open - Reopen sem1 SUCCESSFUL with a different id -Init: sem_close (1) - SUCCESSFUL -Init: sem_close (2) - SUCCESSFUL -Init: sem_unlink - sem1 (2) SUCCESSFUL -Init: sem_close - UNSUCCESSFUL (EINVAL) -Init: sem_unlink - UNSUCCESSFUL (ENOENT) -Init: sem_unlink (NULL) - EINVAL -Init: sem_unlink ("") - EINVAL -Init: sem_unlink - UNSUCCESSFUL (ENOENT) -*** POSIX SEMAPHORE MANAGER TEST 1 COMPLETED *** - diff --git a/c/src/tests/psxtests/psxsem01/system.h b/c/src/tests/psxtests/psxsem01/system.h deleted file mode 100644 index 7380f8dd17..0000000000 --- a/c/src/tests/psxtests/psxsem01/system.h +++ /dev/null @@ -1,55 +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 -#include -#include -#include -#include -#include - -void *POSIX_Init( - void *argument -); - -void *Task_1_through_3( - void *argument -); - -/* configuration information */ - -#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER -#define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER - -#define CONFIGURE_POSIX_INIT_THREAD_TABLE - -#define CONFIGURE_MAXIMUM_POSIX_THREADS 2 -#define CONFIGURE_MAXIMUM_POSIX_SEMAPHORES 10 - -#define CONFIGURE_POSIX_INIT_THREAD_TABLE -#define CONFIGURE_POSIX_INIT_THREAD_STACK_SIZE \ - (RTEMS_MINIMUM_STACK_SIZE * 4) - -#include - -/* global variables */ - -TEST_EXTERN pthread_t Init_id; -TEST_EXTERN pthread_t Task_id; - -/* end of include file */ - diff --git a/c/src/tests/psxtests/psxstat/.cvsignore b/c/src/tests/psxtests/psxstat/.cvsignore deleted file mode 100644 index 282522db03..0000000000 --- a/c/src/tests/psxtests/psxstat/.cvsignore +++ /dev/null @@ -1,2 +0,0 @@ -Makefile -Makefile.in diff --git a/c/src/tests/psxtests/psxstat/Makefile.am b/c/src/tests/psxtests/psxstat/Makefile.am deleted file mode 100644 index 467ccbdfdc..0000000000 --- a/c/src/tests/psxtests/psxstat/Makefile.am +++ /dev/null @@ -1,41 +0,0 @@ -## -## $Id$ -## - - -TEST = psxstat - -MANAGERS = all - -C_FILES = main.c test.c -C_O_FILES = $(C_FILES:%.c=${ARCH}/%.$(OBJEXT)) - -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/psxstat/main.c b/c/src/tests/psxtests/psxstat/main.c deleted file mode 100644 index 6e07fc405b..0000000000 --- a/c/src/tests/psxtests/psxstat/main.c +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Simple test program -- simplified version of sample test hello. - * - * 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 TEST_INIT - -#include -#include - -void test_main( void ); - -rtems_task Init( - rtems_task_argument ignored -) -{ - test_main(); - rtems_test_exit( 0 ); -} - -/* configuration information */ - -#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER -#define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER - -#define CONFIGURE_USE_IMFS_AS_BASE_FILESYSTEM -#define CONFIGURE_LIBIO_MAXIMUM_FILE_DESCRIPTORS 10 - -#define CONFIGURE_MAXIMUM_TASKS 1 - -#define CONFIGURE_RTEMS_INIT_TASKS_TABLE -#define CONFIGURE_INIT_TASK_STACK_SIZE (RTEMS_MINIMUM_STACK_SIZE * 2) - -#define CONFIGURE_INIT - -#include - -/* end of file */ diff --git a/c/src/tests/psxtests/psxstat/psxstat.scn b/c/src/tests/psxtests/psxstat/psxstat.scn deleted file mode 100644 index 8be1a93e13..0000000000 --- a/c/src/tests/psxtests/psxstat/psxstat.scn +++ /dev/null @@ -1,1199 +0,0 @@ -*** STAT TEST 01 *** ->>>>Current Time: - rtems_clock_get - 09:00:00 12/31/1988 -Making directory /my_mount_point/dir1 -Making directory /my_mount_point/dir2 -Making directory /my_mount_point/dir3 -Making directory /my_mount_point/dir4 -Making directory /my_mount_point/dir1/dir1 -Making directory /./././my_mount_point/dir1/ dir1 -Making directory /./././my_mount_point/links -Making directory ///my_mount_point/dir1/dir1/../../dir1/../symlinks///// -Making file /////my_mount_point/dir1/\//file1\\// -Making file /my_mount_point/dir1/file2 -Making file /my_mount_point/dir1/file3 -Making file /my_mount_point/dir1/file4 -Making file /my_mount_point/dir1/dir1/file1 -Making file ../../..//my_mount_point/dir1/./././dir1/ file1 -Making file main.c -Making file dir1/dir1/../../links/dir1 -Making file links/dir2 -Making file links/dir3 -Making file links/dir4 -Making file links/dir1_dir1 -Making file links/dir1_ dir1 -Making file links/../links/../links/links -Making file links/dir1_file1 -Making file links/dir1_file2 -Making file links/dir1_file3 -Making file links/dir1_file4 -Making file links/dir1_dir1_f1 -Making file links/dir1_dir1 f1 -Making file links/links/links/links_dir1 -Making file links//links_dir2 -Making file links//links_dir3 -Making file links//links_dir4 -Making file links//links_dir1_d1 -Making file links//links_dir1 d1 -Making file links//links_links -Making file links///links_d1_file1 -Making file links///links_d1_file2 -Making file links///links_d1_file3 -Making file links///links_d1_file4 -Making file links///links_d1_d1_f1 -Making file links///links_r1_d1 f1 -Doing the stat() on all the good absolute paths -stat( /my_mount_point/dev ) returned -...st_dev (0x0:0x0) -...st_ino 2 -...st_mode 40700 -...st_nlink 1 -...st_uid 0 -...st_gid 0 -...st_rdev (0x0:0x0) -...st_size 0 -...st_atime Sat Dec 31 09:00:00 1988 -...st_mtime Sat Dec 31 09:00:00 1988 -...st_ctime Sat Dec 31 09:00:00 1988 -stat( ////my_mount_point/dir1/\//file1\\// ) returned -...st_dev (0x0:0x0) -...st_ino b -...st_mode 100000 -...st_nlink 3 -...st_uid 0 -...st_gid 0 -...st_rdev (0x0:0x0) -...st_size 0 -...st_atime Sat Dec 31 09:00:00 1988 -...st_mtime Sat Dec 31 09:00:00 1988 -...st_ctime Sat Dec 31 09:00:10 1988 -stat( /my_mount_point/dir1/\\/file2 ) returned -...st_dev (0x0:0x0) -...st_ino c -...st_mode 100000 -...st_nlink 3 -...st_uid 0 -...st_gid 0 -...st_rdev (0x0:0x0) -...st_size 0 -...st_atime Sat Dec 31 09:00:00 1988 -...st_mtime Sat Dec 31 09:00:00 1988 -...st_ctime Sat Dec 31 09:00:10 1988 -stat( /my_mount_point/dir1/file3/////\\\ ) returned -...st_dev (0x0:0x0) -...st_ino d -...st_mode 100000 -...st_nlink 3 -...st_uid 0 -...st_gid 0 -...st_rdev (0x0:0x0) -...st_size 0 -...st_atime Sat Dec 31 09:00:00 1988 -...st_mtime Sat Dec 31 09:00:00 1988 -...st_ctime Sat Dec 31 09:00:10 1988 -stat( /my_mount_point/dir1/file4 ) returned -...st_dev (0x0:0x0) -...st_ino e -...st_mode 100000 -...st_nlink 3 -...st_uid 0 -...st_gid 0 -...st_rdev (0x0:0x0) -...st_size 0 -...st_atime Sat Dec 31 09:00:00 1988 -...st_mtime Sat Dec 31 09:00:00 1988 -...st_ctime Sat Dec 31 09:00:10 1988 -stat( /my_mount_point/dir1/dir1/file1 ) returned -...st_dev (0x0:0x0) -...st_ino f -...st_mode 100000 -...st_nlink 3 -...st_uid 0 -...st_gid 0 -...st_rdev (0x0:0x0) -...st_size 0 -...st_atime Sat Dec 31 09:00:00 1988 -...st_mtime Sat Dec 31 09:00:00 1988 -...st_ctime Sat Dec 31 09:00:10 1988 -stat( /my_mount_point/dir1/dir1/ file1 ) returned -...st_dev (0x0:0x0) -...st_ino 10 -...st_mode 100000 -...st_nlink 3 -...st_uid 0 -...st_gid 0 -...st_rdev (0x0:0x0) -...st_size 0 -...st_atime Sat Dec 31 09:00:00 1988 -...st_mtime Sat Dec 31 09:00:00 1988 -...st_ctime Sat Dec 31 09:00:10 1988 -stat( /my_mount_point/dir1 ) returned -...st_dev (0x0:0x0) -...st_ino 3 -...st_mode 40700 -...st_nlink 3 -...st_uid 0 -...st_gid 0 -...st_rdev (0x0:0x0) -...st_size 1608 -...st_atime Sat Dec 31 09:00:00 1988 -...st_mtime Sat Dec 31 09:00:00 1988 -...st_ctime Sat Dec 31 09:00:05 1988 -stat( /my_mount_point/dir2//////\ ) returned -...st_dev (0x0:0x0) -...st_ino 4 -...st_mode 40700 -...st_nlink 3 -...st_uid 0 -...st_gid 0 -...st_rdev (0x0:0x0) -...st_size 0 -...st_atime Sat Dec 31 09:00:00 1988 -...st_mtime Sat Dec 31 09:00:00 1988 -...st_ctime Sat Dec 31 09:00:05 1988 -stat( /my_mount_point/dir3 ) returned -...st_dev (0x0:0x0) -...st_ino 5 -...st_mode 40700 -...st_nlink 3 -...st_uid 0 -...st_gid 0 -...st_rdev (0x0:0x0) -...st_size 0 -...st_atime Sat Dec 31 09:00:00 1988 -...st_mtime Sat Dec 31 09:00:00 1988 -...st_ctime Sat Dec 31 09:00:05 1988 -stat( /my_mount_point/dir4 ) returned -...st_dev (0x0:0x0) -...st_ino 6 -...st_mode 40700 -...st_nlink 3 -...st_uid 0 -...st_gid 0 -...st_rdev (0x0:0x0) -...st_size 0 -...st_atime Sat Dec 31 09:00:00 1988 -...st_mtime Sat Dec 31 09:00:00 1988 -...st_ctime Sat Dec 31 09:00:05 1988 -stat( /my_mount_point/dir1/dir1 ) returned -...st_dev (0x0:0x0) -...st_ino 7 -...st_mode 40700 -...st_nlink 3 -...st_uid 0 -...st_gid 0 -...st_rdev (0x0:0x0) -...st_size 536 -...st_atime Sat Dec 31 09:00:00 1988 -...st_mtime Sat Dec 31 09:00:00 1988 -...st_ctime Sat Dec 31 09:00:05 1988 -stat( /my_mount_point/dir1/ dir1///\\ ) returned -...st_dev (0x0:0x0) -...st_ino 8 -...st_mode 40700 -...st_nlink 3 -...st_uid 0 -...st_gid 0 -...st_rdev (0x0:0x0) -...st_size 0 -...st_atime Sat Dec 31 09:00:00 1988 -...st_mtime Sat Dec 31 09:00:00 1988 -...st_ctime Sat Dec 31 09:00:05 1988 -stat( /my_mount_point/\/\/\/\/\/\/links\/\/\/\/\/\ ) returned -...st_dev (0x0:0x0) -...st_ino 9 -...st_mode 40700 -...st_nlink 3 -...st_uid 0 -...st_gid 0 -...st_rdev (0x0:0x0) -...st_size 6968 -...st_atime Sat Dec 31 09:00:00 1988 -...st_mtime Sat Dec 31 09:00:00 1988 -...st_ctime Sat Dec 31 09:00:05 1988 -Doing the stat() on all the good relative paths -stat( dev ) returned -...st_dev (0x0:0x0) -...st_ino 2 -...st_mode 40700 -...st_nlink 1 -...st_uid 0 -...st_gid 0 -...st_rdev (0x0:0x0) -...st_size 0 -...st_atime Sat Dec 31 09:00:00 1988 -...st_mtime Sat Dec 31 09:00:00 1988 -...st_ctime Sat Dec 31 09:00:00 1988 -stat( dir1/\//file1\\// ) returned -...st_dev (0x0:0x0) -...st_ino b -...st_mode 100000 -...st_nlink 3 -...st_uid 0 -...st_gid 0 -...st_rdev (0x0:0x0) -...st_size 0 -...st_atime Sat Dec 31 09:00:00 1988 -...st_mtime Sat Dec 31 09:00:00 1988 -...st_ctime Sat Dec 31 09:00:10 1988 -stat( dir1/\\/file2 ) returned -...st_dev (0x0:0x0) -...st_ino c -...st_mode 100000 -...st_nlink 3 -...st_uid 0 -...st_gid 0 -...st_rdev (0x0:0x0) -...st_size 0 -...st_atime Sat Dec 31 09:00:00 1988 -...st_mtime Sat Dec 31 09:00:00 1988 -...st_ctime Sat Dec 31 09:00:10 1988 -stat( dir1/file3/////\\\ ) returned -...st_dev (0x0:0x0) -...st_ino d -...st_mode 100000 -...st_nlink 3 -...st_uid 0 -...st_gid 0 -...st_rdev (0x0:0x0) -...st_size 0 -...st_atime Sat Dec 31 09:00:00 1988 -...st_mtime Sat Dec 31 09:00:00 1988 -...st_ctime Sat Dec 31 09:00:10 1988 -stat( dir1/file4 ) returned -...st_dev (0x0:0x0) -...st_ino e -...st_mode 100000 -...st_nlink 3 -...st_uid 0 -...st_gid 0 -...st_rdev (0x0:0x0) -...st_size 0 -...st_atime Sat Dec 31 09:00:00 1988 -...st_mtime Sat Dec 31 09:00:00 1988 -...st_ctime Sat Dec 31 09:00:10 1988 -stat( dir1/dir1/file1 ) returned -...st_dev (0x0:0x0) -...st_ino f -...st_mode 100000 -...st_nlink 3 -...st_uid 0 -...st_gid 0 -...st_rdev (0x0:0x0) -...st_size 0 -...st_atime Sat Dec 31 09:00:00 1988 -...st_mtime Sat Dec 31 09:00:00 1988 -...st_ctime Sat Dec 31 09:00:10 1988 -stat( dir1/dir1/ file1 ) returned -...st_dev (0x0:0x0) -...st_ino 10 -...st_mode 100000 -...st_nlink 3 -...st_uid 0 -...st_gid 0 -...st_rdev (0x0:0x0) -...st_size 0 -...st_atime Sat Dec 31 09:00:00 1988 -...st_mtime Sat Dec 31 09:00:00 1988 -...st_ctime Sat Dec 31 09:00:10 1988 -stat( dir1 ) returned -...st_dev (0x0:0x0) -...st_ino 3 -...st_mode 40700 -...st_nlink 3 -...st_uid 0 -...st_gid 0 -...st_rdev (0x0:0x0) -...st_size 1608 -...st_atime Sat Dec 31 09:00:00 1988 -...st_mtime Sat Dec 31 09:00:00 1988 -...st_ctime Sat Dec 31 09:00:05 1988 -stat( dir2//////\ ) returned -...st_dev (0x0:0x0) -...st_ino 4 -...st_mode 40700 -...st_nlink 3 -...st_uid 0 -...st_gid 0 -...st_rdev (0x0:0x0) -...st_size 0 -...st_atime Sat Dec 31 09:00:00 1988 -...st_mtime Sat Dec 31 09:00:00 1988 -...st_ctime Sat Dec 31 09:00:05 1988 -stat( dir3 ) returned -...st_dev (0x0:0x0) -...st_ino 5 -...st_mode 40700 -...st_nlink 3 -...st_uid 0 -...st_gid 0 -...st_rdev (0x0:0x0) -...st_size 0 -...st_atime Sat Dec 31 09:00:00 1988 -...st_mtime Sat Dec 31 09:00:00 1988 -...st_ctime Sat Dec 31 09:00:05 1988 -stat( dir4 ) returned -...st_dev (0x0:0x0) -...st_ino 6 -...st_mode 40700 -...st_nlink 3 -...st_uid 0 -...st_gid 0 -...st_rdev (0x0:0x0) -...st_size 0 -...st_atime Sat Dec 31 09:00:00 1988 -...st_mtime Sat Dec 31 09:00:00 1988 -...st_ctime Sat Dec 31 09:00:05 1988 -stat( dir1/dir1 ) returned -...st_dev (0x0:0x0) -...st_ino 7 -...st_mode 40700 -...st_nlink 3 -...st_uid 0 -...st_gid 0 -...st_rdev (0x0:0x0) -...st_size 536 -...st_atime Sat Dec 31 09:00:00 1988 -...st_mtime Sat Dec 31 09:00:00 1988 -...st_ctime Sat Dec 31 09:00:05 1988 -stat( dir1/ dir1///\\ ) returned -...st_dev (0x0:0x0) -...st_ino 8 -...st_mode 40700 -...st_nlink 3 -...st_uid 0 -...st_gid 0 -...st_rdev (0x0:0x0) -...st_size 0 -...st_atime Sat Dec 31 09:00:00 1988 -...st_mtime Sat Dec 31 09:00:00 1988 -...st_ctime Sat Dec 31 09:00:05 1988 -stat( main.c ) returned -...st_dev (0x0:0x0) -...st_ino 11 -...st_mode 100000 -...st_nlink 1 -...st_uid 0 -...st_gid 0 -...st_rdev (0x0:0x0) -...st_size 0 -...st_atime Sat Dec 31 09:00:00 1988 -...st_mtime Sat Dec 31 09:00:00 1988 -...st_ctime Sat Dec 31 09:00:00 1988 -chdir to dev -stat relative paths that are now bad -stat( dev ) returned : No such file or directory -stat( dir1/\//file1\\// ) returned : No such file or directory -stat( dir1/\\/file2 ) returned : No such file or directory -stat( dir1/file3/////\\\ ) returned : No such file or directory -stat( dir1/file4 ) returned : No such file or directory -stat( dir1/dir1/file1 ) returned : No such file or directory -stat( dir1/dir1/ file1 ) returned : No such file or directory -stat( dir1 ) returned : No such file or directory -stat( dir2//////\ ) returned : No such file or directory -stat( dir3 ) returned : No such file or directory -stat( dir4 ) returned : No such file or directory -stat( dir1/dir1 ) returned : No such file or directory -stat( dir1/ dir1///\\ ) returned : No such file or directory -stat( main.c ) returned : No such file or directory -chdir to ../links -Doing the stat() on good links -stat( dir1/dir1/../../links/dir1 ) returned -...st_dev (0x0:0x0) -...st_ino 3 -...st_mode 40700 -...st_nlink 3 -...st_uid 0 -...st_gid 0 -...st_rdev (0x0:0x0) -...st_size 1608 -...st_atime Sat Dec 31 09:00:00 1988 -...st_mtime Sat Dec 31 09:00:00 1988 -...st_ctime Sat Dec 31 09:00:05 1988 -stat( links/dir2 ) returned -...st_dev (0x0:0x0) -...st_ino 4 -...st_mode 40700 -...st_nlink 3 -...st_uid 0 -...st_gid 0 -...st_rdev (0x0:0x0) -...st_size 0 -...st_atime Sat Dec 31 09:00:00 1988 -...st_mtime Sat Dec 31 09:00:00 1988 -...st_ctime Sat Dec 31 09:00:05 1988 -stat( links/dir3 ) returned -...st_dev (0x0:0x0) -...st_ino 5 -...st_mode 40700 -...st_nlink 3 -...st_uid 0 -...st_gid 0 -...st_rdev (0x0:0x0) -...st_size 0 -...st_atime Sat Dec 31 09:00:00 1988 -...st_mtime Sat Dec 31 09:00:00 1988 -...st_ctime Sat Dec 31 09:00:05 1988 -stat( links/dir4 ) returned -...st_dev (0x0:0x0) -...st_ino 6 -...st_mode 40700 -...st_nlink 3 -...st_uid 0 -...st_gid 0 -...st_rdev (0x0:0x0) -...st_size 0 -...st_atime Sat Dec 31 09:00:00 1988 -...st_mtime Sat Dec 31 09:00:00 1988 -...st_ctime Sat Dec 31 09:00:05 1988 -stat( links/dir1_dir1 ) returned -...st_dev (0x0:0x0) -...st_ino 7 -...st_mode 40700 -...st_nlink 3 -...st_uid 0 -...st_gid 0 -...st_rdev (0x0:0x0) -...st_size 536 -...st_atime Sat Dec 31 09:00:00 1988 -...st_mtime Sat Dec 31 09:00:00 1988 -...st_ctime Sat Dec 31 09:00:05 1988 -stat( links/dir1_ dir1 ) returned -...st_dev (0x0:0x0) -...st_ino 8 -...st_mode 40700 -...st_nlink 3 -...st_uid 0 -...st_gid 0 -...st_rdev (0x0:0x0) -...st_size 0 -...st_atime Sat Dec 31 09:00:00 1988 -...st_mtime Sat Dec 31 09:00:00 1988 -...st_ctime Sat Dec 31 09:00:05 1988 -stat( links/../links/../links/links ) returned -...st_dev (0x0:0x0) -...st_ino 9 -...st_mode 40700 -...st_nlink 3 -...st_uid 0 -...st_gid 0 -...st_rdev (0x0:0x0) -...st_size 6968 -...st_atime Sat Dec 31 09:00:00 1988 -...st_mtime Sat Dec 31 09:00:00 1988 -...st_ctime Sat Dec 31 09:00:05 1988 -stat( links/dir1_file1 ) returned -...st_dev (0x0:0x0) -...st_ino b -...st_mode 100000 -...st_nlink 3 -...st_uid 0 -...st_gid 0 -...st_rdev (0x0:0x0) -...st_size 0 -...st_atime Sat Dec 31 09:00:00 1988 -...st_mtime Sat Dec 31 09:00:00 1988 -...st_ctime Sat Dec 31 09:00:10 1988 -stat( links/dir1_file2 ) returned -...st_dev (0x0:0x0) -...st_ino c -...st_mode 100000 -...st_nlink 3 -...st_uid 0 -...st_gid 0 -...st_rdev (0x0:0x0) -...st_size 0 -...st_atime Sat Dec 31 09:00:00 1988 -...st_mtime Sat Dec 31 09:00:00 1988 -...st_ctime Sat Dec 31 09:00:10 1988 -stat( links/dir1_file3 ) returned -...st_dev (0x0:0x0) -...st_ino d -...st_mode 100000 -...st_nlink 3 -...st_uid 0 -...st_gid 0 -...st_rdev (0x0:0x0) -...st_size 0 -...st_atime Sat Dec 31 09:00:00 1988 -...st_mtime Sat Dec 31 09:00:00 1988 -...st_ctime Sat Dec 31 09:00:10 1988 -stat( links/dir1_file4 ) returned -...st_dev (0x0:0x0) -...st_ino e -...st_mode 100000 -...st_nlink 3 -...st_uid 0 -...st_gid 0 -...st_rdev (0x0:0x0) -...st_size 0 -...st_atime Sat Dec 31 09:00:00 1988 -...st_mtime Sat Dec 31 09:00:00 1988 -...st_ctime Sat Dec 31 09:00:10 1988 -stat( links/dir1_dir1_f1 ) returned -...st_dev (0x0:0x0) -...st_ino f -...st_mode 100000 -...st_nlink 3 -...st_uid 0 -...st_gid 0 -...st_rdev (0x0:0x0) -...st_size 0 -...st_atime Sat Dec 31 09:00:00 1988 -...st_mtime Sat Dec 31 09:00:00 1988 -...st_ctime Sat Dec 31 09:00:10 1988 -stat( links/dir1_dir1 f1 ) returned -...st_dev (0x0:0x0) -...st_ino 10 -...st_mode 100000 -...st_nlink 3 -...st_uid 0 -...st_gid 0 -...st_rdev (0x0:0x0) -...st_size 0 -...st_atime Sat Dec 31 09:00:00 1988 -...st_mtime Sat Dec 31 09:00:00 1988 -...st_ctime Sat Dec 31 09:00:10 1988 -stat( links/links/links/links_dir1 ) returned -...st_dev (0x0:0x0) -...st_ino 3 -...st_mode 40700 -...st_nlink 3 -...st_uid 0 -...st_gid 0 -...st_rdev (0x0:0x0) -...st_size 1608 -...st_atime Sat Dec 31 09:00:00 1988 -...st_mtime Sat Dec 31 09:00:00 1988 -...st_ctime Sat Dec 31 09:00:05 1988 -stat( links//links_dir2 ) returned -...st_dev (0x0:0x0) -...st_ino 4 -...st_mode 40700 -...st_nlink 3 -...st_uid 0 -...st_gid 0 -...st_rdev (0x0:0x0) -...st_size 0 -...st_atime Sat Dec 31 09:00:00 1988 -...st_mtime Sat Dec 31 09:00:00 1988 -...st_ctime Sat Dec 31 09:00:05 1988 -stat( links//links_dir3 ) returned -...st_dev (0x0:0x0) -...st_ino 5 -...st_mode 40700 -...st_nlink 3 -...st_uid 0 -...st_gid 0 -...st_rdev (0x0:0x0) -...st_size 0 -...st_atime Sat Dec 31 09:00:00 1988 -...st_mtime Sat Dec 31 09:00:00 1988 -...st_ctime Sat Dec 31 09:00:05 1988 -stat( links//links_dir4 ) returned -...st_dev (0x0:0x0) -...st_ino 6 -...st_mode 40700 -...st_nlink 3 -...st_uid 0 -...st_gid 0 -...st_rdev (0x0:0x0) -...st_size 0 -...st_atime Sat Dec 31 09:00:00 1988 -...st_mtime Sat Dec 31 09:00:00 1988 -...st_ctime Sat Dec 31 09:00:05 1988 -stat( links//links_dir1_d1 ) returned -...st_dev (0x0:0x0) -...st_ino 7 -...st_mode 40700 -...st_nlink 3 -...st_uid 0 -...st_gid 0 -...st_rdev (0x0:0x0) -...st_size 536 -...st_atime Sat Dec 31 09:00:00 1988 -...st_mtime Sat Dec 31 09:00:00 1988 -...st_ctime Sat Dec 31 09:00:05 1988 -stat( links//links_dir1 d1 ) returned -...st_dev (0x0:0x0) -...st_ino 8 -...st_mode 40700 -...st_nlink 3 -...st_uid 0 -...st_gid 0 -...st_rdev (0x0:0x0) -...st_size 0 -...st_atime Sat Dec 31 09:00:00 1988 -...st_mtime Sat Dec 31 09:00:00 1988 -...st_ctime Sat Dec 31 09:00:05 1988 -stat( links//links_links ) returned -...st_dev (0x0:0x0) -...st_ino 9 -...st_mode 40700 -...st_nlink 3 -...st_uid 0 -...st_gid 0 -...st_rdev (0x0:0x0) -...st_size 6968 -...st_atime Sat Dec 31 09:00:00 1988 -...st_mtime Sat Dec 31 09:00:00 1988 -...st_ctime Sat Dec 31 09:00:05 1988 -stat( links///links_d1_file1 ) returned -...st_dev (0x0:0x0) -...st_ino b -...st_mode 100000 -...st_nlink 3 -...st_uid 0 -...st_gid 0 -...st_rdev (0x0:0x0) -...st_size 0 -...st_atime Sat Dec 31 09:00:00 1988 -...st_mtime Sat Dec 31 09:00:00 1988 -...st_ctime Sat Dec 31 09:00:10 1988 -stat( links///links_d1_file2 ) returned -...st_dev (0x0:0x0) -...st_ino c -...st_mode 100000 -...st_nlink 3 -...st_uid 0 -...st_gid 0 -...st_rdev (0x0:0x0) -...st_size 0 -...st_atime Sat Dec 31 09:00:00 1988 -...st_mtime Sat Dec 31 09:00:00 1988 -...st_ctime Sat Dec 31 09:00:10 1988 -stat( links///links_d1_file3 ) returned -...st_dev (0x0:0x0) -...st_ino d -...st_mode 100000 -...st_nlink 3 -...st_uid 0 -...st_gid 0 -...st_rdev (0x0:0x0) -...st_size 0 -...st_atime Sat Dec 31 09:00:00 1988 -...st_mtime Sat Dec 31 09:00:00 1988 -...st_ctime Sat Dec 31 09:00:10 1988 -stat( links///links_d1_file4 ) returned -...st_dev (0x0:0x0) -...st_ino e -...st_mode 100000 -...st_nlink 3 -...st_uid 0 -...st_gid 0 -...st_rdev (0x0:0x0) -...st_size 0 -...st_atime Sat Dec 31 09:00:00 1988 -...st_mtime Sat Dec 31 09:00:00 1988 -...st_ctime Sat Dec 31 09:00:10 1988 -stat( links///links_d1_d1_f1 ) returned -...st_dev (0x0:0x0) -...st_ino f -...st_mode 100000 -...st_nlink 3 -...st_uid 0 -...st_gid 0 -...st_rdev (0x0:0x0) -...st_size 0 -...st_atime Sat Dec 31 09:00:00 1988 -...st_mtime Sat Dec 31 09:00:00 1988 -...st_ctime Sat Dec 31 09:00:10 1988 -stat( links///links_r1_d1 f1 ) returned -...st_dev (0x0:0x0) -...st_ino 10 -...st_mode 100000 -...st_nlink 3 -...st_uid 0 -...st_gid 0 -...st_rdev (0x0:0x0) -...st_size 0 -...st_atime Sat Dec 31 09:00:00 1988 -...st_mtime Sat Dec 31 09:00:00 1988 -...st_ctime Sat Dec 31 09:00:10 1988 -chmod of /my_mount_point/dir1/dir1 to Read/Write -Doing the stat() on all the bad paths -stat( /my_mount_point/links/ENAMETOOLONG__________________________ ) returned : File or path name too long -stat( /my_mount_point/dir1/file4/NOTADIR ) returned : Not a directory -stat( /my_mount_point/dir1/dir1/EACCES__ ) returned : Permission denied -Making file /my_mount_point/links/ENAMETOOLONG__________________________ : File or path name too long -Making file /my_mount_point/dir1/file4/NOTADIR : Not a directory -Making file /my_mount_point/dir1/dir1/EACCES__ : Permission denied -Return /my_mount_point/dir1/dir1 to RWX -Making file /my_mount_point/symlinks/a_file_symlink -Verify with readlink -Making file /my_mount_point/symlinks/a_dir_symlink -Verify with readlink -Making file /my_mount_point/symlinks/a_link_symlink -Verify with readlink -Making file ../symlinks/no_file -Verify with readlink -Making file /my_mount_point/symlinks/a_dir_symlink/a_file_symlink -Verify with readlink -Making file /my_mount_point/symlinks/links -Verify with readlink -stat( /my_mount_point/symlinks/a_file_symlink ) returned -...st_dev (0x0:0x0) -...st_ino b -...st_mode 100000 -...st_nlink 3 -...st_uid 0 -...st_gid 0 -...st_rdev (0x0:0x0) -...st_size 0 -...st_atime Sat Dec 31 09:00:00 1988 -...st_mtime Sat Dec 31 09:00:00 1988 -...st_ctime Sat Dec 31 09:00:10 1988 -stat( /my_mount_point/symlinks/a_dir_symlink ) returned -...st_dev (0x0:0x0) -...st_ino 3 -...st_mode 40700 -...st_nlink 3 -...st_uid 0 -...st_gid 0 -...st_rdev (0x0:0x0) -...st_size 1876 -...st_atime Sat Dec 31 09:00:00 1988 -...st_mtime Sat Dec 31 09:00:00 1988 -...st_ctime Sat Dec 31 09:00:05 1988 -stat( /my_mount_point/symlinks/a_link_symlink ) returned -...st_dev (0x0:0x0) -...st_ino 3 -...st_mode 40700 -...st_nlink 3 -...st_uid 0 -...st_gid 0 -...st_rdev (0x0:0x0) -...st_size 1876 -...st_atime Sat Dec 31 09:00:00 1988 -...st_mtime Sat Dec 31 09:00:00 1988 -...st_ctime Sat Dec 31 09:00:05 1988 -stat( ../symlinks/no_file ) returned : No such file or directory -stat( /my_mount_point/symlinks/a_dir_symlink/a_file_symlink ) returned -...st_dev (0x0:0x0) -...st_ino 3 -...st_mode 40700 -...st_nlink 3 -...st_uid 0 -...st_gid 0 -...st_rdev (0x0:0x0) -...st_size 1876 -...st_atime Sat Dec 31 09:00:00 1988 -...st_mtime Sat Dec 31 09:00:00 1988 -...st_ctime Sat Dec 31 09:00:05 1988 -Making file 1 -Verify with readlink -Making file 2 -Verify with readlink -Making file 3 -Verify with readlink -Making file 4 -Verify with readlink -Making file 5 -Verify with readlink -Making file 6 -Verify with readlink -Making file 7 -Verify with readlink -Making file 8 -Verify with readlink -Making file 9 -Verify with readlink -stat( 1 ) returned : No such file or directory -stat( 2 ) returned : No such file or directory -stat( 3 ) returned : No such file or directory -stat( 4 ) returned : No such file or directory -stat( 5 ) returned : No such file or directory -stat( 6 ) returned : Too many symbolic links -stat( 7 ) returned : Too many symbolic links -stat( 8 ) returned : Too many symbolic links -stat( 9 ) returned : Too many symbolic links -Pass an invalid mode to chmod should fail with EPERM -chdir to a file should fail with ENOTDIR -Verify RWX permission on /my_mount_point/dir1 via access -chmod of /my_mount_point/dir1 to Read/Write -chmod fred should fail with ENOENT -Create under /my_mount_point/dir1 should fail with EACCES -chdir to /my_mount_point/dir1/dir1 should fail with EACCES -Stat with a NULL buffer should fail with EFAULT -chmod of /my_mount_point/dir1 to Read/Write -mkdir /my_mount_point/dir1/BADNAME should fail with EACCESS -/my_mount_point/dir1 Should exist ( access ) -/my_mount_point/dir1 Should have read permission( access ) -/my_mount_point/dir1 Should have write permission( access ) -/my_mount_point/dir1 Should not have execute permission( access ) -Restore /my_mount_point/dir1 to RWX -chdir to /my_mount_point -Remove /./././my_mount_point/dir1/ dir1 -stat( /./././my_mount_point/dir1/ dir1 ) returned : No such file or directory -stat( links/dir1_ dir1 ) returned -...st_dev (0x0:0x0) -...st_ino 8 -...st_mode 40700 -...st_nlink 2 -...st_uid 0 -...st_gid 0 -...st_rdev (0x0:0x0) -...st_size 0 -...st_atime Sat Dec 31 09:00:00 1988 -...st_mtime Sat Dec 31 09:00:00 1988 -...st_ctime Sat Dec 31 09:00:20 1988 -stat( links//links_dir1 d1 ) returned -...st_dev (0x0:0x0) -...st_ino 8 -...st_mode 40700 -...st_nlink 2 -...st_uid 0 -...st_gid 0 -...st_rdev (0x0:0x0) -...st_size 0 -...st_atime Sat Dec 31 09:00:00 1988 -...st_mtime Sat Dec 31 09:00:00 1988 -...st_ctime Sat Dec 31 09:00:20 1988 -Chdir to links/dir1_ dir1 -Chdir to .. should fail with ENOENT -mkdir ../t should fail with ENOENT -mkdir t -chdir to /my_mount_point -rmdir links/dir1_ dir1 should fail with ENOTDIR -unlink links/dir1_ dir1 -unlink links//links_dir1 d1 should fail with ENOTEMPTY -rmdir links//links_dir1 d1/t -unlink links/dir1_ dir1 -Attempting to mount IMFS file system at /dir1/my_mount_point -rmdir /dir1/my_mount_point should fail with EBUSY -Unmount /my_mount_point/dir1/my_mount_point -chmod of /////my_mount_point/dir1/\//file1\\// to group and other execute -Open /////my_mount_point/dir1/\//file1\\// for write should fail with EACCES -chmod of /my_mount_point/dir4 to User Execute and Read -Mkdir of /my_mount_point/dir4/NewFile should fail with EACCES -Making too many hard links. -Making file /LinkName1 -Making file /LinkName2 -Making file /LinkName3 -Making file /LinkName4 -Making file /LinkName5 -Making file /LinkName6 -Making file /LinkName7 -Making file /LinkName8 -pass fstat a null pointer should fail with EFAULT -chdir to /my_mount_point -Change group of /////my_mount_point/dir1/\//file1\\// -stat( /////my_mount_point/dir1/\//file1\\// ) returned -...st_dev (0x0:0x0) -...st_ino b -...st_mode 100011 -...st_nlink 3 -...st_uid 0 -...st_gid 1 -...st_rdev (0x0:0x0) -...st_size 0 -...st_atime Sat Dec 31 09:00:00 1988 -...st_mtime Sat Dec 31 09:00:00 1988 -...st_ctime Sat Dec 31 09:00:25 1988 -Change owner of /////my_mount_point/dir1/\//file1\\// -stat( /////my_mount_point/dir1/\//file1\\// ) returned -...st_dev (0x0:0x0) -...st_ino b -...st_mode 100011 -...st_nlink 3 -...st_uid 1 -...st_gid 0 -...st_rdev (0x0:0x0) -...st_size 0 -...st_atime Sat Dec 31 09:00:00 1988 -...st_mtime Sat Dec 31 09:00:00 1988 -...st_ctime Sat Dec 31 09:00:25 1988 -Change group of /my_mount_point/dir1/file2 -stat( /my_mount_point/dir1/file2 ) returned -...st_dev (0x0:0x0) -...st_ino c -...st_mode 100000 -...st_nlink 3 -...st_uid 0 -...st_gid 1 -...st_rdev (0x0:0x0) -...st_size 0 -...st_atime Sat Dec 31 09:00:00 1988 -...st_mtime Sat Dec 31 09:00:00 1988 -...st_ctime Sat Dec 31 09:00:25 1988 -Change owner of /my_mount_point/dir1/file2 -stat( /my_mount_point/dir1/file2 ) returned -...st_dev (0x0:0x0) -...st_ino c -...st_mode 100000 -...st_nlink 3 -...st_uid 1 -...st_gid 0 -...st_rdev (0x0:0x0) -...st_size 0 -...st_atime Sat Dec 31 09:00:00 1988 -...st_mtime Sat Dec 31 09:00:00 1988 -...st_ctime Sat Dec 31 09:00:25 1988 -Change group of /my_mount_point/dir1/file3 -stat( /my_mount_point/dir1/file3 ) returned -...st_dev (0x0:0x0) -...st_ino d -...st_mode 100000 -...st_nlink 3 -...st_uid 0 -...st_gid 1 -...st_rdev (0x0:0x0) -...st_size 0 -...st_atime Sat Dec 31 09:00:00 1988 -...st_mtime Sat Dec 31 09:00:00 1988 -...st_ctime Sat Dec 31 09:00:25 1988 -Change owner of /my_mount_point/dir1/file3 -stat( /my_mount_point/dir1/file3 ) returned -...st_dev (0x0:0x0) -...st_ino d -...st_mode 100000 -...st_nlink 3 -...st_uid 1 -...st_gid 0 -...st_rdev (0x0:0x0) -...st_size 0 -...st_atime Sat Dec 31 09:00:00 1988 -...st_mtime Sat Dec 31 09:00:00 1988 -...st_ctime Sat Dec 31 09:00:25 1988 -Change group of /my_mount_point/dir1/file4 -stat( /my_mount_point/dir1/file4 ) returned -...st_dev (0x0:0x0) -...st_ino e -...st_mode 100000 -...st_nlink 3 -...st_uid 0 -...st_gid 1 -...st_rdev (0x0:0x0) -...st_size 0 -...st_atime Sat Dec 31 09:00:00 1988 -...st_mtime Sat Dec 31 09:00:00 1988 -...st_ctime Sat Dec 31 09:00:25 1988 -Change owner of /my_mount_point/dir1/file4 -stat( /my_mount_point/dir1/file4 ) returned -...st_dev (0x0:0x0) -...st_ino e -...st_mode 100000 -...st_nlink 3 -...st_uid 1 -...st_gid 0 -...st_rdev (0x0:0x0) -...st_size 0 -...st_atime Sat Dec 31 09:00:00 1988 -...st_mtime Sat Dec 31 09:00:00 1988 -...st_ctime Sat Dec 31 09:00:25 1988 -Change group of /my_mount_point/dir1/dir1/file1 -stat( /my_mount_point/dir1/dir1/file1 ) returned -...st_dev (0x0:0x0) -...st_ino f -...st_mode 100000 -...st_nlink 3 -...st_uid 0 -...st_gid 1 -...st_rdev (0x0:0x0) -...st_size 0 -...st_atime Sat Dec 31 09:00:00 1988 -...st_mtime Sat Dec 31 09:00:00 1988 -...st_ctime Sat Dec 31 09:00:25 1988 -Change owner of /my_mount_point/dir1/dir1/file1 -stat( /my_mount_point/dir1/dir1/file1 ) returned -...st_dev (0x0:0x0) -...st_ino f -...st_mode 100000 -...st_nlink 3 -...st_uid 1 -...st_gid 0 -...st_rdev (0x0:0x0) -...st_size 0 -...st_atime Sat Dec 31 09:00:00 1988 -...st_mtime Sat Dec 31 09:00:00 1988 -...st_ctime Sat Dec 31 09:00:25 1988 -Change group of ../../..//my_mount_point/dir1/./././dir1/ file1 -stat( ../../..//my_mount_point/dir1/./././dir1/ file1 ) returned -...st_dev (0x0:0x0) -...st_ino 10 -...st_mode 100000 -...st_nlink 3 -...st_uid 0 -...st_gid 1 -...st_rdev (0x0:0x0) -...st_size 0 -...st_atime Sat Dec 31 09:00:00 1988 -...st_mtime Sat Dec 31 09:00:00 1988 -...st_ctime Sat Dec 31 09:00:25 1988 -Change owner of ../../..//my_mount_point/dir1/./././dir1/ file1 -stat( ../../..//my_mount_point/dir1/./././dir1/ file1 ) returned -...st_dev (0x0:0x0) -...st_ino 10 -...st_mode 100000 -...st_nlink 3 -...st_uid 1 -...st_gid 0 -...st_rdev (0x0:0x0) -...st_size 0 -...st_atime Sat Dec 31 09:00:00 1988 -...st_mtime Sat Dec 31 09:00:00 1988 -...st_ctime Sat Dec 31 09:00:25 1988 -Change group of main.c -stat( main.c ) returned -...st_dev (0x0:0x0) -...st_ino 11 -...st_mode 100000 -...st_nlink 1 -...st_uid 0 -...st_gid 1 -...st_rdev (0x0:0x0) -...st_size 0 -...st_atime Sat Dec 31 09:00:00 1988 -...st_mtime Sat Dec 31 09:00:00 1988 -...st_ctime Sat Dec 31 09:00:25 1988 -Change owner of main.c -stat( main.c ) returned -...st_dev (0x0:0x0) -...st_ino 11 -...st_mode 100000 -...st_nlink 1 -...st_uid 1 -...st_gid 0 -...st_rdev (0x0:0x0) -...st_size 0 -...st_atime Sat Dec 31 09:00:00 1988 -...st_mtime Sat Dec 31 09:00:00 1988 -...st_ctime Sat Dec 31 09:00:25 1988 -Change group of dir1/dir1/../../links/dir1 -stat( dir1/dir1/../../links/dir1 ) returned -...st_dev (0x0:0x0) -...st_ino 3 -...st_mode 40700 -...st_nlink 3 -...st_uid 0 -...st_gid 1 -...st_rdev (0x0:0x0) -...st_size 1876 -...st_atime Sat Dec 31 09:00:00 1988 -...st_mtime Sat Dec 31 09:00:00 1988 -...st_ctime Sat Dec 31 09:00:30 1988 -Change owner of dir1/dir1/../../links/dir1 -stat( dir1/dir1/../../links/dir1 ) returned : Permission denied -Change group of links/dir2 -stat( links/dir2 ) returned -...st_dev (0x0:0x0) -...st_ino 4 -...st_mode 40700 -...st_nlink 3 -...st_uid 0 -...st_gid 1 -...st_rdev (0x0:0x0) -...st_size 0 -...st_atime Sat Dec 31 09:00:00 1988 -...st_mtime Sat Dec 31 09:00:00 1988 -...st_ctime Sat Dec 31 09:00:30 1988 -Change owner of links/dir2 -stat( links/dir2 ) returned -...st_dev (0x0:0x0) -...st_ino 4 -...st_mode 40700 -...st_nlink 3 -...st_uid 1 -...st_gid 0 -...st_rdev (0x0:0x0) -...st_size 0 -...st_atime Sat Dec 31 09:00:00 1988 -...st_mtime Sat Dec 31 09:00:00 1988 -...st_ctime Sat Dec 31 09:00:30 1988 -Change group of links/dir3 -stat( links/dir3 ) returned -...st_dev (0x0:0x0) -...st_ino 5 -...st_mode 40700 -...st_nlink 3 -...st_uid 0 -...st_gid 1 -...st_rdev (0x0:0x0) -...st_size 0 -...st_atime Sat Dec 31 09:00:00 1988 -...st_mtime Sat Dec 31 09:00:00 1988 -...st_ctime Sat Dec 31 09:00:30 1988 -Change owner of links/dir3 -stat( links/dir3 ) returned -...st_dev (0x0:0x0) -...st_ino 5 -...st_mode 40700 -...st_nlink 3 -...st_uid 1 -...st_gid 0 -...st_rdev (0x0:0x0) -...st_size 0 -...st_atime Sat Dec 31 09:00:00 1988 -...st_mtime Sat Dec 31 09:00:00 1988 -...st_ctime Sat Dec 31 09:00:30 1988 -Change group of links/dir4 -stat( links/dir4 ) returned -...st_dev (0x0:0x0) -...st_ino 6 -...st_mode 40500 -...st_nlink 3 -...st_uid 0 -...st_gid 1 -...st_rdev (0x0:0x0) -...st_size 0 -...st_atime Sat Dec 31 09:00:00 1988 -...st_mtime Sat Dec 31 09:00:00 1988 -...st_ctime Sat Dec 31 09:00:30 1988 -Change owner of links/dir4 -stat( links/dir4 ) returned -...st_dev (0x0:0x0) -...st_ino 6 -...st_mode 40500 -...st_nlink 3 -...st_uid 1 -...st_gid 0 -...st_rdev (0x0:0x0) -...st_size 0 -...st_atime Sat Dec 31 09:00:00 1988 -...st_mtime Sat Dec 31 09:00:00 1988 -...st_ctime Sat Dec 31 09:00:30 1988 -Change group of links/dir1_dir1 -stat( links/dir1_dir1 ) returned -...st_dev (0x0:0x0) -...st_ino 7 -...st_mode 40700 -...st_nlink 3 -...st_uid 0 -...st_gid 1 -...st_rdev (0x0:0x0) -...st_size 536 -...st_atime Sat Dec 31 09:00:00 1988 -...st_mtime Sat Dec 31 09:00:00 1988 -...st_ctime Sat Dec 31 09:00:30 1988 -Change owner of links/dir1_dir1 -stat( links/dir1_dir1 ) returned -...st_dev (0x0:0x0) -...st_ino 7 -...st_mode 40700 -...st_nlink 3 -...st_uid 1 -...st_gid 0 -...st_rdev (0x0:0x0) -...st_size 536 -...st_atime Sat Dec 31 09:00:00 1988 -...st_mtime Sat Dec 31 09:00:00 1988 -...st_ctime Sat Dec 31 09:00:30 1988 -Change group of links/dir1_ dir1 -stat( links/dir1_ dir1 ) returned : No such file or directory -Change owner of links/dir1_ dir1 -stat( links/dir1_ dir1 ) returned : No such file or directory -Change group of links/../links/../links/links -stat( links/../links/../links/links ) returned -...st_dev (0x0:0x0) -...st_ino 9 -...st_mode 40700 -...st_nlink 3 -...st_uid 0 -...st_gid 1 -...st_rdev (0x0:0x0) -...st_size 8844 -...st_atime Sat Dec 31 09:00:00 1988 -...st_mtime Sat Dec 31 09:00:00 1988 -...st_ctime Sat Dec 31 09:00:30 1988 -Change owner of links/../links/../links/links -stat( links/../links/../links/links ) returned : Permission denied -*** END OF STAT TEST 01 *** diff --git a/c/src/tests/psxtests/psxstat/test.c b/c/src/tests/psxtests/psxstat/test.c deleted file mode 100644 index b9426a2328..0000000000 --- a/c/src/tests/psxtests/psxstat/test.c +++ /dev/null @@ -1,857 +0,0 @@ -/* - * This test exercises stat() via fstat() and generates as many of the - * path evaluation cases as possible. - * - * 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 -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#define MAXSYMLINK 5 /* There needs to be a better way of getting this. */ -#define TIMEOUT_VALUE ( 5 * TICKS_PER_SECOND ) - - -/* - * List of files which should exist. - */ - -char *Files[] = { - "/////my_mount_point/dir1/\\//file1\\\\//", - "/my_mount_point/dir1/file2", - "/my_mount_point/dir1/file3", - "/my_mount_point/dir1/file4", - "/my_mount_point/dir1/dir1/file1", - "../../..//my_mount_point/dir1/./././dir1/ file1", - "main.c", - 0 -}; - -/* - * List of directories which should exist. - */ - -char *Directories[] = { - "/my_mount_point/dir1", - "/my_mount_point/dir2", - "/my_mount_point/dir3", - "/my_mount_point/dir4", - "/my_mount_point/dir1/dir1", - "/./././my_mount_point/dir1/ dir1", - "/./././my_mount_point/links", - "///my_mount_point/dir1/dir1/../../dir1/../symlinks/////", - 0 -}; - -char *Links_to_Dirs[]= { - "dir1/dir1/../../links/dir1", - "links/dir2", - "links/dir3", - "links/dir4", - "links/dir1_dir1", - "links/dir1_ dir1", - "links/../links/../links/links", - 0 -}; - -char *Links_to_Files[]= { - "links/dir1_file1", - "links/dir1_file2", - "links/dir1_file3", - "links/dir1_file4", - "links/dir1_dir1_f1", - "links/dir1_dir1 f1", - 0 -}; - -char *Links_to_dirlinks[]= { - "links/links/links/links_dir1", - "links//links_dir2", - "links//links_dir3", - "links//links_dir4", - "links//links_dir1_d1", - "links//links_dir1 d1", - "links//links_links", - 0 -}; - -char *Links_to_filelinks[]= { - "links///links_d1_file1", - "links///links_d1_file2", - "links///links_d1_file3", - "links///links_d1_file4", - "links///links_d1_d1_f1", - "links///links_r1_d1 f1", - 0 -}; - -char *SymLinks[]= { - "/my_mount_point/symlinks/a_file_symlink", - "/my_mount_point/symlinks/a_dir_symlink", - "/my_mount_point/symlinks/a_link_symlink", - "../symlinks/no_file", - "/my_mount_point/symlinks/a_dir_symlink/a_file_symlink", - 0 -}; - -/* - * List of absolute paths to stat. - */ - -char *Good_absolute_paths[] = { - "/my_mount_point/dev", - "////my_mount_point/dir1/\\//file1\\\\//", - "/my_mount_point/dir1/\\\\/file2", - "/my_mount_point/dir1/file3/////\\\\\\", - "/my_mount_point/dir1/file4", - "/my_mount_point/dir1/dir1/file1", - "/my_mount_point/dir1/dir1/ file1", - "/my_mount_point/dir1", - "/my_mount_point/dir2//////\\", - "/my_mount_point/dir3", - "/my_mount_point/dir4", - "/my_mount_point/dir1/dir1", - "/my_mount_point/dir1/ dir1///\\\\", - "/my_mount_point/\\/\\/\\/\\/\\/\\/links\\/\\/\\/\\/\\/\\", - 0 -}; - - -char *Bad_paths[] = { - "/my_mount_point/links/ENAMETOOLONG__________________________", - "/my_mount_point/dir1/file4/NOTADIR", - "/my_mount_point/dir1/dir1/EACCES__", - 0 -}; - -/* - * List of relative paths to stat. - */ - -char *Good_relative_paths[] = { - "dev", - "dir1/\\//file1\\\\//", - "dir1/\\\\/file2", - "dir1/file3/////\\\\\\", - "dir1/file4", - "dir1/dir1/file1", - "dir1/dir1/ file1", - "dir1", - "dir2//////\\", - "dir3", - "dir4", - "dir1/dir1", - "dir1/ dir1///\\\\", - "main.c", - 0 -}; - -/* - * Do a stat on a single file and report the status. - */ - -void stat_a_file( - const char *file -) -{ - int status; - struct stat statbuf; - int major1; - int minor1; - int major2; - int minor2; - - - assert( file ); - - printf( "stat( %s ) returned ", file ); - fflush( stdout ); - - status = stat( file, &statbuf ); - - if ( status == -1 ) { - printf( ": %s\n", strerror( errno ) ); - } else { - - rtems_filesystem_split_dev_t( statbuf.st_dev, major1, minor1 ); - rtems_filesystem_split_dev_t( statbuf.st_rdev, major2, minor2 ); - - - printf("\n...st_dev (0x%x:0x%x)\n", major1, minor1 ); - printf( "...st_ino %x\n", (int) statbuf.st_ino ); - printf( "...st_mode %o\n", statbuf.st_mode ); - printf( "...st_nlink %x\n", statbuf.st_nlink ); - printf( "...st_uid %d\n", statbuf.st_uid ); - printf( "...st_gid %d\n", statbuf.st_gid ); - printf( "...st_rdev (0x%x:0x%x)\n", major2, minor2 ); - printf( "...st_size %d\n",(unsigned int) statbuf.st_size ); - printf( "...st_atime %s", ctime( &statbuf.st_atime ) ); - printf( "...st_mtime %s", ctime( &statbuf.st_mtime ) ); - printf( "...st_ctime %s", ctime( &statbuf.st_ctime ) ); -#if defined(__svr4__) && !defined(__PPC__) && !defined(__sun__) - printf( "...st_blksize %x\n", statbuf.st_blksize ); - printf( "...st_blocks %x\n", statbuf.st_blocks ); -#endif - - } -} - -/* - * stat() multiple files at a time - */ - -void stat_multiple_files( - char **files -) -{ - int i; - - i = 0; - while ( files[i] ) { - stat_a_file( files[i] ); - i++; - } -} - -/* - * chown() multiple files at a time - */ -void chown_multiple_files( - char **files -) -{ - int i; - uid_t st_uid; - gid_t st_gid; - - st_uid = geteuid(); - st_gid = getegid(); - - i = 0; - while ( files[i] ) { - printf("Change group of %s\n", files[i]); - chown( files[i], st_uid, (st_gid+1) ); - stat_a_file( files[i] ); - - printf("Change owner of %s\n", files[i]); - chown( files[i], (st_uid+1), st_gid ); - stat_a_file( files[i] ); - i++; - } - -} - - - -/* - * mknod() multiple files at a time - */ - -void make_multiple_files( - char **files -) -{ - int i; - int status; - - i = 0; - while ( files[i] ) { - printf( "Making file %s\n", files[i] ); - status = mknod( files[i], ( S_IFREG | S_IROTH|S_IWOTH ), 0LL ); - assert( !status ); - i++; - } - puts( "" ); -} - -void make_multiple_bad_files( - char **files -) -{ - int i; - int status; - - i = 0; - while ( files[i] ) { - printf( "Making file %s ", files[i] ); - status = mknod( files[i], ( S_IFREG | S_IROTH|S_IWOTH ), 0LL ); - assert( status ); - printf( ": %s\n", strerror( errno ) ); - i++; - } - puts( "" ); -} - -void make_multiple_links( - char **existing, - char **new -) -{ - int i; - int status; - - i = 0; - while ( new[i] && existing[i] ) { - printf( "Making file %s\n", new[i] ); - status = link( existing[i], new[i] ); - assert( !status ); - i++; - } - puts( "" ); - - status = link( "fred", "bob" ); - assert( status == -1 ); - - status = link( existing[1], "doug/bob" ); - assert( status == -1 ); -} - - -void make_too_many_links() -{ - int i; - int status; - char name [20]; - - status = mkdir("/dummy", S_IRWXU ); - assert( status == 0 ); - - for (i=1; i<= LINK_MAX; i++) { - - sprintf(name,"/LinkName%d",i); - printf( "Making file %s\n", name ); - status = link("/dummy" , name ); - if( i < LINK_MAX ) - assert( !status ); - else - assert( status == -1 ); - - } -} - - -void make_a_symlink( - char *existing, - char *new -) -{ - int status; - char buf[100]; - int len; - - memset( buf, 0, 100 ); - - printf( "Making file %s\n", new ); - status = symlink( existing, new ); - assert( !status ); - - printf( "Verify with readlink\n"); - status = readlink( new, buf, 100 ); - len = strlen( existing ); - assert ( status == len ); - - status = readlink( new, buf, 3 ); - len = strlen( existing ); - if (len < 3 ) - assert( status == len ); - else - assert( status == 3 ); - - status = strcmp( existing, buf ); - assert( !status ); -} - -void make_multiple_symlinks() -{ - int status; - - make_a_symlink( Files[0], SymLinks[0] ); - make_a_symlink( Directories[0], SymLinks[1] ); - make_a_symlink( Links_to_dirlinks[0], SymLinks[2] ); - make_a_symlink( "No_File", SymLinks[3] ); - make_a_symlink( SymLinks[1], SymLinks[4] ); - make_a_symlink( "//my_mount_point/links","/my_mount_point/symlinks/links" ); - - stat_a_file( SymLinks[0] ); - stat_a_file( SymLinks[1] ); - stat_a_file( SymLinks[2] ); - stat_a_file( SymLinks[3] ); - stat_a_file( SymLinks[4] ); - - status = symlink( "//links", "bob/frank" ); - assert (status == -1); - -} -/* -void make_too_many_symlinks() -{ - int i, status; - char name1[8]; - - for (i=1; i <= MAXSYMLINK; i++) { - sprintf( name1, "SymLink%d", i ); - status = symlink( "/dummy", name1 ); - if( i < MAXSYMLINK ) - assert( !status ); - else - assert( status == -1 ); - } -} -*/ -void make_many_symlinks( - char *real_file, - int link_count -) -{ - int i; - char name1[5]; - char name2[5]; - char *link_file; - - link_file = real_file; - for (i=1; i < link_count; i++) { - sprintf( name1, "%d", i ); - make_a_symlink( link_file, name1 ); - strcpy( name2, name1 ); - link_file = name2; - } - - for (i=1; i < link_count; i++) { - sprintf( name1, "%d", i ); - stat_a_file( name1 ); - } - -} - -/* - * mkdir() multiple directories at a time - */ - -void make_multiple_directories( - char **files -) -{ - int i; - int status; - - i = 0; - while ( files[i] ) { - printf( "Making directory %s\n", files[i] ); - status = mkdir( files[i], S_IRWXU ); - assert( !status ); - i++; - } - puts( "" ); -} - -/* - * Cause faults. - */ - - -void Cause_faults() -{ - int fd; - int status; - char longer_name[100]; - rtems_filesystem_mount_table_entry_t *mt_entry; - - /* - * Verify chmod with an invalid type. - */ - - printf("\n\nPass an invalid mode to chmod should fail with EPERM \n" ); - status = chmod( Files[0], S_IFREG ); - assert( status == -1 ); - assert( errno == EPERM ); - - /* - * Change file to executable then try to chdir to it. - */ - - status = chmod( Files[0], S_IXUSR ); - assert( status != -1 ); - - printf("chdir to a file should fail with ENOTDIR\n"); - status = chdir( Files[0] ); - assert( status == -1 ); - assert( errno == ENOTDIR ); - - /* - * Change mode to read/write on a directory. - * Verify directory works properly. - */ - - printf("Verify RWX permission on %s via access\n", Directories[0]); - status = access( Directories[0], ( R_OK | W_OK | X_OK ) ); - assert( status == 0 ); - - printf( "chmod of %s to Read/Write\n", Directories[0] ); - status = chmod( Directories[0], (S_IXGRP | S_IXOTH) ); - assert( status == 0 ); - - printf( "chmod fred should fail with ENOENT\n" ); - status = chmod( "fred", (S_IXGRP | S_IXOTH) ); - assert( status == -1 ); - assert( errno == ENOENT ); - - strcpy(longer_name, Directories[0] ); - strcat(longer_name, "/BADNAME" ); - printf( "Create under %s should fail with EACCES\n", Directories[0] ); - status = mkdir( longer_name , S_IRWXU ); - assert( status == -1 ); - assert( errno == EACCES ); - - printf("chdir to %s should fail with EACCES\n", Directories[4] ); - status = chdir( Directories[4] ); - assert( status == -1 ); - assert( errno == EACCES ); - - /* - * Check stat with a NULL buffer. - */ - - printf("Stat with a NULL buffer should fail with EFAULT\n"); - status = stat( Directories[0], NULL ); - assert( status == -1 ); - assert( errno == EFAULT ); - - /* - * Set current to a directory with no owner permissions. - * Verify it works properly. - */ - - printf( "\n\nchmod of %s to Read/Write\n", Directories[0] ); - status = chmod( Directories[0], (S_IXGRP | S_IXOTH) ); - assert( status == 0 ); - - printf("mkdir %s should fail with EACCESS\n", longer_name ); - status = mkdir( longer_name , S_IRWXU ); - assert( status == -1 ); - assert( errno == EACCES ); - - printf("\n%s Should exist ( access )\n",Directories[0] ); - status = access( Directories[0], F_OK ); - assert( status == 0 ); - printf("\n%s Should have read permission( access )\n",Directories[0] ); - status = access( Directories[0], R_OK ); - assert( status != 0 ); - printf("\n%s Should have write permission( access )\n",Directories[0] ); - status = access( Directories[0], W_OK ); - assert( status != 0 ); - printf("\n%s Should not have execute permission( access )\n",Directories[0] ); - status = access( Directories[0], X_OK ); - assert( status != 0 ); - - printf("\nRestore %s to RWX\n",Directories[0] ); - status = chmod( Directories[0], S_IRWXU ); - assert( status == 0 ); - - printf("chdir to /my_mount_point \n"); - status = chdir( "/my_mount_point" ); - assert( status == 0 ); - - /* - * Remove one of the directories. - * Verify links to the removed directory still work. - */ - - printf( "Remove %s\n", Directories[5] ); - status = rmdir( Directories[5] ); - assert( status == 0 ); - - stat_a_file( Directories[5] ); - status = access( Directories[5], F_OK ); - assert( status != 0 ); - - stat_a_file( Links_to_Dirs[5] ); - status = readlink( Links_to_Dirs[5], longer_name, 3 ); - assert( status == -1 ); - assert( errno == EINVAL ); - - stat_a_file( Links_to_dirlinks[5] ); - printf("Chdir to %s\n", Links_to_Dirs[5] ); - status = chdir( Links_to_Dirs[5] ); - assert( status == 0 ); - - /* - * Verify we cannot move up from a node with no parent node. - */ - - printf("Chdir to .. should fail with ENOENT\n" ); - status = chdir( ".." ); - assert( status == -1 ); - assert( errno == ENOENT ); - - /* - * Create a subdirectory under the dangling node. - */ - - printf("mkdir ../t should fail with ENOENT\n" ); - status = mkdir( "../t" , S_IRWXU ); - assert( status == -1 ); - assert( errno == ENOENT ); - - printf("mkdir t\n"); - status = mkdir( "t" , S_IRWXU ); - assert( status == 0 ); - - printf("chdir to /my_mount_point\n"); - status = chdir( "/my_mount_point" ); - assert( status == 0 ); - - /* - * Check rmdir, rmnod, and unlink - */ - - printf("rmdir %s should fail with ENOTDIR\n", Links_to_Dirs[5] ); - status = rmdir( Links_to_Dirs[5] ); - assert( status == -1 ); - assert( errno == ENOTDIR ); - - printf("unlink %s\n", Links_to_Dirs[5] ); - status = unlink( Links_to_Dirs[5] ); - assert( status == 0 ); - - printf("unlink %s should fail with ENOTEMPTY\n", Links_to_dirlinks[5] ); - status = unlink( Links_to_dirlinks[5] ); - assert( status == -1 ); - assert( errno == ENOTEMPTY ); - - strcpy( longer_name, Links_to_dirlinks[5] ); - strcat( longer_name, "/t"); - printf("rmdir %s\n", longer_name ); - status = rmdir( longer_name ); - assert( status == 0 ); - - printf("unlink %s\n", Links_to_Dirs[5]); - status = unlink( Links_to_dirlinks[5] ); - assert( status == 0 ); - - status = chdir( Directories[0] ); - status = mkdir ( "my_mount_point", S_IRWXU ); - assert( status == 0 ); - - printf("Attempting to mount IMFS file system at /dir1/my_mount_point \n"); - status = mount( - &mt_entry, - &IMFS_ops, - RTEMS_FILESYSTEM_READ_WRITE, - NULL, - "/my_mount_point/dir1/my_mount_point" ); - assert( status == 0 ); - - printf("rmdir /dir1/my_mount_point should fail with EBUSY\n"); - status = rmdir ("/my_mount_point/dir1/my_mount_point" ); - assert( status == -1 ); - assert( errno == EBUSY ); - - printf( "Unmount /my_mount_point/dir1/my_mount_point\n"); - status = unmount( "/my_mount_point/dir1/my_mount_point" ); - assert( status == 0 ); - - /* - * Verify write permission is checked. - */ - - printf("chmod of %s to group and other execute\n", Files[0] ); - status = chmod (Files[0], (S_IXGRP | S_IXOTH) ); - assert( status == 0 ); - - printf("Open %s for write should fail with EACCES\n", Files[0] ); - fd = open (Files[0], O_WRONLY); - assert( fd == -1 ); - assert( errno == EACCES ); - - printf("chmod of %s to User Execute and Read\n", Directories[3] ); - status = chmod (Directories[3], (S_IXUSR | S_IRUSR) ); - assert( status == 0 ); - strcpy(longer_name, Directories[3] ); - strcat(longer_name, "/NewFile" ); - printf("Mkdir of %s should fail with EACCES\n",longer_name ); - status = mkdir( longer_name, S_IRWXU ); - assert( status != 0 ); - assert( errno == EACCES ); - - printf("Making too many hard links.\n" ); - make_too_many_links( ); - - printf( "pass fstat a null pointer should fail with EFAULT\n"); - status = fstat( fd, NULL ); - assert( status == -1 ); - assert( errno == EFAULT); - - /* - * The current directory MUST be restored at the end of this test. - */ - - printf("chdir to /my_mount_point \n"); - status = chdir( "/my_mount_point" ); - assert( status == 0 ); - -} - -void Show_Time() -{ - rtems_time_of_day time; - rtems_status_code status; - - status = rtems_clock_get( RTEMS_CLOCK_GET_TOD, &time ); - printf(">>>>Current Time: "); - print_time( " - rtems_clock_get - ", &time, "\n" ); -} - -/* - * main entry point to the test - */ - -#if defined(__rtems__) -int test_main(void) -#else -int main( - int argc, - char **argv -) -#endif -{ - rtems_status_code status; - rtems_time_of_day time; - rtems_filesystem_mount_table_entry_t *mt_entry; - - puts( "\n\n*** STAT TEST 01 ***" ); - - build_time( &time, 12, 31, 1988, 9, 0, 0, 0 ); - status = rtems_clock_set( &time ); - Show_Time(); - - /* - * Create and mount another version of the filesyste. - * This allows expected node id's to be consistant across - * platforms and bsp's. - */ - - status = mkdir("/my_mount_point", S_IRWXU ); - assert( status == 0 ); - status = mount( - &mt_entry, - &IMFS_ops, - RTEMS_FILESYSTEM_READ_WRITE, - NULL, - "my_mount_point" ); - assert( status == 0 ); - status = chdir( "/my_mount_point" ); - assert( status == 0 ); - status = mkdir("dev", S_IRWXU ); - assert( status == 0 ); - - - /* - * Create the files and directories for the test. - */ - - make_multiple_directories( Directories ); - make_multiple_files( Files ); - make_multiple_links( Directories, Links_to_Dirs ); - make_multiple_links( Files, Links_to_Files ); - - status = rtems_task_wake_after( TIMEOUT_VALUE ); - make_multiple_links( Links_to_Dirs, Links_to_dirlinks ); - status = rtems_task_wake_after( TIMEOUT_VALUE ); - make_multiple_links( Links_to_Files, Links_to_filelinks ); - - status = rtems_task_wake_after( TIMEOUT_VALUE ); - - /* - * Now go through all the absolute path. - */ - - puts( "Doing the stat() on all the good absolute paths" ); - stat_multiple_files( Good_absolute_paths ); - - /* - * run through the relative paths. - */ - - puts( "\nDoing the stat() on all the good relative paths" ); - stat_multiple_files( Good_relative_paths ); - - /* - * Change directory and releative paths are now bad. - */ - - puts("\nchdir to dev"); - chdir("dev"); - puts("\nstat relative paths that are now bad"); - stat_multiple_files( Good_relative_paths ); - - /* - * Change directory to the link directory and follow links. - */ - - puts("\nchdir to ../links"); - chdir("../links"); - puts("Doing the stat() on good links\n"); - stat_multiple_files( Links_to_Dirs ); - stat_multiple_files( Links_to_Files ); - stat_multiple_files( Links_to_dirlinks ); - stat_multiple_files( Links_to_filelinks ); - - /* - * Chmod on dir1/dir1. This allows the error path to be hit. - */ - - printf( "chmod of %s to Read/Write\n", Directories[4] ); - chmod( Directories[4], (S_IROTH|S_IWOTH) ); - puts( "\nDoing the stat() on all the bad paths" ); - - stat_multiple_files( Bad_paths ); - make_multiple_bad_files( Bad_paths ); - - printf( "Return %s to RWX\n", Directories[4] ); - chmod( Directories[4], S_IRWXU ); - - - /* - * Check out symbolic links. - */ - - make_multiple_symlinks(); - make_many_symlinks( "/symlinks", 10 ); - - status = rtems_task_wake_after( TIMEOUT_VALUE ); - Cause_faults(); - - status = rtems_task_wake_after( TIMEOUT_VALUE ); - chown_multiple_files( Files ); - - status = rtems_task_wake_after( TIMEOUT_VALUE ); - chown_multiple_files( Links_to_Dirs ); - - puts( "\n\n*** END OF STAT TEST 01 ***" ); - rtems_test_exit(0); -} - - - - - - - diff --git a/c/src/tests/psxtests/psxtests.am b/c/src/tests/psxtests/psxtests.am deleted file mode 100644 index edf4bdeb51..0000000000 --- a/c/src/tests/psxtests/psxtests.am +++ /dev/null @@ -1,25 +0,0 @@ -## $Id$ - -project_bspdir=$(PROJECT_ROOT)/@RTEMS_BSP@ - -$(project_bspdir)/tests: - @$(mkinstalldirs) $@ - -$(project_bspdir)/tests/$(TEST)$(LIB_VARIANT).exe: $(PGM) - $(INSTALL_PROGRAM) $< $@ - -$(project_bspdir)/tests/screens: - @$(mkinstalldirs) $@ - -$(project_bspdir)/tests/screens/psxtests: - @$(mkinstalldirs) $@ - -$(project_bspdir)/tests/screens/psxtests/$(TEST).scn: $(TEST).scn - $(INSTALL_DATA) $< $@ - -TMPINSTALL_FILES = \ -$(project_bspdir)/tests \ -$(project_bspdir)/tests/$(TEST)$(LIB_VARIANT).exe \ -$(project_bspdir)/tests/screens \ -$(project_bspdir)/tests/screens/psxtests \ -$(project_bspdir)/tests/screens/psxtests/$(TEST).scn diff --git a/c/src/tests/psxtests/psxtime/.cvsignore b/c/src/tests/psxtests/psxtime/.cvsignore deleted file mode 100644 index 282522db03..0000000000 --- a/c/src/tests/psxtests/psxtime/.cvsignore +++ /dev/null @@ -1,2 +0,0 @@ -Makefile -Makefile.in diff --git a/c/src/tests/psxtests/psxtime/Makefile.am b/c/src/tests/psxtests/psxtime/Makefile.am deleted file mode 100644 index c30f797296..0000000000 --- a/c/src/tests/psxtests/psxtime/Makefile.am +++ /dev/null @@ -1,39 +0,0 @@ -## -## $Id$ -## - - -TEST = psxtime - -MANAGERS = all - -C_FILES = main.c test.c -C_O_FILES = $(C_FILES:%.c=${ARCH}/%.$(OBJEXT)) - -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 += -# - -${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/psxtime/main.c b/c/src/tests/psxtests/psxtime/main.c deleted file mode 100644 index c6ebe0b94b..0000000000 --- a/c/src/tests/psxtests/psxtime/main.c +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Simple test program -- simplified version of sample test hello. - * - * 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 TEST_INIT - -#include -#include /* instantiate buffering code if needed */ - -void test_main( void ); - -rtems_task Init( - rtems_task_argument ignored -) -{ - test_main(); - rtems_test_exit( 0 ); -} - -/* configuration information */ - -#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 - -#include - -/* end of file */ diff --git a/c/src/tests/psxtests/psxtime/psxtime.scn b/c/src/tests/psxtests/psxtime/psxtime.scn deleted file mode 100644 index 57f751fcf5..0000000000 --- a/c/src/tests/psxtests/psxtime/psxtime.scn +++ /dev/null @@ -1,302 +0,0 @@ - - -*** POSIX TIME OF DAY TEST *** -rtems_clock_set 12:45:00 01/01/1988 -rtems_clock_get 12:45:00 01/01/1988 -gettimeofday: Fri Jan 1 12:45:00 1988 -time: Fri Jan 1 12:45:00 1988 -localtime: Fri Jan 1 12:45:00 1988 -gmtime: Fri Jan 1 12:45:00 1988 - -rtems_clock_get 12:45:05 01/01/1988 -gettimeofday: Fri Jan 1 12:45:05 1988 -time: Fri Jan 1 12:45:05 1988 -localtime: Fri Jan 1 12:45:05 1988 -gmtime: Fri Jan 1 12:45:05 1988 - -rtems_clock_get 12:45:10 01/01/1988 -gettimeofday: Fri Jan 1 12:45:10 1988 -time: Fri Jan 1 12:45:10 1988 -localtime: Fri Jan 1 12:45:10 1988 -gmtime: Fri Jan 1 12:45:10 1988 - -rtems_clock_get 12:45:15 01/01/1988 -gettimeofday: Fri Jan 1 12:45:15 1988 -time: Fri Jan 1 12:45:15 1988 -localtime: Fri Jan 1 12:45:15 1988 -gmtime: Fri Jan 1 12:45:15 1988 - -rtems_clock_get 12:45:20 01/01/1988 -gettimeofday: Fri Jan 1 12:45:20 1988 -time: Fri Jan 1 12:45:20 1988 -localtime: Fri Jan 1 12:45:20 1988 -gmtime: Fri Jan 1 12:45:20 1988 - -rtems_clock_get 12:45:25 01/01/1988 -gettimeofday: Fri Jan 1 12:45:25 1988 -time: Fri Jan 1 12:45:25 1988 -localtime: Fri Jan 1 12:45:25 1988 -gmtime: Fri Jan 1 12:45:25 1988 - -rtems_clock_set 09:00:00 12/31/1988 -rtems_clock_get 09:00:00 12/31/1988 -gettimeofday: Sat Dec 31 09:00:00 1988 -time: Sat Dec 31 09:00:00 1988 -localtime: Sat Dec 31 09:00:00 1988 -gmtime: Sat Dec 31 09:00:00 1988 - -rtems_clock_get 09:00:05 12/31/1988 -gettimeofday: Sat Dec 31 09:00:05 1988 -time: Sat Dec 31 09:00:05 1988 -localtime: Sat Dec 31 09:00:05 1988 -gmtime: Sat Dec 31 09:00:05 1988 - -rtems_clock_get 09:00:10 12/31/1988 -gettimeofday: Sat Dec 31 09:00:10 1988 -time: Sat Dec 31 09:00:10 1988 -localtime: Sat Dec 31 09:00:10 1988 -gmtime: Sat Dec 31 09:00:10 1988 - -rtems_clock_get 09:00:15 12/31/1988 -gettimeofday: Sat Dec 31 09:00:15 1988 -time: Sat Dec 31 09:00:15 1988 -localtime: Sat Dec 31 09:00:15 1988 -gmtime: Sat Dec 31 09:00:15 1988 - -rtems_clock_get 09:00:20 12/31/1988 -gettimeofday: Sat Dec 31 09:00:20 1988 -time: Sat Dec 31 09:00:20 1988 -localtime: Sat Dec 31 09:00:20 1988 -gmtime: Sat Dec 31 09:00:20 1988 - -rtems_clock_get 09:00:25 12/31/1988 -gettimeofday: Sat Dec 31 09:00:25 1988 -time: Sat Dec 31 09:00:25 1988 -localtime: Sat Dec 31 09:00:25 1988 -gmtime: Sat Dec 31 09:00:25 1988 - -rtems_clock_set 23:55:59 12/31/1999 -rtems_clock_get 23:55:59 12/31/1999 -gettimeofday: Fri Dec 31 23:55:59 1999 -time: Fri Dec 31 23:55:59 1999 -localtime: Fri Dec 31 23:55:59 1999 -gmtime: Fri Dec 31 23:55:59 1999 - -rtems_clock_get 23:56:04 12/31/1999 -gettimeofday: Fri Dec 31 23:56:04 1999 -time: Fri Dec 31 23:56:04 1999 -localtime: Fri Dec 31 23:56:04 1999 -gmtime: Fri Dec 31 23:56:04 1999 - -rtems_clock_get 23:56:09 12/31/1999 -gettimeofday: Fri Dec 31 23:56:09 1999 -time: Fri Dec 31 23:56:09 1999 -localtime: Fri Dec 31 23:56:09 1999 -gmtime: Fri Dec 31 23:56:09 1999 - -rtems_clock_get 23:56:14 12/31/1999 -gettimeofday: Fri Dec 31 23:56:14 1999 -time: Fri Dec 31 23:56:14 1999 -localtime: Fri Dec 31 23:56:14 1999 -gmtime: Fri Dec 31 23:56:14 1999 - -rtems_clock_get 23:56:19 12/31/1999 -gettimeofday: Fri Dec 31 23:56:19 1999 -time: Fri Dec 31 23:56:19 1999 -localtime: Fri Dec 31 23:56:19 1999 -gmtime: Fri Dec 31 23:56:19 1999 - -rtems_clock_get 23:56:24 12/31/1999 -gettimeofday: Fri Dec 31 23:56:24 1999 -time: Fri Dec 31 23:56:24 1999 -localtime: Fri Dec 31 23:56:24 1999 -gmtime: Fri Dec 31 23:56:24 1999 - -rtems_clock_set 00:01:30 06/30/1999 -rtems_clock_get 00:01:30 06/30/1999 -gettimeofday: Wed Jun 30 00:01:30 1999 -time: Wed Jun 30 00:01:30 1999 -localtime: Wed Jun 30 00:01:30 1999 -gmtime: Wed Jun 30 00:01:30 1999 - -rtems_clock_get 00:01:35 06/30/1999 -gettimeofday: Wed Jun 30 00:01:35 1999 -time: Wed Jun 30 00:01:35 1999 -localtime: Wed Jun 30 00:01:35 1999 -gmtime: Wed Jun 30 00:01:35 1999 - -rtems_clock_get 00:01:40 06/30/1999 -gettimeofday: Wed Jun 30 00:01:40 1999 -time: Wed Jun 30 00:01:40 1999 -localtime: Wed Jun 30 00:01:40 1999 -gmtime: Wed Jun 30 00:01:40 1999 - -rtems_clock_get 00:01:45 06/30/1999 -gettimeofday: Wed Jun 30 00:01:45 1999 -time: Wed Jun 30 00:01:45 1999 -localtime: Wed Jun 30 00:01:45 1999 -gmtime: Wed Jun 30 00:01:45 1999 - -rtems_clock_get 00:01:50 06/30/1999 -gettimeofday: Wed Jun 30 00:01:50 1999 -time: Wed Jun 30 00:01:50 1999 -localtime: Wed Jun 30 00:01:50 1999 -gmtime: Wed Jun 30 00:01:50 1999 - -rtems_clock_get 00:01:55 06/30/1999 -gettimeofday: Wed Jun 30 00:01:55 1999 -time: Wed Jun 30 00:01:55 1999 -localtime: Wed Jun 30 00:01:55 1999 -gmtime: Wed Jun 30 00:01:55 1999 - -rtems_clock_set 00:15:59 01/01/2000 -rtems_clock_get 00:15:59 01/01/2000 -gettimeofday: Sat Jan 1 00:15:59 2000 -time: Sat Jan 1 00:15:59 2000 -localtime: Sat Jan 1 00:15:59 2000 -gmtime: Sat Jan 1 00:15:59 2000 - -rtems_clock_get 00:16:04 01/01/2000 -gettimeofday: Sat Jan 1 00:16:04 2000 -time: Sat Jan 1 00:16:04 2000 -localtime: Sat Jan 1 00:16:04 2000 -gmtime: Sat Jan 1 00:16:04 2000 - -rtems_clock_get 00:16:09 01/01/2000 -gettimeofday: Sat Jan 1 00:16:09 2000 -time: Sat Jan 1 00:16:09 2000 -localtime: Sat Jan 1 00:16:09 2000 -gmtime: Sat Jan 1 00:16:09 2000 - -rtems_clock_get 00:16:14 01/01/2000 -gettimeofday: Sat Jan 1 00:16:14 2000 -time: Sat Jan 1 00:16:14 2000 -localtime: Sat Jan 1 00:16:14 2000 -gmtime: Sat Jan 1 00:16:14 2000 - -rtems_clock_get 00:16:19 01/01/2000 -gettimeofday: Sat Jan 1 00:16:19 2000 -time: Sat Jan 1 00:16:19 2000 -localtime: Sat Jan 1 00:16:19 2000 -gmtime: Sat Jan 1 00:16:19 2000 - -rtems_clock_get 00:16:24 01/01/2000 -gettimeofday: Sat Jan 1 00:16:24 2000 -time: Sat Jan 1 00:16:24 2000 -localtime: Sat Jan 1 00:16:24 2000 -gmtime: Sat Jan 1 00:16:24 2000 - -rtems_clock_set 05:10:59 02/02/2005 -rtems_clock_get 05:10:59 02/02/2005 -gettimeofday: Wed Feb 2 05:10:59 2005 -time: Wed Feb 2 05:10:59 2005 -localtime: Wed Feb 2 05:10:59 2005 -gmtime: Wed Feb 2 05:10:59 2005 - -rtems_clock_get 05:11:04 02/02/2005 -gettimeofday: Wed Feb 2 05:11:04 2005 -time: Wed Feb 2 05:11:04 2005 -localtime: Wed Feb 2 05:11:04 2005 -gmtime: Wed Feb 2 05:11:04 2005 - -rtems_clock_get 05:11:09 02/02/2005 -gettimeofday: Wed Feb 2 05:11:09 2005 -time: Wed Feb 2 05:11:09 2005 -localtime: Wed Feb 2 05:11:09 2005 -gmtime: Wed Feb 2 05:11:09 2005 - -rtems_clock_get 05:11:14 02/02/2005 -gettimeofday: Wed Feb 2 05:11:14 2005 -time: Wed Feb 2 05:11:14 2005 -localtime: Wed Feb 2 05:11:14 2005 -gmtime: Wed Feb 2 05:11:14 2005 - -rtems_clock_get 05:11:19 02/02/2005 -gettimeofday: Wed Feb 2 05:11:19 2005 -time: Wed Feb 2 05:11:19 2005 -localtime: Wed Feb 2 05:11:19 2005 -gmtime: Wed Feb 2 05:11:19 2005 - -rtems_clock_get 05:11:24 02/02/2005 -gettimeofday: Wed Feb 2 05:11:24 2005 -time: Wed Feb 2 05:11:24 2005 -localtime: Wed Feb 2 05:11:24 2005 -gmtime: Wed Feb 2 05:11:24 2005 - -rtems_clock_set 10:05:59 03/03/2010 -rtems_clock_get 10:05:59 03/03/2010 -gettimeofday: Wed Mar 3 10:05:59 2010 -time: Wed Mar 3 10:05:59 2010 -localtime: Wed Mar 3 10:05:59 2010 -gmtime: Wed Mar 3 10:05:59 2010 - -rtems_clock_get 10:06:04 03/03/2010 -gettimeofday: Wed Mar 3 10:06:04 2010 -time: Wed Mar 3 10:06:04 2010 -localtime: Wed Mar 3 10:06:04 2010 -gmtime: Wed Mar 3 10:06:04 2010 - -rtems_clock_get 10:06:09 03/03/2010 -gettimeofday: Wed Mar 3 10:06:09 2010 -time: Wed Mar 3 10:06:09 2010 -localtime: Wed Mar 3 10:06:09 2010 -gmtime: Wed Mar 3 10:06:09 2010 - -rtems_clock_get 10:06:14 03/03/2010 -gettimeofday: Wed Mar 3 10:06:14 2010 -time: Wed Mar 3 10:06:14 2010 -localtime: Wed Mar 3 10:06:14 2010 -gmtime: Wed Mar 3 10:06:14 2010 - -rtems_clock_get 10:06:19 03/03/2010 -gettimeofday: Wed Mar 3 10:06:19 2010 -time: Wed Mar 3 10:06:19 2010 -localtime: Wed Mar 3 10:06:19 2010 -gmtime: Wed Mar 3 10:06:19 2010 - -rtems_clock_get 10:06:24 03/03/2010 -gettimeofday: Wed Mar 3 10:06:24 2010 -time: Wed Mar 3 10:06:24 2010 -localtime: Wed Mar 3 10:06:24 2010 -gmtime: Wed Mar 3 10:06:24 2010 - -rtems_clock_set 15:00:59 04/04/2020 -rtems_clock_get 15:00:59 04/04/2020 -gettimeofday: Sat Apr 4 15:00:59 2020 -time: Sat Apr 4 15:00:59 2020 -localtime: Sat Apr 4 15:00:59 2020 -gmtime: Sat Apr 4 15:00:59 2020 - -rtems_clock_get 15:01:04 04/04/2020 -gettimeofday: Sat Apr 4 15:01:04 2020 -time: Sat Apr 4 15:01:04 2020 -localtime: Sat Apr 4 15:01:04 2020 -gmtime: Sat Apr 4 15:01:04 2020 - -rtems_clock_get 15:01:09 04/04/2020 -gettimeofday: Sat Apr 4 15:01:09 2020 -time: Sat Apr 4 15:01:09 2020 -localtime: Sat Apr 4 15:01:09 2020 -gmtime: Sat Apr 4 15:01:09 2020 - -rtems_clock_get 15:01:14 04/04/2020 -gettimeofday: Sat Apr 4 15:01:14 2020 -time: Sat Apr 4 15:01:14 2020 -localtime: Sat Apr 4 15:01:14 2020 -gmtime: Sat Apr 4 15:01:14 2020 - -rtems_clock_get 15:01:19 04/04/2020 -gettimeofday: Sat Apr 4 15:01:19 2020 -time: Sat Apr 4 15:01:19 2020 -localtime: Sat Apr 4 15:01:19 2020 -gmtime: Sat Apr 4 15:01:19 2020 - -rtems_clock_get 15:01:24 04/04/2020 -gettimeofday: Sat Apr 4 15:01:24 2020 -time: Sat Apr 4 15:01:24 2020 -localtime: Sat Apr 4 15:01:24 2020 -gmtime: Sat Apr 4 15:01:24 2020 - - - -*** END OF TIME OF DAY TEST 01 *** diff --git a/c/src/tests/psxtests/psxtime/test.c b/c/src/tests/psxtests/psxtime/test.c deleted file mode 100644 index 8f6511dcfe..0000000000 --- a/c/src/tests/psxtests/psxtime/test.c +++ /dev/null @@ -1,115 +0,0 @@ -/* - * This test exercises the time of day services via the Classic - * and POSIX APIs to make sure they are consistent. - * - * 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 -#include -#include -#include -#include -#include -#include -#include -#include -#include - -/* - * List of dates and times to test. - */ -#define NUMBER_OF_DATES 8 -rtems_time_of_day Dates[ NUMBER_OF_DATES ] = { - /* YEAR, MONTH, DAY, HOUR, MINUTE, SECOND, TICKS */ - { 1988, 1, 1, 12, 45, 00, 0 }, - { 1988, 12, 31, 9, 00, 00, 0 }, - { 1999, 12, 31, 23, 55, 59, 0 }, - { 1999, 06, 30, 00, 01, 30, 0 }, - { 2000, 1, 1, 0, 15, 59, 0 }, - { 2005, 2, 2, 5, 10, 59, 0 }, - { 2010, 3, 3, 10, 5, 59, 0 }, - { 2020, 4, 4, 15, 0, 59, 0 }, -}; - -/* - * Check out a single date and time - */ - -void check_a_tod( - rtems_time_of_day *the_tod -) -{ - rtems_status_code status; - rtems_time_of_day new_tod; - time_t a_time_t; - struct timeval tv; - struct tm *a_tm; - int result; - int i = 0; - - print_time( "rtems_clock_set ", the_tod, "\n" ); - status = rtems_clock_set( the_tod ); - assert( !status ); - - do { - status = rtems_clock_get( RTEMS_CLOCK_GET_TOD, &new_tod ); - assert( !status ); - print_time( "rtems_clock_get ", &new_tod, "\n" ); - - /* now do the posix time gets */ - result = gettimeofday( &tv, 0 ); - assert( result == 0 ); - a_time_t = tv.tv_sec; /* ctime() takes a time_t */ - printf( "gettimeofday: %s", ctime( &a_time_t) ); - - a_time_t = time( 0 ); - printf( "time: %s", ctime( &a_time_t ) ); - - a_tm = localtime( &a_time_t ); - printf( "localtime: %s", asctime( a_tm ) ); - - a_tm = gmtime( &a_time_t ); - printf( "gmtime: %s\n", asctime( a_tm ) ); - - status = rtems_task_wake_after( 5 * TICKS_PER_SECOND ); - - i++; - - } while( i < 6 ); -} - -/* - * main entry point to the test - */ - -#if defined(__rtems__) -int test_main(void) -#else -int main( - int argc, - char **argv -) -#endif -{ - int i; - - puts( "\n\n*** POSIX TIME OF DAY TEST ***" ); - - i = 0; - while ( i < NUMBER_OF_DATES ) { - check_a_tod( &Dates[i] ); - i++; - } - - puts( "\n\n*** END OF TIME OF DAY TEST 01 ***" ); - rtems_test_exit(0); -} - diff --git a/c/src/tests/psxtests/psxtimer/.cvsignore b/c/src/tests/psxtests/psxtimer/.cvsignore deleted file mode 100644 index 282522db03..0000000000 --- a/c/src/tests/psxtests/psxtimer/.cvsignore +++ /dev/null @@ -1,2 +0,0 @@ -Makefile -Makefile.in diff --git a/c/src/tests/psxtests/psxtimer/Makefile.am b/c/src/tests/psxtests/psxtimer/Makefile.am deleted file mode 100644 index 041b67ff34..0000000000 --- a/c/src/tests/psxtests/psxtimer/Makefile.am +++ /dev/null @@ -1,44 +0,0 @@ -## -## $Id$ -## - - -TEST = psxtimer - -MANAGERS = all - -C_FILES = psxtimer.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/psxtimer/psxtimer.c b/c/src/tests/psxtests/psxtimer/psxtimer.c deleted file mode 100644 index ee217523af..0000000000 --- a/c/src/tests/psxtests/psxtimer/psxtimer.c +++ /dev/null @@ -1,340 +0,0 @@ -/* - * - * This is a simple real-time applications which contains 3 periodic tasks. - * - * Task A is an independent task. - * - * Task B and C share a data. - * - * Tasks are implemented as POSIX threads. - * - * The share data is protected with a POSIX mutex. - * - * Other POSIX facilities such as timers, condition, .. is also used - * - * 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 /* thread facilities */ -#include /* signal facilities */ -#include /* sleep facilities */ -#include /* schedule facilities */ -#include /* time facilities */ -#include /* console facilities */ - - - -/* temporal parameters of a task */ - -struct periodic_params { - struct timespec period; - int signo; /* signal number */ - int id; /* task identification */ - }; - -pthread_attr_t attr; - -/* shared datum */ - -struct shared_data { - pthread_mutex_t mutex; - pthread_cond_t sync; - int updated; - int x; - }; - -struct shared_data data; - -/* task A */ - -void * task_a (void *arg) -{ - struct timespec my_period; - int my_sig, received_sig; - struct itimerspec timerdata; - timer_t timer_id; - time_t clock; - struct sigevent event; - sigset_t set; - - my_period = ((struct periodic_params*) arg)->period; - my_sig = ((struct periodic_params*) arg)->signo; - - /* timer create */ - event.sigev_notify = SIGEV_SIGNAL; - event.sigev_signo = my_sig; - if (timer_create (CLOCK_REALTIME, &event, &timer_id) == -1) { - perror ("Error in timer creation\n"); - pthread_exit ((void *) -1); - } - - /* block the timer signal */ - sigemptyset (&set); - sigaddset (&set,my_sig); - pthread_sigmask(SIG_BLOCK,&set,NULL); - - /* set the timer in periodic mode */ - timerdata.it_interval = my_period; - timerdata.it_value = my_period; - if (timer_settime(timer_id, 0, &timerdata, NULL) == -1) { - perror ("Error in timer setting\n"); - pthread_exit ((void *) -1); - } - - /* periodic activity */ - while(1) { - if (sigwait(&set,&received_sig) == -1) { - perror ("Error in sigwait\n"); - } - clock = time(NULL); - printf("Executing task A %s", ctime(&clock)); - } - return NULL; -} - -/* task B */ - -void * task_b (void *arg) -{ - struct timespec my_period; - int my_sig, received_sig; - struct itimerspec timerdata; - timer_t timer_id; - time_t clock; - struct sigevent event; - sigset_t set; - - int x; /* value to be copied to the shared datum */ - - my_period = ((struct periodic_params*) arg)->period; - my_sig = ((struct periodic_params*) arg)->signo; - - x = 1; - - /* timer create */ - event.sigev_notify = SIGEV_SIGNAL; - event.sigev_signo = my_sig; - if (timer_create (CLOCK_REALTIME, &event, &timer_id) == -1) { - perror ("Error in timer creation\n"); - pthread_exit ((void *) -1); - } - - /* block the timer signal */ - sigemptyset (&set); - sigaddset (&set,my_sig); - pthread_sigmask(SIG_BLOCK,&set,NULL); - - /* set the timer in periodic mode */ - timerdata.it_interval = my_period; - timerdata.it_value = my_period; - if (timer_settime(timer_id, 0, &timerdata, NULL) == -1) { - perror ("Error in timer setting\n"); - pthread_exit ((void *) -1); - } - - /* periodic activity */ - while(1) { - if (sigwait(&set,&received_sig) == -1) { - perror ("Error in sigwait\n"); - pthread_exit ((void *) -1); - } - pthread_mutex_lock (&data.mutex); - clock = time(NULL); - printf("Executing task B with x = %i %s", x, ctime(&clock)); - data.x = x; - data.updated = TRUE; - pthread_cond_signal (&data.sync); - pthread_mutex_unlock (&data.mutex); - x++; - } - return NULL; -} - -/* task C */ - -void * task_c (void *arg) -{ - struct timespec my_period; - int my_sig, received_sig; - struct itimerspec timerdata; - timer_t timer_id; - time_t clock; - struct sigevent event; - sigset_t set; - - int x; /* value to be copied to the shared datum */ - - my_period = ((struct periodic_params*) arg)->period; - my_sig = ((struct periodic_params*) arg)->signo; - - x = 0; - - /* timer create */ - event.sigev_notify = SIGEV_SIGNAL; - event.sigev_signo = my_sig; - if (timer_create (CLOCK_REALTIME, &event, &timer_id) == -1) { - perror ("Error in timer creation\n"); - pthread_exit ((void *) -1); - } - - /* block the timer signal */ - sigemptyset (&set); - sigaddset (&set,my_sig); - pthread_sigmask(SIG_BLOCK,&set,NULL); - - /* set the timer in periodic mode */ - timerdata.it_interval = my_period; - timerdata.it_value = my_period; - if (timer_settime(timer_id, 0, &timerdata, NULL) == -1) { - perror ("Error in timer setting\n"); - pthread_exit ((void *) -1); - } - - /* periodic activity */ - while(1) { - if (sigwait(&set,&received_sig) == -1) { - perror ("Error in sigwait\n"); - pthread_exit ((void *) -1); - } - pthread_mutex_lock (&data.mutex); - while (data.updated == FALSE) { - pthread_cond_wait (&data.sync,&data.mutex); - } - x = data.x; - clock = time(NULL); - printf("Executing task C with x = %i %s", x, ctime(&clock)); - pthread_mutex_unlock (&data.mutex); - } - return NULL; -} - - -/* main */ - -void *POSIX_Init ( - void *argument -) - -{ - pthread_mutexattr_t mutexattr; /* mutex attributes */ - pthread_condattr_t condattr; /* condition attributes */ - pthread_attr_t attr; /* task attributes */ - pthread_t ta,tb,tc; /* threads */ - sigset_t set; /* signals */ - - struct sched_param sch_param; /* schedule parameters */ - struct periodic_params params_a, params_b, params_c; - - puts( "\n\n*** POSIX Timers Test ***" ); - - data.updated = FALSE; - data.x = 0; - - /* mask signal */ - sigemptyset (&set); - sigaddset (&set,SIGALRM); - pthread_sigmask (SIG_BLOCK,&set,NULL); - - /* set mutex attributes */ - if (pthread_mutexattr_init (&mutexattr) != 0) { - perror ("Error in mutex attribute init\n"); - } - - /* init mutex */ - if (pthread_mutex_init (&data.mutex,&mutexattr) != 0) { - perror ("Error in mutex init"); - } - - /* init condition attributes */ - if (pthread_condattr_init (&condattr) != 0) { - perror ("Error in condition attribute init\n"); - } - - /* init condition */ - if (pthread_cond_init (&data.sync,&condattr) != 0) { - perror ("Error in condition init"); - } - - /* init task attributes */ - if (pthread_attr_init(&attr) != 0) { - perror ("Error in attribute init\n"); - } - - /* set explicit schedule for every task */ - if (pthread_attr_setinheritsched (&attr, - PTHREAD_EXPLICIT_SCHED) != 0) { - perror("Error in attribute inheritsched\n"); - } - - /* set task independent (join will not use) */ - if (pthread_attr_setdetachstate (&attr, - PTHREAD_CREATE_DETACHED) != 0) { - perror ("Error in attribute detachstate\n"); - } - - /* schedule policy POSIX_FIFO (priority preemtive and FIFO within the same - priority) */ - if (pthread_attr_setschedpolicy (&attr, - SCHED_FIFO) != 0) { - perror ("Error in attribute setschedpolicy\n"); - } - - /* set and create thread A with priority 1 */ - - sch_param.sched_priority = 1; - if (pthread_attr_setschedparam(&attr, &sch_param) != 0) { - perror ("Error in attribute schedparam\n"); - } - - /* Temporal parameters (1 sec. periodicity) */ - - params_a.period.tv_sec = 1; /* seconds */ - params_a.period.tv_nsec = 000000000; /* nanoseconds */ - params_a.signo = SIGALRM; - if (pthread_create (&ta, &attr, task_a, ¶ms_a) != 0 ) { - perror ("Error in thread create for task a\n"); - } - - /* set and create thread B with priority 15 */ - - sch_param.sched_priority = 15; - if (pthread_attr_setschedparam(&attr, &sch_param) != 0) { - perror ("Error in attribute schedparam"); - } - - /* Temporal parameters (2 sec. periodicity) */ - params_b.period.tv_sec = 2; /* seconds */ - params_b.period.tv_nsec = 000000000; /* nanoseconds */ - params_b.signo = SIGALRM; - if (pthread_create (&tb, &attr, task_b, ¶ms_b) != 0) { - perror ("Error in thread create for task b\n"); - } - - /* set and create thread B with priority 14 */ - - sch_param.sched_priority = 14; - if (pthread_attr_setschedparam(&attr, &sch_param) != 0 ) { - perror ("Error in attribute schedparam\n"); - } - - /* Temporal parameters (3 sec. periodicity) */ - params_c.period.tv_sec = 3; /* seconds */ - params_c.period.tv_nsec = 000000000; /* nanoseconds */ - params_c.signo = SIGALRM; - if (pthread_create (&tc, &attr, task_c, ¶ms_c) != 0) { - perror ("Error in trhead create for task c\n"); - } - - - /* execute 20 seconds and finish */ - sleep (20); - puts( "\n\n*** End of POSIX Timers Test ***" ); - rtems_test_exit (0); - } - diff --git a/c/src/tests/psxtests/psxtimer/psxtimer.scn b/c/src/tests/psxtests/psxtimer/psxtimer.scn deleted file mode 100644 index e9940d077e..0000000000 --- a/c/src/tests/psxtests/psxtimer/psxtimer.scn +++ /dev/null @@ -1,37 +0,0 @@ -*** POSIX Timers Test *** -Executing task A Fri Jan 1 00:00:01 1988 -Executing task B with x = 1 Fri Jan 1 00:00:02 1988 -Executing task A Fri Jan 1 00:00:02 1988 -Executing task C with x = 1 Fri Jan 1 00:00:03 1988 -Executing task A Fri Jan 1 00:00:03 1988 -Executing task B with x = 2 Fri Jan 1 00:00:04 1988 -Executing task A Fri Jan 1 00:00:04 1988 -Executing task A Fri Jan 1 00:00:05 1988 -Executing task B with x = 3 Fri Jan 1 00:00:06 1988 -Executing task C with x = 3 Fri Jan 1 00:00:06 1988 -Executing task A Fri Jan 1 00:00:06 1988 -Executing task A Fri Jan 1 00:00:07 1988 -Executing task B with x = 4 Fri Jan 1 00:00:08 1988 -Executing task A Fri Jan 1 00:00:08 1988 -Executing task C with x = 4 Fri Jan 1 00:00:09 1988 -Executing task A Fri Jan 1 00:00:09 1988 -Executing task B with x = 5 Fri Jan 1 00:00:10 1988 -Executing task A Fri Jan 1 00:00:10 1988 -Executing task A Fri Jan 1 00:00:11 1988 -Executing task B with x = 6 Fri Jan 1 00:00:12 1988 -Executing task C with x = 6 Fri Jan 1 00:00:12 1988 -Executing task A Fri Jan 1 00:00:12 1988 -Executing task A Fri Jan 1 00:00:13 1988 -Executing task B with x = 7 Fri Jan 1 00:00:14 1988 -Executing task A Fri Jan 1 00:00:14 1988 -Executing task C with x = 7 Fri Jan 1 00:00:15 1988 -Executing task A Fri Jan 1 00:00:15 1988 -Executing task B with x = 8 Fri Jan 1 00:00:16 1988 -Executing task A Fri Jan 1 00:00:16 1988 -Executing task A Fri Jan 1 00:00:17 1988 -Executing task B with x = 9 Fri Jan 1 00:00:18 1988 -Executing task C with x = 9 Fri Jan 1 00:00:18 1988 -Executing task A Fri Jan 1 00:00:18 1988 -Executing task A Fri Jan 1 00:00:19 1988 -Executing task B with x = 10 Fri Jan 1 00:00:20 1988 -*** End of POSIX Timers Test *** diff --git a/c/src/tests/psxtests/psxtimer/system.h b/c/src/tests/psxtests/psxtimer/system.h deleted file mode 100644 index e4afc49a2a..0000000000 --- a/c/src/tests/psxtests/psxtimer/system.h +++ /dev/null @@ -1,64 +0,0 @@ -/* system.h - * - * This include file contains information that is included in every - * function in the test set. - * - * 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.9 1996/08/09 18:48:33 joel Exp - */ - -/* functions */ - -#include -#include -#include -#include - -void *POSIX_Init ( - void *arg -); - -void *task_a( - void *arg -); - -void *task_b( - void *arg -); - -void *task_c( - void *arg -); - - -/* configuration information */ - -#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER -#define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER - -#define CONFIGURE_POSIX_INIT_THREAD_TABLE - -#define CONFIGURE_MAXIMUM_POSIX_THREADS 4 -#define CONFIGURE_MAXIMUM_POSIX_TIMERS 4 -#define CONFIGURE_MAXIMUM_TIMERS 4 -#define CONFIGURE_MAXIMUM_POSIX_MUTEXES 2 -#define CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES 2 - - -#include - -/* global variables */ - -#ifdef CONFIGURE_INIT -#define TEST_EXTERN -#else -#define TEST_EXTERN extern -#endif - -TEST_EXTERN pthread_t Init_id; -TEST_EXTERN pthread_t Task_id; - -/* end of include file */ -- cgit v1.2.3