<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>change log for rtems (2010-10-21)</title>
</head>
<body text='#000000' bgcolor='#ffffff'>
<a name='cs1'></a>
<table border='0' cellspacing='0' cellpadding='5' width='100%' bgcolor='#eeeeee'>
<tr><td colspan='3' bgcolor='#dddddd'>
<font color='#bb2222'><strong>joel</strong></font>
</td></tr>
<tr><td colspan='3' bgcolor='#dddddd'><pre>2010-10-21 Joel Sherrill <joel.sherrill@oarcorp.com>
* psx02/init.c, psx02/task.c, psx03/init.c, psx04/init.c,
psx04/task1.c, psx04/task2.c, psx04/task3.c, psx05/init.c,
psx05/task.c, psx05/task2.c, psx05/task3.c, psx06/init.c,
psx06/task.c, psx06/task2.c, psx07/init.c, psx08/init.c,
psx08/task2.c, psx08/task3.c, psx09/init.c, psx10/init.c,
psx10/task.c, psx10/task2.c, psx10/task3.c, psx11/init.c,
psx11/task.c, psx12/init.c, psxalarm01/init.c, psxbarrier01/test.c,
psxcancel01/init.c, psxchroot01/test.c, psxitimer/init.c,
psxkey01/task.c, psxkey02/init.c, psxkey03/init.c, psxmount/test.c,
psxmsgq01/init.c, psxmsgq03/init.c, psxmsgq04/init.c,
psxrwlock01/test.c, psxsem01/init.c, psxsignal01/init.c,
psxsignal01/task1.c, psxsignal02/init.c, psxsignal03/init.c,
psxsignal05/init.c, psxspin01/test.c, psxspin02/test.c,
psxstack01/init.c, psxstack02/init.c, psxualarm/init.c: Eliminate
double space after parenthesis on rtems_test_assert().
</pre></td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/testsuites/psxtests/ChangeLog.diff?r1=text&tr1=1.320&r2=text&tr2=1.321&diff_format=h">M</a></td><td width='1%'>1.321</td><td width='100%'>testsuites/psxtests/ChangeLog</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/testsuites/psxtests/psx02/init.c.diff?r1=text&tr1=1.15&r2=text&tr2=1.16&diff_format=h">M</a></td><td width='1%'>1.16</td><td width='100%'>testsuites/psxtests/psx02/init.c</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/testsuites/psxtests/psx02/task.c.diff?r1=text&tr1=1.10&r2=text&tr2=1.11&diff_format=h">M</a></td><td width='1%'>1.11</td><td width='100%'>testsuites/psxtests/psx02/task.c</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/testsuites/psxtests/psx03/init.c.diff?r1=text&tr1=1.14&r2=text&tr2=1.15&diff_format=h">M</a></td><td width='1%'>1.15</td><td width='100%'>testsuites/psxtests/psx03/init.c</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/testsuites/psxtests/psx04/init.c.diff?r1=text&tr1=1.23&r2=text&tr2=1.24&diff_format=h">M</a></td><td width='1%'>1.24</td><td width='100%'>testsuites/psxtests/psx04/init.c</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/testsuites/psxtests/psx04/task1.c.diff?r1=text&tr1=1.8&r2=text&tr2=1.9&diff_format=h">M</a></td><td width='1%'>1.9</td><td width='100%'>testsuites/psxtests/psx04/task1.c</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/testsuites/psxtests/psx04/task2.c.diff?r1=text&tr1=1.7&r2=text&tr2=1.8&diff_format=h">M</a></td><td width='1%'>1.8</td><td width='100%'>testsuites/psxtests/psx04/task2.c</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/testsuites/psxtests/psx04/task3.c.diff?r1=text&tr1=1.10&r2=text&tr2=1.11&diff_format=h">M</a></td><td width='1%'>1.11</td><td width='100%'>testsuites/psxtests/psx04/task3.c</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/testsuites/psxtests/psx05/init.c.diff?r1=text&tr1=1.34&r2=text&tr2=1.35&diff_format=h">M</a></td><td width='1%'>1.35</td><td width='100%'>testsuites/psxtests/psx05/init.c</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/testsuites/psxtests/psx05/task.c.diff?r1=text&tr1=1.9&r2=text&tr2=1.10&diff_format=h">M</a></td><td width='1%'>1.10</td><td width='100%'>testsuites/psxtests/psx05/task.c</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/testsuites/psxtests/psx05/task2.c.diff?r1=text&tr1=1.8&r2=text&tr2=1.9&diff_format=h">M</a></td><td width='1%'>1.9</td><td width='100%'>testsuites/psxtests/psx05/task2.c</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/testsuites/psxtests/psx05/task3.c.diff?r1=text&tr1=1.7&r2=text&tr2=1.8&diff_format=h">M</a></td><td width='1%'>1.8</td><td width='100%'>testsuites/psxtests/psx05/task3.c</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/testsuites/psxtests/psx06/init.c.diff?r1=text&tr1=1.17&r2=text&tr2=1.18&diff_format=h">M</a></td><td width='1%'>1.18</td><td width='100%'>testsuites/psxtests/psx06/init.c</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/testsuites/psxtests/psx06/task.c.diff?r1=text&tr1=1.12&r2=text&tr2=1.13&diff_format=h">M</a></td><td width='1%'>1.13</td><td width='100%'>testsuites/psxtests/psx06/task.c</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/testsuites/psxtests/psx06/task2.c.diff?r1=text&tr1=1.12&r2=text&tr2=1.13&diff_format=h">M</a></td><td width='1%'>1.13</td><td width='100%'>testsuites/psxtests/psx06/task2.c</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/testsuites/psxtests/psx07/init.c.diff?r1=text&tr1=1.35&r2=text&tr2=1.36&diff_format=h">M</a></td><td width='1%'>1.36</td><td width='100%'>testsuites/psxtests/psx07/init.c</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/testsuites/psxtests/psx08/init.c.diff?r1=text&tr1=1.12&r2=text&tr2=1.13&diff_format=h">M</a></td><td width='1%'>1.13</td><td width='100%'>testsuites/psxtests/psx08/init.c</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/testsuites/psxtests/psx08/task2.c.diff?r1=text&tr1=1.9&r2=text&tr2=1.10&diff_format=h">M</a></td><td width='1%'>1.10</td><td width='100%'>testsuites/psxtests/psx08/task2.c</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/testsuites/psxtests/psx08/task3.c.diff?r1=text&tr1=1.6&r2=text&tr2=1.7&diff_format=h">M</a></td><td width='1%'>1.7</td><td width='100%'>testsuites/psxtests/psx08/task3.c</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/testsuites/psxtests/psx09/init.c.diff?r1=text&tr1=1.17&r2=text&tr2=1.18&diff_format=h">M</a></td><td width='1%'>1.18</td><td width='100%'>testsuites/psxtests/psx09/init.c</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/testsuites/psxtests/psx10/init.c.diff?r1=text&tr1=1.20&r2=text&tr2=1.21&diff_format=h">M</a></td><td width='1%'>1.21</td><td width='100%'>testsuites/psxtests/psx10/init.c</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/testsuites/psxtests/psx10/task.c.diff?r1=text&tr1=1.9&r2=text&tr2=1.10&diff_format=h">M</a></td><td width='1%'>1.10</td><td width='100%'>testsuites/psxtests/psx10/task.c</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/testsuites/psxtests/psx10/task2.c.diff?r1=text&tr1=1.9&r2=text&tr2=1.10&diff_format=h">M</a></td><td width='1%'>1.10</td><td width='100%'>testsuites/psxtests/psx10/task2.c</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/testsuites/psxtests/psx10/task3.c.diff?r1=text&tr1=1.8&r2=text&tr2=1.9&diff_format=h">M</a></td><td width='1%'>1.9</td><td width='100%'>testsuites/psxtests/psx10/task3.c</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/testsuites/psxtests/psx11/init.c.diff?r1=text&tr1=1.13&r2=text&tr2=1.14&diff_format=h">M</a></td><td width='1%'>1.14</td><td width='100%'>testsuites/psxtests/psx11/init.c</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/testsuites/psxtests/psx11/task.c.diff?r1=text&tr1=1.10&r2=text&tr2=1.11&diff_format=h">M</a></td><td width='1%'>1.11</td><td width='100%'>testsuites/psxtests/psx11/task.c</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/testsuites/psxtests/psx12/init.c.diff?r1=text&tr1=1.15&r2=text&tr2=1.16&diff_format=h">M</a></td><td width='1%'>1.16</td><td width='100%'>testsuites/psxtests/psx12/init.c</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/testsuites/psxtests/psxalarm01/init.c.diff?r1=text&tr1=1.4&r2=text&tr2=1.5&diff_format=h">M</a></td><td width='1%'>1.5</td><td width='100%'>testsuites/psxtests/psxalarm01/init.c</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/testsuites/psxtests/psxbarrier01/test.c.diff?r1=text&tr1=1.8&r2=text&tr2=1.9&diff_format=h">M</a></td><td width='1%'>1.9</td><td width='100%'>testsuites/psxtests/psxbarrier01/test.c</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/testsuites/psxtests/psxcancel01/init.c.diff?r1=text&tr1=1.4&r2=text&tr2=1.5&diff_format=h">M</a></td><td width='1%'>1.5</td><td width='100%'>testsuites/psxtests/psxcancel01/init.c</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/testsuites/psxtests/psxchroot01/test.c.diff?r1=text&tr1=1.10&r2=text&tr2=1.11&diff_format=h">M</a></td><td width='1%'>1.11</td><td width='100%'>testsuites/psxtests/psxchroot01/test.c</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/testsuites/psxtests/psxitimer/init.c.diff?r1=text&tr1=1.2&r2=text&tr2=1.3&diff_format=h">M</a></td><td width='1%'>1.3</td><td width='100%'>testsuites/psxtests/psxitimer/init.c</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/testsuites/psxtests/psxkey01/task.c.diff?r1=text&tr1=1.4&r2=text&tr2=1.5&diff_format=h">M</a></td><td width='1%'>1.5</td><td width='100%'>testsuites/psxtests/psxkey01/task.c</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/testsuites/psxtests/psxkey02/init.c.diff?r1=text&tr1=1.3&r2=text&tr2=1.4&diff_format=h">M</a></td><td width='1%'>1.4</td><td width='100%'>testsuites/psxtests/psxkey02/init.c</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/testsuites/psxtests/psxkey03/init.c.diff?r1=text&tr1=1.5&r2=text&tr2=1.6&diff_format=h">M</a></td><td width='1%'>1.6</td><td width='100%'>testsuites/psxtests/psxkey03/init.c</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/testsuites/psxtests/psxmount/test.c.diff?r1=text&tr1=1.15&r2=text&tr2=1.16&diff_format=h">M</a></td><td width='1%'>1.16</td><td width='100%'>testsuites/psxtests/psxmount/test.c</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/testsuites/psxtests/psxmsgq01/init.c.diff?r1=text&tr1=1.23&r2=text&tr2=1.24&diff_format=h">M</a></td><td width='1%'>1.24</td><td width='100%'>testsuites/psxtests/psxmsgq01/init.c</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/testsuites/psxtests/psxmsgq03/init.c.diff?r1=text&tr1=1.4&r2=text&tr2=1.5&diff_format=h">M</a></td><td width='1%'>1.5</td><td width='100%'>testsuites/psxtests/psxmsgq03/init.c</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/testsuites/psxtests/psxmsgq04/init.c.diff?r1=text&tr1=1.8&r2=text&tr2=1.9&diff_format=h">M</a></td><td width='1%'>1.9</td><td width='100%'>testsuites/psxtests/psxmsgq04/init.c</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/testsuites/psxtests/psxrwlock01/test.c.diff?r1=text&tr1=1.13&r2=text&tr2=1.14&diff_format=h">M</a></td><td width='1%'>1.14</td><td width='100%'>testsuites/psxtests/psxrwlock01/test.c</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/testsuites/psxtests/psxsem01/init.c.diff?r1=text&tr1=1.18&r2=text&tr2=1.19&diff_format=h">M</a></td><td width='1%'>1.19</td><td width='100%'>testsuites/psxtests/psxsem01/init.c</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/testsuites/psxtests/psxsignal01/init.c.diff?r1=text&tr1=1.8&r2=text&tr2=1.9&diff_format=h">M</a></td><td width='1%'>1.9</td><td width='100%'>testsuites/psxtests/psxsignal01/init.c</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/testsuites/psxtests/psxsignal01/task1.c.diff?r1=text&tr1=1.2&r2=text&tr2=1.3&diff_format=h">M</a></td><td width='1%'>1.3</td><td width='100%'>testsuites/psxtests/psxsignal01/task1.c</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/testsuites/psxtests/psxsignal02/init.c.diff?r1=text&tr1=1.6&r2=text&tr2=1.7&diff_format=h">M</a></td><td width='1%'>1.7</td><td width='100%'>testsuites/psxtests/psxsignal02/init.c</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/testsuites/psxtests/psxsignal03/init.c.diff?r1=text&tr1=1.10&r2=text&tr2=1.11&diff_format=h">M</a></td><td width='1%'>1.11</td><td width='100%'>testsuites/psxtests/psxsignal03/init.c</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/testsuites/psxtests/psxsignal05/init.c.diff?r1=text&tr1=1.2&r2=text&tr2=1.3&diff_format=h">M</a></td><td width='1%'>1.3</td><td width='100%'>testsuites/psxtests/psxsignal05/init.c</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/testsuites/psxtests/psxspin01/test.c.diff?r1=text&tr1=1.5&r2=text&tr2=1.6&diff_format=h">M</a></td><td width='1%'>1.6</td><td width='100%'>testsuites/psxtests/psxspin01/test.c</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/testsuites/psxtests/psxspin02/test.c.diff?r1=text&tr1=1.5&r2=text&tr2=1.6&diff_format=h">M</a></td><td width='1%'>1.6</td><td width='100%'>testsuites/psxtests/psxspin02/test.c</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/testsuites/psxtests/psxstack01/init.c.diff?r1=text&tr1=1.6&r2=text&tr2=1.7&diff_format=h">M</a></td><td width='1%'>1.7</td><td width='100%'>testsuites/psxtests/psxstack01/init.c</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/testsuites/psxtests/psxstack02/init.c.diff?r1=text&tr1=1.1&r2=text&tr2=1.2&diff_format=h">M</a></td><td width='1%'>1.2</td><td width='100%'>testsuites/psxtests/psxstack02/init.c</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/testsuites/psxtests/psxualarm/init.c.diff?r1=text&tr1=1.4&r2=text&tr2=1.5&diff_format=h">M</a></td><td width='1%'>1.5</td><td width='100%'>testsuites/psxtests/psxualarm/init.c</td></tr>
</table>
<pre>
<font color='#006600'>diff -u rtems/testsuites/psxtests/ChangeLog:1.320 rtems/testsuites/psxtests/ChangeLog:1.321
--- rtems/testsuites/psxtests/ChangeLog:1.320 Fri Oct 8 04:39:35 2010
+++ rtems/testsuites/psxtests/ChangeLog Thu Oct 21 16:22:24 2010
</font><font color='#997700'>@@ -1,3 +1,21 @@
</font><font color='#000088'>+2010-10-21 Joel Sherrill <joel.sherrill@oarcorp.com>
+
+ * psx02/init.c, psx02/task.c, psx03/init.c, psx04/init.c,
+ psx04/task1.c, psx04/task2.c, psx04/task3.c, psx05/init.c,
+ psx05/task.c, psx05/task2.c, psx05/task3.c, psx06/init.c,
+ psx06/task.c, psx06/task2.c, psx07/init.c, psx08/init.c,
+ psx08/task2.c, psx08/task3.c, psx09/init.c, psx10/init.c,
+ psx10/task.c, psx10/task2.c, psx10/task3.c, psx11/init.c,
+ psx11/task.c, psx12/init.c, psxalarm01/init.c, psxbarrier01/test.c,
+ psxcancel01/init.c, psxchroot01/test.c, psxitimer/init.c,
+ psxkey01/task.c, psxkey02/init.c, psxkey03/init.c, psxmount/test.c,
+ psxmsgq01/init.c, psxmsgq03/init.c, psxmsgq04/init.c,
+ psxrwlock01/test.c, psxsem01/init.c, psxsignal01/init.c,
+ psxsignal01/task1.c, psxsignal02/init.c, psxsignal03/init.c,
+ psxsignal05/init.c, psxspin01/test.c, psxspin02/test.c,
+ psxstack01/init.c, psxstack02/init.c, psxualarm/init.c: Eliminate
+ double space after parenthesis on rtems_test_assert().
+
</font> 2010-10-08 Ralf Corsépius <ralf.corsepius@rtems.org>
* psx07/init.c: Add HAVE_DECL_PTHREAD_ATTR_SETGUARDSIZE guard around
<font color='#006600'>diff -u rtems/testsuites/psxtests/psx02/init.c:1.15 rtems/testsuites/psxtests/psx02/init.c:1.16
--- rtems/testsuites/psxtests/psx02/init.c:1.15 Tue Dec 8 11:52:52 2009
+++ rtems/testsuites/psxtests/psx02/init.c Thu Oct 21 16:22:24 2010
</font><font color='#997700'>@@ -56,7 +56,7 @@
</font> /* install a signal handler */
status = sigemptyset( &act.sa_mask );
<font color='#880000'>- rtems_test_assert( !status );
</font><font color='#000088'>+ rtems_test_assert( !status );
</font>
act.sa_handler = Signal_handler;
act.sa_flags = 0;
<font color='#997700'>@@ -69,43 +69,43 @@
</font> Signal_occurred = 0;
status = pthread_kill( Init_id, SIGUSR1 );
<font color='#880000'>- rtems_test_assert( !status );
</font><font color='#000088'>+ rtems_test_assert( !status );
</font>
Signal_occurred = 0;
/* now block the signal, send it, see if it is pending, and unblock it */
status = sigemptyset( &mask );
<font color='#880000'>- rtems_test_assert( !status );
</font><font color='#000088'>+ rtems_test_assert( !status );
</font>
status = sigaddset( &mask, SIGUSR1 );
<font color='#880000'>- rtems_test_assert( !status );
</font><font color='#000088'>+ rtems_test_assert( !status );
</font>
printf( "Init: Block SIGUSR1\n" );
status = sigprocmask( SIG_BLOCK, &mask, NULL );
<font color='#880000'>- rtems_test_assert( !status );
</font><font color='#000088'>+ rtems_test_assert( !status );
</font>
status = sigpending( &pending_set );
<font color='#880000'>- rtems_test_assert( !status );
</font><font color='#000088'>+ rtems_test_assert( !status );
</font> printf( "Init: Signals pending 0x%08x\n", (unsigned int) pending_set );
printf( "Init: send SIGUSR1 to self\n" );
status = pthread_kill( Init_id, SIGUSR1 );
<font color='#880000'>- rtems_test_assert( !status );
</font><font color='#000088'>+ rtems_test_assert( !status );
</font>
status = sigpending( &pending_set );
<font color='#880000'>- rtems_test_assert( !status );
</font><font color='#000088'>+ rtems_test_assert( !status );
</font> printf( "Init: Signals pending 0x%08x\n", (unsigned int) pending_set );
printf( "Init: Unblock SIGUSR1\n" );
status = sigprocmask( SIG_UNBLOCK, &mask, NULL );
<font color='#880000'>- rtems_test_assert( !status );
</font><font color='#000088'>+ rtems_test_assert( !status );
</font>
/* create a thread */
status = pthread_create( &Task_id, NULL, Task_1_through_3, NULL );
<font color='#880000'>- rtems_test_assert( !status );
</font><font color='#000088'>+ rtems_test_assert( !status );
</font>
/*
* Loop for 5 seconds seeing how many signals we catch
<font color='#997700'>@@ -122,10 +122,10 @@
</font> status = nanosleep ( &tv, &tr );
if ( status == -1 ) {
<font color='#880000'>- rtems_test_assert( errno == EINTR );
- rtems_test_assert( tr.tv_nsec || tr.tv_sec );
</font><font color='#000088'>+ rtems_test_assert( errno == EINTR );
+ rtems_test_assert( tr.tv_nsec || tr.tv_sec );
</font> } else if ( !status ) {
<font color='#880000'>- rtems_test_assert( !tr.tv_nsec && !tr.tv_sec );
</font><font color='#000088'>+ rtems_test_assert( !tr.tv_nsec && !tr.tv_sec );
</font> }
printf(
<font color='#006600'>diff -u rtems/testsuites/psxtests/psx02/task.c:1.10 rtems/testsuites/psxtests/psx02/task.c:1.11
--- rtems/testsuites/psxtests/psx02/task.c:1.10 Tue Dec 8 11:52:52 2009
+++ rtems/testsuites/psxtests/psx02/task.c Thu Oct 21 16:22:24 2010
</font><font color='#997700'>@@ -32,10 +32,10 @@
</font> for ( i=0 ; i<5 ; i++ ) {
print_current_time( "Task1: ", "" );
status = pthread_kill( Init_id, SIGUSR1 );
<font color='#880000'>- rtems_test_assert( !status );
</font><font color='#000088'>+ rtems_test_assert( !status );
</font>
seconds = sleep( 1 );
<font color='#880000'>- rtems_test_assert( !seconds );
</font><font color='#000088'>+ rtems_test_assert( !seconds );
</font> }
puts( "*** END OF POSIX TEST 2 ***" );
rtems_test_exit( 0 );
<font color='#006600'>diff -u rtems/testsuites/psxtests/psx03/init.c:1.14 rtems/testsuites/psxtests/psx03/init.c:1.15
--- rtems/testsuites/psxtests/psx03/init.c:1.14 Tue Dec 8 11:52:52 2009
+++ rtems/testsuites/psxtests/psx03/init.c Thu Oct 21 16:22:24 2010
</font><font color='#997700'>@@ -77,17 +77,17 @@
</font> /* initialize the signal set we will wait for to SIGUSR1 */
status = sigemptyset( &waitset );
<font color='#880000'>- rtems_test_assert( !status );
</font><font color='#000088'>+ rtems_test_assert( !status );
</font>
status = sigaddset( &waitset, SIGUSR1 );
<font color='#880000'>- rtems_test_assert( !status );
</font><font color='#000088'>+ rtems_test_assert( !status );
</font>
timeout.tv_sec = 3;
timeout.tv_nsec = 0;
puts( "Init: waiting on any signal for 3 seconds." );
signo = sigtimedwait( &waitset, &siginfo, &timeout );
<font color='#880000'>- rtems_test_assert( signo == -1 );
</font><font color='#000088'>+ rtems_test_assert( signo == -1 );
</font>
if ( errno == EAGAIN )
puts( "Init: correctly timed out waiting for SIGUSR1." );
<font color='#997700'>@@ -105,19 +105,19 @@
</font> /* initialize a mask to block SIGUSR2 */
status = sigemptyset( &mask );
<font color='#880000'>- rtems_test_assert( !status );
</font><font color='#000088'>+ rtems_test_assert( !status );
</font>
status = sigaddset( &mask, SIGUSR2 );
<font color='#880000'>- rtems_test_assert( !status );
</font><font color='#000088'>+ rtems_test_assert( !status );
</font>
printf( "Init: Block SIGUSR2\n" );
status = sigprocmask( SIG_BLOCK, &mask, NULL );
<font color='#880000'>- rtems_test_assert( !status );
</font><font color='#000088'>+ rtems_test_assert( !status );
</font>
/* create a thread */
status = pthread_create( &Task_id, NULL, Task_1, NULL );
<font color='#880000'>- rtems_test_assert( !status );
</font><font color='#000088'>+ rtems_test_assert( !status );
</font>
/* signal handler is still installed, waitset is still set for SIGUSR1 */
<font color='#997700'>@@ -133,7 +133,7 @@
</font> puts( "Init: correctly timed out waiting for SIGUSR1." );
else
printf( "sigtimedwait returned wrong errno - %d\n", errno );
<font color='#880000'>- rtems_test_assert( signo == -1 );
</font><font color='#000088'>+ rtems_test_assert( signo == -1 );
</font>
/*
* wait on SIGUSR1 for 3 seconds, Task_2 will send it to us
<font color='#997700'>@@ -144,7 +144,7 @@
</font> /* create a thread */
status = pthread_create( &Task_id, NULL, Task_2, NULL );
<font color='#880000'>- rtems_test_assert( !status );
</font><font color='#000088'>+ rtems_test_assert( !status );
</font>
/* signal handler is still installed, waitset is still set for SIGUSR1 */
<font color='#997700'>@@ -162,38 +162,38 @@
</font> 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 );
<font color='#880000'>- rtems_test_assert( signo == SIGUSR1 );
- rtems_test_assert( siginfo.si_signo == SIGUSR1 );
- rtems_test_assert( siginfo.si_code == SI_USER );
- rtems_test_assert( siginfo.si_value.sival_int != -1 ); /* rtems does always set this */
</font><font color='#000088'>+ rtems_test_assert( signo == SIGUSR1 );
+ rtems_test_assert( siginfo.si_signo == SIGUSR1 );
+ rtems_test_assert( siginfo.si_code == SI_USER );
+ rtems_test_assert( siginfo.si_value.sival_int != -1 ); /* rtems does always set this */
</font>
/* try out a process signal */
empty_line();
puts( "Init: kill with SIGUSR2." );
status = kill( getpid(), SIGUSR2 );
<font color='#880000'>- rtems_test_assert( !status );
</font><font color='#000088'>+ rtems_test_assert( !status );
</font>
siginfo.si_code = -1;
siginfo.si_signo = -1;
siginfo.si_value.sival_int = -1;
status = sigemptyset( &waitset );
<font color='#880000'>- rtems_test_assert( !status );
</font><font color='#000088'>+ rtems_test_assert( !status );
</font>
status = sigaddset( &waitset, SIGUSR1 );
<font color='#880000'>- rtems_test_assert( !status );
</font><font color='#000088'>+ rtems_test_assert( !status );
</font>
status = sigaddset( &waitset, SIGUSR2 );
<font color='#880000'>- rtems_test_assert( !status );
</font><font color='#000088'>+ rtems_test_assert( !status );
</font>
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 );
<font color='#880000'>- rtems_test_assert( signo == SIGUSR2 );
- rtems_test_assert( siginfo.si_signo == SIGUSR2 );
- rtems_test_assert( siginfo.si_code == SI_USER );
- rtems_test_assert( siginfo.si_value.sival_int != -1 ); /* rtems does always set this */
</font><font color='#000088'>+ rtems_test_assert( signo == SIGUSR2 );
+ rtems_test_assert( siginfo.si_signo == SIGUSR2 );
+ rtems_test_assert( siginfo.si_code == SI_USER );
+ rtems_test_assert( siginfo.si_value.sival_int != -1 ); /* rtems does always set this */
</font>
/* exit this thread */
<font color='#006600'>diff -u rtems/testsuites/psxtests/psx04/init.c:1.23 rtems/testsuites/psxtests/psx04/init.c:1.24
--- rtems/testsuites/psxtests/psx04/init.c:1.23 Tue Jul 27 11:38:08 2010
+++ rtems/testsuites/psxtests/psx04/init.c Thu Oct 21 16:22:24 2010
</font><font color='#997700'>@@ -85,44 +85,44 @@
</font> status = sigwait( NULL, NULL );
if ( status != EINVAL )
printf( "status = %d (%s)\n", status, strerror(status) );
<font color='#880000'>- rtems_test_assert( status == EINVAL );
</font><font color='#000088'>+ rtems_test_assert( status == EINVAL );
</font> puts( "Init: sigwait - EINVAL (NULL set)" );
status = sigtimedwait( NULL, NULL, NULL );
if ( status != -1 )
printf( "status = %d\n", status );
<font color='#880000'>- rtems_test_assert( errno == EINVAL );
</font><font color='#000088'>+ rtems_test_assert( errno == EINVAL );
</font> puts( "Init: sigwait - EINVAL (NULL set)" );
/* install a signal handler for SIGUSR1 */
status = sigemptyset( &act.sa_mask );
<font color='#880000'>- rtems_test_assert( !status );
</font><font color='#000088'>+ rtems_test_assert( !status );
</font> printf( "Init: sigemptyset - set= 0x%08x\n", (unsigned int) act.sa_mask );
/* test sigfillset following the above sigemptyset */
status = sigfillset( &act.sa_mask );
<font color='#880000'>- rtems_test_assert( !status );
</font><font color='#000088'>+ rtems_test_assert( !status );
</font> printf( "Init: sigfillset - set= 0x%08x\n", (unsigned int) act.sa_mask );
/* test sigdelset */
status = sigdelset( &act.sa_mask, SIGUSR1 );
<font color='#880000'>- rtems_test_assert( !status );
</font><font color='#000088'>+ rtems_test_assert( !status );
</font> printf( "Init: sigdelset - delete SIGUSR1 set= 0x%08x\n",
(unsigned int) act.sa_mask );
/* test sigismember - FALSE */
status = sigismember( &act.sa_mask, SIGUSR1 );
<font color='#880000'>- rtems_test_assert( !status );
</font><font color='#000088'>+ rtems_test_assert( !status );
</font> puts( "Init: sigismember - FALSE since SIGUSR1 is not a member" );
/* test sigismember - TRUE */
status = sigismember( &act.sa_mask, SIGUSR2 );
<font color='#880000'>- rtems_test_assert( status );
</font><font color='#000088'>+ rtems_test_assert( status );
</font> puts( "Init: sigismember - TRUE since SIGUSR2 is a member" );
/* return the set to empty */
<font color='#997700'>@@ -139,7 +139,7 @@
</font>
puts( "Init: send SIGUSR1 to process" );
status = kill( getpid(), SIGUSR1 );
<font color='#880000'>- rtems_test_assert( !status );
</font><font color='#000088'>+ rtems_test_assert( !status );
</font>
/* end of install a signal handler for SIGUSR1 */
<font color='#997700'>@@ -150,10 +150,10 @@
</font> empty_line();
status = sigemptyset( &mask );
<font color='#880000'>- rtems_test_assert( !status );
</font><font color='#000088'>+ rtems_test_assert( !status );
</font>
status = sigaddset( &mask, SIGUSR1 );
<font color='#880000'>- rtems_test_assert( !status );
</font><font color='#000088'>+ rtems_test_assert( !status );
</font>
puts( "Init: Block SIGUSR1" );
act.sa_handler = Signal_handler;
<font color='#997700'>@@ -168,7 +168,7 @@
</font>
puts( "Init: send SIGUSR1 to process" );
status = kill( getpid(), SIGUSR1 );
<font color='#880000'>- rtems_test_assert( !status );
</font><font color='#000088'>+ rtems_test_assert( !status );
</font>
Signal_occurred = 0;
<font color='#997700'>@@ -177,30 +177,30 @@
</font> empty_line();
status = sigemptyset( &mask );
<font color='#880000'>- rtems_test_assert( !status );
</font><font color='#000088'>+ rtems_test_assert( !status );
</font>
status = sigaddset( &mask, SIGUSR1 );
<font color='#880000'>- rtems_test_assert( !status );
</font><font color='#000088'>+ rtems_test_assert( !status );
</font>
puts( "Init: Block SIGUSR1" );
status = sigprocmask( SIG_BLOCK, &mask, NULL );
<font color='#880000'>- rtems_test_assert( !status );
</font><font color='#000088'>+ rtems_test_assert( !status );
</font>
status = sigpending( &pending_set );
<font color='#880000'>- rtems_test_assert( !status );
</font><font color='#000088'>+ rtems_test_assert( !status );
</font> printf( "Init: Signals pending 0x%08x\n", (unsigned int) pending_set );
puts( "Init: send SIGUSR1 to process" );
status = kill( getpid(), SIGUSR1 );
<font color='#880000'>- rtems_test_assert( !status );
</font><font color='#000088'>+ rtems_test_assert( !status );
</font>
status = sigpending( &pending_set );
<font color='#880000'>- rtems_test_assert( !status );
</font><font color='#000088'>+ rtems_test_assert( !status );
</font> printf( "Init: Signals pending 0x%08x\n", (unsigned int) pending_set );
puts( "Init: Unblock SIGUSR1" );
status = sigprocmask( SIG_UNBLOCK, &mask, NULL );
<font color='#880000'>- rtems_test_assert( !status );
</font><font color='#000088'>+ rtems_test_assert( !status );
</font>
/* now let another task get interrupted by a signal */
<font color='#997700'>@@ -208,33 +208,33 @@
</font>
puts( "Init: create a thread interested in SIGUSR1" );
status = pthread_create( &Task1_id, NULL, Task_1, NULL );
<font color='#880000'>- rtems_test_assert( !status );
</font><font color='#000088'>+ rtems_test_assert( !status );
</font>
puts( "Init: Block SIGUSR1" );
status = sigprocmask( SIG_BLOCK, &mask, NULL );
<font color='#880000'>- rtems_test_assert( !status );
</font><font color='#000088'>+ rtems_test_assert( !status );
</font>
status = sigpending( &pending_set );
<font color='#880000'>- rtems_test_assert( !status );
</font><font color='#000088'>+ rtems_test_assert( !status );
</font> printf( "Init: Signals pending 0x%08x\n", (unsigned int) pending_set );
puts( "Init: sleep so the other task can block" );
remaining = sleep( 1 );
<font color='#880000'>- rtems_test_assert( !status );
</font><font color='#000088'>+ rtems_test_assert( !status );
</font>
/* switch to task 1 */
puts( "Init: send SIGUSR1 to process" );
status = kill( getpid(), SIGUSR1 );
<font color='#880000'>- rtems_test_assert( !status );
</font><font color='#000088'>+ rtems_test_assert( !status );
</font>
status = sigpending( &pending_set );
<font color='#880000'>- rtems_test_assert( !status );
</font><font color='#000088'>+ rtems_test_assert( !status );
</font> printf( "Init: Signals pending 0x%08x\n", (unsigned int) pending_set );
puts( "Init: sleep so the other task can catch signal" );
remaining = sleep( 1 );
<font color='#880000'>- rtems_test_assert( !status );
</font><font color='#000088'>+ rtems_test_assert( !status );
</font>
/* switch to task 1 */
<font color='#997700'>@@ -245,7 +245,7 @@
</font> /* install a signal handler for SIGALRM and unblock it */
status = sigemptyset( &act.sa_mask );
<font color='#880000'>- rtems_test_assert( !status );
</font><font color='#000088'>+ rtems_test_assert( !status );
</font>
act.sa_handler = Signal_handler;
act.sa_flags = 0;
<font color='#997700'>@@ -253,65 +253,65 @@
</font> sigaction( SIGALRM, &act, NULL );
status = sigemptyset( &mask );
<font color='#880000'>- rtems_test_assert( !status );
</font><font color='#000088'>+ rtems_test_assert( !status );
</font>
status = sigaddset( &mask, SIGALRM );
<font color='#880000'>- rtems_test_assert( !status );
</font><font color='#000088'>+ rtems_test_assert( !status );
</font>
puts( "Init: Unblock SIGALRM" );
status = sigprocmask( SIG_UNBLOCK, &mask, NULL );
<font color='#880000'>- rtems_test_assert( !status );
</font><font color='#000088'>+ rtems_test_assert( !status );
</font>
/* schedule the alarm */
puts( "Init: Firing alarm in 5 seconds" );
remaining = alarm( 5 );
printf( "Init: %d seconds left on previous alarm\n", status );
<font color='#880000'>- rtems_test_assert( !status );
</font><font color='#000088'>+ rtems_test_assert( !status );
</font>
puts( "Init: Firing alarm in 2 seconds" );
remaining = alarm( 2 );
printf( "Init: %d seconds left on previous alarm\n", remaining );
<font color='#880000'>- rtems_test_assert( remaining == 5 );
</font><font color='#000088'>+ rtems_test_assert( remaining == 5 );
</font>
puts( "Init: Wait 4 seconds for alarm" );
remaining = sleep( 4 );
printf( "Init: %d seconds left in sleep\n", remaining );
<font color='#880000'>- rtems_test_assert( remaining == 2 );
</font><font color='#000088'>+ rtems_test_assert( remaining == 2 );
</font>
/* test SIG_SETMASK case and returning oset of pthread_sigmask */
empty_line();
status = sigemptyset( &mask );
<font color='#880000'>- rtems_test_assert( !status );
</font><font color='#000088'>+ rtems_test_assert( !status );
</font>
status = sigaddset( &mask, SIGUSR1 );
<font color='#880000'>- rtems_test_assert( !status );
</font><font color='#000088'>+ rtems_test_assert( !status );
</font>
status = sigaddset( &mask, SIGUSR2 );
<font color='#880000'>- rtems_test_assert( !status );
</font><font color='#000088'>+ rtems_test_assert( !status );
</font>
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 );
<font color='#880000'>- rtems_test_assert( !status );
</font><font color='#000088'>+ rtems_test_assert( !status );
</font>
/* 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 );
<font color='#880000'>- rtems_test_assert( !status );
</font><font color='#000088'>+ rtems_test_assert( !status );
</font>
/* return blocked mask to no signals blocked */
status = sigemptyset( &mask );
<font color='#880000'>- rtems_test_assert( !status );
</font><font color='#000088'>+ rtems_test_assert( !status );
</font>
puts( "Init: Unblock all signals" );
status = pthread_sigmask( SIG_SETMASK, &mask, &oset );
printf( "Init: Previous blocked set was 0x%08x\n", (unsigned int) oset );
<font color='#880000'>- rtems_test_assert( !status );
</font><font color='#000088'>+ rtems_test_assert( !status );
</font>
/* test sigsuspend */
<font color='#997700'>@@ -319,14 +319,14 @@
</font>
puts( "Init: create a thread to send Init SIGUSR1" );
status = pthread_create( &Task2_id, NULL, Task_2, NULL );
<font color='#880000'>- rtems_test_assert( !status );
</font><font color='#000088'>+ rtems_test_assert( !status );
</font>
status = sigemptyset( &mask );
<font color='#880000'>- rtems_test_assert( !status );
</font><font color='#000088'>+ rtems_test_assert( !status );
</font>
puts( "Init: sigsuspend for any signal" );
status = sigsuspend( &mask );
<font color='#880000'>- rtems_test_assert( status );
</font><font color='#000088'>+ rtems_test_assert( status );
</font> printf( "Init: awakended from sigsuspend status=%08d \n", status );
/* test a SIGINFO case, these are signals sent to a process only */
<font color='#997700'>@@ -335,7 +335,7 @@
</font>
puts( "Init: create a thread to sent Process SIGUSR1 with SA_SIGINFO" );
status = pthread_create( &Task3_id, NULL, Task_3, NULL );
<font color='#880000'>- rtems_test_assert( !status );
</font><font color='#000088'>+ rtems_test_assert( !status );
</font>
/* set action on SIGUSR1 to an info case */
act.sa_handler = Signal_handler;
<font color='#997700'>@@ -346,7 +346,7 @@
</font>
puts( "Init: sleep so the Task_3 can sigqueue SIGUSR1" );
remaining = sleep( 1 );
<font color='#880000'>- rtems_test_assert( !status );
</font><font color='#000088'>+ rtems_test_assert( !status );
</font>
/* switch to task 1 */
<font color='#997700'>@@ -355,71 +355,71 @@
</font> /* Send SIGUSR1, Task_3 has issued a sigwaitinfo */
status = sigemptyset( &mask );
<font color='#880000'>- rtems_test_assert( !status );
</font><font color='#000088'>+ rtems_test_assert( !status );
</font>
status = sigaddset( &mask, SIGUSR1 );
<font color='#880000'>- rtems_test_assert( !status );
</font><font color='#000088'>+ rtems_test_assert( !status );
</font>
puts( "Init: Block SIGUSR1" );
status = sigprocmask( SIG_BLOCK, &mask, NULL );
<font color='#880000'>- rtems_test_assert( !status );
</font><font color='#000088'>+ rtems_test_assert( !status );
</font>
puts( "Init: send SIGUSR1 to process" );
status = kill( getpid(), SIGUSR1 );
<font color='#880000'>- rtems_test_assert( !status );
</font><font color='#000088'>+ rtems_test_assert( !status );
</font>
puts( "Init: sleep so the Task_3 can receive SIGUSR1" );
remaining = sleep( 1 );
<font color='#880000'>- rtems_test_assert( !status );
</font><font color='#000088'>+ rtems_test_assert( !status );
</font>
/* Send SIGUSR1, Task_3 has issued a sigwait */
status = sigemptyset( &mask );
<font color='#880000'>- rtems_test_assert( !status );
</font><font color='#000088'>+ rtems_test_assert( !status );
</font>
status = sigaddset( &mask, SIGUSR1 );
<font color='#880000'>- rtems_test_assert( !status );
</font><font color='#000088'>+ rtems_test_assert( !status );
</font>
puts( "Init: Block SIGUSR1" );
status = sigprocmask( SIG_BLOCK, &mask, NULL );
<font color='#880000'>- rtems_test_assert( !status );
</font><font color='#000088'>+ rtems_test_assert( !status );
</font>
puts( "Init: send SIGUSR1 to process" );
status = kill( getpid(), SIGUSR1 );
<font color='#880000'>- rtems_test_assert( !status );
</font><font color='#000088'>+ rtems_test_assert( !status );
</font>
puts( "Init: sleep so the Task_3 can receive SIGUSR1" );
remaining = sleep( 1 );
<font color='#880000'>- rtems_test_assert( !status );
</font><font color='#000088'>+ rtems_test_assert( !status );
</font>
/* Send SIGUSR1, Task_3 has issued a sigwaitinfo */
status = sigemptyset( &mask );
<font color='#880000'>- rtems_test_assert( !status );
</font><font color='#000088'>+ rtems_test_assert( !status );
</font>
status = sigaddset( &mask, SIGUSR2 );
<font color='#880000'>- rtems_test_assert( !status );
</font><font color='#000088'>+ rtems_test_assert( !status );
</font>
puts( "Init: Block SIGUSR2" );
status = sigprocmask( SIG_BLOCK, &mask, NULL );
<font color='#880000'>- rtems_test_assert( !status );
</font><font color='#000088'>+ rtems_test_assert( !status );
</font>
puts( "Init: send SIGUSR2 to process" );
status = kill( getpid(), SIGUSR2 );
<font color='#880000'>- rtems_test_assert( !status );
</font><font color='#000088'>+ rtems_test_assert( !status );
</font>
puts( "Init: sleep so the Task_3 can receive SIGUSR2" );
remaining = sleep( 1 );
<font color='#880000'>- rtems_test_assert( !status );
</font><font color='#000088'>+ rtems_test_assert( !status );
</font>
/* Suspend for signal that has already be sent */
status = sigemptyset( &mask );
<font color='#880000'>- rtems_test_assert( !status );
</font><font color='#000088'>+ rtems_test_assert( !status );
</font>
puts( "Init: sigsuspend for any signal" );
status = sigsuspend( &mask );
<font color='#880000'>- rtems_test_assert( status );
</font><font color='#000088'>+ rtems_test_assert( status );
</font> printf( "Init: awakended from sigsuspend status=%d \n", status );
/* generate error cases for psignal */
<font color='#997700'>@@ -429,156 +429,156 @@
</font> status = sigemptyset( NULL );
if ( status != -1 )
printf( "status = %d\n", status );
<font color='#880000'>- rtems_test_assert( errno == EINVAL );
</font><font color='#000088'>+ rtems_test_assert( errno == EINVAL );
</font> puts( "Init: sigemptyset - EINVAL (set invalid)" );
status = sigfillset( NULL );
if ( status != -1 )
printf( "status = %d\n", status );
<font color='#880000'>- rtems_test_assert( errno == EINVAL );
</font><font color='#000088'>+ rtems_test_assert( errno == EINVAL );
</font> puts( "Init: sigfillset - EINVAL (set invalid)" );
status = sigaddset( NULL, SIGUSR1 );
if ( status != -1 )
printf( "status = %d\n", status );
<font color='#880000'>- rtems_test_assert( errno == EINVAL );
</font><font color='#000088'>+ rtems_test_assert( errno == EINVAL );
</font> puts( "Init: sigaddset - EINVAL (set invalid)" );
status = sigaddset( &mask, 0 );
if ( status != -1 )
printf( "status = %d\n", status );
<font color='#880000'>- rtems_test_assert( errno == EINVAL );
</font><font color='#000088'>+ rtems_test_assert( errno == EINVAL );
</font> puts( "Init: sigaddset - EINVAL (signal = 0)" );
status = sigaddset( &mask, 999 );
if ( status != -1 )
printf( "status = %d\n", status );
<font color='#880000'>- rtems_test_assert( errno == EINVAL );
</font><font color='#000088'>+ rtems_test_assert( errno == EINVAL );
</font> puts( "Init: sigaddset - EINVAL (set invalid)" );
status = sigdelset( NULL, SIGUSR1 );
if ( status != -1 )
printf( "status = %d\n", status );
<font color='#880000'>- rtems_test_assert( errno == EINVAL );
</font><font color='#000088'>+ rtems_test_assert( errno == EINVAL );
</font> puts( "Init: sigdelset - EINVAL (set invalid)" );
status = sigdelset( &mask, 0 );
<font color='#880000'>- rtems_test_assert( !status );
</font><font color='#000088'>+ rtems_test_assert( !status );
</font> puts( "Init: sigdelset - SUCCESSFUL (signal = 0)" );
status = sigdelset( &mask, 999 );
if ( status != -1 )
printf( "status = %d\n", status );
<font color='#880000'>- rtems_test_assert( errno == EINVAL );
</font><font color='#000088'>+ rtems_test_assert( errno == EINVAL );
</font> puts( "Init: sigdelset - EINVAL (set invalid)" );
status = sigismember( NULL, SIGUSR1 );
if ( status != -1 )
printf( "status = %d\n", status );
<font color='#880000'>- rtems_test_assert( errno == EINVAL );
</font><font color='#000088'>+ rtems_test_assert( errno == EINVAL );
</font> puts( "Init: sigismember - EINVAL (set invalid)" );
status = sigismember( &mask, 0 );
<font color='#880000'>- rtems_test_assert( !status );
</font><font color='#000088'>+ rtems_test_assert( !status );
</font> puts( "Init: sigismember - SUCCESSFUL (signal = 0)" );
status = sigismember( &mask, 999 );
if ( status != -1 )
printf( "status = %d\n", status );
<font color='#880000'>- rtems_test_assert( errno == EINVAL );
</font><font color='#000088'>+ rtems_test_assert( errno == EINVAL );
</font> puts( "Init: sigismember - EINVAL (signal invalid)" );
status = sigaction( 0, &act, 0 );
if ( status != -1 )
printf( "status = %d\n", status );
<font color='#880000'>- rtems_test_assert( errno == EINVAL );
</font><font color='#000088'>+ rtems_test_assert( errno == EINVAL );
</font> puts( "Init: sigaction - EINVAL (signal = 0)" );
status = sigaction( 999, &act, NULL );
if ( status != -1 )
printf( "status = %d\n", status );
<font color='#880000'>- rtems_test_assert( errno == EINVAL );
</font><font color='#000088'>+ rtems_test_assert( errno == EINVAL );
</font> puts( "Init: sigaction - EINVAL (signal invalid)" );
status = sigaction( SIGKILL, &act, NULL );
if ( status != -1 )
printf( "status = %d\n", status );
<font color='#880000'>- rtems_test_assert( errno == EINVAL );
</font><font color='#000088'>+ rtems_test_assert( errno == EINVAL );
</font> puts( "Init: sigaction - EINVAL (SIGKILL)" );
status = pthread_sigmask( SIG_BLOCK, NULL, NULL );
if ( status != -1 )
printf( "status = %d\n", status );
<font color='#880000'>- rtems_test_assert( errno == EINVAL );
</font><font color='#000088'>+ rtems_test_assert( errno == EINVAL );
</font> puts( "Init: pthread_sigmask - EINVAL (set and oset invalid)" );
status = pthread_sigmask( 999, &pending_set, NULL );
if ( status != -1 )
printf( "status = %d\n", status );
<font color='#880000'>- rtems_test_assert( errno == EINVAL );
</font><font color='#000088'>+ rtems_test_assert( errno == EINVAL );
</font> puts( "Init: pthread_sigmask - EINVAL (how invalid)" );
status = sigpending( NULL );
if ( status != -1 )
printf( "status = %d\n", status );
<font color='#880000'>- rtems_test_assert( errno == EINVAL );
</font><font color='#000088'>+ rtems_test_assert( errno == EINVAL );
</font> puts( "Init: sigpending - EINVAL (set invalid)" );
timeout.tv_nsec = -1;
status = sigtimedwait( &mask, &info, &timeout );
if ( status != -1 )
printf( "status = %d\n", status );
<font color='#880000'>- rtems_test_assert( errno == EINVAL );
</font><font color='#000088'>+ rtems_test_assert( errno == EINVAL );
</font> 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 );
<font color='#880000'>- rtems_test_assert( errno == EINVAL );
</font><font color='#000088'>+ rtems_test_assert( errno == EINVAL );
</font> puts( "Init: pthread_sigmask - EINVAL (timout->nsec invalid to large)" );
status = pthread_kill( Init_id, 999 );
if ( status != -1 )
printf( "status = %d\n", status );
<font color='#880000'>- rtems_test_assert( errno == EINVAL );
</font><font color='#000088'>+ rtems_test_assert( errno == EINVAL );
</font> puts( "Init: pthread_kill - EINVAL (sig invalid)" );
status = pthread_kill( 0, SIGUSR2 );
if ( status != -1 )
printf( "status = %d\n", status );
<font color='#880000'>- rtems_test_assert( errno == ESRCH );
</font><font color='#000088'>+ rtems_test_assert( errno == ESRCH );
</font> puts( "Init: pthread_kill - ESRCH (signal SA_SIGINFO)" );
status = pthread_kill( Init_id, 0 );
if ( status != -1 )
printf( "status = %d\n", status );
<font color='#880000'>- rtems_test_assert( errno == EINVAL );
</font><font color='#000088'>+ rtems_test_assert( errno == EINVAL );
</font> puts( "Init: pthread_kill - EINVAL (signal = 0)" );
act.sa_handler = SIG_IGN;
act.sa_flags = 0;
sigaction( SIGUSR2, &act, NULL );
status = pthread_kill( Init_id, SIGUSR2 );
<font color='#880000'>- rtems_test_assert( !status );
</font><font color='#000088'>+ rtems_test_assert( !status );
</font> puts( "Init: pthread_kill - SUCCESSFUL (signal = SIG_IGN)" );
status = kill( INT_MAX, SIGUSR1 );
if ( status != -1 )
printf( "status = %d\n", status );
<font color='#880000'>- rtems_test_assert( errno == ESRCH );
</font><font color='#000088'>+ rtems_test_assert( errno == ESRCH );
</font> puts( "Init: kill - ESRCH (pid invalid)" );
status = kill( getpid(), 0 );
if ( status != -1 )
printf( "status = %d\n", status );
<font color='#880000'>- rtems_test_assert( errno == EINVAL );
</font><font color='#000088'>+ rtems_test_assert( errno == EINVAL );
</font> puts( "Init: kill - EINVAL (signal = 0)" );
status = kill( getpid(), 999 );
if ( status != -1 )
printf( "status = %d\n", status );
<font color='#880000'>- rtems_test_assert( errno == EINVAL );
</font><font color='#000088'>+ rtems_test_assert( errno == EINVAL );
</font> puts( "Init: kill - EINVAL (sig invalid)" );
/* exit this thread */
<font color='#006600'>diff -u rtems/testsuites/psxtests/psx04/task1.c:1.8 rtems/testsuites/psxtests/psx04/task1.c:1.9
--- rtems/testsuites/psxtests/psx04/task1.c:1.8 Tue Dec 8 11:52:52 2009
+++ rtems/testsuites/psxtests/psx04/task1.c Thu Oct 21 16:22:24 2010
</font><font color='#997700'>@@ -30,7 +30,7 @@
</font>
seconds = sleep( 5 );
printf( "Task_1: %d seconds left\n", seconds );
<font color='#880000'>- rtems_test_assert( seconds );
</font><font color='#000088'>+ rtems_test_assert( seconds );
</font>
/* switch to Init */
<font color='#006600'>diff -u rtems/testsuites/psxtests/psx04/task2.c:1.7 rtems/testsuites/psxtests/psx04/task2.c:1.8
--- rtems/testsuites/psxtests/psx04/task2.c:1.7 Tue Dec 8 11:52:52 2009
+++ rtems/testsuites/psxtests/psx04/task2.c Thu Oct 21 16:22:24 2010
</font><font color='#997700'>@@ -28,7 +28,7 @@
</font>
printf( "Task_2: sending SIGUSR1\n" );
status = pthread_kill( Init_id, SIGUSR1 );
<font color='#880000'>- rtems_test_assert( !status );
</font><font color='#000088'>+ rtems_test_assert( !status );
</font>
/* switch to Init */
<font color='#006600'>diff -u rtems/testsuites/psxtests/psx04/task3.c:1.10 rtems/testsuites/psxtests/psx04/task3.c:1.11
--- rtems/testsuites/psxtests/psx04/task3.c:1.10 Tue Dec 8 11:52:52 2009
+++ rtems/testsuites/psxtests/psx04/task3.c Thu Oct 21 16:22:24 2010
</font><font color='#997700'>@@ -35,24 +35,24 @@
</font>
printf( "Task_3: sigqueue SIGUSR1 with value= %d\n", value.sival_int );
status = sigqueue( getpid(), SIGUSR1, value );
<font color='#880000'>- rtems_test_assert( !status );
</font><font color='#000088'>+ rtems_test_assert( !status );
</font>
/* catch signal with sigwaitinfo */
empty_line();
status = sigemptyset( &mask );
<font color='#880000'>- rtems_test_assert( !status );
</font><font color='#000088'>+ rtems_test_assert( !status );
</font>
status = sigaddset( &mask, SIGUSR1 );
<font color='#880000'>- rtems_test_assert( !status );
</font><font color='#000088'>+ rtems_test_assert( !status );
</font>
printf( "Task_3: sigwaitinfo SIGUSR1 with value= %d\n", value.sival_int );
status = sigwaitinfo( &mask, &info );
/* switch to Init */
<font color='#880000'>- rtems_test_assert( !(status==-1) );
</font><font color='#000088'>+ rtems_test_assert( !(status==-1) );
</font> printf(
"Task_3: si_signo= %d si_code= %d value= %d\n",
info.si_signo,
<font color='#997700'>@@ -65,17 +65,17 @@
</font> empty_line();
status = sigemptyset( &mask );
<font color='#880000'>- rtems_test_assert( !status );
</font><font color='#000088'>+ rtems_test_assert( !status );
</font>
status = sigaddset( &mask, SIGUSR1 );
<font color='#880000'>- rtems_test_assert( !status );
</font><font color='#000088'>+ rtems_test_assert( !status );
</font>
printf( "Task_3: sigwait SIGUSR1\n" );
status = sigwait( &mask, &sig );
/* switch to Init */
<font color='#880000'>- rtems_test_assert( !status );
</font><font color='#000088'>+ rtems_test_assert( !status );
</font> printf( "Task_3: signo= %d\n", sig );
/* catch signal with pause */
<font color='#997700'>@@ -83,17 +83,17 @@
</font> empty_line();
status = sigemptyset( &mask );
<font color='#880000'>- rtems_test_assert( !status );
</font><font color='#000088'>+ rtems_test_assert( !status );
</font>
status = sigaddset( &mask, SIGUSR1 );
<font color='#880000'>- rtems_test_assert( !status );
</font><font color='#000088'>+ rtems_test_assert( !status );
</font>
printf( "Task_3: pause\n" );
status = pause( );
/* switch to Init */
<font color='#880000'>- rtems_test_assert( !(status==-1) );
</font><font color='#000088'>+ rtems_test_assert( !(status==-1) );
</font> printf( "Task_3: pause= %d\n", status );
<font color='#997700'>@@ -103,11 +103,11 @@
</font>
printf( "Task_3: sending SIGUSR2\n" );
status = pthread_kill( Init_id, SIGUSR2 );
<font color='#880000'>- rtems_test_assert( !status );
</font><font color='#000088'>+ rtems_test_assert( !status );
</font>
printf( "Task_3: sleep so the Init task can reguest a signal\n" );
remaining = sleep( 1 );
<font color='#880000'>- rtems_test_assert( !status );
</font><font color='#000088'>+ rtems_test_assert( !status );
</font>
/* end of task 3 */
printf( "Task_3: exit\n" );
<font color='#006600'>diff -u rtems/testsuites/psxtests/psx05/init.c:1.34 rtems/testsuites/psxtests/psx05/init.c:1.35
--- rtems/testsuites/psxtests/psx05/init.c:1.34 Tue Dec 8 11:52:52 2009
+++ rtems/testsuites/psxtests/psx05/init.c Thu Oct 21 16:22:24 2010
</font><font color='#997700'>@@ -42,7 +42,7 @@
</font> /* protocol */
status = pthread_mutexattr_getprotocol( attr, &protocol );
<font color='#880000'>- rtems_test_assert( !status );
</font><font color='#000088'>+ rtems_test_assert( !status );
</font>
printf( "%smutex protocol is (%d) -- ", msg, protocol );
switch ( protocol ) {
<font color='#997700'>@@ -57,20 +57,20 @@
</font> break;
default:
puts( "UNKNOWN" );
<font color='#880000'>- rtems_test_assert( 0 );
</font><font color='#000088'>+ rtems_test_assert( 0 );
</font> break;
}
/* priority ceiling */
status = pthread_mutexattr_getprioceiling( attr, &prioceiling );
<font color='#880000'>- rtems_test_assert( !status );
</font><font color='#000088'>+ rtems_test_assert( !status );
</font> printf( "%smutex priority ceiling is %d\n", msg, prioceiling );
/* process shared */
status = pthread_mutexattr_getpshared( attr, &pshared );
<font color='#880000'>- rtems_test_assert( !status );
</font><font color='#000088'>+ rtems_test_assert( !status );
</font> printf( "%smutex process shared is (%d) -- ", msg, pshared );
switch ( pshared ) {
case PTHREAD_PROCESS_PRIVATE:
<font color='#997700'>@@ -81,7 +81,7 @@
</font> break;
default:
puts( "UNKNOWN" );
<font color='#880000'>- rtems_test_assert( 0 );
</font><font color='#000088'>+ rtems_test_assert( 0 );
</font> break;
}
}
<font color='#997700'>@@ -123,7 +123,7 @@
</font> int old_ceiling;
int priority;
<font color='#880000'>- rtems_test_assert( MUTEX_BAD_ID != PTHREAD_MUTEX_INITIALIZER );
</font><font color='#000088'>+ rtems_test_assert( MUTEX_BAD_ID != PTHREAD_MUTEX_INITIALIZER );
</font> Mutex_bad_id = MUTEX_BAD_ID;
puts( "\n\n*** POSIX TEST 5 ***" );
<font color='#997700'>@@ -141,30 +141,30 @@
</font>
puts( "Init: pthread_mutexattr_init - EINVAL (NULL attr)" );
status = pthread_mutexattr_init( NULL );
<font color='#880000'>- rtems_test_assert( status == EINVAL );
</font><font color='#000088'>+ rtems_test_assert( status == EINVAL );
</font>
puts( "Init: pthread_mutexattr_init - SUCCESSFUL" );
status = pthread_mutexattr_init( &attr );
<font color='#880000'>- rtems_test_assert( !status );
</font><font color='#000088'>+ rtems_test_assert( !status );
</font>
Print_mutexattr( "Init: ", &attr );
/* create an "uninitialized" attribute structure */
status = pthread_mutexattr_init( &destroyed_attr );
<font color='#880000'>- rtems_test_assert( !status );
</font><font color='#000088'>+ rtems_test_assert( !status );
</font>
puts( "Init: pthread_mutexattr_destroy - SUCCESSFUL" );
status = pthread_mutexattr_destroy( &destroyed_attr );
<font color='#880000'>- rtems_test_assert( !status );
</font><font color='#000088'>+ rtems_test_assert( !status );
</font>
puts( "Init: pthread_mutexattr_destroy - EINVAL (NULL attr)" );
status = pthread_mutexattr_destroy( NULL );
<font color='#880000'>- rtems_test_assert( status == EINVAL );
</font><font color='#000088'>+ rtems_test_assert( status == EINVAL );
</font>
puts( "Init: pthread_mutexattr_destroy - EINVAL (not initialized)" );
status = pthread_mutexattr_destroy( &destroyed_attr );
<font color='#880000'>- rtems_test_assert( status == EINVAL );
</font><font color='#000088'>+ rtems_test_assert( status == EINVAL );
</font>
/* error cases for set and get pshared attribute */
<font color='#997700'>@@ -172,25 +172,25 @@
</font>
puts( "Init: pthread_mutexattr_getpshared - EINVAL (NULL attr)" );
status = pthread_mutexattr_getpshared( NULL, &pshared );
<font color='#880000'>- rtems_test_assert( status == EINVAL );
</font><font color='#000088'>+ rtems_test_assert( status == EINVAL );
</font>
puts( "Init: pthread_mutexattr_getpshared - EINVAL (NULL pshared)" );
status = pthread_mutexattr_getpshared( &attr, NULL );
<font color='#880000'>- rtems_test_assert( status == EINVAL );
</font><font color='#000088'>+ rtems_test_assert( status == EINVAL );
</font>
puts( "Init: pthread_mutexattr_getpshared - EINVAL (not initialized)" );
status = pthread_mutexattr_getpshared( &destroyed_attr, &pshared );
<font color='#880000'>- rtems_test_assert( status == EINVAL );
</font><font color='#000088'>+ rtems_test_assert( status == EINVAL );
</font>
pshared = PTHREAD_PROCESS_PRIVATE;
puts( "Init: pthread_mutexattr_setpshared - EINVAL (NULL attr)" );
status = pthread_mutexattr_setpshared( NULL, pshared );
<font color='#880000'>- rtems_test_assert( status == EINVAL );
</font><font color='#000088'>+ rtems_test_assert( status == EINVAL );
</font>
pshared = PTHREAD_PROCESS_PRIVATE;
puts( "Init: pthread_mutexattr_setpshared - EINVAL (not initialized)" );
status = pthread_mutexattr_setpshared( &destroyed_attr, pshared );
<font color='#880000'>- rtems_test_assert( status == EINVAL );
</font><font color='#000088'>+ rtems_test_assert( status == EINVAL );
</font>
/* error cases for set and get protocol attribute */
<font color='#997700'>@@ -198,27 +198,27 @@
</font>
puts( "Init: pthread_mutexattr_getprotocol - EINVAL (NULL attr)" );
status = pthread_mutexattr_getprotocol( NULL, &protocol );
<font color='#880000'>- rtems_test_assert( status == EINVAL );
</font><font color='#000088'>+ rtems_test_assert( status == EINVAL );
</font>
puts( "Init: pthread_mutexattr_getprotocol - EINVAL (NULL protocol)" );
status = pthread_mutexattr_getprotocol( &attr, NULL );
<font color='#880000'>- rtems_test_assert( status == EINVAL );
</font><font color='#000088'>+ rtems_test_assert( status == EINVAL );
</font>
puts( "Init: pthread_mutexattr_getprotocol - EINVAL (not initialized)" );
status = pthread_mutexattr_getprotocol( &destroyed_attr, &protocol );
<font color='#880000'>- rtems_test_assert( status == EINVAL );
</font><font color='#000088'>+ rtems_test_assert( status == EINVAL );
</font>
puts( "Init: pthread_mutexattr_setprotocol - EINVAL (NULL attr)" );
status = pthread_mutexattr_setprotocol( NULL, PTHREAD_PRIO_NONE );
<font color='#880000'>- rtems_test_assert( status == EINVAL );
</font><font color='#000088'>+ rtems_test_assert( status == EINVAL );
</font>
puts( "Init: pthread_mutexattr_setprotocol - EINVAL (invalid protocol)" );
status = pthread_mutexattr_setprotocol( &attr, -1 );
<font color='#880000'>- rtems_test_assert( status == EINVAL );
</font><font color='#000088'>+ rtems_test_assert( status == EINVAL );
</font>
puts( "Init: pthread_mutexattr_setprotocol - EINVAL (not initialized)" );
status = pthread_mutexattr_setprotocol( &destroyed_attr, -1 );
<font color='#880000'>- rtems_test_assert( status == EINVAL );
</font><font color='#000088'>+ rtems_test_assert( status == EINVAL );
</font>
/* error cases for set and get prioceiling attribute */
<font color='#997700'>@@ -226,34 +226,34 @@
</font>
puts( "Init: pthread_mutexattr_getprioceiling - EINVAL (NULL attr)" );
status = pthread_mutexattr_getprioceiling( NULL, &ceiling );
<font color='#880000'>- rtems_test_assert( status == EINVAL );
</font><font color='#000088'>+ rtems_test_assert( status == EINVAL );
</font>
puts( "Init: pthread_mutexattr_getprioceiling - EINVAL (NULL prioceiling)" );
status = pthread_mutexattr_getprioceiling( &attr, NULL );
<font color='#880000'>- rtems_test_assert( status == EINVAL );
</font><font color='#000088'>+ rtems_test_assert( status == EINVAL );
</font>
puts( "Init: pthread_mutexattr_getprioceiling - EINVAL (not initialized)" );
status = pthread_mutexattr_getprioceiling( &destroyed_attr, &ceiling );
<font color='#880000'>- rtems_test_assert( status == EINVAL );
</font><font color='#000088'>+ rtems_test_assert( status == EINVAL );
</font>
puts( "Init: pthread_mutexattr_setprioceiling - EINVAL (NULL attr)" );
status = pthread_mutexattr_setprioceiling( NULL, 128 );
<font color='#880000'>- rtems_test_assert( status == EINVAL );
</font><font color='#000088'>+ rtems_test_assert( status == EINVAL );
</font>
puts( "Init: pthread_mutexattr_setprioceiling - EINVAL (invalid priority)" );
status = pthread_mutexattr_setprioceiling( &attr, 512 );
if ( status != EINVAL )
printf( "status = %d\n", status );
<font color='#880000'>- rtems_test_assert( status == EINVAL );
</font><font color='#000088'>+ rtems_test_assert( status == EINVAL );
</font>
puts( "Init: pthread_mutexattr_setprioceiling - EINVAL (not initialized)" );
status = pthread_mutexattr_setprioceiling( &destroyed_attr, -1 );
<font color='#880000'>- rtems_test_assert( status == EINVAL );
</font><font color='#000088'>+ rtems_test_assert( status == EINVAL );
</font>
/* create a thread */
status = pthread_create( &Task_id, NULL, Task_1, NULL );
<font color='#880000'>- rtems_test_assert( !status );
</font><font color='#000088'>+ rtems_test_assert( !status );
</font>
/* now try some basic mutex operations */
<font color='#997700'>@@ -261,18 +261,18 @@
</font>
puts( "Init: pthread_mutex_init - EINVAL (NULL mutex_id)" );
status = pthread_mutex_init( NULL, &attr );
<font color='#880000'>- rtems_test_assert( status == EINVAL );
</font><font color='#000088'>+ rtems_test_assert( status == EINVAL );
</font>
puts( "Init: pthread_mutex_init - EINVAL (not initialized attr)" );
status = pthread_mutex_init( &Mutex_id, &destroyed_attr );
<font color='#880000'>- rtems_test_assert( status == EINVAL );
</font><font color='#000088'>+ rtems_test_assert( status == EINVAL );
</font>
/* 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 );
<font color='#880000'>- rtems_test_assert( status == EINVAL );
</font><font color='#000088'>+ rtems_test_assert( status == EINVAL );
</font>
/* must get around error checks in attribute set routines */
attr.protocol = PTHREAD_PRIO_INHERIT;
<font color='#997700'>@@ -280,56 +280,56 @@
</font>
puts( "Init: pthread_mutex_init - EINVAL (bad priority ceiling)" );
status = pthread_mutex_init( &Mutex_id, &attr );
<font color='#880000'>- rtems_test_assert( status == EINVAL );
</font><font color='#000088'>+ rtems_test_assert( status == EINVAL );
</font>
/* must get around various error checks before checking bad scope */
puts( "Init: Resetting mutex attributes" );
status = pthread_mutexattr_init( &attr );
<font color='#880000'>- rtems_test_assert( !status );
</font><font color='#000088'>+ rtems_test_assert( !status );
</font>
puts( "Init: pthread_mutex_init - ENOSYS (process wide scope)" );
attr.process_shared = PTHREAD_PROCESS_SHARED;
status = pthread_mutex_init( &Mutex_id, &attr );
<font color='#880000'>- rtems_test_assert( status == ENOSYS );
</font><font color='#000088'>+ rtems_test_assert( status == ENOSYS );
</font>
puts( "Init: pthread_mutex_init - EINVAL (invalid scope)" );
attr.process_shared = -1;
status = pthread_mutex_init( &Mutex_id, &attr );
<font color='#880000'>- rtems_test_assert( status == EINVAL );
</font><font color='#000088'>+ rtems_test_assert( status == EINVAL );
</font>
/* bad kind */
status = pthread_mutexattr_init( &attr );
<font color='#880000'>- rtems_test_assert( !status );
</font><font color='#000088'>+ rtems_test_assert( !status );
</font>
puts( "Init: pthread_mutex_init - EINVAL (invalid type)" );
attr.type = -1;
status = pthread_mutex_init( &Mutex_id, &attr );
<font color='#880000'>- rtems_test_assert( status == EINVAL );
</font><font color='#000088'>+ rtems_test_assert( status == EINVAL );
</font>
/* now set up for a success pthread_mutex_init */
puts( "Init: Resetting mutex attributes" );
status = pthread_mutexattr_init( &attr );
<font color='#880000'>- rtems_test_assert( !status );
</font><font color='#000088'>+ rtems_test_assert( !status );
</font>
puts( "Init: Changing mutex attributes" );
status = pthread_mutexattr_setprotocol( &attr, PTHREAD_PRIO_INHERIT );
<font color='#880000'>- rtems_test_assert( !status );
</font><font color='#000088'>+ rtems_test_assert( !status );
</font>
status = pthread_mutexattr_setprioceiling(
&attr,
(sched_get_priority_max(SCHED_FIFO) / 2) + 1
);
<font color='#880000'>- rtems_test_assert( !status );
</font><font color='#000088'>+ rtems_test_assert( !status );
</font>
status = pthread_mutexattr_setpshared( &attr, PTHREAD_PROCESS_SHARED );
<font color='#880000'>- rtems_test_assert( !status );
</font><font color='#000088'>+ rtems_test_assert( !status );
</font>
Print_mutexattr( "Init: ", &attr );
puts( "Init: Resetting mutex attributes" );
status = pthread_mutexattr_init( &attr );
<font color='#880000'>- rtems_test_assert( !status );
</font><font color='#000088'>+ rtems_test_assert( !status );
</font>
/*
* Set the protocol to priority ceiling so the owner check happens
<font color='#997700'>@@ -337,13 +337,13 @@
</font> */
status = pthread_mutexattr_setprotocol( &attr, PTHREAD_PRIO_INHERIT );
<font color='#880000'>- rtems_test_assert( !status );
</font><font color='#000088'>+ rtems_test_assert( !status );
</font>
puts( "Init: pthread_mutex_init - SUCCESSFUL" );
status = pthread_mutex_init( &Mutex_id, &attr );
if ( status )
printf( "status = %d\n", status );
<font color='#880000'>- rtems_test_assert( !status );
</font><font color='#000088'>+ rtems_test_assert( !status );
</font>
/*
* This is not required to be an error and when it is, there are
<font color='#997700'>@@ -355,44 +355,44 @@
</font> status = pthread_mutex_init( &Mutex_id, &attr );
if ( !status )
printf( "status = %d\n", status );
<font color='#880000'>- rtems_test_assert( status == EBUSY );
</font><font color='#000088'>+ rtems_test_assert( status == EBUSY );
</font> #endif
puts( "Init: pthread_mutex_trylock - EINVAL (illegal ID)" );
status = pthread_mutex_trylock( &Mutex_bad_id );
if ( status != EINVAL )
printf( "status = %d\n", status );
<font color='#880000'>- rtems_test_assert( status == EINVAL );
</font><font color='#000088'>+ rtems_test_assert( status == EINVAL );
</font>
puts( "Init: pthread_mutex_trylock - SUCCESSFUL" );
status = pthread_mutex_trylock( &Mutex_id );
if ( status )
printf( "status = %d\n", status );
<font color='#880000'>- rtems_test_assert( !status );
</font><font color='#000088'>+ rtems_test_assert( !status );
</font>
puts( "Init: pthread_mutex_trylock - EDEADLK (already locked)" );
status = pthread_mutex_trylock( &Mutex_id );
if ( status != EDEADLK )
printf( "status = %d\n", status );
<font color='#880000'>- rtems_test_assert( status == EDEADLK );
</font><font color='#000088'>+ rtems_test_assert( status == EDEADLK );
</font>
puts( "Init: pthread_mutex_lock - EINVAL (NULL id)" );
status = pthread_mutex_lock( NULL );
if ( status != EINVAL )
printf( "status = %d\n", status );
<font color='#880000'>- rtems_test_assert( status == EINVAL );
</font><font color='#000088'>+ rtems_test_assert( status == EINVAL );
</font>
puts( "Init: pthread_mutex_unlock - EINVAL (NULL id)" );
status = pthread_mutex_unlock( NULL );
if ( status != EINVAL )
printf( "status = %d\n", status );
<font color='#880000'>- rtems_test_assert( status == EINVAL );
</font><font color='#000088'>+ rtems_test_assert( status == EINVAL );
</font>
puts( "Init: pthread_mutex_lock - EDEADLK (already locked)" );
status = pthread_mutex_lock( &Mutex_id );
if ( status != EDEADLK )
printf( "status = %d\n", status );
<font color='#880000'>- rtems_test_assert( status == EDEADLK );
</font><font color='#000088'>+ rtems_test_assert( status == EDEADLK );
</font>
puts( "Init: Sleep 1 second" );
<font color='#997700'>@@ -404,19 +404,19 @@
</font> status = pthread_mutex_unlock( &Mutex_bad_id );
if ( status != EINVAL )
printf( "status = %d\n", status );
<font color='#880000'>- rtems_test_assert( status == EINVAL );
</font><font color='#000088'>+ rtems_test_assert( status == EINVAL );
</font>
puts( "Init: pthread_mutex_unlock - SUCCESSFUL" );
status = pthread_mutex_unlock( &Mutex_id );
if ( status )
printf( "status = %d\n", status );
<font color='#880000'>- rtems_test_assert( !status );
</font><font color='#000088'>+ rtems_test_assert( !status );
</font>
puts( "Init: pthread_mutex_unlock - EPERM (not owner)" );
status = pthread_mutex_unlock( &Mutex_id );
if ( status != EPERM )
printf( "status = %d\n", status );
<font color='#880000'>- rtems_test_assert( status == EPERM );
</font><font color='#000088'>+ rtems_test_assert( status == EPERM );
</font>
puts( "Init: pthread_mutex_timedlock - time out in 1/2 second" );
calculate_abstimeout( ×, 0, (TOD_NANOSECONDS_PER_SECOND / 2) );
<font color='#997700'>@@ -424,7 +424,7 @@
</font> status = pthread_mutex_timedlock( &Mutex_id, × );
if ( status != ETIMEDOUT )
printf( "status = %d\n", status );
<font color='#880000'>- rtems_test_assert( status == ETIMEDOUT );
</font><font color='#000088'>+ rtems_test_assert( status == ETIMEDOUT );
</font>
puts( "Init: pthread_mutex_timedlock - time out in the past" );
calculate_abstimeout( ×, -1, (TOD_NANOSECONDS_PER_SECOND / 2) );
<font color='#997700'>@@ -432,7 +432,7 @@
</font> status = pthread_mutex_timedlock( &Mutex_id, × );
if ( status != EBUSY )
printf( "status = %d\n", status );
<font color='#880000'>- rtems_test_assert( status == EBUSY );
</font><font color='#000088'>+ rtems_test_assert( status == EBUSY );
</font>
/* switch to idle */
<font color='#997700'>@@ -446,23 +446,23 @@
</font> status = pthread_mutex_init( &Mutex2_id, &attr );
if ( status )
printf( "status = %d\n", status );
<font color='#880000'>- rtems_test_assert( !status );
</font><font color='#000088'>+ rtems_test_assert( !status );
</font>
puts( "Init: pthread_mutex_init - EAGAIN (too many)" );
status = pthread_mutex_init( &Mutex3_id, &attr );
<font color='#880000'>- rtems_test_assert( status == EAGAIN );
</font><font color='#000088'>+ rtems_test_assert( status == EAGAIN );
</font>
puts( "Init: pthread_mutexattr_destroy - SUCCESSFUL" );
status = pthread_mutexattr_destroy( &attr );
<font color='#880000'>- rtems_test_assert( !status );
</font><font color='#000088'>+ rtems_test_assert( !status );
</font>
puts( "Init: pthread_mutex_destroy - SUCCESSFUL" );
status = pthread_mutex_destroy( &Mutex2_id );
<font color='#880000'>- rtems_test_assert( !status );
</font><font color='#000088'>+ rtems_test_assert( !status );
</font>
puts( "Init: pthread_mutex_destroy - EINVAL (invalid id)" );
status = pthread_mutex_destroy( &Mutex_bad_id );
<font color='#880000'>- rtems_test_assert( status == EINVAL );
</font><font color='#000088'>+ rtems_test_assert( status == EINVAL );
</font>
/* destroy a busy mutex */
<font color='#997700'>@@ -470,31 +470,31 @@
</font>
puts( "Init: pthread_mutexattr_init - SUCCESSFUL" );
status = pthread_mutexattr_init( &attr );
<font color='#880000'>- rtems_test_assert( !status );
</font><font color='#000088'>+ rtems_test_assert( !status );
</font>
puts( "Init: pthread_mutex_init - SUCCESSFUL" );
status = pthread_mutex_init( &Mutex2_id, &attr );
<font color='#880000'>- rtems_test_assert( !status );
</font><font color='#000088'>+ rtems_test_assert( !status );
</font>
puts( "Init: pthread_mutex_trylock - SUCCESSFUL" );
status = pthread_mutex_trylock( &Mutex2_id );
if ( status )
printf( "status = %d\n", status );
<font color='#880000'>- rtems_test_assert( !status );
</font><font color='#000088'>+ rtems_test_assert( !status );
</font>
puts( "Init: pthread_mutex_destroy - EBUSY (already locked)" );
status = pthread_mutex_destroy( &Mutex2_id );
if ( status != EBUSY )
printf( "status = %d\n", status );
<font color='#880000'>- rtems_test_assert( status == EBUSY );
</font><font color='#000088'>+ rtems_test_assert( status == EBUSY );
</font>
puts( "Init: pthread_mutex_unlock - SUCCESSFUL" );
status = pthread_mutex_unlock( &Mutex2_id );
<font color='#880000'>- rtems_test_assert( !status );
</font><font color='#000088'>+ rtems_test_assert( !status );
</font>
puts( "Init: pthread_mutex_destroy - SUCCESSFUL" );
status = pthread_mutex_destroy( &Mutex2_id );
<font color='#880000'>- rtems_test_assert( !status );
</font><font color='#000088'>+ rtems_test_assert( !status );
</font>
/* priority inherit mutex */
<font color='#997700'>@@ -502,26 +502,26 @@
</font>
puts( "Init: pthread_mutexattr_init - SUCCESSFUL" );
status = pthread_mutexattr_init( &attr );
<font color='#880000'>- rtems_test_assert( !status );
</font><font color='#000088'>+ rtems_test_assert( !status );
</font>
puts(
"Init: pthread_mutexattr_setprotocol - SUCCESSFUL (PTHREAD_PRIO_INHERIT)"
);
status = pthread_mutexattr_setprotocol( &attr, PTHREAD_PRIO_INHERIT );
<font color='#880000'>- rtems_test_assert( !status );
</font><font color='#000088'>+ rtems_test_assert( !status );
</font>
puts( "Init: pthread_mutex_init - SUCCESSFUL" );
status = pthread_mutex_init( &Mutex2_id, &attr );
<font color='#880000'>- rtems_test_assert( !status );
</font><font color='#000088'>+ rtems_test_assert( !status );
</font>
puts( "Init: pthread_mutex_trylock - SUCCESSFUL" );
status = pthread_mutex_trylock( &Mutex2_id );
<font color='#880000'>- rtems_test_assert( !status );
</font><font color='#000088'>+ rtems_test_assert( !status );
</font>
/* create a thread at a lower priority */
status = pthread_create( &Task2_id, NULL, Task_2, NULL );
<font color='#880000'>- rtems_test_assert( !status );
</font><font color='#000088'>+ rtems_test_assert( !status );
</font>
/* set priority of Task2 to highest priority */
<font color='#997700'>@@ -529,25 +529,25 @@
</font>
puts( "Init: pthread_setschedparam - Setting Task2 priority to highest" );
status = pthread_setschedparam( Task2_id, SCHED_FIFO, ¶m );
<font color='#880000'>- rtems_test_assert( !status );
</font><font color='#000088'>+ rtems_test_assert( !status );
</font>
/* switching to Task2 */
status = pthread_getschedparam( pthread_self(), &policy, ¶m );
<font color='#880000'>- rtems_test_assert( !status );
</font><font color='#000088'>+ rtems_test_assert( !status );
</font> printf( "Init: pthread_getschedparam - priority = %d\n", param.sched_priority);
puts( "Init: pthread_mutex_unlock - SUCCESSFUL" );
status = pthread_mutex_unlock( &Mutex2_id );
<font color='#880000'>- rtems_test_assert( !status );
</font><font color='#000088'>+ rtems_test_assert( !status );
</font>
puts( "Init: pthread_mutexattr_destroy - SUCCESSFUL" );
status = pthread_mutexattr_destroy( &attr );
<font color='#880000'>- rtems_test_assert( !status );
</font><font color='#000088'>+ rtems_test_assert( !status );
</font>
puts( "Init: pthread_mutex_destroy - SUCCESSFUL" );
status = pthread_mutex_destroy( &Mutex2_id );
<font color='#880000'>- rtems_test_assert( !status );
</font><font color='#000088'>+ rtems_test_assert( !status );
</font>
/* priority ceiling mutex */
<font color='#997700'>@@ -555,41 +555,41 @@
</font>
puts( "Init: pthread_mutexattr_init - SUCCESSFUL" );
status = pthread_mutexattr_init( &attr );
<font color='#880000'>- rtems_test_assert( !status );
</font><font color='#000088'>+ rtems_test_assert( !status );
</font>
puts(
"Init: pthread_mutexattr_setprotocol - SUCCESSFUL (PTHREAD_PRIO_PROTECT)"
);
status = pthread_mutexattr_setprotocol( &attr, PTHREAD_PRIO_PROTECT );
<font color='#880000'>- rtems_test_assert( !status );
</font><font color='#000088'>+ rtems_test_assert( !status );
</font>
puts( "Init: pthread_mutex_init - SUCCESSFUL" );
status = pthread_mutex_init( &Mutex2_id, &attr );
<font color='#880000'>- rtems_test_assert( !status );
</font><font color='#000088'>+ rtems_test_assert( !status );
</font>
puts( "Init: pthread_mutex_getprioceiling - EINVAL (invalid id)" );
status = pthread_mutex_getprioceiling( &Mutex_bad_id, &ceiling );
<font color='#880000'>- rtems_test_assert( status == EINVAL );
</font><font color='#000088'>+ rtems_test_assert( status == EINVAL );
</font>
puts( "Init: pthread_mutex_getprioceiling - EINVAL (NULL ceiling)" );
status = pthread_mutex_getprioceiling( &Mutex2_id, NULL );
<font color='#880000'>- rtems_test_assert( status == EINVAL );
</font><font color='#000088'>+ rtems_test_assert( status == EINVAL );
</font>
status = pthread_mutex_getprioceiling( &Mutex2_id, &ceiling );
<font color='#880000'>- rtems_test_assert( !status );
</font><font color='#000088'>+ rtems_test_assert( !status );
</font> 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 );
<font color='#880000'>- rtems_test_assert( status == EINVAL );
</font><font color='#000088'>+ rtems_test_assert( status == EINVAL );
</font>
puts( "Init: pthread_mutex_setprioceiling - EINVAL (illegal priority)" );
status = pthread_mutex_setprioceiling( &Mutex2_id, 512, &old_ceiling );
<font color='#880000'>- rtems_test_assert( status == EINVAL );
</font><font color='#000088'>+ rtems_test_assert( status == EINVAL );
</font>
puts( "Init: pthread_mutex_setprioceiling - EINVAL (NULL ceiling)" );
status = pthread_mutex_setprioceiling( &Mutex2_id, 128, NULL );
<font color='#880000'>- rtems_test_assert( status == EINVAL );
</font><font color='#000088'>+ rtems_test_assert( status == EINVAL );
</font>
/* normal cases of set priority ceiling */
<font color='#997700'>@@ -598,23 +598,23 @@
</font>
printf( "Init: pthread_mutex_setprioceiling - new ceiling = %d\n", priority );
status = pthread_mutex_setprioceiling( &Mutex2_id, priority, &old_ceiling );
<font color='#880000'>- rtems_test_assert( !status );
</font><font color='#000088'>+ rtems_test_assert( !status );
</font> printf(
"Init: pthread_mutex_setprioceiling - old ceiling = %d\n",old_ceiling
);
status = pthread_getschedparam( pthread_self(), &policy, ¶m );
<font color='#880000'>- rtems_test_assert( !status );
</font><font color='#000088'>+ rtems_test_assert( !status );
</font> printf(
"Init: pthread_getschedparam - priority = %d\n", param.sched_priority
);
puts( "Init: pthread_mutex_trylock - SUCCESSFUL" );
status = pthread_mutex_trylock( &Mutex2_id );
<font color='#880000'>- rtems_test_assert( !status );
</font><font color='#000088'>+ rtems_test_assert( !status );
</font>
status = pthread_getschedparam( pthread_self(), &policy, ¶m );
<font color='#880000'>- rtems_test_assert( !status );
</font><font color='#000088'>+ rtems_test_assert( !status );
</font> printf(
"Init: pthread_getschedparam - priority = %d\n", param.sched_priority
);
<font color='#997700'>@@ -622,30 +622,30 @@
</font> /* create a thread at a higher priority */
status = pthread_create( &Task3_id, NULL, Task_3, NULL );
<font color='#880000'>- rtems_test_assert( !status );
</font><font color='#000088'>+ rtems_test_assert( !status );
</font>
/* set priority of Task3 to highest priority */
param.sched_priority = --priority;
status = pthread_setschedparam( Task3_id, SCHED_FIFO, ¶m );
<font color='#880000'>- rtems_test_assert( !status );
</font><font color='#000088'>+ rtems_test_assert( !status );
</font> puts( "Init: pthread_setschedparam - set Task3 priority to highest" );
/* DOES NOT SWITCH to Task3 */
puts( "Init: Sleep 1 second" );
<font color='#880000'>- rtems_test_assert( !status );
</font><font color='#000088'>+ rtems_test_assert( !status );
</font> sleep( 1 );
/* switch to task 3 */
puts( "Init: pthread_mutex_unlock - SUCCESSFUL" );
status = pthread_mutex_unlock( &Mutex2_id );
<font color='#880000'>- rtems_test_assert( !status );
</font><font color='#000088'>+ rtems_test_assert( !status );
</font>
status = pthread_mutex_getprioceiling( &Mutex2_id, &ceiling );
<font color='#880000'>- rtems_test_assert( !status );
</font><font color='#000088'>+ rtems_test_assert( !status );
</font> printf( "Init: pthread_mutex_getprioceiling- ceiling = %d\n", ceiling );
/* set priority of Init to highest priority */
<font color='#997700'>@@ -653,14 +653,14 @@
</font> param.sched_priority = sched_get_priority_max(SCHED_FIFO);
status = pthread_setschedparam( Init_id, SCHED_FIFO, ¶m );
<font color='#880000'>- rtems_test_assert( !status );
</font><font color='#000088'>+ rtems_test_assert( !status );
</font> 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 );
<font color='#880000'>- rtems_test_assert( status == EINVAL );
</font><font color='#000088'>+ rtems_test_assert( status == EINVAL );
</font>
/* mutexinit.c: Initialising recursive mutex */
<font color='#997700'>@@ -678,7 +678,7 @@
</font> status = pthread_mutex_init( &Mutex2_id, &attr );
if ( status )
printf( "status recursive mutex :%d\n", status );
<font color='#880000'>- rtems_test_assert( !status );
</font><font color='#000088'>+ rtems_test_assert( !status );
</font>
puts( "*** END OF POSIX TEST 5 ***" );
rtems_test_exit( 0 );
<font color='#006600'>diff -u rtems/testsuites/psxtests/psx05/task.c:1.9 rtems/testsuites/psxtests/psx05/task.c:1.10
--- rtems/testsuites/psxtests/psx05/task.c:1.9 Tue Dec 8 11:52:53 2009
+++ rtems/testsuites/psxtests/psx05/task.c Thu Oct 21 16:22:24 2010
</font><font color='#997700'>@@ -31,13 +31,13 @@
</font> status = pthread_mutex_trylock( &Mutex_id );
if ( status != EBUSY )
printf( "status = %d\n", status );
<font color='#880000'>- rtems_test_assert( status == EBUSY );
</font><font color='#000088'>+ rtems_test_assert( status == EBUSY );
</font>
printf( "Task: pthread_mutex_lock unavailable\n" );
status = pthread_mutex_lock( &Mutex_id );
if ( status )
printf( "status = %d\n", status );
<font color='#880000'>- rtems_test_assert( !status );
</font><font color='#000088'>+ rtems_test_assert( !status );
</font>
/* switch to init */
<font color='#006600'>diff -u rtems/testsuites/psxtests/psx05/task2.c:1.8 rtems/testsuites/psxtests/psx05/task2.c:1.9
--- rtems/testsuites/psxtests/psx05/task2.c:1.8 Tue Dec 8 11:52:53 2009
+++ rtems/testsuites/psxtests/psx05/task2.c Thu Oct 21 16:22:24 2010
</font><font color='#997700'>@@ -30,14 +30,14 @@
</font> status = pthread_mutex_lock( &Mutex2_id );
if ( status )
printf( "status =%d\n", status );
<font color='#880000'>- rtems_test_assert( !status );
</font><font color='#000088'>+ rtems_test_assert( !status );
</font> printf( "Task 2: mutex acquired\n" );
/* switch to init */
printf( "Task 2: unlock Mutex 2\n" );
status = pthread_mutex_unlock( &Mutex2_id );
<font color='#880000'>- rtems_test_assert( !status );
</font><font color='#000088'>+ rtems_test_assert( !status );
</font>
printf( "Task 2: exit\n" );
pthread_exit( NULL );
<font color='#006600'>diff -u rtems/testsuites/psxtests/psx05/task3.c:1.7 rtems/testsuites/psxtests/psx05/task3.c:1.8
--- rtems/testsuites/psxtests/psx05/task3.c:1.7 Tue Dec 8 11:52:53 2009
+++ rtems/testsuites/psxtests/psx05/task3.c Thu Oct 21 16:22:24 2010
</font><font color='#997700'>@@ -31,14 +31,14 @@
</font> printf( "Task 3: pthread_mutex_lock unavailable (inherit case)\n" );
status = pthread_mutex_lock( &Mutex2_id );
printf( "Task 3: mutex acquired\n" );
<font color='#880000'>- rtems_test_assert( !status );
</font><font color='#000088'>+ rtems_test_assert( !status );
</font>
printf( "Task 3: unlock Mutex 2\n" );
status = pthread_mutex_unlock( &Mutex2_id );
<font color='#880000'>- rtems_test_assert( !status );
</font><font color='#000088'>+ rtems_test_assert( !status );
</font>
status = pthread_getschedparam( pthread_self(), &policy, ¶m );
<font color='#880000'>- rtems_test_assert( !status );
</font><font color='#000088'>+ rtems_test_assert( !status );
</font> printf( "Task 3: pthread_getschedparam priority = %d\n", param.sched_priority );
printf( "Task 3: exit\n" );
<font color='#006600'>diff -u rtems/testsuites/psxtests/psx06/init.c:1.17 rtems/testsuites/psxtests/psx06/init.c:1.18
--- rtems/testsuites/psxtests/psx06/init.c:1.17 Tue Dec 8 11:52:53 2009
+++ rtems/testsuites/psxtests/psx06/init.c Thu Oct 21 16:22:24 2010
</font><font color='#997700'>@@ -52,10 +52,10 @@
</font> /* create a couple of threads */
status = pthread_create( &Task_id, NULL, Task_1, NULL );
<font color='#880000'>- rtems_test_assert( !status );
</font><font color='#000088'>+ rtems_test_assert( !status );
</font>
status = pthread_create( &Task2_id, NULL, Task_2, NULL );
<font color='#880000'>- rtems_test_assert( !status );
</font><font color='#000088'>+ rtems_test_assert( !status );
</font>
/* create a key */
<font color='#997700'>@@ -66,31 +66,31 @@
</font> status = pthread_key_create( &Key_id, Key_destructor );
if ( status )
printf( "status = %d\n", status );
<font color='#880000'>- rtems_test_assert( !status );
</font><font color='#000088'>+ rtems_test_assert( !status );
</font>
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 );
<font color='#880000'>- rtems_test_assert( status == EAGAIN );
</font><font color='#000088'>+ rtems_test_assert( status == EAGAIN );
</font>
puts( "Init: pthread_setspecific - EINVAL (invalid key)" );
status = pthread_setspecific( (pthread_t) -1, &Data_array[ 0 ] );
<font color='#880000'>- rtems_test_assert( status == EINVAL );
</font><font color='#000088'>+ rtems_test_assert( status == EINVAL );
</font>
puts( "Init: pthread_getspecific - EINVAL (invalid key)" );
key_data = pthread_getspecific( (pthread_t) -1 );
<font color='#880000'>- rtems_test_assert( !key_data );
</font><font color='#000088'>+ rtems_test_assert( !key_data );
</font>
puts( "Init: pthread_key_delete - EINVAL (invalid key)" );
status = pthread_key_delete( (pthread_t) -1 );
<font color='#880000'>- rtems_test_assert( status == EINVAL );
</font><font color='#000088'>+ rtems_test_assert( status == EINVAL );
</font>
printf( "Init: Setting the key to %d\n", 0 );
status = pthread_setspecific( Key_id, &Data_array[ 0 ] );
if ( status )
printf( "status = %d\n", status );
<font color='#880000'>- rtems_test_assert( !status );
</font><font color='#000088'>+ rtems_test_assert( !status );
</font>
/* switch to task 1 */
<font color='#997700'>@@ -101,7 +101,7 @@
</font> remaining = sleep( 3 );
if ( remaining )
printf( "seconds remaining = %d\n", remaining );
<font color='#880000'>- rtems_test_assert( !remaining );
</font><font color='#000088'>+ rtems_test_assert( !remaining );
</font>
/* switch to task 1 */
<font color='#997700'>@@ -111,7 +111,7 @@
</font> status = pthread_key_delete( Key_id );
if ( status )
printf( "status = %d\n", status );
<font color='#880000'>- rtems_test_assert( !status );
</font><font color='#000088'>+ rtems_test_assert( !status );
</font>
printf( "Destructor invoked %d times\n", Destructor_invoked );
<font color='#006600'>diff -u rtems/testsuites/psxtests/psx06/task.c:1.12 rtems/testsuites/psxtests/psx06/task.c:1.13
--- rtems/testsuites/psxtests/psx06/task.c:1.12 Tue Dec 8 11:52:53 2009
+++ rtems/testsuites/psxtests/psx06/task.c Thu Oct 21 16:22:24 2010
</font><font color='#997700'>@@ -32,14 +32,14 @@
</font> status = pthread_setspecific( Key_id, &Data_array[ 1 ] );
if ( status )
printf( "status = %d\n", status );
<font color='#880000'>- rtems_test_assert( !status );
</font><font color='#000088'>+ rtems_test_assert( !status );
</font>
key_data = pthread_getspecific( Key_id );
printf( "Task_1: Got the key value of %ld\n",
(unsigned long) ((uint32_t *)key_data - Data_array) );
if ( status )
printf( "status = %d\n", status );
<font color='#880000'>- rtems_test_assert( !status );
</font><font color='#000088'>+ rtems_test_assert( !status );
</font>
puts( "Task_1: exitting" );
pthread_exit( NULL );
<font color='#006600'>diff -u rtems/testsuites/psxtests/psx06/task2.c:1.12 rtems/testsuites/psxtests/psx06/task2.c:1.13
--- rtems/testsuites/psxtests/psx06/task2.c:1.12 Tue Dec 8 11:52:53 2009
+++ rtems/testsuites/psxtests/psx06/task2.c Thu Oct 21 16:22:24 2010
</font><font color='#997700'>@@ -33,14 +33,14 @@
</font> status = pthread_setspecific( Key_id, &Data_array[ 2 ] );
if ( status )
printf( "status = %d\n", status );
<font color='#880000'>- rtems_test_assert( !status );
</font><font color='#000088'>+ rtems_test_assert( !status );
</font>
key_data = pthread_getspecific( Key_id );
printf( "Task_2: Got the key value of %ld\n",
(unsigned long) ((uint32_t *)key_data - Data_array) );
if ( status )
printf( "status = %d\n", status );
<font color='#880000'>- rtems_test_assert( !status );
</font><font color='#000088'>+ rtems_test_assert( !status );
</font>
puts( "Task2: exitting" );
pthread_exit( NULL );
<font color='#006600'>diff -u rtems/testsuites/psxtests/psx07/init.c:1.35 rtems/testsuites/psxtests/psx07/init.c:1.36
--- rtems/testsuites/psxtests/psx07/init.c:1.35 Fri Oct 8 04:39:35 2010
+++ rtems/testsuites/psxtests/psx07/init.c Thu Oct 21 16:22:24 2010
</font><font color='#997700'>@@ -685,7 +685,7 @@
</font> posix_service_failed( status, "pthread_attr_setschedparam");
status = pthread_create( &Task2_id, &attr, Task_2, NULL );
<font color='#880000'>- rtems_test_assert( !status );
</font><font color='#000088'>+ rtems_test_assert( !status );
</font>
status = pthread_join( Task2_id, NULL );
posix_service_failed( status, " pthread_join");
<font color='#006600'>diff -u rtems/testsuites/psxtests/psx08/init.c:1.12 rtems/testsuites/psxtests/psx08/init.c:1.13
--- rtems/testsuites/psxtests/psx08/init.c:1.12 Tue Dec 8 11:52:53 2009
+++ rtems/testsuites/psxtests/psx08/init.c Thu Oct 21 16:22:24 2010
</font><font color='#997700'>@@ -33,22 +33,22 @@
</font>
puts( "Init: pthread_detach - ESRCH (invalid id)" );
status = pthread_detach( (pthread_t) -1 );
<font color='#880000'>- rtems_test_assert( status == ESRCH );
</font><font color='#000088'>+ rtems_test_assert( status == ESRCH );
</font>
/* detach this thread */
puts( "Init: pthread_detach self" );
status = pthread_detach( pthread_self() );
<font color='#880000'>- rtems_test_assert( !status );
</font><font color='#000088'>+ rtems_test_assert( !status );
</font>
/* create thread */
status = pthread_create( &Task1_id, NULL, Task_1, NULL );
<font color='#880000'>- rtems_test_assert( !status );
</font><font color='#000088'>+ rtems_test_assert( !status );
</font>
puts( "Init: pthread_join - ESRCH (invalid id)" );
status = pthread_join( (pthread_t) -1, &return_pointer );
<font color='#880000'>- rtems_test_assert( status == ESRCH );
</font><font color='#000088'>+ rtems_test_assert( status == ESRCH );
</font>
puts( "Init: pthread_join - SUCCESSFUL" );
status = pthread_join( Task1_id, &return_pointer );
<font color='#997700'>@@ -56,7 +56,7 @@
</font> puts( "Init: returned from pthread_join through return" );
if ( status )
printf( "status = %d\n", status );
<font color='#880000'>- rtems_test_assert( !status );
</font><font color='#000088'>+ rtems_test_assert( !status );
</font>
if ( return_pointer == &Task1_id )
puts( "Init: pthread_join returned correct pointer" );
<font color='#997700'>@@ -69,10 +69,10 @@
</font>
puts( "Init: creating two pthreads" );
status = pthread_create( &Task2_id, NULL, Task_2, NULL );
<font color='#880000'>- rtems_test_assert( !status );
</font><font color='#000088'>+ rtems_test_assert( !status );
</font>
status = pthread_create( &Task3_id, NULL, Task_3, NULL );
<font color='#880000'>- rtems_test_assert( !status );
</font><font color='#000088'>+ rtems_test_assert( !status );
</font>
puts( "Init: pthread_join - SUCCESSFUL" );
status = pthread_join( Task2_id, &return_pointer );
<font color='#997700'>@@ -81,7 +81,7 @@
</font> puts( "Init: returned from pthread_join through pthread_exit" );
if ( status )
printf( "status = %d\n", status );
<font color='#880000'>- rtems_test_assert( !status );
</font><font color='#000088'>+ rtems_test_assert( !status );
</font>
if ( return_pointer == &Task2_id )
puts( "Init: pthread_join returned correct pointer" );
<font color='#006600'>diff -u rtems/testsuites/psxtests/psx08/task2.c:1.9 rtems/testsuites/psxtests/psx08/task2.c:1.10
--- rtems/testsuites/psxtests/psx08/task2.c:1.9 Tue Dec 8 11:52:53 2009
+++ rtems/testsuites/psxtests/psx08/task2.c Thu Oct 21 16:22:24 2010
</font><font color='#997700'>@@ -37,13 +37,13 @@
</font> status = pthread_join( Init_id, NULL );
if ( status != EINVAL )
printf( "status = %d\n", status );
<font color='#880000'>- rtems_test_assert( status == EINVAL );
</font><font color='#000088'>+ rtems_test_assert( status == EINVAL );
</font>
puts( "Task_2: join to self task (Init) -- EDEADLK" );
status = pthread_join( pthread_self(), NULL );
if ( status != EDEADLK )
printf( "status = %d\n", status );
<font color='#880000'>- rtems_test_assert( status == EDEADLK );
</font><font color='#000088'>+ rtems_test_assert( status == EDEADLK );
</font>
puts( "Task_2: exitting" );
<font color='#006600'>diff -u rtems/testsuites/psxtests/psx08/task3.c:1.6 rtems/testsuites/psxtests/psx08/task3.c:1.7
--- rtems/testsuites/psxtests/psx08/task3.c:1.6 Tue Dec 8 11:52:53 2009
+++ rtems/testsuites/psxtests/psx08/task3.c Thu Oct 21 16:22:24 2010
</font><font color='#997700'>@@ -33,7 +33,7 @@
</font> puts( "Task_3: returned from pthread_join" );
if ( status )
printf( "status = %d\n", status );
<font color='#880000'>- rtems_test_assert( !status );
</font><font color='#000088'>+ rtems_test_assert( !status );
</font>
if ( return_pointer == &Task2_id )
puts( "Task_3: pthread_join returned correct pointer" );
<font color='#006600'>diff -u rtems/testsuites/psxtests/psx09/init.c:1.17 rtems/testsuites/psxtests/psx09/init.c:1.18
--- rtems/testsuites/psxtests/psx09/init.c:1.17 Sat Apr 3 01:07:24 2010
+++ rtems/testsuites/psxtests/psx09/init.c Thu Oct 21 16:22:24 2010
</font><font color='#997700'>@@ -73,7 +73,7 @@
</font>
puts( "Init: pthread_getschedparam - SUCCESSFUL" );
status = pthread_getschedparam( pthread_self(), &schedpolicy, &schedparam );
<font color='#880000'>- rtems_test_assert( !status );
</font><font color='#000088'>+ rtems_test_assert( !status );
</font>
priority = schedparam.sched_priority;
sprintf( buffer, " - current priority = %d", priority );
<font color='#997700'>@@ -89,10 +89,10 @@
</font>
puts( "Init: pthread_setschedparam - SUCCESSFUL (sporadic server)" );
status = pthread_setschedparam( pthread_self(), SCHED_SPORADIC, &schedparam );
<font color='#880000'>- rtems_test_assert( !status );
</font><font color='#000088'>+ rtems_test_assert( !status );
</font>
status = pthread_getschedparam( pthread_self(), &schedpolicy, &schedparam );
<font color='#880000'>- rtems_test_assert( !status );
</font><font color='#000088'>+ rtems_test_assert( !status );
</font>
priority = schedparam.sched_priority;
sprintf( buffer, " - new priority = %d", priority );
<font color='#997700'>@@ -102,7 +102,7 @@
</font>
for ( passes=0 ; passes <= 3 ; ) {
status = pthread_getschedparam( pthread_self(), &schedpolicy, &schedparam );
<font color='#880000'>- rtems_test_assert( !status );
</font><font color='#000088'>+ rtems_test_assert( !status );
</font>
if ( priority != schedparam.sched_priority ) {
priority = schedparam.sched_priority;
<font color='#997700'>@@ -117,7 +117,7 @@
</font> empty_line();
status = pthread_getschedparam( pthread_self(), &schedpolicy, &schedparam );
<font color='#880000'>- rtems_test_assert( !status );
</font><font color='#000088'>+ rtems_test_assert( !status );
</font>
schedparam.sched_ss_repl_period.tv_sec = 0;
schedparam.sched_ss_repl_period.tv_nsec = 500000000; /* 1/2 second */
<font color='#997700'>@@ -133,23 +133,23 @@
</font>
puts( "Init: pthread_setschedparam - SUCCESSFUL (sporadic server)" );
status = pthread_setschedparam( pthread_self(), SCHED_SPORADIC, &schedparam );
<font color='#880000'>- rtems_test_assert( !status );
</font><font color='#000088'>+ rtems_test_assert( !status );
</font>
puts( "Init: Initializing mutex attributes for priority ceiling" );
status = pthread_mutexattr_init( &attr );
<font color='#880000'>- rtems_test_assert( !status );
</font><font color='#000088'>+ rtems_test_assert( !status );
</font>
status = pthread_mutexattr_setprotocol( &attr, PTHREAD_PRIO_INHERIT );
<font color='#880000'>- rtems_test_assert( !status );
</font><font color='#000088'>+ rtems_test_assert( !status );
</font>
puts( "Init: Creating a mutex" );
status = pthread_mutex_init( &Mutex_id, &attr );
if ( status )
printf( "status = %d\n", status );
<font color='#880000'>- rtems_test_assert( !status );
</font><font color='#000088'>+ rtems_test_assert( !status );
</font>
status = pthread_getschedparam( pthread_self(), &schedpolicy, &schedparam );
<font color='#880000'>- rtems_test_assert( !status );
</font><font color='#000088'>+ rtems_test_assert( !status );
</font>
priority = schedparam.sched_priority;
sprintf( buffer, " - new priority = %d", priority );
<font color='#997700'>@@ -163,11 +163,11 @@
</font> status = pthread_mutex_lock( &Mutex_id );
if ( status )
printf( "status = %d %s\n", status, strerror(status) );
<font color='#880000'>- rtems_test_assert( !status );
</font><font color='#000088'>+ rtems_test_assert( !status );
</font>
for ( ; ; ) {
status = pthread_getschedparam( pthread_self(), &schedpolicy, &schedparam );
<font color='#880000'>- rtems_test_assert( !status );
</font><font color='#000088'>+ rtems_test_assert( !status );
</font>
if ( schedparam.sched_priority == LOW_PRIORITY ) {
puts( "ERROR - Init's priority lowered while holding mutex" );
<font color='#997700'>@@ -183,7 +183,7 @@
</font> print_current_time( "Init: ", buffer );
status = pthread_getschedparam( pthread_self(), &schedpolicy, &schedparam );
<font color='#880000'>- rtems_test_assert( !status );
</font><font color='#000088'>+ rtems_test_assert( !status );
</font>
priority = schedparam.sched_priority;
sprintf( buffer, " - new priority = %d", priority );
<font color='#997700'>@@ -198,10 +198,10 @@
</font> status = pthread_mutex_unlock( &Mutex_id );
if ( status )
printf( "status = %d\n", status );
<font color='#880000'>- rtems_test_assert( !status );
</font><font color='#000088'>+ rtems_test_assert( !status );
</font>
status = pthread_getschedparam( pthread_self(), &schedpolicy, &schedparam );
<font color='#880000'>- rtems_test_assert( !status );
</font><font color='#000088'>+ rtems_test_assert( !status );
</font>
priority = schedparam.sched_priority;
sprintf( buffer, " - new priority = %d", priority );
<font color='#997700'>@@ -209,14 +209,14 @@
</font>
for ( ; ; ) {
status = pthread_getschedparam( pthread_self(), &schedpolicy, &schedparam );
<font color='#880000'>- rtems_test_assert( !status );
</font><font color='#000088'>+ rtems_test_assert( !status );
</font>
if ( schedparam.sched_priority == LOW_PRIORITY )
break;
}
status = pthread_getschedparam( pthread_self(), &schedpolicy, &schedparam );
<font color='#880000'>- rtems_test_assert( !status );
</font><font color='#000088'>+ rtems_test_assert( !status );
</font>
priority = schedparam.sched_priority;
sprintf( buffer, " - new priority = %d", priority );
<font color='#006600'>diff -u rtems/testsuites/psxtests/psx10/init.c:1.20 rtems/testsuites/psxtests/psx10/init.c:1.21
--- rtems/testsuites/psxtests/psx10/init.c:1.20 Tue Dec 8 11:52:53 2009
+++ rtems/testsuites/psxtests/psx10/init.c Thu Oct 21 16:22:24 2010
</font><font color='#997700'>@@ -29,61 +29,61 @@
</font>
puts( "Init: pthread_condattr_init" );
status = pthread_condattr_init( &attr );
<font color='#880000'>- rtems_test_assert( !status );
</font><font color='#000088'>+ rtems_test_assert( !status );
</font>
puts( "Init: pthread_condattr_init - EINVAL (attribute invalid)" );
status = pthread_condattr_init( NULL );
if ( status != EINVAL )
printf( "status = %d\n", status );
<font color='#880000'>- rtems_test_assert( status == EINVAL );
</font><font color='#000088'>+ rtems_test_assert( status == EINVAL );
</font>
puts( "Init: pthread_condattr_destroy" );
status = pthread_condattr_destroy( &attr );
<font color='#880000'>- rtems_test_assert( !status );
</font><font color='#000088'>+ rtems_test_assert( !status );
</font>
puts( "Init: pthread_condattr_destroy - EINVAL (attribute invalid)" );
status = pthread_condattr_destroy( NULL );
if ( status != EINVAL )
printf( "status = %d\n", status );
<font color='#880000'>- rtems_test_assert( status == EINVAL );
</font><font color='#000088'>+ rtems_test_assert( status == EINVAL );
</font>
puts( "Init: pthread_condattr_init" );
status = pthread_condattr_init( &attr );
<font color='#880000'>- rtems_test_assert( !status );
</font><font color='#000088'>+ rtems_test_assert( !status );
</font>
puts( "Init: pthread_condattr_setpshared - PTHREAD_PROCESS_SHARED" );
status = pthread_condattr_setpshared( &attr, PTHREAD_PROCESS_SHARED );
<font color='#880000'>- rtems_test_assert( !status );
</font><font color='#000088'>+ rtems_test_assert( !status );
</font>
puts( "Init: pthread_condattr_setpshared - PTHREAD_PROCESS_PRIVATE" );
status = pthread_condattr_setpshared( &attr, PTHREAD_PROCESS_PRIVATE );
<font color='#880000'>- rtems_test_assert( !status );
</font><font color='#000088'>+ rtems_test_assert( !status );
</font>
status = pthread_condattr_setpshared( NULL, PTHREAD_PROCESS_PRIVATE );
if ( status != EINVAL )
printf( "status = %d\n", status );
<font color='#880000'>- rtems_test_assert( status == EINVAL );
</font><font color='#000088'>+ rtems_test_assert( status == EINVAL );
</font> puts( "Init: pthread_condattr_setpshared - EINVAL (attribute invalid)" );
status = pthread_condattr_setpshared( &attr, 0x7FFF );
if ( status != EINVAL )
printf( "status = %d\n", status );
<font color='#880000'>- rtems_test_assert( status == EINVAL );
</font><font color='#000088'>+ rtems_test_assert( status == EINVAL );
</font> puts( "Init: pthread_condattr_setpshared - EINVAL (pshared invalid)" );
status = pthread_condattr_getpshared( &attr, &pshared );
<font color='#880000'>- rtems_test_assert( !status );
</font><font color='#000088'>+ rtems_test_assert( !status );
</font> printf( "Init: pthread_condattr_getpshared - %d\n", pshared );
status = pthread_condattr_getpshared( NULL, &pshared );
if ( status != EINVAL )
printf( "status = %d\n", status );
<font color='#880000'>- rtems_test_assert( status == EINVAL );
</font><font color='#000088'>+ rtems_test_assert( status == EINVAL );
</font> puts( "Init: pthread_condattr_getpshared - EINVAL (attribute invalid)" );
puts( "Init: pthread_cond_init - NULL attr" );
status = pthread_cond_init( &cond, NULL );
<font color='#880000'>- rtems_test_assert( !status );
</font><font color='#000088'>+ rtems_test_assert( !status );
</font>
/* error for attribute not initialized */
<font color='#997700'>@@ -91,39 +91,39 @@
</font> status = pthread_cond_init( &cond, &attr_error );
if ( status != EINVAL )
printf( "status = %d\n", status );
<font color='#880000'>- rtems_test_assert( status == EINVAL );
</font><font color='#000088'>+ rtems_test_assert( status == EINVAL );
</font> puts( "Init: pthread_cond_init - EINVAL (attr not initialized)" );
status = pthread_cond_init( &cond, NULL );
if ( status != ENOMEM )
printf( "status = %d\n", status );
<font color='#880000'>- rtems_test_assert( status == ENOMEM );
</font><font color='#000088'>+ rtems_test_assert( status == ENOMEM );
</font> puts( "Init: pthread_cond_init - ENOMEM (too many conds)" );
puts( "Init: pthread_cond_destroy" );
status = pthread_cond_destroy( &cond );
<font color='#880000'>- rtems_test_assert( !status );
</font><font color='#000088'>+ rtems_test_assert( !status );
</font>
/* error for bad condition variable passed */
status = pthread_cond_destroy( NULL );
if ( status != EINVAL )
printf( "status = %d\n", status );
<font color='#880000'>- rtems_test_assert( status == EINVAL );
</font><font color='#000088'>+ rtems_test_assert( status == EINVAL );
</font> 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 );
<font color='#880000'>- rtems_test_assert( !status );
</font><font color='#000088'>+ rtems_test_assert( !status );
</font>
/* signal task1 with a condition variable */
empty_line();
status = pthread_create( &Task_id, NULL, Task_1, NULL );
<font color='#880000'>- rtems_test_assert( !status );
</font><font color='#000088'>+ rtems_test_assert( !status );
</font>
/* switch to task1 to allow it to wait for a condition variable */
<font color='#997700'>@@ -133,17 +133,17 @@
</font> status = pthread_cond_destroy( &Cond1_id );
if ( status != EBUSY )
printf( "status = %d\n", status );
<font color='#880000'>- rtems_test_assert( status == EBUSY );
</font><font color='#000088'>+ rtems_test_assert( status == EBUSY );
</font> puts( "Init: pthread_cond_destroy - EBUSY (task1 waiting)" );
puts( "Init: pthread_cond_signal" );
status = pthread_cond_signal( &Cond1_id );
<font color='#880000'>- rtems_test_assert( !status );
</font><font color='#000088'>+ rtems_test_assert( !status );
</font>
empty_line();
status = pthread_create( &Task2_id, NULL, Task_2, NULL );
<font color='#880000'>- rtems_test_assert( !status );
</font><font color='#000088'>+ rtems_test_assert( !status );
</font>
/* switch to task1 and task2 to allow them to wait for broadcast signal */
<font color='#997700'>@@ -154,7 +154,7 @@
</font>
puts( "Init: pthread_cond_broadcast" );
status = pthread_cond_broadcast( &Cond1_id );
<font color='#880000'>- rtems_test_assert( !status );
</font><font color='#000088'>+ rtems_test_assert( !status );
</font>
puts( "Init: sleep - switch to Task_1" );
sleep( 0 );
<font color='#997700'>@@ -162,12 +162,12 @@
</font> /* timedwait case - timeout */
status = pthread_mutex_lock( &Mutex_id );
<font color='#880000'>- rtems_test_assert( !status );
</font><font color='#000088'>+ rtems_test_assert( !status );
</font>
/* set timeout to 3 seconds */
status = clock_gettime( CLOCK_REALTIME, &timeout );
<font color='#880000'>- rtems_test_assert( !status );
</font><font color='#000088'>+ rtems_test_assert( !status );
</font> timeout.tv_sec += 3;
timeout.tv_nsec = 0;
<font color='#997700'>@@ -175,11 +175,11 @@
</font> status = pthread_cond_timedwait( &Cond1_id, &Mutex_id, &timeout );
if ( status != ETIMEDOUT )
printf( "status = %d\n", status );
<font color='#880000'>- rtems_test_assert( status == ETIMEDOUT );
</font><font color='#000088'>+ rtems_test_assert( status == ETIMEDOUT );
</font> puts( "Init: pthread_cond_timedwait - ETIMEDOUT - (mutex not acquired)" );
status = pthread_mutex_unlock( &Mutex_id );
<font color='#880000'>- rtems_test_assert( !status );
</font><font color='#000088'>+ rtems_test_assert( !status );
</font>
/* remaining error messages */
<font color='#997700'>@@ -190,78 +190,78 @@
</font> status = pthread_cond_signal( NULL );
if ( status != EINVAL )
printf( "status = %d\n", status );
<font color='#880000'>- rtems_test_assert( status == EINVAL );
</font><font color='#000088'>+ rtems_test_assert( status == EINVAL );
</font> puts( "Init: pthread_cond_signal - EINVAL (cond invalid)" );
status = pthread_cond_broadcast( NULL );
if ( status != EINVAL )
printf( "status = %d\n", status );
<font color='#880000'>- rtems_test_assert( status == EINVAL );
</font><font color='#000088'>+ rtems_test_assert( status == EINVAL );
</font> puts( "Init: pthread_cond_broadcast - EINVAL (cond invalid)" );
/* acquire mutex so errors will occur */
status = pthread_mutex_lock( &Mutex_id );
<font color='#880000'>- rtems_test_assert( !status );
</font><font color='#000088'>+ rtems_test_assert( !status );
</font>
status = pthread_cond_wait( NULL, &Mutex_id );
if ( status != EINVAL )
printf( "status = %d\n", status );
<font color='#880000'>- rtems_test_assert( status == EINVAL );
</font><font color='#000088'>+ rtems_test_assert( status == EINVAL );
</font> puts( "Init: pthread_cond_wait - EINVAL (cond invalid)" );
status = pthread_cond_timedwait( NULL, &Mutex_id, &timeout );
if ( status != EINVAL )
printf( "status = %d\n", status );
<font color='#880000'>- rtems_test_assert( status == EINVAL );
</font><font color='#000088'>+ rtems_test_assert( status == EINVAL );
</font> puts( "Init: pthread_cond_timedwait - EINVAL (cond invalid)" );
status = pthread_cond_wait( &Cond1_id, NULL );
if ( status != EINVAL )
printf( "status = %d\n", status );
<font color='#880000'>- rtems_test_assert( status == EINVAL );
</font><font color='#000088'>+ rtems_test_assert( status == EINVAL );
</font> puts( "Init: pthread_cond_wait - EINVAL (mutex invalid)" );
status = pthread_cond_timedwait( &Cond1_id, NULL, &timeout );
if ( status != EINVAL )
printf( "status = %d\n", status );
<font color='#880000'>- rtems_test_assert( status == EINVAL );
</font><font color='#000088'>+ rtems_test_assert( status == EINVAL );
</font> 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 );
<font color='#880000'>- rtems_test_assert( status == EINVAL );
</font><font color='#000088'>+ rtems_test_assert( status == EINVAL );
</font> puts( "Init: pthread_cond_timedwait - EINVAL (abstime NULL)" );
status = clock_gettime( CLOCK_REALTIME, &timeout );
<font color='#880000'>- rtems_test_assert( !status );
</font><font color='#000088'>+ rtems_test_assert( !status );
</font> timeout.tv_sec -= 1;
status = pthread_cond_timedwait( &Cond1_id, &Mutex_id, &timeout );
if ( status != ETIMEDOUT )
printf( "status = %d\n", status );
<font color='#880000'>- rtems_test_assert( status == ETIMEDOUT );
</font><font color='#000088'>+ rtems_test_assert( status == ETIMEDOUT );
</font> puts( "Init: pthread_cond_timedwait - ETIMEDOUT (abstime->tv_sec < current time)" );
status = pthread_mutex_unlock( &Mutex_id );
<font color='#880000'>- rtems_test_assert( !status );
</font><font color='#000088'>+ rtems_test_assert( !status );
</font>
status = pthread_mutex_lock( &Mutex_id );
<font color='#880000'>- rtems_test_assert( !status );
</font><font color='#000088'>+ rtems_test_assert( !status );
</font>
/* ensure we do not catch a 0 nanosecond boundary */
do {
status = clock_gettime( CLOCK_REALTIME, &timeout );
<font color='#880000'>- rtems_test_assert( !status );
</font><font color='#000088'>+ rtems_test_assert( !status );
</font> timeout.tv_nsec -= 1;
} while ( timeout.tv_nsec < 0);
status = pthread_cond_timedwait( &Cond1_id, &Mutex_id, &timeout );
if ( status != ETIMEDOUT )
printf( "status = %d\n", status );
<font color='#880000'>- rtems_test_assert( status == ETIMEDOUT );
</font><font color='#000088'>+ rtems_test_assert( status == ETIMEDOUT );
</font> puts( "Init: pthread_cond_timedwait - ETIMEDOUT (abstime->tv_nsec < current time)" );
status = pthread_mutex_unlock( &Mutex_id );
<font color='#880000'>- rtems_test_assert( !status );
</font><font color='#000088'>+ rtems_test_assert( !status );
</font>
/* wait and timedwait without mutex */
<font color='#997700'>@@ -270,26 +270,26 @@
</font> * status = pthread_cond_wait( &Cond1_id, &Mutex_id );
* if ( status != EINVAL )
* printf( "status = %d\n", status );
<font color='#880000'>- * rtems_test_assert( status == EINVAL );
</font><font color='#000088'>+ * rtems_test_assert( status == EINVAL );
</font> */
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 );
<font color='#880000'>- * rtems_test_assert( !status );
</font><font color='#000088'>+ * rtems_test_assert( !status );
</font> * timeout.tv_sec += 1;
* status = pthread_cond_timedwait( &Cond1_id, &Mutex_id, &timeout );
* if ( status != EINVAL )
* printf( "status = %d\n", status );
<font color='#880000'>- * rtems_test_assert( status == EINVAL );
</font><font color='#000088'>+ * rtems_test_assert( status == EINVAL );
</font> */
puts( "Init: pthread_cond_timedwait - EINVAL (mutex not locked before call)");
empty_line();
status = pthread_create( &Task3_id, NULL, Task_3, NULL );
<font color='#880000'>- rtems_test_assert( !status );
</font><font color='#000088'>+ rtems_test_assert( !status );
</font>
/* switch to task3 to allow it to wait for broadcast signal */
<font color='#997700'>@@ -299,7 +299,7 @@
</font> /* destroy the mutex so Task3 can not acguire at the end of Wait_support */
status = pthread_mutex_destroy( &Mutex_id );
<font color='#880000'>- rtems_test_assert( !status );
</font><font color='#000088'>+ rtems_test_assert( !status );
</font>
/* signal a condition variable to task3 */
<font color='#006600'>diff -u rtems/testsuites/psxtests/psx10/task.c:1.9 rtems/testsuites/psxtests/psx10/task.c:1.10
--- rtems/testsuites/psxtests/psx10/task.c:1.9 Tue Dec 8 11:52:53 2009
+++ rtems/testsuites/psxtests/psx10/task.c Thu Oct 21 16:22:25 2010
</font><font color='#997700'>@@ -31,31 +31,31 @@
</font> printf( "Task_1: ID is 0x%08" PRIxpthread_t "\n", Task_id );
status = pthread_mutex_init( &Mutex_id, NULL );
<font color='#880000'>- rtems_test_assert( !status );
</font><font color='#000088'>+ rtems_test_assert( !status );
</font>
status = pthread_mutex_lock( &Mutex_id );
<font color='#880000'>- rtems_test_assert( !status );
</font><font color='#000088'>+ rtems_test_assert( !status );
</font>
puts( "Task_1: pthread_cond_wait" );
status = pthread_cond_wait( &Cond1_id, &Mutex_id );
<font color='#880000'>- rtems_test_assert( !status );
</font><font color='#000088'>+ rtems_test_assert( !status );
</font>
puts( "Task_1: back from pthread_cond_wait release mutex" );
status = pthread_mutex_unlock( &Mutex_id );
<font color='#880000'>- rtems_test_assert( !status );
</font><font color='#000088'>+ rtems_test_assert( !status );
</font>
/* wait for a condition variable broadcast from Init */
status = pthread_mutex_lock( &Mutex_id );
<font color='#880000'>- rtems_test_assert( !status );
</font><font color='#000088'>+ rtems_test_assert( !status );
</font>
puts( "Task_1: pthread_cond_wait" );
status = pthread_cond_wait( &Cond1_id, &Mutex_id );
<font color='#880000'>- rtems_test_assert( !status );
</font><font color='#000088'>+ rtems_test_assert( !status );
</font>
puts( "Task_1: back from pthread_cond_wait release mutex" );
status = pthread_mutex_unlock( &Mutex_id );
<font color='#880000'>- rtems_test_assert( !status );
</font><font color='#000088'>+ rtems_test_assert( !status );
</font>
puts( "Task_1: task exit" );
pthread_exit( NULL );
<font color='#006600'>diff -u rtems/testsuites/psxtests/psx10/task2.c:1.9 rtems/testsuites/psxtests/psx10/task2.c:1.10
--- rtems/testsuites/psxtests/psx10/task2.c:1.9 Tue Dec 8 11:52:53 2009
+++ rtems/testsuites/psxtests/psx10/task2.c Thu Oct 21 16:22:25 2010
</font><font color='#997700'>@@ -29,15 +29,15 @@
</font> printf( "Task_2: ID is 0x%08" PRIxpthread_t "\n", Task_id );
status = pthread_mutex_lock( &Mutex_id );
<font color='#880000'>- rtems_test_assert( !status );
</font><font color='#000088'>+ rtems_test_assert( !status );
</font>
puts( "Task_2: pthread_cond_wait" );
status = pthread_cond_wait( &Cond1_id, &Mutex_id );
<font color='#880000'>- rtems_test_assert( !status );
</font><font color='#000088'>+ rtems_test_assert( !status );
</font>
puts( "Task_2: back from pthread_cond_wait release mutex" );
status = pthread_mutex_unlock( &Mutex_id );
<font color='#880000'>- rtems_test_assert( !status );
</font><font color='#000088'>+ rtems_test_assert( !status );
</font>
puts( "Task_2: task exit" );
pthread_exit( NULL );
<font color='#006600'>diff -u rtems/testsuites/psxtests/psx10/task3.c:1.8 rtems/testsuites/psxtests/psx10/task3.c:1.9
--- rtems/testsuites/psxtests/psx10/task3.c:1.8 Tue Dec 8 11:52:53 2009
+++ rtems/testsuites/psxtests/psx10/task3.c Thu Oct 21 16:22:25 2010
</font><font color='#997700'>@@ -29,13 +29,13 @@
</font> printf( "Task_3: ID is 0x%08" PRIxpthread_t "\n", Task_id );
status = pthread_mutex_lock( &Mutex_id );
<font color='#880000'>- rtems_test_assert( !status );
</font><font color='#000088'>+ rtems_test_assert( !status );
</font>
puts( "Task_3: pthread_cond_wait" );
status = pthread_cond_wait( &Cond1_id, &Mutex_id );
if ( status != EINVAL )
printf( "status = %d\n", status );
<font color='#880000'>- rtems_test_assert( status == EINVAL );
</font><font color='#000088'>+ rtems_test_assert( status == EINVAL );
</font> puts( "Task_3: pthread_cond_wait - EINVAL (mutex not locked after signal)");
puts( "Task_3: task exit" );
<font color='#006600'>diff -u rtems/testsuites/psxtests/psx11/init.c:1.13 rtems/testsuites/psxtests/psx11/init.c:1.14
--- rtems/testsuites/psxtests/psx11/init.c:1.13 Tue Dec 8 11:52:53 2009
+++ rtems/testsuites/psxtests/psx11/init.c Thu Oct 21 16:22:25 2010
</font><font color='#997700'>@@ -52,7 +52,7 @@
</font> priority_1
);
status = pthread_setschedparam( Init_id, SCHED_FIFO, ¶m );
<font color='#880000'>- rtems_test_assert( !status );
</font><font color='#000088'>+ rtems_test_assert( !status );
</font>
param.sched_priority = priority_2;
<font color='#997700'>@@ -61,7 +61,7 @@
</font> priority_2
);
status = pthread_setschedparam( Init_id, SCHED_RR, ¶m );
<font color='#880000'>- rtems_test_assert( !status );
</font><font color='#000088'>+ rtems_test_assert( !status );
</font>
param.sched_priority = priority_3;
<font color='#997700'>@@ -70,59 +70,59 @@
</font> priority_3
);
status = pthread_setschedparam( Init_id, SCHED_OTHER, ¶m );
<font color='#880000'>- rtems_test_assert( !status );
</font><font color='#000088'>+ rtems_test_assert( !status );
</font>
/* create a thread as SCHED_FIFO */
printf(
"Init: create a thread of SCHED_FIFO with priority %d\n", priority_4 );
status = pthread_attr_init( &attr );
<font color='#880000'>- rtems_test_assert( !status );
</font><font color='#000088'>+ rtems_test_assert( !status );
</font>
attr.schedpolicy = SCHED_FIFO;
attr.schedparam.sched_priority = priority_4;
status = pthread_create( &Task_id, &attr, Task_1, NULL );
<font color='#880000'>- rtems_test_assert( !status );
</font><font color='#000088'>+ rtems_test_assert( !status );
</font>
puts( "Init: join with the other thread" );
status = pthread_join( Task_id, NULL );
<font color='#880000'>- rtems_test_assert( !status );
</font><font color='#000088'>+ rtems_test_assert( !status );
</font>
/* create a thread as SCHED_RR */
printf( "Init: create a thread of SCHED_RR with priority %d\n", priority_4 );
status = pthread_attr_init( &attr );
<font color='#880000'>- rtems_test_assert( !status );
</font><font color='#000088'>+ rtems_test_assert( !status );
</font>
status = pthread_attr_setinheritsched( &attr, PTHREAD_EXPLICIT_SCHED );
<font color='#880000'>- rtems_test_assert( !status );
</font><font color='#000088'>+ rtems_test_assert( !status );
</font> attr.schedpolicy = SCHED_RR;
attr.schedparam.sched_priority = priority_4;
status = pthread_create( &Task_id, &attr, Task_1, NULL );
<font color='#880000'>- rtems_test_assert( !status );
</font><font color='#000088'>+ rtems_test_assert( !status );
</font>
puts( "Init: join with the other thread" );
status = pthread_join( Task_id, NULL );
<font color='#880000'>- rtems_test_assert( !status );
</font><font color='#000088'>+ rtems_test_assert( !status );
</font>
/* create a thread as SCHED_OTHER */
printf(
"Init: create a thread of SCHED_OTHER with priority %d\n", priority_4 );
status = pthread_attr_init( &attr );
<font color='#880000'>- rtems_test_assert( !status );
</font><font color='#000088'>+ rtems_test_assert( !status );
</font>
attr.schedpolicy = SCHED_OTHER;
attr.schedparam.sched_priority = priority_4;
status = pthread_create( &Task_id, &attr, Task_1, NULL );
<font color='#880000'>- rtems_test_assert( !status );
</font><font color='#000088'>+ rtems_test_assert( !status );
</font>
puts( "Init: join with the other thread" );
status = pthread_join( Task_id, NULL );
<font color='#880000'>- rtems_test_assert( !status );
</font><font color='#000088'>+ rtems_test_assert( !status );
</font>
puts( "*** END OF POSIX TEST 11 ***" );
rtems_test_exit( 0 );
<font color='#006600'>diff -u rtems/testsuites/psxtests/psx11/task.c:1.10 rtems/testsuites/psxtests/psx11/task.c:1.11
--- rtems/testsuites/psxtests/psx11/task.c:1.10 Tue Dec 8 11:52:53 2009
+++ rtems/testsuites/psxtests/psx11/task.c Thu Oct 21 16:22:25 2010
</font><font color='#997700'>@@ -50,10 +50,10 @@
</font> struct timespec delay;
status = clock_gettime( CLOCK_REALTIME, &start );
<font color='#880000'>- rtems_test_assert( !status );
</font><font color='#000088'>+ rtems_test_assert( !status );
</font>
status = sched_rr_get_interval( getpid(), &delay );
<font color='#880000'>- rtems_test_assert( !status );
</font><font color='#000088'>+ rtems_test_assert( !status );
</font>
/* double the rr interval for confidence */
<font color='#997700'>@@ -69,7 +69,7 @@
</font> for ( ; ; ) {
status = clock_gettime( CLOCK_REALTIME, ¤t );
<font color='#880000'>- rtems_test_assert( !status );
</font><font color='#000088'>+ rtems_test_assert( !status );
</font>
diff_timespec( &start, ¤t, &difference );
<font color='#006600'>diff -u rtems/testsuites/psxtests/psx12/init.c:1.15 rtems/testsuites/psxtests/psx12/init.c:1.16
--- rtems/testsuites/psxtests/psx12/init.c:1.15 Sat Apr 3 01:07:24 2010
+++ rtems/testsuites/psxtests/psx12/init.c Thu Oct 21 16:22:25 2010
</font><font color='#997700'>@@ -63,25 +63,25 @@
</font>
puts( "Init: pthread_attr_init - SUCCESSFUL" );
status = pthread_attr_init( &attr );
<font color='#880000'>- rtems_test_assert( !status );
</font><font color='#000088'>+ rtems_test_assert( !status );
</font>
status = pthread_attr_setinheritsched( &attr, PTHREAD_EXPLICIT_SCHED );
<font color='#880000'>- rtems_test_assert( !status );
</font><font color='#000088'>+ rtems_test_assert( !status );
</font> attr.schedpolicy = -1;
puts( "Init: pthread_create - EINVAL (invalid scheduling policy)" );
status = pthread_create( &Task_id, &attr, Task_1, NULL );
<font color='#880000'>- rtems_test_assert( status == EINVAL );
</font><font color='#000088'>+ rtems_test_assert( status == EINVAL );
</font>
/* replenish period < budget error */
puts( "Init: pthread_attr_init - SUCCESSFUL" );
status = pthread_attr_init( &attr );
<font color='#880000'>- rtems_test_assert( !status );
</font><font color='#000088'>+ rtems_test_assert( !status );
</font>
puts( "Init: set scheduling parameter attributes for sporadic server" );
status = pthread_attr_setschedpolicy( &attr, SCHED_SPORADIC );
<font color='#880000'>- rtems_test_assert( !status );
</font><font color='#000088'>+ rtems_test_assert( !status );
</font>
schedparam.sched_ss_repl_period.tv_sec = 1;
schedparam.sched_ss_repl_period.tv_nsec = 0;
<font color='#997700'>@@ -92,14 +92,14 @@
</font> schedparam.sched_ss_low_priority = 100;
status = pthread_attr_setschedparam( &attr, &schedparam );
<font color='#880000'>- rtems_test_assert( !status );
</font><font color='#000088'>+ rtems_test_assert( !status );
</font>
status = pthread_attr_setinheritsched( &attr, PTHREAD_EXPLICIT_SCHED );
<font color='#880000'>- rtems_test_assert( !status );
</font><font color='#000088'>+ rtems_test_assert( !status );
</font>
puts( "Init: pthread_create - EINVAL (replenish < budget)" );
status = pthread_create( &Task_id, &attr, Task_1, NULL );
<font color='#880000'>- rtems_test_assert( status == EINVAL );
</font><font color='#000088'>+ rtems_test_assert( status == EINVAL );
</font>
/* invalid sched_ss_low_priority error */
<font color='#997700'>@@ -112,11 +112,11 @@
</font> schedparam.sched_ss_low_priority = -1;
status = pthread_attr_setschedparam( &attr, &schedparam );
<font color='#880000'>- rtems_test_assert( !status );
</font><font color='#000088'>+ rtems_test_assert( !status );
</font>
puts( "Init: pthread_create - EINVAL (invalid sched_ss_low_priority)" );
status = pthread_create( &Task_id, &attr, Task_1, NULL );
<font color='#880000'>- rtems_test_assert( status == EINVAL );
</font><font color='#000088'>+ rtems_test_assert( status == EINVAL );
</font>
/* create a thread as a sporadic server */
<font color='#997700'>@@ -129,14 +129,14 @@
</font> schedparam.sched_ss_low_priority = sched_get_priority_max( SCHED_FIFO ) - 6;
status = pthread_attr_setschedparam( &attr, &schedparam );
<font color='#880000'>- rtems_test_assert( !status );
</font><font color='#000088'>+ rtems_test_assert( !status );
</font>
puts( "Init: pthread_create - SUCCESSFUL" );
status = pthread_create( &Task_id, &attr, Task_1, NULL );
<font color='#880000'>- rtems_test_assert( !status );
</font><font color='#000088'>+ rtems_test_assert( !status );
</font>
status = pthread_join( Task_id, NULL );
<font color='#880000'>- rtems_test_assert( status );
</font><font color='#000088'>+ rtems_test_assert( status );
</font>
/* switch to Task_1 */
<font color='#006600'>diff -u rtems/testsuites/psxtests/psxalarm01/init.c:1.4 rtems/testsuites/psxtests/psxalarm01/init.c:1.5
--- rtems/testsuites/psxtests/psxalarm01/init.c:1.4 Tue Dec 8 11:52:53 2009
+++ rtems/testsuites/psxtests/psxalarm01/init.c Thu Oct 21 16:22:25 2010
</font><font color='#997700'>@@ -70,7 +70,7 @@
</font> /* install a signal handler for SIGALRM and unblock it */
sc = sigemptyset( &act.sa_mask );
<font color='#880000'>- rtems_test_assert( !sc );
</font><font color='#000088'>+ rtems_test_assert( !sc );
</font>
act.sa_handler = Signal_handler;
act.sa_flags = 0;
<font color='#997700'>@@ -78,21 +78,21 @@
</font> sigaction( SIGALRM, &act, NULL );
sc = sigemptyset( &mask );
<font color='#880000'>- rtems_test_assert( !sc );
</font><font color='#000088'>+ rtems_test_assert( !sc );
</font>
sc = sigaddset( &mask, SIGALRM );
<font color='#880000'>- rtems_test_assert( !sc );
</font><font color='#000088'>+ rtems_test_assert( !sc );
</font>
puts( "Init: Unblock SIGALRM" );
sc = sigprocmask( SIG_UNBLOCK, &mask, NULL );
<font color='#880000'>- rtems_test_assert( !sc );
</font><font color='#000088'>+ rtems_test_assert( !sc );
</font>
/* schedule the alarm */
puts( "Init: Firing alarm in 1 second" );
remaining = alarm( 1 );
printf( "Init: %d seconds left on previous alarm\n", sc );
<font color='#880000'>- rtems_test_assert( !sc );
</font><font color='#000088'>+ rtems_test_assert( !sc );
</font>
puts( "Init: Wait for alarm" );
sleep( 2 );
<font color='#997700'>@@ -100,7 +100,7 @@
</font> puts( "Init: Cancel alarm" );
remaining = alarm( 0 );
printf( "Init: %d seconds left on previous alarm\n", remaining );
<font color='#880000'>- rtems_test_assert( remaining == 0 );
</font><font color='#000088'>+ rtems_test_assert( remaining == 0 );
</font>
puts( "*** END OF POSIX ALARM TEST 01***" );
rtems_test_exit( 0 );
<font color='#006600'>diff -u rtems/testsuites/psxtests/psxbarrier01/test.c:1.8 rtems/testsuites/psxtests/psxbarrier01/test.c:1.9
--- rtems/testsuites/psxtests/psxbarrier01/test.c:1.8 Tue Dec 8 11:52:53 2009
+++ rtems/testsuites/psxtests/psxbarrier01/test.c Thu Oct 21 16:22:25 2010
</font><font color='#997700'>@@ -33,7 +33,7 @@
</font> printf( "pthread_barrier_wait( &Barrier ) for thread 0x%08" PRIxpthread_t "\n", id );
status = pthread_barrier_wait( &Barrier );
printf( "pthread_barrier_wait - 0x%08" PRIxpthread_t " released\n", id );
<font color='#880000'>- rtems_test_assert( (status == 0) || (status == PTHREAD_BARRIER_SERIAL_THREAD) );
</font><font color='#000088'>+ rtems_test_assert( (status == 0) || (status == PTHREAD_BARRIER_SERIAL_THREAD) );
</font>
return NULL;
}
<font color='#997700'>@@ -65,155 +65,155 @@
</font> /*************** NULL POINTER CHECKS *****************/
puts( "pthread_barrierattr_init( NULL ) -- EINVAL" );
status = pthread_barrierattr_init( NULL );
<font color='#880000'>- rtems_test_assert( status == EINVAL );
</font><font color='#000088'>+ rtems_test_assert( status == EINVAL );
</font>
puts( "pthread_barrierattr_setpshared( NULL, private ) -- EINVAL" );
status = pthread_barrierattr_setpshared( NULL, PTHREAD_PROCESS_PRIVATE );
<font color='#880000'>- rtems_test_assert( status == EINVAL );
</font><font color='#000088'>+ rtems_test_assert( status == EINVAL );
</font>
puts( "pthread_barrierattr_setpshared( NULL, shared ) -- EINVAL" );
status = pthread_barrierattr_setpshared( NULL, PTHREAD_PROCESS_SHARED );
<font color='#880000'>- rtems_test_assert( status == EINVAL );
</font><font color='#000088'>+ rtems_test_assert( status == EINVAL );
</font>
puts( "pthread_barrierattr_getpshared( NULL, &p ) -- EINVAL" );
status = pthread_barrierattr_getpshared( NULL, &p );
<font color='#880000'>- rtems_test_assert( status == EINVAL );
</font><font color='#000088'>+ rtems_test_assert( status == EINVAL );
</font>
puts( "pthread_barrierattr_destroy( NULL ) -- EINVAL" );
status = pthread_barrierattr_destroy( NULL );
<font color='#880000'>- rtems_test_assert( status == EINVAL );
</font><font color='#000088'>+ rtems_test_assert( status == EINVAL );
</font>
/*************** NOT INITIALIZED CHECKS *****************/
/* cheat visibility */
attr.is_initialized = 0;
puts( "pthread_barrierattr_setpshared( &attr, shared ) -- EINVAL" );
status = pthread_barrierattr_setpshared( &attr, PTHREAD_PROCESS_SHARED );
<font color='#880000'>- rtems_test_assert( status == EINVAL );
</font><font color='#000088'>+ rtems_test_assert( status == EINVAL );
</font>
puts( "pthread_barrierattr_getpshared( &attr, NULL ) -- EINVAL" );
status = pthread_barrierattr_getpshared( &attr, NULL );
<font color='#880000'>- rtems_test_assert( status == EINVAL );
</font><font color='#000088'>+ rtems_test_assert( status == EINVAL );
</font>
puts( "pthread_barrierattr_destroy( &attr ) -- EINVAL" );
status = pthread_barrierattr_destroy( &attr );
<font color='#880000'>- rtems_test_assert( status == EINVAL );
</font><font color='#000088'>+ rtems_test_assert( status == EINVAL );
</font>
/*************** ACTUALLY WORK THIS TIME *****************/
puts( "pthread_barrierattr_init( &attr ) -- OK" );
status = pthread_barrierattr_init( &attr );
<font color='#880000'>- rtems_test_assert( status == 0 );
</font><font color='#000088'>+ rtems_test_assert( status == 0 );
</font>
puts( "pthread_barrierattr_setpshared( &attr, private ) -- OK" );
status = pthread_barrierattr_setpshared( &attr, PTHREAD_PROCESS_PRIVATE );
<font color='#880000'>- rtems_test_assert( status == 0 );
</font><font color='#000088'>+ rtems_test_assert( status == 0 );
</font>
puts( "pthread_barrierattr_getpshared( &attr, &p ) -- OK" );
status = pthread_barrierattr_getpshared( &attr, &p );
<font color='#880000'>- rtems_test_assert( status == 0 );
- rtems_test_assert( p == PTHREAD_PROCESS_PRIVATE );
</font><font color='#000088'>+ rtems_test_assert( status == 0 );
+ rtems_test_assert( p == PTHREAD_PROCESS_PRIVATE );
</font>
puts( "pthread_barrierattr_setpshared( &attr, shared ) -- OK" );
status = pthread_barrierattr_setpshared( &attr, PTHREAD_PROCESS_SHARED );
<font color='#880000'>- rtems_test_assert( status == 0 );
</font><font color='#000088'>+ rtems_test_assert( status == 0 );
</font>
puts( "pthread_barrierattr_getpshared( &attr, &p ) -- OK" );
status = pthread_barrierattr_getpshared( &attr, &p );
<font color='#880000'>- rtems_test_assert( status == 0 );
- rtems_test_assert( p == PTHREAD_PROCESS_SHARED );
</font><font color='#000088'>+ rtems_test_assert( status == 0 );
+ rtems_test_assert( p == PTHREAD_PROCESS_SHARED );
</font>
/*************** BAD PSHARED CHECK *****************/
puts( "pthread_barrierattr_setpshared( &attr, private ) -- EINVAL" );
status = pthread_barrierattr_setpshared( &attr, ~PTHREAD_PROCESS_PRIVATE );
<font color='#880000'>- rtems_test_assert( status == EINVAL );
</font><font color='#000088'>+ rtems_test_assert( status == EINVAL );
</font>
/*************** DESTROY/REUSE CHECK *****************/
puts( "pthread_barrierattr_destroy( &attr ) -- OK" );
status = pthread_barrierattr_destroy( &attr );
<font color='#880000'>- rtems_test_assert( status == 0 );
</font><font color='#000088'>+ rtems_test_assert( status == 0 );
</font>
puts( "pthread_barrierattr_getpshared( &attr, &p ) destroyed -- EINVAL" );
status = pthread_barrierattr_getpshared( &attr, &p );
<font color='#880000'>- rtems_test_assert( status == EINVAL );
</font><font color='#000088'>+ rtems_test_assert( status == EINVAL );
</font>
/*************** pthread_barrier_init ERROR CHECKs *********/
/* NULL barrier argument */
puts( "pthread_barrier_init( NULL, NULL, 2 ) -- EINVAL" );
status = pthread_barrier_init( NULL, NULL, 2 );
<font color='#880000'>- rtems_test_assert( status == EINVAL );
</font><font color='#000088'>+ rtems_test_assert( status == EINVAL );
</font>
/* uninitialized attr argument */
puts( "pthread_barrier_init( &barrier, &attr, 2 ) -- EINVAL" );
status = pthread_barrier_init( &barrier, &attr, 2 );
<font color='#880000'>- rtems_test_assert( status == EINVAL );
</font><font color='#000088'>+ rtems_test_assert( status == EINVAL );
</font>
/* zero count argument */
puts( "pthread_barrierattr_init( &attr ) -- OK" );
status = pthread_barrierattr_init( &attr );
<font color='#880000'>- rtems_test_assert( status == 0 );
</font><font color='#000088'>+ rtems_test_assert( status == 0 );
</font>
puts( "pthread_barrier_init( &barrier, &attr, 0 ) -- EINVAL" );
status = pthread_barrier_init( &barrier, &attr, 0 );
<font color='#880000'>- rtems_test_assert( status == EINVAL );
</font><font color='#000088'>+ rtems_test_assert( status == EINVAL );
</font>
/* allocating too many */
puts( "pthread_barrier_init( &barrier, NULL, 1 ) -- OK" );
status = pthread_barrier_init( &barrier, NULL, 1 );
<font color='#880000'>- rtems_test_assert( status == 0 );
</font><font color='#000088'>+ rtems_test_assert( status == 0 );
</font>
puts( "pthread_barrier_init( &barrier, NULL, 1 ) -- EAGAIN" );
status = pthread_barrier_init( &barrier, NULL, 1 );
<font color='#880000'>- rtems_test_assert( status == EAGAIN );
</font><font color='#000088'>+ rtems_test_assert( status == EAGAIN );
</font>
/* clean up */
puts( "pthread_barrier_destroy( &barrier ) -- OK" );
status = pthread_barrier_destroy( &barrier );
<font color='#880000'>- rtems_test_assert( status == 0 );
</font><font color='#000088'>+ rtems_test_assert( status == 0 );
</font>
puts( "pthread_barrierattr_destroy( &attr ) -- OK" );
status = pthread_barrierattr_destroy( &attr );
<font color='#880000'>- rtems_test_assert( status == 0 );
</font><font color='#000088'>+ rtems_test_assert( status == 0 );
</font>
/*************** pthread_barrier_destroy ERROR CHECKs *********/
/* NULL barrier argument */
puts( "pthread_barrier_destroy( NULL ) -- EINVAL" );
status = pthread_barrier_destroy( NULL );
<font color='#880000'>- rtems_test_assert( status == EINVAL );
</font><font color='#000088'>+ rtems_test_assert( status == EINVAL );
</font>
puts( "pthread_barrier_destroy( &bad_barrier ) -- EINVAL" );
status = pthread_barrier_destroy( &bad_barrier );
<font color='#880000'>- rtems_test_assert( status == EINVAL );
</font><font color='#000088'>+ rtems_test_assert( status == EINVAL );
</font>
/*************** pthread_barrier_wait ERROR CHECKs *********/
/* NULL barrier argument */
puts( "pthread_barrier_wait( NULL ) -- EINVAL" );
status = pthread_barrier_wait( NULL );
<font color='#880000'>- rtems_test_assert( status == EINVAL );
</font><font color='#000088'>+ rtems_test_assert( status == EINVAL );
</font>
puts( "pthread_barrier_wait( &bad_barrier ) -- EINVAL" );
status = pthread_barrier_wait( &bad_barrier );
<font color='#880000'>- rtems_test_assert( status == EINVAL );
</font><font color='#000088'>+ rtems_test_assert( status == EINVAL );
</font>
/*************** ACTUALLY CREATE ONE CHECK *****************/
puts( "pthread_barrierattr_init( &attr ) -- OK" );
status = pthread_barrierattr_init( &attr );
<font color='#880000'>- rtems_test_assert( status == 0 );
</font><font color='#000088'>+ rtems_test_assert( status == 0 );
</font>
puts( "pthread_barrier_init( &barrier, &attr, 2 ) -- OK" );
status = pthread_barrier_init( &barrier, &attr, 2 );
<font color='#880000'>- rtems_test_assert( status == 0 );
- rtems_test_assert( barrier != 0 );
</font><font color='#000088'>+ rtems_test_assert( status == 0 );
+ rtems_test_assert( barrier != 0 );
</font>
puts( "pthread_barrier_destroy( &barrier ) -- OK" );
status = pthread_barrier_destroy( &barrier );
<font color='#880000'>- rtems_test_assert( status == 0 );
</font><font color='#000088'>+ rtems_test_assert( status == 0 );
</font>
/*************** CREATE THREADS AND LET THEM RELEASE *****************/
puts( "pthread_barrier_init( &Barrier, &attr, NUMBER_THREADS ) -- OK" );
status = pthread_barrier_init( &Barrier, &attr, NUMBER_THREADS );
<font color='#880000'>- rtems_test_assert( status == 0 );
- rtems_test_assert( barrier != 0 );
</font><font color='#000088'>+ rtems_test_assert( status == 0 );
+ rtems_test_assert( barrier != 0 );
</font>
for (i=0 ; i<NUMBER_THREADS ; i++ ) {
<font color='#997700'>@@ -221,13 +221,13 @@
</font> if (i == NUMBER_THREADS - 1) {
puts( "pthread_barrier_destroy( &Barrier ) -- EBUSY" );
status = pthread_barrier_destroy( &Barrier );
<font color='#880000'>- rtems_test_assert( status == EBUSY );
</font><font color='#000088'>+ rtems_test_assert( status == EBUSY );
</font> }
/* create a thread to block on the barrier */
printf( "Init: pthread_create - thread %d OK\n", i+1 );
status = pthread_create(&ThreadIds[i], NULL, BarrierThread, &ThreadIds[i]);
<font color='#880000'>- rtems_test_assert( !status );
</font><font color='#000088'>+ rtems_test_assert( !status );
</font>
sleep(1);
}
<font color='#006600'>diff -u rtems/testsuites/psxtests/psxcancel01/init.c:1.4 rtems/testsuites/psxtests/psxcancel01/init.c:1.5
--- rtems/testsuites/psxtests/psxcancel01/init.c:1.4 Tue Dec 8 11:52:53 2009
+++ rtems/testsuites/psxtests/psxcancel01/init.c Thu Oct 21 16:22:25 2010
</font><font color='#997700'>@@ -63,7 +63,7 @@
</font> TSR_status = 0;
status = rtems_timer_fire_after( timer_id, 10, TSR, NULL );
<font color='#880000'>- rtems_test_assert( !status );
</font><font color='#000088'>+ rtems_test_assert( !status );
</font>
start = rtems_clock_get_ticks_since_boot();
do {
<font color='#997700'>@@ -94,7 +94,7 @@
</font> rtems_build_name( 'T', 'M', '1', ' ' ),
&timer_id
);
<font color='#880000'>- rtems_test_assert( !status );
</font><font color='#000088'>+ rtems_test_assert( !status );
</font>
doit( Cancel_duringISR_TSR, "pthread_cancel" );
doit( SetState_duringISR_TSR, "pthread_setcancelstate" );
<font color='#006600'>diff -u rtems/testsuites/psxtests/psxchroot01/test.c:1.10 rtems/testsuites/psxtests/psxchroot01/test.c:1.11
--- rtems/testsuites/psxtests/psxchroot01/test.c:1.10 Mon Aug 9 09:29:33 2010
+++ rtems/testsuites/psxtests/psxchroot01/test.c Thu Oct 21 16:22:25 2010
</font><font color='#997700'>@@ -40,10 +40,10 @@
</font> {
int fd;
<font color='#880000'>- rtems_test_assert( file );
</font><font color='#000088'>+ rtems_test_assert( file );
</font>
fd = open( file, O_RDWR|O_CREAT, 0777 );
<font color='#880000'>- rtems_test_assert( fd != -1 );
</font><font color='#000088'>+ rtems_test_assert( fd != -1 );
</font> close( fd );
}
<font color='#997700'>@@ -52,7 +52,7 @@
</font> int status;
struct stat statbuf;
<font color='#880000'>- rtems_test_assert( file );
</font><font color='#000088'>+ rtems_test_assert( file );
</font>
status = stat( file, &statbuf );
<font color='#997700'>@@ -93,13 +93,13 @@
</font> printf( "\n\n*** CHROOT01 TEST ***\n" );
status = mkdir( "/one", 0777);
<font color='#880000'>- rtems_test_assert( status == 0 );
</font><font color='#000088'>+ rtems_test_assert( status == 0 );
</font>
status = mkdir( "/one/one", 0777);
<font color='#880000'>- rtems_test_assert( status == 0 );
</font><font color='#000088'>+ rtems_test_assert( status == 0 );
</font>
status = mkdir( "/one/two", 0777);
<font color='#880000'>- rtems_test_assert( status == 0 );
</font><font color='#000088'>+ rtems_test_assert( status == 0 );
</font>
touch( "/one/one.test" );
touch( "/one/two/two.test" );
<font color='#006600'>diff -u rtems/testsuites/psxtests/psxitimer/init.c:1.2 rtems/testsuites/psxtests/psxitimer/init.c:1.3
--- rtems/testsuites/psxtests/psxitimer/init.c:1.2 Tue Dec 8 11:52:53 2009
+++ rtems/testsuites/psxtests/psxitimer/init.c Thu Oct 21 16:22:25 2010
</font><font color='#997700'>@@ -26,48 +26,48 @@
</font> /* test getitimer stub */
puts( "getitimer -- bad which - EINVAL " );
status = getitimer( 1234, &itimer );
<font color='#880000'>- rtems_test_assert( status == -1 && errno == EINVAL );
</font><font color='#000088'>+ rtems_test_assert( status == -1 && errno == EINVAL );
</font>
puts( "getitimer -- NULL pointer - EFAULT " );
status = getitimer( ITIMER_REAL, NULL );
<font color='#880000'>- rtems_test_assert( status == -1 && errno == EFAULT );
</font><font color='#000088'>+ rtems_test_assert( status == -1 && errno == EFAULT );
</font>
puts( "getitimer -- ITIMER_REAL - ENOSYS " );
status = getitimer( ITIMER_REAL, &itimer );
<font color='#880000'>- rtems_test_assert( status == -1 && errno == ENOSYS );
</font><font color='#000088'>+ rtems_test_assert( status == -1 && errno == ENOSYS );
</font>
puts( "getitimer -- ITIMER_VIRTUAL - ENOSYS " );
status = getitimer( ITIMER_VIRTUAL, &itimer );
<font color='#880000'>- rtems_test_assert( status == -1 && errno == ENOSYS );
</font><font color='#000088'>+ rtems_test_assert( status == -1 && errno == ENOSYS );
</font>
puts( "getitimer -- ITIMER_PROF - ENOSYS " );
status = getitimer( ITIMER_PROF, &itimer );
<font color='#880000'>- rtems_test_assert( status == -1 && errno == ENOSYS );
</font><font color='#000088'>+ rtems_test_assert( status == -1 && errno == ENOSYS );
</font>
/* test setitimer stub */
puts( "setitimer -- bad which - EINVAL " );
status = setitimer( 1234, &itimer, &otimer );
<font color='#880000'>- rtems_test_assert( status == -1 && errno == EINVAL );
</font><font color='#000088'>+ rtems_test_assert( status == -1 && errno == EINVAL );
</font>
puts( "setitimer -- NULL value pointer - EFAULT " );
status = setitimer( ITIMER_REAL, NULL, &otimer );
<font color='#880000'>- rtems_test_assert( status == -1 && errno == EFAULT );
</font><font color='#000088'>+ rtems_test_assert( status == -1 && errno == EFAULT );
</font>
puts( "setitimer -- NULL value pointer - EFAULT " );
status = setitimer( ITIMER_REAL, &itimer, NULL );
<font color='#880000'>- rtems_test_assert( status == -1 && errno == EFAULT );
</font><font color='#000088'>+ rtems_test_assert( status == -1 && errno == EFAULT );
</font>
puts( "setitimer -- ITIMER_REAL - ENOSYS " );
status = setitimer( ITIMER_REAL, &itimer, &otimer );
<font color='#880000'>- rtems_test_assert( status == -1 && errno == ENOSYS );
</font><font color='#000088'>+ rtems_test_assert( status == -1 && errno == ENOSYS );
</font>
puts( "setitimer -- ITIMER_VIRTUAL - ENOSYS " );
status = setitimer( ITIMER_VIRTUAL, &itimer, &otimer );
<font color='#880000'>- rtems_test_assert( status == -1 && errno == ENOSYS );
</font><font color='#000088'>+ rtems_test_assert( status == -1 && errno == ENOSYS );
</font>
puts( "setitimer -- ITIMER_PROF - ENOSYS " );
status = setitimer( ITIMER_PROF, &itimer, &otimer );
<font color='#880000'>- rtems_test_assert( status == -1 && errno == ENOSYS );
</font><font color='#000088'>+ rtems_test_assert( status == -1 && errno == ENOSYS );
</font>
puts( "*** END OF POSIX TEST ITIMER ***" );
rtems_test_exit(0);
<font color='#006600'>diff -u rtems/testsuites/psxtests/psxkey01/task.c:1.4 rtems/testsuites/psxtests/psxkey01/task.c:1.5
--- rtems/testsuites/psxtests/psxkey01/task.c:1.4 Tue Dec 8 11:52:53 2009
+++ rtems/testsuites/psxtests/psxkey01/task.c Thu Oct 21 16:22:25 2010
</font><font color='#997700'>@@ -34,14 +34,14 @@
</font> status = pthread_setspecific( Key_id[0], (void *)&Data_array[ 1 ] );
if ( status )
printf( "status = %d\n", status );
<font color='#880000'>- rtems_test_assert( !status );
</font><font color='#000088'>+ rtems_test_assert( !status );
</font>
key_data = pthread_getspecific( Key_id[0] );
printf( "Task_1: Got the key value of %ld\n",
(unsigned long) ((uint32_t *)key_data - Data_array) );
if ( status )
printf( "status = %d\n", status );
<font color='#880000'>- rtems_test_assert( !status );
</font><font color='#000088'>+ rtems_test_assert( !status );
</font>
puts( "Task_1: exitting" );
pthread_exit( NULL );
<font color='#006600'>diff -u rtems/testsuites/psxtests/psxkey02/init.c:1.3 rtems/testsuites/psxtests/psxkey02/init.c:1.4
--- rtems/testsuites/psxtests/psxkey02/init.c:1.3 Tue Dec 8 11:52:53 2009
+++ rtems/testsuites/psxtests/psxkey02/init.c Thu Oct 21 16:22:25 2010
</font><font color='#997700'>@@ -30,13 +30,13 @@
</font>
puts( "Init - rtems_workspace_get_information - OK" );
sb = rtems_workspace_get_information( &start );
<font color='#880000'>- rtems_test_assert( sb );
</font><font color='#000088'>+ rtems_test_assert( sb );
</font>
#if 0
printf( "Init - workspace free = %d\n", start.Free.largest );
printf( "Init - workspace free blocks = %d\n", start.Free.number );
#endif
<font color='#880000'>- rtems_test_assert( start.Free.number == 1 );
</font><font color='#000088'>+ rtems_test_assert( start.Free.number == 1 );
</font> to_alloc = start.Free.largest;
/* find the largest we can actually allocate */
<font color='#997700'>@@ -57,15 +57,15 @@
</font> * Verify heap is still in same shape if we couldn't allocate a task
*/
sb = rtems_workspace_get_information( &info );
<font color='#880000'>- rtems_test_assert( sb );
- rtems_test_assert( info.Free.largest == start.Free.largest );
- rtems_test_assert( info.Free.number == start.Free.number );
</font><font color='#000088'>+ rtems_test_assert( sb );
+ rtems_test_assert( info.Free.largest == start.Free.largest );
+ rtems_test_assert( info.Free.number == start.Free.number );
</font>
puts( "Init - pthread_key_create - ENOMEM" );
while (1) {
sb = rtems_workspace_allocate( to_alloc, &alloced );
<font color='#880000'>- rtems_test_assert( sb );
</font><font color='#000088'>+ rtems_test_assert( sb );
</font>
sc = pthread_key_create( &key, NULL );
<font color='#997700'>@@ -88,9 +88,9 @@
</font> printf( "Init - workspace free/blocks = %d/%d\n",
info.Free.largest, info.Free.number );
#endif
<font color='#880000'>- rtems_test_assert( sb );
- rtems_test_assert( info.Free.largest == start.Free.largest );
- rtems_test_assert( info.Free.number == start.Free.number );
</font><font color='#000088'>+ rtems_test_assert( sb );
+ rtems_test_assert( info.Free.largest == start.Free.largest );
+ rtems_test_assert( info.Free.number == start.Free.number );
</font>
to_alloc -= 8;
if ( to_alloc == 0 )
<font color='#997700'>@@ -105,7 +105,7 @@
</font> */
puts( "Init - pthread_key_delete - OK" );
sc = pthread_key_delete( key );
<font color='#880000'>- rtems_test_assert( sc == 0 );
</font><font color='#000088'>+ rtems_test_assert( sc == 0 );
</font>
puts( "Init - verify workspace has same memory" );
sb = rtems_workspace_get_information( &info );
<font color='#997700'>@@ -113,9 +113,9 @@
</font> printf( "Init - workspace free/blocks = %d/%d\n",
info.Free.largest, info.Free.number );
#endif
<font color='#880000'>- rtems_test_assert( sb );
- rtems_test_assert( info.Free.largest == start.Free.largest );
- rtems_test_assert( info.Free.number == start.Free.number );
</font><font color='#000088'>+ rtems_test_assert( sb );
+ rtems_test_assert( info.Free.largest == start.Free.largest );
+ rtems_test_assert( info.Free.number == start.Free.number );
</font>
puts( "*** END OF TEST KEY 02 ***" );
rtems_test_exit(0);
<font color='#006600'>diff -u rtems/testsuites/psxtests/psxkey03/init.c:1.5 rtems/testsuites/psxtests/psxkey03/init.c:1.6
--- rtems/testsuites/psxtests/psxkey03/init.c:1.5 Tue Dec 8 11:52:53 2009
+++ rtems/testsuites/psxtests/psxkey03/init.c Thu Oct 21 16:22:25 2010
</font><font color='#997700'>@@ -30,7 +30,7 @@
</font>
puts( "Test_Thread - pthread_setspecific - OK" );
sc = pthread_setspecific( Key, key_value );
<font color='#880000'>- rtems_test_assert( !sc );
</font><font color='#000088'>+ rtems_test_assert( !sc );
</font>
puts( "Test_Thread - pthread_exit to run key destructors - OK" );
return NULL;
<font color='#997700'>@@ -51,21 +51,21 @@
</font> */
puts( "Init - pthread_key_create with NULL destructor - OK" );
sc = pthread_key_create( &Key, NULL );
<font color='#880000'>- rtems_test_assert( !sc );
</font><font color='#000088'>+ rtems_test_assert( !sc );
</font>
puts( "Init - pthread_create - OK" );
sc = pthread_create( &thread, NULL, Test_Thread, &sc );
<font color='#880000'>- rtems_test_assert( !sc );
</font><font color='#000088'>+ rtems_test_assert( !sc );
</font>
puts( "Init - sleep - let thread run - OK" );
delay_request.tv_sec = 0;
delay_request.tv_nsec = 5 * 100000000;
sc = nanosleep( &delay_request, NULL );
<font color='#880000'>- rtems_test_assert( !sc );
</font><font color='#000088'>+ rtems_test_assert( !sc );
</font>
puts( "Init - pthread_key_delete - OK" );
sc = pthread_key_delete( Key );
<font color='#880000'>- rtems_test_assert( sc == 0 );
</font><font color='#000088'>+ rtems_test_assert( sc == 0 );
</font>
/*
* Key with non-NULL destructor
<font color='#997700'>@@ -73,22 +73,22 @@
</font> destructor_ran = false;
puts( "Init - pthread_key_create with non-NULL destructor - OK" );
sc = pthread_key_create( &Key, destructor );
<font color='#880000'>- rtems_test_assert( !sc );
</font><font color='#000088'>+ rtems_test_assert( !sc );
</font>
puts( "Init - pthread_create - OK" );
sc = pthread_create( &thread, NULL, Test_Thread, NULL );
<font color='#880000'>- rtems_test_assert( !sc );
</font><font color='#000088'>+ rtems_test_assert( !sc );
</font>
puts( "Init - sleep - let thread run - OK" );
sc = nanosleep( &delay_request, NULL );
<font color='#880000'>- rtems_test_assert( !sc );
</font><font color='#000088'>+ rtems_test_assert( !sc );
</font>
puts( "Init - verify destructor did NOT ran" );
<font color='#880000'>- rtems_test_assert( destructor_ran == false );
</font><font color='#000088'>+ rtems_test_assert( destructor_ran == false );
</font>
puts( "Init - pthread_key_delete - OK" );
sc = pthread_key_delete( Key );
<font color='#880000'>- rtems_test_assert( sc == 0 );
</font><font color='#000088'>+ rtems_test_assert( sc == 0 );
</font>
puts( "*** END OF TEST KEY 03 ***" );
rtems_test_exit(0);
<font color='#006600'>diff -u rtems/testsuites/psxtests/psxmount/test.c:1.15 rtems/testsuites/psxtests/psxmount/test.c:1.16
--- rtems/testsuites/psxtests/psxmount/test.c:1.15 Tue Jun 1 19:50:37 2010
+++ rtems/testsuites/psxtests/psxmount/test.c Thu Oct 21 16:22:25 2010
</font><font color='#997700'>@@ -130,23 +130,23 @@
</font>
printf("create /b/my_file\n");
fd = open ("/b/my_file", O_CREAT, S_IRWXU|S_IRWXG|S_IRWXO);
<font color='#880000'>- rtems_test_assert( fd != 0 );
</font><font color='#000088'>+ rtems_test_assert( fd != 0 );
</font> close (fd);
printf("Verify /b/my_file\n");
fd = open("/b/my_file", S_IRWXU|S_IRWXG|S_IRWXO);
<font color='#880000'>- rtems_test_assert( fd != 0 );
</font><font color='#000088'>+ rtems_test_assert( fd != 0 );
</font> 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);
<font color='#880000'>- rtems_test_assert( fd != 0 );
</font><font color='#000088'>+ rtems_test_assert( fd != 0 );
</font> 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);
<font color='#880000'>- rtems_test_assert( fd != 0 );
</font><font color='#000088'>+ rtems_test_assert( fd != 0 );
</font> close( fd );
/*
<font color='#997700'>@@ -160,7 +160,7 @@
</font> "imfs",
RTEMS_FILESYSTEM_READ_WRITE,
NULL );
<font color='#880000'>- rtems_test_assert( status == 0 );
</font><font color='#000088'>+ rtems_test_assert( status == 0 );
</font> printf("2nd file system successfully mounted at /c/z/my_mount_point \n");
/*
<font color='#997700'>@@ -216,8 +216,8 @@
</font> "nofound",
RTEMS_FILESYSTEM_READ_WRITE,
NULL );
<font color='#880000'>- rtems_test_assert( status == -1 );
- rtems_test_assert( errno == EINVAL );
</font><font color='#000088'>+ rtems_test_assert( status == -1 );
+ rtems_test_assert( errno == EINVAL );
</font>
/*
* Verify mount with option of -62 fails with EINVAL
<font color='#997700'>@@ -230,8 +230,8 @@
</font> "imfs",
-62,
NULL );
<font color='#880000'>- rtems_test_assert( status == -1 );
- rtems_test_assert( errno == EINVAL );
</font><font color='#000088'>+ rtems_test_assert( status == -1 );
+ rtems_test_assert( errno == EINVAL );
</font>
/*
* Mount a Read Only File system.
<font color='#997700'>@@ -244,7 +244,7 @@
</font> "imfs",
RTEMS_FILESYSTEM_READ_ONLY,
NULL );
<font color='#880000'>- rtems_test_assert( status == 0 );
</font><font color='#000088'>+ rtems_test_assert( status == 0 );
</font> printf("Read only file system successfully mounted at /c/y/my_mount_point \n");
/*
<font color='#997700'>@@ -253,11 +253,11 @@
</font>
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 );
<font color='#880000'>- rtems_test_assert( status == 0 );
</font><font color='#000088'>+ rtems_test_assert( status == 0 );
</font> status = stat("c/y/my_mount_point/../../y/my_mount_point/new_dir",&statbuf );
<font color='#880000'>- rtems_test_assert( status == 0 );
</font><font color='#000088'>+ rtems_test_assert( status == 0 );
</font> status = stat("c/y/my_mount_point/new_dir/..", &statbuf );
<font color='#880000'>- rtems_test_assert( status == 0 );
</font><font color='#000088'>+ rtems_test_assert( status == 0 );
</font>
/*
* Attempt to mount a second file system at a used mount point.
<font color='#997700'>@@ -270,8 +270,8 @@
</font> "imfs",
RTEMS_FILESYSTEM_READ_ONLY,
NULL );
<font color='#880000'>- rtems_test_assert( status == -1 );
- rtems_test_assert( errno == EBUSY);
</font><font color='#000088'>+ rtems_test_assert( status == -1 );
+ rtems_test_assert( errno == EBUSY);
</font>
/*
* Attempt to mount at a file.
<font color='#997700'>@@ -284,8 +284,8 @@
</font> "imfs",
RTEMS_FILESYSTEM_READ_ONLY,
NULL );
<font color='#880000'>- rtems_test_assert( status == -1 );
- rtems_test_assert( errno == ENOTDIR );
</font><font color='#000088'>+ rtems_test_assert( status == -1 );
+ rtems_test_assert( errno == ENOTDIR );
</font>
/*
<font color='#997700'>@@ -294,15 +294,15 @@
</font>
printf("Create and chdir to /c/y/my_mount_point/mydir\n");
status = mkdir( "/c/y/my_mount_point/mydir", 0777);
<font color='#880000'>- rtems_test_assert( status == 0 );
</font><font color='#000088'>+ rtems_test_assert( status == 0 );
</font>
status = chdir( "/c/y/my_mount_point/mydir" );
<font color='#880000'>- rtems_test_assert( status == 0 );
</font><font color='#000088'>+ rtems_test_assert( status == 0 );
</font>
printf("unmount of /c/y/my_mount_point should fail with EBUSY\n");
status = unmount( "/c/y/my_mount_point" );
<font color='#880000'>- rtems_test_assert( status == -1 );
- rtems_test_assert( errno == EBUSY );
</font><font color='#000088'>+ rtems_test_assert( status == -1 );
+ rtems_test_assert( errno == EBUSY );
</font>
/*
* Chdir to root and verify we can unmount the file system now.
<font color='#997700'>@@ -310,11 +310,11 @@
</font>
printf("chdir to / and verify we can unmount /c/y/my_mount_point\n");
status = chdir( "/" );
<font color='#880000'>- rtems_test_assert( status == 0 );
</font><font color='#000088'>+ rtems_test_assert( status == 0 );
</font>
printf("unmount /c/y/my_mount_point \n");
status = unmount( "/c/y/my_mount_point" );
<font color='#880000'>- rtems_test_assert( status == 0 );
</font><font color='#000088'>+ rtems_test_assert( status == 0 );
</font>
/*
* Attempt to unmount a directory that does not exist.
<font color='#997700'>@@ -322,8 +322,8 @@
</font>
printf("unmount /b/mount_point should fail with EINVAL\n");
status = unmount( "/b/mount_point" );
<font color='#880000'>- rtems_test_assert( status == -1 );
- rtems_test_assert( errno == ENOENT );
</font><font color='#000088'>+ rtems_test_assert( status == -1 );
+ rtems_test_assert( errno == ENOENT );
</font>
/*
* Remount the filesystem.
<font color='#997700'>@@ -336,7 +336,7 @@
</font> "imfs",
RTEMS_FILESYSTEM_READ_ONLY,
NULL );
<font color='#880000'>- rtems_test_assert( status == 0 );
</font><font color='#000088'>+ rtems_test_assert( status == 0 );
</font>
/*
* Create a file and directory then open the directory.
<font color='#997700'>@@ -345,24 +345,24 @@
</font>
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);
<font color='#880000'>- rtems_test_assert( fd != -1 );
</font><font color='#000088'>+ rtems_test_assert( fd != -1 );
</font> status = close( fd );
<font color='#880000'>- rtems_test_assert( status == 0 );
</font><font color='#000088'>+ rtems_test_assert( status == 0 );
</font>
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" );
<font color='#880000'>- rtems_test_assert( directory );
</font><font color='#000088'>+ rtems_test_assert( directory );
</font>
printf("Unmount /c/y/my_mount_point should fail with EBUSY\n");
status = unmount( "/c/y/my_mount_point" );
<font color='#880000'>- rtems_test_assert( status == -1 );
- rtems_test_assert( errno == EBUSY );
</font><font color='#000088'>+ rtems_test_assert( status == -1 );
+ rtems_test_assert( errno == EBUSY );
</font>
printf("Close /c/y/my_mount_point/my_dir\n");
status = closedir( directory );
<font color='#880000'>- rtems_test_assert( status == 0 );
</font><font color='#000088'>+ rtems_test_assert( status == 0 );
</font>
/*
* Attempt to unmount a directory that is not a mount point.
<font color='#997700'>@@ -370,8 +370,8 @@
</font>
printf("Unmount /c/y/my_mount_point/my_dir should fail with EACCES\n");
status = unmount( "/c/y/my_mount_point/my_dir" );
<font color='#880000'>- rtems_test_assert( status == -1 );
- rtems_test_assert( errno == EACCES );
</font><font color='#000088'>+ rtems_test_assert( status == -1 );
+ rtems_test_assert( errno == EACCES );
</font>
/*
* Verify a file system can not be unmounted with a mounted file system
<font color='#997700'>@@ -385,12 +385,12 @@
</font> "imfs",
RTEMS_FILESYSTEM_READ_WRITE,
NULL );
<font color='#880000'>- rtems_test_assert( status == 0 );
</font><font color='#000088'>+ rtems_test_assert( status == 0 );
</font>
printf("unmount /c/y/my_mount_point should fail with EBUSY\n");
status = unmount( "/c/y/my_mount_point" );
<font color='#880000'>- rtems_test_assert( status == -1 );
- rtems_test_assert( errno == EBUSY );
</font><font color='#000088'>+ rtems_test_assert( status == -1 );
+ rtems_test_assert( errno == EBUSY );
</font>
/*
* Verify you cannot create a hard link across mounted file systems.
<font color='#997700'>@@ -398,11 +398,11 @@
</font>
printf("Verify a hard link across filesystems fails with EXDEV\n");
status = mkdir( "/c/y/my_mount_point/my_dir2", S_IRWXU );
<font color='#880000'>- rtems_test_assert( status == 0 );
</font><font color='#000088'>+ rtems_test_assert( status == 0 );
</font>
status = link( "/c/y/my_mount_point/my_dir2", "/c/y/my_mount_point/my_dir/my_link" );
<font color='#880000'>- rtems_test_assert( status == -1 );
- rtems_test_assert( errno == EXDEV );
</font><font color='#000088'>+ rtems_test_assert( status == -1 );
+ rtems_test_assert( errno == EXDEV );
</font>
/*
* Create a symbolic link across mountpoints.
<font color='#997700'>@@ -410,13 +410,13 @@
</font>
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" );
<font color='#880000'>- rtems_test_assert( status == 0 );
</font><font color='#000088'>+ rtems_test_assert( status == 0 );
</font> status = stat( "/c/y/my_mount_point/my_dir/my_link", &statbuf );
<font color='#880000'>- rtems_test_assert( status == 0 );
</font><font color='#000088'>+ rtems_test_assert( status == 0 );
</font>
printf("unmount /c/y/my_mount_point/my_dir\n");
status = unmount( "/c/y/my_mount_point/my_dir" );
<font color='#880000'>- rtems_test_assert( status == 0 );
</font><font color='#000088'>+ rtems_test_assert( status == 0 );
</font>
/*
* Verify symblic link no longer works.
<font color='#997700'>@@ -424,11 +424,11 @@
</font>
printf("Verify the symbolic link now fails\n");
status = stat( "/c/y/my_mount_point/my_dir/my_link", &statbuf );
<font color='#880000'>- rtems_test_assert( status != 0 );
</font><font color='#000088'>+ rtems_test_assert( status != 0 );
</font>
printf("unmount /c/y/my_mount_point\n");
status = unmount( "/c/y/my_mount_point" );
<font color='#880000'>- rtems_test_assert( status == 0 );
</font><font color='#000088'>+ rtems_test_assert( status == 0 );
</font>
printf( "\n\n*** END OF MOUNT/UNMOUNT TEST ***\n" );
rtems_test_exit(0);
<font color='#006600'>diff -u rtems/testsuites/psxtests/psxmsgq01/init.c:1.23 rtems/testsuites/psxtests/psxmsgq01/init.c:1.24
--- rtems/testsuites/psxtests/psxmsgq01/init.c:1.23 Tue Dec 8 11:52:53 2009
+++ rtems/testsuites/psxtests/psxmsgq01/init.c Thu Oct 21 16:22:25 2010
</font><font color='#997700'>@@ -130,7 +130,7 @@
</font> else
Test_q[que].mq = mq_open( tq->name, tq->oflag, 0x777, &attr );
<font color='#880000'>- rtems_test_assert( Test_q[que].mq != (-1) );
</font><font color='#000088'>+ rtems_test_assert( Test_q[que].mq != (-1) );
</font> }
status = mq_close( Test_q[NUMBER_OF_TEST_QUEUES].mq );
<font color='#997700'>@@ -223,7 +223,7 @@
</font> 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 );
<font color='#880000'>- rtems_test_assert( open_mq[0] != (-1) );
</font><font color='#000088'>+ rtems_test_assert( open_mq[0] != (-1) );
</font>
n_mq2 = mq_open(
Build_Queue_Name(0), O_CREAT | O_EXCL | O_RDONLY, 0x777, NULL);
<font color='#997700'>@@ -245,8 +245,8 @@
</font> 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 );
<font color='#880000'>- rtems_test_assert( open_mq[i] != (-1) );
- rtems_test_assert( open_mq[i] );
</font><font color='#000088'>+ rtems_test_assert( open_mq[i] != (-1) );
+ rtems_test_assert( open_mq[i] );
</font> /*XXX - Isn't there a more general check */
/* JRS printf( "mq_open 0x%x %s\n", open_mq[i], Build_Queue_Name(i) ); */
}
<font color='#997700'>@@ -494,7 +494,7 @@
</font> sprintf( err_msg, "%s msg %s size failure", Test_q[ que ].name, ptr->msg );
fatal_int_service_status( status, ptr->size, err_msg );
<font color='#880000'>- rtems_test_assert( !strcmp( message, ptr->msg ) );
</font><font color='#000088'>+ rtems_test_assert( !strcmp( message, ptr->msg ) );
</font> strcpy( message, "No Message" );
sprintf( err_msg,"%s msg %s size failure", Test_q[ que ].name, ptr->msg );
<font color='#997700'>@@ -683,7 +683,7 @@
</font> puts( "Init: mq_open - Open an existing mq ( same id )" );
n_mq = mq_open( RD_NAME, 0 );
fatal_posix_service_status(
<font color='#880000'>- rtems_test_assert( n_mq == Test_q[RD_QUEUE].mq );
</font><font color='#000088'>+ rtems_test_assert( n_mq == Test_q[RD_QUEUE].mq );
</font> #endif
}
<font color='#997700'>@@ -704,8 +704,8 @@
</font> fatal_posix_service_status( status, 0, "mq_unlink locked message queue");
n_mq = mq_open( DEFAULT_NAME, DEFAULT_ATTR, 0x777, NULL );
<font color='#880000'>- rtems_test_assert( n_mq != (-1) );
- rtems_test_assert( n_mq != Test_q[ DEFAULT_RW ].mq );
</font><font color='#000088'>+ rtems_test_assert( n_mq != (-1) );
+ rtems_test_assert( n_mq != Test_q[ DEFAULT_RW ].mq );
</font>
status = mq_unlink( DEFAULT_NAME );
<font color='#997700'>@@ -888,10 +888,10 @@
</font> timeout.tv_nsec = 0;
status = sigemptyset( waitset );
<font color='#880000'>- rtems_test_assert( !status );
</font><font color='#000088'>+ rtems_test_assert( !status );
</font>
status = sigaddset( waitset, SIGUSR1 );
<font color='#880000'>- rtems_test_assert( !status );
</font><font color='#000088'>+ rtems_test_assert( !status );
</font>
printf( "waiting on any signal for %d seconds.\n", sec );
signo = sigtimedwait( waitset, &siginfo, &timeout );
<font color='#997700'>@@ -1007,7 +1007,7 @@
</font>
Start_Test( "multi-thread Task 4 Receive Test" );
status = pthread_create( &id, NULL, Task_4, NULL );
<font color='#880000'>- rtems_test_assert( !status );
</font><font color='#000088'>+ rtems_test_assert( !status );
</font> puts( "Init: mq_receive - Empty queue changes to non-blocking (EAGAIN)" );
status = mq_receive( Test_q[BLOCKING].mq, message, 100, &priority );
fatal_int_service_status( status, -1, "mq_receive error return status");
<font color='#997700'>@@ -1022,7 +1022,7 @@
</font>
Start_Test( "multi-thread Task 1 Test" );
status = pthread_create( &id, NULL, Task_1, NULL );
<font color='#880000'>- rtems_test_assert( !status );
</font><font color='#000088'>+ rtems_test_assert( !status );
</font> Read_msg_from_que( BLOCKING, 0 ); /* Block until init writes */
print_current_time( "Init: ", "" );
<font color='#997700'>@@ -1036,7 +1036,7 @@
</font> Start_Test( "multi-thread Task 4 Send Test" );
fill_message_queues( "Init:" );
status = pthread_create( &id, NULL, Task_4, NULL );
<font color='#880000'>- rtems_test_assert( !status );
</font><font color='#000088'>+ rtems_test_assert( !status );
</font> puts( "Init: mq_send - Full queue changes to non-blocking (EAGAIN)" );
status = mq_send(Test_q[BLOCKING].mq, message, 0, 0 );
fatal_posix_service_status( status, -1, "mq_send error return status");
<font color='#997700'>@@ -1051,7 +1051,7 @@
</font> Start_Test( "multi-thread Task 2 Test" );
fill_message_queues( "Init:" );
status = pthread_create( &id, NULL, Task_2, NULL );
<font color='#880000'>- rtems_test_assert( !status );
</font><font color='#000088'>+ rtems_test_assert( !status );
</font> Show_send_msg_to_que( "Init:", BLOCKING, Priority_Order[0] );
print_current_time( "Init: ", "" );
verify_queues_full( "Init:" );
<font color='#997700'>@@ -1065,7 +1065,7 @@
</font> Start_Test( "multi-thread Task 3 Test" );
fill_message_queues( "Init:" );
status = pthread_create( &id, NULL, Task_3, NULL );
<font color='#880000'>- rtems_test_assert( !status );
</font><font color='#000088'>+ rtems_test_assert( !status );
</font> puts( "Init: mq_send - Block while thread deletes queue (EBADF)" );
ptr = &Predefined_Msgs[0];
status = mq_send( Test_q[BLOCKING].mq, ptr->msg, ptr->size , ptr->priority );
<font color='#997700'>@@ -1271,7 +1271,7 @@
</font>
/* switch to Init */
<font color='#880000'>- rtems_test_assert( 0 );
</font><font color='#000088'>+ rtems_test_assert( 0 );
</font> return NULL; /* just so the compiler thinks we returned something */
}
<font color='#006600'>diff -u rtems/testsuites/psxtests/psxmsgq03/init.c:1.4 rtems/testsuites/psxtests/psxmsgq03/init.c:1.5
--- rtems/testsuites/psxtests/psxmsgq03/init.c:1.4 Tue Dec 8 11:52:53 2009
+++ rtems/testsuites/psxtests/psxmsgq03/init.c Thu Oct 21 16:22:25 2010
</font><font color='#997700'>@@ -55,14 +55,14 @@
</font> if ( Queue == (-1) ) {
perror( "mq_open failed" );
}
<font color='#880000'>- rtems_test_assert( Queue != (-1) );
</font><font color='#000088'>+ rtems_test_assert( Queue != (-1) );
</font>
puts( "Init - send to message queue" );
status = mq_send( Queue, (const char *)&status, sizeof(int), 1 );
if ( status == (-1) ) {
perror( "mq_status failed" );
}
<font color='#880000'>- rtems_test_assert( status != (-1) );
</font><font color='#000088'>+ rtems_test_assert( status != (-1) );
</font>
/*
* Now create the timer we will send to a full queue from.
<font color='#006600'>diff -u rtems/testsuites/psxtests/psxmsgq04/init.c:1.8 rtems/testsuites/psxtests/psxmsgq04/init.c:1.9
--- rtems/testsuites/psxtests/psxmsgq04/init.c:1.8 Tue Dec 8 11:52:53 2009
+++ rtems/testsuites/psxtests/psxmsgq04/init.c Thu Oct 21 16:22:25 2010
</font><font color='#997700'>@@ -43,29 +43,29 @@
</font> Queue = mq_open( "Queue", O_CREAT | O_RDWR, 0x777, &attr );
if ( Queue == (-1) )
perror( "mq_open failed" );
<font color='#880000'>- rtems_test_assert( Queue != (-1) );
</font><font color='#000088'>+ rtems_test_assert( Queue != (-1) );
</font>
puts( "Init - Open message queue instance 2 - FAIL - ENFILE " );
second_Queue = mq_open( "Queue2", O_CREAT | O_RDWR, 0x777, &attr );
if ( second_Queue != (-1) )
puts( "mq_open did not failed" );
<font color='#880000'>- rtems_test_assert( second_Queue == (-1) );
- rtems_test_assert( errno == ENFILE );
</font><font color='#000088'>+ rtems_test_assert( second_Queue == (-1) );
+ rtems_test_assert( errno == ENFILE );
</font>
puts( "Init - Unlink message queue instance 1" );
sc = mq_unlink( "Queue" );
if ( sc != 0 )
perror( "mq_unlink failed" );
<font color='#880000'>- rtems_test_assert( sc == 0 );
</font><font color='#000088'>+ rtems_test_assert( sc == 0 );
</font>
puts( "Init - Close message queue instance 1" );
sc = mq_close( Queue );
if ( sc != 0 )
perror( "mq_close failed" );
<font color='#880000'>- rtems_test_assert( sc == 0 );
</font><font color='#000088'>+ rtems_test_assert( sc == 0 );
</font>
sb = rtems_workspace_get_information( &start );
<font color='#880000'>- rtems_test_assert( start.Free.number == 1 );
</font><font color='#000088'>+ rtems_test_assert( start.Free.number == 1 );
</font> to_alloc = start.Free.largest;
/* find the largest we can actually allocate */
<font color='#997700'>@@ -91,7 +91,7 @@
</font> name = Get_Longest_Name();
while ( attr.mq_msgsize > 0 ) {
sb = rtems_workspace_allocate( to_alloc, &alloced );
<font color='#880000'>- rtems_test_assert( sb );
</font><font color='#000088'>+ rtems_test_assert( sb );
</font>
second_Queue = mq_open(name,O_CREAT | O_RDWR, 0x777, &attr );
<font color='#997700'>@@ -114,13 +114,13 @@
</font> sc = mq_unlink( name );
if ( sc != 0 )
perror( "mq_unlink failed" );
<font color='#880000'>- rtems_test_assert( sc == 0 );
</font><font color='#000088'>+ rtems_test_assert( sc == 0 );
</font>
puts( "Init - Close message queue" );
sc = mq_close( second_Queue );
if ( sc != 0 )
perror( "mq_close failed" );
<font color='#880000'>- rtems_test_assert( sc == 0 );
</font><font color='#000088'>+ rtems_test_assert( sc == 0 );
</font>
puts( "*** END OF POSIX MESSAGE QUEUE TEST 4 ***" );
rtems_test_exit( 0 );
<font color='#006600'>diff -u rtems/testsuites/psxtests/psxrwlock01/test.c:1.13 rtems/testsuites/psxtests/psxrwlock01/test.c:1.14
--- rtems/testsuites/psxtests/psxrwlock01/test.c:1.13 Tue Dec 8 15:16:02 2009
+++ rtems/testsuites/psxtests/psxrwlock01/test.c Thu Oct 21 16:22:25 2010
</font><font color='#997700'>@@ -37,11 +37,11 @@
</font>
puts( "ReadThread - pthread_rwlock_rdlock(RWLock) blocking -- OK" );
status = pthread_rwlock_rdlock(&RWLock);
<font color='#880000'>- rtems_test_assert( !status );
</font><font color='#000088'>+ rtems_test_assert( !status );
</font> puts( "ReadThread - pthread_rwlock_rdlock(RWLock) unblocked -- OK" );
status = pthread_rwlock_unlock(&RWLock);
<font color='#880000'>- rtems_test_assert( !status );
</font><font color='#000088'>+ rtems_test_assert( !status );
</font> return NULL;
}
<font color='#997700'>@@ -54,14 +54,14 @@
</font>
puts( "WriteThread - pthread_rwlock_wrlock(RWLock) blocking -- OK" );
status = pthread_rwlock_wrlock(&RWLock);
<font color='#880000'>- rtems_test_assert( !status );
</font><font color='#000088'>+ rtems_test_assert( !status );
</font> puts( "WriteThread - pthread_rwlock_wrlock(RWLock) unblocked -- OK" );
sleep( 1 );
puts( "WriteThread - pthread_rwlock_unlock(RWLock) -- OK" );
status = pthread_rwlock_unlock(&RWLock);
<font color='#880000'>- rtems_test_assert( !status );
</font><font color='#000088'>+ rtems_test_assert( !status );
</font> return NULL;
}
<font color='#997700'>@@ -90,75 +90,75 @@
</font> /*************** NULL POINTER CHECKS *****************/
puts( "pthread_rwlockattr_init( NULL ) -- EINVAL" );
status = pthread_rwlockattr_init( NULL );
<font color='#880000'>- rtems_test_assert( status == EINVAL );
</font><font color='#000088'>+ rtems_test_assert( status == EINVAL );
</font>
puts( "pthread_rwlockattr_setpshared( NULL, private ) -- EINVAL" );
status = pthread_rwlockattr_setpshared( NULL, PTHREAD_PROCESS_PRIVATE );
<font color='#880000'>- rtems_test_assert( status == EINVAL );
</font><font color='#000088'>+ rtems_test_assert( status == EINVAL );
</font>
puts( "pthread_rwlockattr_setpshared( NULL, shared ) -- EINVAL" );
status = pthread_rwlockattr_setpshared( NULL, PTHREAD_PROCESS_SHARED );
<font color='#880000'>- rtems_test_assert( status == EINVAL );
</font><font color='#000088'>+ rtems_test_assert( status == EINVAL );
</font>
puts( "pthread_rwlockattr_getpshared( NULL, &p ) -- EINVAL" );
status = pthread_rwlockattr_getpshared( NULL, &p );
<font color='#880000'>- rtems_test_assert( status == EINVAL );
</font><font color='#000088'>+ rtems_test_assert( status == EINVAL );
</font>
puts( "pthread_rwlockattr_destroy( NULL ) -- EINVAL" );
status = pthread_rwlockattr_destroy( NULL );
<font color='#880000'>- rtems_test_assert( status == EINVAL );
</font><font color='#000088'>+ rtems_test_assert( status == EINVAL );
</font>
/*************** NOT INITIALIZED CHECKS *****************/
/* cheat visibility */
attr.is_initialized = 0;
puts( "pthread_rwlockattr_setpshared( &attr, shared ) -- EINVAL" );
status = pthread_rwlockattr_setpshared( &attr, PTHREAD_PROCESS_SHARED );
<font color='#880000'>- rtems_test_assert( status == EINVAL );
</font><font color='#000088'>+ rtems_test_assert( status == EINVAL );
</font>
puts( "pthread_rwlockattr_getpshared( &attr, NULL ) -- EINVAL" );
status = pthread_rwlockattr_getpshared( &attr, NULL );
<font color='#880000'>- rtems_test_assert( status == EINVAL );
</font><font color='#000088'>+ rtems_test_assert( status == EINVAL );
</font>
puts( "pthread_rwlockattr_destroy( &attr ) -- EINVAL" );
status = pthread_rwlockattr_destroy( &attr );
<font color='#880000'>- rtems_test_assert( status == EINVAL );
</font><font color='#000088'>+ rtems_test_assert( status == EINVAL );
</font>
/*************** BAD PSHARED CHECK *****************/
puts( "pthread_rwlockattr_setpshared( &attr, private ) -- EINVAL" );
status = pthread_rwlockattr_setpshared( &attr, ~PTHREAD_PROCESS_PRIVATE );
<font color='#880000'>- rtems_test_assert( status == EINVAL );
</font><font color='#000088'>+ rtems_test_assert( status == EINVAL );
</font>
/*************** ACTUALLY WORK THIS TIME *****************/
puts( "pthread_rwlockattr_init( &attr ) -- OK" );
status = pthread_rwlockattr_init( &attr );
<font color='#880000'>- rtems_test_assert( status == 0 );
</font><font color='#000088'>+ rtems_test_assert( status == 0 );
</font>
puts( "pthread_rwlockattr_setpshared( &attr, private ) -- OK" );
status = pthread_rwlockattr_setpshared( &attr, PTHREAD_PROCESS_PRIVATE );
<font color='#880000'>- rtems_test_assert( status == 0 );
</font><font color='#000088'>+ rtems_test_assert( status == 0 );
</font>
puts( "pthread_rwlockattr_getpshared( &attr, &p ) -- OK" );
status = pthread_rwlockattr_getpshared( &attr, &p );
<font color='#880000'>- rtems_test_assert( status == 0 );
- rtems_test_assert( p == PTHREAD_PROCESS_PRIVATE );
</font><font color='#000088'>+ rtems_test_assert( status == 0 );
+ rtems_test_assert( p == PTHREAD_PROCESS_PRIVATE );
</font>
puts( "pthread_rwlockattr_setpshared( &attr, shared ) -- OK" );
status = pthread_rwlockattr_setpshared( &attr, PTHREAD_PROCESS_SHARED );
<font color='#880000'>- rtems_test_assert( status == 0 );
</font><font color='#000088'>+ rtems_test_assert( status == 0 );
</font>
puts( "pthread_rwlockattr_getpshared( &attr, &p ) -- OK" );
status = pthread_rwlockattr_getpshared( &attr, &p );
<font color='#880000'>- rtems_test_assert( status == 0 );
- rtems_test_assert( p == PTHREAD_PROCESS_SHARED );
</font><font color='#000088'>+ rtems_test_assert( status == 0 );
+ rtems_test_assert( p == PTHREAD_PROCESS_SHARED );
</font>
/*************** DESTROY/REUSE CHECK *****************/
puts( "pthread_rwlockattr_destroy( &attr ) -- OK" );
status = pthread_rwlockattr_destroy( &attr );
<font color='#880000'>- rtems_test_assert( status == 0 );
</font><font color='#000088'>+ rtems_test_assert( status == 0 );
</font>
puts( "pthread_rwlockattr_getpshared( &attr, &p ) destroyed -- EINVAL" );
status = pthread_rwlockattr_getpshared( &attr, &p );
<font color='#880000'>- rtems_test_assert( status == EINVAL );
</font><font color='#000088'>+ rtems_test_assert( status == EINVAL );
</font>
/*************** NULL ARGUMENT CHECKS *****************/
abstime.tv_sec = 0;
<font color='#997700'>@@ -166,87 +166,87 @@
</font>
puts( "pthread_rwlock_init(NULL, &attr) -- EINVAL" );
status = pthread_rwlock_init(NULL, &attr);
<font color='#880000'>- rtems_test_assert( status == EINVAL );
</font><font color='#000088'>+ rtems_test_assert( status == EINVAL );
</font>
puts( "pthread_rwlock_destroy(NULL) -- EINVAL" );
status = pthread_rwlock_destroy(NULL);
<font color='#880000'>- rtems_test_assert( status == EINVAL );
</font><font color='#000088'>+ rtems_test_assert( status == EINVAL );
</font>
puts( "pthread_rwlock_rdlock(NULL) -- EINVAL" );
status = pthread_rwlock_rdlock(NULL);
<font color='#880000'>- rtems_test_assert( status == EINVAL );
</font><font color='#000088'>+ rtems_test_assert( status == EINVAL );
</font>
puts( "pthread_rwlock_timedrdlock( NULL, &abstime) -- EINVAL" );
status = pthread_rwlock_timedrdlock( NULL, &abstime);
<font color='#880000'>- rtems_test_assert( status == EINVAL );
</font><font color='#000088'>+ rtems_test_assert( status == EINVAL );
</font>
puts( "pthread_rwlock_timedrdlock( &rwlock, NULL) -- EINVAL" );
status = pthread_rwlock_timedrdlock( &rwlock, NULL);
<font color='#880000'>- rtems_test_assert( status == EINVAL );
</font><font color='#000088'>+ rtems_test_assert( status == EINVAL );
</font>
puts( "pthread_rwlock_tryrdlock(NULL) -- EINVAL" );
status = pthread_rwlock_tryrdlock(NULL);
<font color='#880000'>- rtems_test_assert( status == EINVAL );
</font><font color='#000088'>+ rtems_test_assert( status == EINVAL );
</font>
puts( "pthread_rwlock_wrlock(NULL) -- EINVAL" );
status = pthread_rwlock_wrlock(NULL);
<font color='#880000'>- rtems_test_assert( status == EINVAL );
</font><font color='#000088'>+ rtems_test_assert( status == EINVAL );
</font>
puts( "pthread_rwlock_timedwrlock( NULL, &abstime) -- EINVAL" );
status = pthread_rwlock_timedwrlock( NULL, &abstime );
<font color='#880000'>- rtems_test_assert( status == EINVAL );
</font><font color='#000088'>+ rtems_test_assert( status == EINVAL );
</font>
puts( "pthread_rwlock_timedwrlock( &rwlock, NULL) -- EINVAL" );
status = pthread_rwlock_timedwrlock( &rwlock, NULL);
<font color='#880000'>- rtems_test_assert( status == EINVAL );
</font><font color='#000088'>+ rtems_test_assert( status == EINVAL );
</font>
puts( "pthread_rwlock_trywrlock(NULL) -- EINVAL" );
status = pthread_rwlock_trywrlock(NULL);
<font color='#880000'>- rtems_test_assert( status == EINVAL );
</font><font color='#000088'>+ rtems_test_assert( status == EINVAL );
</font>
puts( "pthread_rwlock_unlock(NULL) -- EINVAL" );
status = pthread_rwlock_unlock(NULL);
<font color='#880000'>- rtems_test_assert( status == EINVAL );
</font><font color='#000088'>+ rtems_test_assert( status == EINVAL );
</font>
/*************** BAD ID CHECK *****************/
rwlock = 1;
/* make a valid abstime */
puts( "clock_gettime(CLOCK_REALTIME, &abstime) -- OK" );
status = clock_gettime( CLOCK_REALTIME, &abstime );
<font color='#880000'>- rtems_test_assert( !status );
</font><font color='#000088'>+ rtems_test_assert( !status );
</font> abstime.tv_sec += 5;
puts( "pthread_rwlock_destroy(BadId) -- EINVAL" );
status = pthread_rwlock_destroy(&rwlock);
<font color='#880000'>- rtems_test_assert( status == EINVAL );
</font><font color='#000088'>+ rtems_test_assert( status == EINVAL );
</font>
puts( "pthread_rwlock_rdlock(BadId) -- EINVAL" );
status = pthread_rwlock_rdlock(&rwlock);
<font color='#880000'>- rtems_test_assert( status == EINVAL );
</font><font color='#000088'>+ rtems_test_assert( status == EINVAL );
</font>
puts( "pthread_rwlock_timedrdlock(BadId, &abstime) -- EINVAL" );
status = pthread_rwlock_timedrdlock( &rwlock, &abstime);
<font color='#880000'>- rtems_test_assert( status == EINVAL );
</font><font color='#000088'>+ rtems_test_assert( status == EINVAL );
</font>
puts( "pthread_rwlock_tryrdlock(BadId) -- EINVAL" );
status = pthread_rwlock_tryrdlock(&rwlock);
<font color='#880000'>- rtems_test_assert( status == EINVAL );
</font><font color='#000088'>+ rtems_test_assert( status == EINVAL );
</font>
puts( "pthread_rwlock_wrlock(BadId) -- EINVAL" );
status = pthread_rwlock_wrlock(&rwlock);
<font color='#880000'>- rtems_test_assert( status == EINVAL );
</font><font color='#000088'>+ rtems_test_assert( status == EINVAL );
</font>
puts( "pthread_rwlock_timedwrlock(BadId, &abstime) -- EINVAL" );
status = pthread_rwlock_timedwrlock( &rwlock, &abstime );
<font color='#880000'>- rtems_test_assert( status == EINVAL );
</font><font color='#000088'>+ rtems_test_assert( status == EINVAL );
</font>
puts( "pthread_rwlock_trywrlock(BadId) -- EINVAL" );
status = pthread_rwlock_trywrlock(&rwlock);
<font color='#880000'>- rtems_test_assert( status == EINVAL );
</font><font color='#000088'>+ rtems_test_assert( status == EINVAL );
</font>
puts( "pthread_rwlock_unlock(BadId) -- EINVAL" );
status = pthread_rwlock_unlock(&rwlock);
<font color='#880000'>- rtems_test_assert( status == EINVAL );
</font><font color='#000088'>+ rtems_test_assert( status == EINVAL );
</font>
/*************** BAD ABSTIME CHECK *****************/
<font color='#997700'>@@ -263,66 +263,66 @@
</font> /*************** ACTUALLY CREATE ONE CHECK *****************/
puts( "pthread_rwlockattr_init( &attr ) -- OK" );
status = pthread_rwlockattr_init( &attr );
<font color='#880000'>- rtems_test_assert( status == 0 );
</font><font color='#000088'>+ rtems_test_assert( status == 0 );
</font>
puts( "pthread_rwlock_init( &rwlock, &attr ) -- OK" );
status = pthread_rwlock_init( &rwlock, &attr );
<font color='#880000'>- rtems_test_assert( status == 0 );
- rtems_test_assert( rwlock != 0 );
</font><font color='#000088'>+ rtems_test_assert( status == 0 );
+ rtems_test_assert( rwlock != 0 );
</font>
puts( "pthread_rwlock_init( &rwlock, &attr ) -- EAGAIN" );
status = pthread_rwlock_init( &rwlock, &attr );
<font color='#880000'>- rtems_test_assert( status == EAGAIN );
</font><font color='#000088'>+ rtems_test_assert( status == EAGAIN );
</font>
puts( "pthread_rwlock_destroy( &rwlock ) -- OK" );
status = pthread_rwlock_destroy( &rwlock );
<font color='#880000'>- rtems_test_assert( status == 0 );
</font><font color='#000088'>+ rtems_test_assert( status == 0 );
</font>
/********* CREATE RWLOCK WITH DEFAULT ATTRIBUTES AND DESTROY IT *********/
puts( "pthread_rwlock_init( &rwlock, NULL ) -- OK" );
status = pthread_rwlock_init( &rwlock, NULL );
<font color='#880000'>- rtems_test_assert( status == 0 );
</font><font color='#000088'>+ rtems_test_assert( status == 0 );
</font>
puts( "pthread_rwlock_destroy( &rwlock ) -- OK" );
status = pthread_rwlock_destroy( &rwlock );
<font color='#880000'>- rtems_test_assert( status == 0 );
</font><font color='#000088'>+ rtems_test_assert( status == 0 );
</font>
/*************** CREATE THREADS AND LET THEM OBTAIN READLOCK ***************/
puts( "pthread_rwlock_init( &RWLock, &attr ) -- OK" );
status = pthread_rwlock_init( &RWLock, &attr );
<font color='#880000'>- rtems_test_assert( status == 0 );
</font><font color='#000088'>+ rtems_test_assert( status == 0 );
</font>
puts( "pthread_rwlock_tryrdlock(RWLock) -- OK" );
status = pthread_rwlock_tryrdlock(&RWLock);
<font color='#880000'>- rtems_test_assert( !status );
</font><font color='#000088'>+ rtems_test_assert( !status );
</font>
for (i=0 ; i<NUMBER_THREADS ; i++ ) {
printf( "Init: pthread_create - thread %d OK\n", i+1 );
status = pthread_create(&ThreadIds[i], NULL, ReadLockThread, &ThreadIds[i]);
<font color='#880000'>- rtems_test_assert( !status );
</font><font color='#000088'>+ rtems_test_assert( !status );
</font>
sleep(1);
}
puts( "pthread_rwlock_unlock(RWLock) -- OK" );
status = pthread_rwlock_unlock(&RWLock);
<font color='#880000'>- rtems_test_assert( !status );
</font><font color='#000088'>+ rtems_test_assert( !status );
</font>
sleep(1);
/*************** CREATE THREADS AND LET THEM OBTAIN READLOCK ***************/
puts( "pthread_rwlock_trywrlock(RWLock) -- OK" );
status = pthread_rwlock_trywrlock(&RWLock);
<font color='#880000'>- rtems_test_assert( !status );
</font><font color='#000088'>+ rtems_test_assert( !status );
</font>
puts( "pthread_rwlock_tryrdlock(&RWLock) -- EBUSY" );
status = pthread_rwlock_tryrdlock(&RWLock);
<font color='#880000'>- rtems_test_assert( status == EBUSY );
</font><font color='#000088'>+ rtems_test_assert( status == EBUSY );
</font>
for (i=0 ; i<NUMBER_THREADS ; i++ ) {
printf( "Init: pthread_create - thread %d OK\n", i+1 );
status = pthread_create(&ThreadIds[i], NULL, ReadLockThread, &ThreadIds[i]);
<font color='#880000'>- rtems_test_assert( !status );
</font><font color='#000088'>+ rtems_test_assert( !status );
</font>
sleep(1);
}
<font color='#997700'>@@ -330,101 +330,101 @@
</font> /* Attempt delete while threads are blocked */
puts( "pthread_rwlock_destroy( &RWLock ) -- EBUSY" );
status = pthread_rwlock_destroy( &RWLock );
<font color='#880000'>- rtems_test_assert( status == EBUSY );
</font><font color='#000088'>+ rtems_test_assert( status == EBUSY );
</font>
/* now unlock it so the threads can continue */
puts( "pthread_rwlock_unlock(RWLock) -- OK" );
status = pthread_rwlock_unlock(&RWLock);
<font color='#880000'>- rtems_test_assert( !status );
</font><font color='#000088'>+ rtems_test_assert( !status );
</font>
sleep(2);
/*************** CREATE THREADS AND LET THEM OBTAIN WRITE LOCK *************/
puts( "pthread_rwlock_trywrlock(RWLock) -- OK" );
status = pthread_rwlock_trywrlock(&RWLock);
<font color='#880000'>- rtems_test_assert( !status );
</font><font color='#000088'>+ rtems_test_assert( !status );
</font>
puts( "pthread_rwlock_trywrlock(&RWLock) -- EBUSY" );
status = pthread_rwlock_trywrlock(&RWLock);
<font color='#880000'>- rtems_test_assert( status == EBUSY );
</font><font color='#000088'>+ rtems_test_assert( status == EBUSY );
</font>
for (i=0 ; i<NUMBER_THREADS ; i++ ) {
printf( "Init: pthread_create - thread %d OK\n", i+1 );
status =
pthread_create(&ThreadIds[i], NULL, WriteLockThread, &ThreadIds[i]);
<font color='#880000'>- rtems_test_assert( !status );
</font><font color='#000088'>+ rtems_test_assert( !status );
</font>
sleep(1);
}
puts( "pthread_rwlock_unlock(RWLock) -- OK" );
status = pthread_rwlock_unlock(&RWLock);
<font color='#880000'>- rtems_test_assert( !status );
</font><font color='#000088'>+ rtems_test_assert( !status );
</font>
sleep(2);
/*************** TIMEOUT ON RWLOCK ***************/
puts( "clock_gettime(CLOCK_REALTIME, &abstime) -- OK" );
status = clock_gettime( CLOCK_REALTIME, &abstime );
<font color='#880000'>- rtems_test_assert( !status );
</font><font color='#000088'>+ rtems_test_assert( !status );
</font>
abstime.tv_sec += 1;
puts( "pthread_rwlock_timedwrlock( &RWLock, &abstime) -- OK" );
status = pthread_rwlock_timedwrlock( &RWLock, &abstime );
<font color='#880000'>- rtems_test_assert( status == 0 );
</font><font color='#000088'>+ rtems_test_assert( status == 0 );
</font>
abstime.tv_sec += 1;
puts( "pthread_rwlock_timedrdlock( &RWLock, &abstime) -- ETIMEDOUT" );
status = pthread_rwlock_timedrdlock( &RWLock, &abstime );
<font color='#880000'>- rtems_test_assert( status == ETIMEDOUT );
</font><font color='#000088'>+ rtems_test_assert( status == ETIMEDOUT );
</font>
abstime.tv_sec -= 1;
puts( "pthread_rwlock_timedrdlock( &RWLock, &abstime) -- ETIMEDOUT" );
status = pthread_rwlock_timedrdlock( &RWLock, &abstime );
<font color='#880000'>- rtems_test_assert( status == ETIMEDOUT );
</font><font color='#000088'>+ rtems_test_assert( status == ETIMEDOUT );
</font>
abstime.tv_sec -= 1;
puts( "pthread_rwlock_timedwrlock( &RWLock, &abstime) -- ETIMEDOUT" );
status = pthread_rwlock_timedwrlock( &RWLock, &abstime );
<font color='#880000'>- rtems_test_assert( status == ETIMEDOUT );
</font><font color='#000088'>+ rtems_test_assert( status == ETIMEDOUT );
</font>
/*************** OBTAIN RWLOCK WITH ABSTIME IN PAST ***************/
status = pthread_rwlock_unlock(&RWLock);
<font color='#880000'>- rtems_test_assert( !status );
</font><font color='#000088'>+ rtems_test_assert( !status );
</font>
abstime.tv_sec -= 1;
puts( "pthread_rwlock_timedrdlock( &RWLock, &abstime) -- in past -- OK" );
status = pthread_rwlock_timedrdlock( &RWLock, &abstime );
<font color='#880000'>- rtems_test_assert( status == 0 );
</font><font color='#000088'>+ rtems_test_assert( status == 0 );
</font>
/*************** OBTAIN RWLOCK FOR WRITE WITH ABSTIME IN PAST ***************/
status = pthread_rwlock_unlock(&RWLock);
<font color='#880000'>- rtems_test_assert( !status );
</font><font color='#000088'>+ rtems_test_assert( !status );
</font>
abstime.tv_sec -= 1;
puts( "pthread_rwlock_timedwrlock( &RWLock, &abstime) -- in past -- OK" );
status = pthread_rwlock_timedwrlock( &RWLock, &abstime );
<font color='#880000'>- rtems_test_assert( status == 0 );
</font><font color='#000088'>+ rtems_test_assert( status == 0 );
</font>
/*************** DESTROY RWLOCK ***************/
puts( "pthread_rwlock_destroy( &RWLock ) -- OK" );
status = pthread_rwlock_destroy( &RWLock );
<font color='#880000'>- rtems_test_assert( status == 0 );
</font><font color='#000088'>+ rtems_test_assert( status == 0 );
</font>
/*************** OBTAIN A LOCK AND THEN RELEASE IT TWICE ***************/
puts( "pthread_rwlock_init( &rwlock, NULL ) -- OK" );
status = pthread_rwlock_init( &rwlock, NULL );
<font color='#880000'>- rtems_test_assert( status == 0 );
- rtems_test_assert( rwlock != 0 );
</font><font color='#000088'>+ rtems_test_assert( status == 0 );
+ rtems_test_assert( rwlock != 0 );
</font>
puts( "pthread_rwlock_unlock ( &rwlock ) -- OK" );
status = pthread_rwlock_unlock( &rwlock );
<font color='#880000'>- rtems_test_assert( status == 0 );
</font><font color='#000088'>+ rtems_test_assert( status == 0 );
</font>
puts( "pthread_rwlock_unlock ( &rwlock ) -- OK" );
status = pthread_rwlock_unlock( &rwlock );
<font color='#880000'>- rtems_test_assert( status == 0 );
</font><font color='#000088'>+ rtems_test_assert( status == 0 );
</font>
/*************** END OF TEST *****************/
puts( "*** END OF POSIX RWLOCK TEST 01 ***" );
<font color='#006600'>diff -u rtems/testsuites/psxtests/psxsem01/init.c:1.18 rtems/testsuites/psxtests/psxsem01/init.c:1.19
--- rtems/testsuites/psxtests/psxsem01/init.c:1.18 Tue Dec 8 11:52:53 2009
+++ rtems/testsuites/psxtests/psxsem01/init.c Thu Oct 21 16:22:25 2010
</font><font color='#997700'>@@ -178,7 +178,7 @@
</font>
puts( "Init: sem_open - sem1 SUCCESSFUL" );
n_sem1 = sem_open( "sem1",O_CREAT, 0777, 1 );
<font color='#880000'>- rtems_test_assert( n_sem1 != SEM_FAILED );
</font><font color='#000088'>+ rtems_test_assert( n_sem1 != SEM_FAILED );
</font>
puts( "Init: sem_destroy - named sem1 - EINVAL" );
status = sem_destroy(n_sem1);
<font color='#997700'>@@ -218,7 +218,7 @@
</font>
puts( "Init: sem_open - Open an existing sem ( same id )" );
n_sem2 = sem_open("sem1", 0 );
<font color='#880000'>- rtems_test_assert( n_sem2 == n_sem1 );
</font><font color='#000088'>+ rtems_test_assert( n_sem2 == n_sem1 );
</font>
/*
* Unlink the semaphore, then verify an open of the same name produces a
<font color='#997700'>@@ -231,8 +231,8 @@
</font>
puts( "Init: sem_open - Reopen sem1 SUCCESSFUL with a different id" );
n_sem2 = sem_open( "sem1", O_CREAT | O_EXCL, 0777, 1);
<font color='#880000'>- rtems_test_assert( n_sem2 != SEM_FAILED );
- rtems_test_assert( n_sem2 != n_sem1 );
</font><font color='#000088'>+ rtems_test_assert( n_sem2 != SEM_FAILED );
+ rtems_test_assert( n_sem2 != n_sem1 );
</font>
/*
* Validate we can call close on a semaphore opened with sem_open.
<font color='#997700'>@@ -289,7 +289,7 @@
</font> 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");
<font color='#880000'>- rtems_test_assert( (status == -1) && (errno == ENOENT) );
</font><font color='#000088'>+ rtems_test_assert( (status == -1) && (errno == ENOENT) );
</font>
/* Try adding in unlinking before closing... (can we still open?) */
<font color='#006600'>diff -u rtems/testsuites/psxtests/psxsignal01/init.c:1.8 rtems/testsuites/psxtests/psxsignal01/init.c:1.9
--- rtems/testsuites/psxtests/psxsignal01/init.c:1.8 Tue Dec 8 11:52:53 2009
+++ rtems/testsuites/psxtests/psxsignal01/init.c Thu Oct 21 16:22:25 2010
</font><font color='#997700'>@@ -124,23 +124,23 @@
</font>
/* unblock Signal and see if it happened */
status = sigemptyset( &mask );
<font color='#880000'>- rtems_test_assert( !status );
</font><font color='#000088'>+ rtems_test_assert( !status );
</font>
status = sigaddset( &mask, SIGUSR1 );
<font color='#880000'>- rtems_test_assert( !status );
</font><font color='#000088'>+ rtems_test_assert( !status );
</font>
status = sigaddset( &mask, SIGFPE );
<font color='#880000'>- rtems_test_assert( !status );
</font><font color='#000088'>+ rtems_test_assert( !status );
</font>
status = sigaddset( &mask, SIGILL );
<font color='#880000'>- rtems_test_assert( !status );
</font><font color='#000088'>+ rtems_test_assert( !status );
</font>
status = sigaddset( &mask, SIGSEGV );
<font color='#880000'>- rtems_test_assert( !status );
</font><font color='#000088'>+ rtems_test_assert( !status );
</font>
puts( "Init: Unblock SIGUSR1 SIGFPE SIGILL SIGSEGV" );
status = sigprocmask( SIG_UNBLOCK, &mask, NULL );
<font color='#880000'>- rtems_test_assert( !status );
</font><font color='#000088'>+ rtems_test_assert( !status );
</font>
/* install a signal handler for SIGUSR1 */
Signal_occurred = 0;
<font color='#006600'>diff -u rtems/testsuites/psxtests/psxsignal01/task1.c:1.2 rtems/testsuites/psxtests/psxsignal01/task1.c:1.3
--- rtems/testsuites/psxtests/psxsignal01/task1.c:1.2 Tue Dec 8 11:52:53 2009
+++ rtems/testsuites/psxtests/psxsignal01/task1.c Thu Oct 21 16:22:25 2010
</font><font color='#997700'>@@ -30,7 +30,7 @@
</font>
seconds = sleep( 5 );
printf( "Task_1: %d seconds left\n", seconds );
<font color='#880000'>- rtems_test_assert( seconds );
</font><font color='#000088'>+ rtems_test_assert( seconds );
</font>
/* switch to Init */
<font color='#006600'>diff -u rtems/testsuites/psxtests/psxsignal02/init.c:1.6 rtems/testsuites/psxtests/psxsignal02/init.c:1.7
--- rtems/testsuites/psxtests/psxsignal02/init.c:1.6 Tue Dec 8 11:52:53 2009
+++ rtems/testsuites/psxtests/psxsignal02/init.c Thu Oct 21 16:22:25 2010
</font><font color='#997700'>@@ -35,14 +35,14 @@
</font> sigset_t mask;
sc = sigemptyset( &mask );
<font color='#880000'>- rtems_test_assert( !sc );
</font><font color='#000088'>+ rtems_test_assert( !sc );
</font>
sc = sigaddset( &mask, SIGUSR1 );
<font color='#880000'>- rtems_test_assert( !sc );
</font><font color='#000088'>+ rtems_test_assert( !sc );
</font>
printf( "%s - Unblock SIGUSR1\n", task_name );
sc = pthread_sigmask( SIG_UNBLOCK, &mask, NULL );
<font color='#880000'>- rtems_test_assert( !sc );
</font><font color='#000088'>+ rtems_test_assert( !sc );
</font> }
/*
<font color='#997700'>@@ -137,43 +137,43 @@
</font>
puts( "Init - Raise my priority" );
sc = pthread_attr_init( &attr );
<font color='#880000'>- rtems_test_assert( !sc );
</font><font color='#000088'>+ rtems_test_assert( !sc );
</font>
param.sched_priority = 30;
sc = pthread_setschedparam( pthread_self(), SCHED_RR, ¶m );
<font color='#880000'>- rtems_test_assert( !sc );
</font><font color='#000088'>+ rtems_test_assert( !sc );
</font>
for ( i=0, test=Threads ; test->priority != -1 ; i++, test++ ) {
printf( "Init - Create thread %d, priority=%d\n", i, test->priority );
sc = pthread_attr_init( &attr );
<font color='#880000'>- rtems_test_assert( !sc );
</font><font color='#000088'>+ rtems_test_assert( !sc );
</font>
sc = pthread_attr_setinheritsched( &attr, PTHREAD_EXPLICIT_SCHED );
<font color='#880000'>- rtems_test_assert( !sc );
</font><font color='#000088'>+ rtems_test_assert( !sc );
</font>
sc = pthread_attr_setschedpolicy( &attr, SCHED_RR );
<font color='#880000'>- rtems_test_assert( !sc );
</font><font color='#000088'>+ rtems_test_assert( !sc );
</font>
param.sched_priority = test->priority;
sc = pthread_attr_setschedparam( &attr, ¶m );
<font color='#880000'>- rtems_test_assert( !sc );
</font><font color='#000088'>+ rtems_test_assert( !sc );
</font>
sc = pthread_create( &id, &attr, Test_Thread, test );
<font color='#880000'>- rtems_test_assert( !sc );
</font><font color='#000088'>+ rtems_test_assert( !sc );
</font>
puts( "Init - sleep - let thread settle - OK" );
delay_request.tv_sec = 0;
delay_request.tv_nsec = 50000000;
sc = nanosleep( &delay_request, NULL );
<font color='#880000'>- rtems_test_assert( !sc );
</font><font color='#000088'>+ rtems_test_assert( !sc );
</font> }
puts( "Init - sending SIGUSR1" );
sc = kill( getpid(), SIGUSR1 );
<font color='#880000'>- rtems_test_assert( !sc );
</font><font color='#000088'>+ rtems_test_assert( !sc );
</font>
/* we are just scheduling the signal, not delivering it */
<font color='#880000'>- rtems_test_assert( Signal_occurred == false );
</font><font color='#000088'>+ rtems_test_assert( Signal_occurred == false );
</font>
puts( "*** END OF POSIX TEST SIGNAL 02 ***" );
rtems_test_exit(0);
<font color='#006600'>diff -u rtems/testsuites/psxtests/psxsignal03/init.c:1.10 rtems/testsuites/psxtests/psxsignal03/init.c:1.11
--- rtems/testsuites/psxtests/psxsignal03/init.c:1.10 Tue Dec 8 11:52:53 2009
+++ rtems/testsuites/psxtests/psxsignal03/init.c Thu Oct 21 16:22:25 2010
</font><font color='#997700'>@@ -94,35 +94,35 @@
</font>
/* build unblocked mask */
sc = sigemptyset( &mask );
<font color='#880000'>- rtems_test_assert( !sc );
</font><font color='#000088'>+ rtems_test_assert( !sc );
</font>
printf( "%s - Unblock %s\n", name, signal_name(SIGNAL_ONE) );
sc = sigaddset( &mask, SIGNAL_ONE );
<font color='#880000'>- rtems_test_assert( !sc );
</font><font color='#000088'>+ rtems_test_assert( !sc );
</font>
if ( !blocked ) {
printf( "%s - Unblock %s\n", name, signal_name(SIGNAL_TWO) );
sc = sigaddset( &mask, SIGNAL_TWO );
<font color='#880000'>- rtems_test_assert( !sc );
</font><font color='#000088'>+ rtems_test_assert( !sc );
</font> }
/* unblocked signals */
sc = pthread_sigmask( SIG_UNBLOCK, &mask, NULL );
<font color='#880000'>- rtems_test_assert( !sc );
</font><font color='#000088'>+ rtems_test_assert( !sc );
</font>
/* build wait mask */
sc = sigemptyset( &wait_mask );
<font color='#880000'>- rtems_test_assert( !sc );
</font><font color='#000088'>+ rtems_test_assert( !sc );
</font>
sc = sigaddset( &wait_mask, SIGNAL_ONE );
<font color='#880000'>- rtems_test_assert( !sc );
</font><font color='#000088'>+ rtems_test_assert( !sc );
</font>
/* wait for a signal */
memset( &info, 0, sizeof(info) );
printf( "%s - Wait for %s unblocked\n", name, signal_name(SIGNAL_ONE) );
sigwaitinfo( &wait_mask, &info );
<font color='#880000'>- rtems_test_assert( !sc );
</font><font color='#000088'>+ rtems_test_assert( !sc );
</font>
printf( "%s - siginfo.si_signo=%d\n", name, info.si_signo );
printf( "%s - siginfo.si_code=%d\n", name, info.si_code );
<font color='#997700'>@@ -132,8 +132,8 @@
</font> * "implementation defined" */
printf( "%s - siginfo.si_value=0x%08" PRIxPTR "\n", name, (uintptr_t) info.si_value.sival_ptr );
<font color='#880000'>- rtems_test_assert( info.si_signo == SIGNAL_TWO );
- rtems_test_assert( info.si_code == SI_USER );
</font><font color='#000088'>+ rtems_test_assert( info.si_signo == SIGNAL_TWO );
+ rtems_test_assert( info.si_code == SI_USER );
</font>
printf( "%s - exiting\n", name );
return NULL;
<font color='#997700'>@@ -163,43 +163,43 @@
</font>
/* create threads */
sc = pthread_create( &id, NULL, Test_Thread, &falseArg );
<font color='#880000'>- rtems_test_assert( !sc );
</font><font color='#000088'>+ rtems_test_assert( !sc );
</font>
sc = pthread_create( &id, NULL, Test_Thread, &trueArg );
<font color='#880000'>- rtems_test_assert( !sc );
</font><font color='#000088'>+ rtems_test_assert( !sc );
</font>
puts( "Init - sleep - let threads settle - OK" );
delay_request.tv_sec = 0;
delay_request.tv_nsec = 5 * 100000000;
sc = nanosleep( &delay_request, NULL );
<font color='#880000'>- rtems_test_assert( !sc );
</font><font color='#000088'>+ rtems_test_assert( !sc );
</font>
puts( "Init - sleep - SignalBlocked thread settle - OK" );
sc = nanosleep( &delay_request, NULL );
<font color='#880000'>- rtems_test_assert( !sc );
</font><font color='#000088'>+ rtems_test_assert( !sc );
</font>
printf( "Init - sending %s - deliver to one thread\n",
signal_name(SIGNAL_TWO));
sc = SEND_SIGNAL( SIGNAL_TWO );
<font color='#880000'>- rtems_test_assert( !sc );
</font><font color='#000088'>+ rtems_test_assert( !sc );
</font>
printf( "Init - sending %s - deliver to other thread\n",
signal_name(SIGNAL_TWO));
sc = SEND_SIGNAL( SIGNAL_TWO );
<font color='#880000'>- rtems_test_assert( !sc );
</font><font color='#000088'>+ rtems_test_assert( !sc );
</font>
#if defined(TO_PROCESS)
printf( "Init - sending %s - expect EAGAIN\n", signal_name(SIGNAL_TWO) );
sc = SEND_SIGNAL( SIGNAL_TWO );
<font color='#880000'>- rtems_test_assert( sc == -1 );
- rtems_test_assert( errno == EAGAIN );
</font><font color='#000088'>+ rtems_test_assert( sc == -1 );
+ rtems_test_assert( errno == EAGAIN );
</font> #endif
puts( "Init - sleep - let thread report if it unblocked - OK" );
usleep(500000);
/* we are just sigwait'ing the signal, not delivering it */
<font color='#880000'>- rtems_test_assert( Signal_occurred == true );
</font><font color='#000088'>+ rtems_test_assert( Signal_occurred == true );
</font>
puts( "*** END OF POSIX TEST SIGNAL " TEST_NAME " ***" );
rtems_test_exit(0);
<font color='#006600'>diff -u rtems/testsuites/psxtests/psxsignal05/init.c:1.2 rtems/testsuites/psxtests/psxsignal05/init.c:1.3
--- rtems/testsuites/psxtests/psxsignal05/init.c:1.2 Tue Dec 8 11:52:53 2009
+++ rtems/testsuites/psxtests/psxsignal05/init.c Thu Oct 21 16:22:25 2010
</font><font color='#997700'>@@ -74,7 +74,7 @@
</font> true, /* is_global */
false /* check_blocked */
);
<font color='#880000'>- rtems_test_assert( bc );
</font><font color='#000088'>+ rtems_test_assert( bc );
</font>
puts( "*** END OF POSIX TEST SIGNAL " TEST_NAME " ***" );
rtems_test_exit(0);
<font color='#006600'>diff -u rtems/testsuites/psxtests/psxspin01/test.c:1.5 rtems/testsuites/psxtests/psxspin01/test.c:1.6
--- rtems/testsuites/psxtests/psxspin01/test.c:1.5 Tue Dec 8 15:16:02 2009
+++ rtems/testsuites/psxtests/psxspin01/test.c Thu Oct 21 16:22:25 2010
</font><font color='#997700'>@@ -34,7 +34,7 @@
</font> }
puts( "pthread_spin_lock( &Spinlock ) from Thread -- OK" );
status = pthread_spin_lock( &Spinlock );
<font color='#880000'>- rtems_test_assert( status == 0 );
</font><font color='#000088'>+ rtems_test_assert( status == 0 );
</font>
puts( "sleep to allow main thread to run" );
sleep( 1 );
<font color='#997700'>@@ -46,7 +46,7 @@
</font>
puts( "pthread_spin_unlock( &Spinlock ) from Thread -- OK" );
status = pthread_spin_unlock( &Spinlock );
<font color='#880000'>- rtems_test_assert( status == 0 );
</font><font color='#000088'>+ rtems_test_assert( status == 0 );
</font>
rtems_task_delete( RTEMS_SELF );
}
<font color='#997700'>@@ -73,96 +73,96 @@
</font>
puts( "pthread_spin_init( NULL, PTHREAD_PROCESS_PRIVATE ) -- EINVAL" );
status = pthread_spin_init( NULL, PTHREAD_PROCESS_PRIVATE );
<font color='#880000'>- rtems_test_assert( status == EINVAL );
</font><font color='#000088'>+ rtems_test_assert( status == EINVAL );
</font>
puts( "pthread_spin_init( NULL, PTHREAD_PROCESS_SHARED ) -- EINVAL" );
status = pthread_spin_init( NULL, PTHREAD_PROCESS_PRIVATE );
<font color='#880000'>- rtems_test_assert( status == EINVAL );
</font><font color='#000088'>+ rtems_test_assert( status == EINVAL );
</font>
puts( "pthread_spin_init( &spinlock, 0x1234 ) -- EINVAL" );
status = pthread_spin_init( &spinlock, 0x1234 );
<font color='#880000'>- rtems_test_assert( status == EINVAL );
</font><font color='#000088'>+ rtems_test_assert( status == EINVAL );
</font>
puts( "pthread_spin_init( &spinlock, PTHREAD_PROCESS_SHARED ) -- EINVAL" );
status = pthread_spin_init( &spinlock, PTHREAD_PROCESS_SHARED );
<font color='#880000'>- rtems_test_assert( status == EINVAL );
</font><font color='#000088'>+ rtems_test_assert( status == EINVAL );
</font>
/* This successfully creates one */
puts( "pthread_spin_init( &Spinlock, PTHREAD_PROCESS_PRIVATE ) -- OK" );
status = pthread_spin_init( &Spinlock, PTHREAD_PROCESS_PRIVATE );
<font color='#880000'>- rtems_test_assert( status == 0 );
</font><font color='#000088'>+ rtems_test_assert( status == 0 );
</font>
puts( "pthread_spin_init( &spinlock, PTHREAD_PROCESS_PRIVATE ) -- EAGAIN" );
status = pthread_spin_init( &spinlock, PTHREAD_PROCESS_PRIVATE );
<font color='#880000'>- rtems_test_assert( status == EAGAIN );
</font><font color='#000088'>+ rtems_test_assert( status == EAGAIN );
</font>
puts( "pthread_spin_init( &spinlock, PTHREAD_PROCESS_PRIVATE ) -- EAGAIN" );
status = pthread_spin_init( &spinlock, PTHREAD_PROCESS_PRIVATE );
<font color='#880000'>- rtems_test_assert( status == EAGAIN );
</font><font color='#000088'>+ rtems_test_assert( status == EAGAIN );
</font>
puts( "pthread_spin_lock( NULL ) -- EINVAL" );
status = pthread_spin_lock( NULL );
<font color='#880000'>- rtems_test_assert( status == EINVAL );
</font><font color='#000088'>+ rtems_test_assert( status == EINVAL );
</font>
puts( "pthread_spin_trylock( NULL ) -- EINVAL" );
status = pthread_spin_trylock( NULL );
<font color='#880000'>- rtems_test_assert( status == EINVAL );
</font><font color='#000088'>+ rtems_test_assert( status == EINVAL );
</font>
puts( "pthread_spin_unlock( NULL ) -- EINVAL" );
status = pthread_spin_unlock( NULL );
<font color='#880000'>- rtems_test_assert( status == EINVAL );
</font><font color='#000088'>+ rtems_test_assert( status == EINVAL );
</font>
puts( "pthread_spin_destroy( NULL ) -- EINVAL" );
status = pthread_spin_destroy( NULL );
<font color='#880000'>- rtems_test_assert( status == EINVAL );
</font><font color='#000088'>+ rtems_test_assert( status == EINVAL );
</font>
spinlock = 0;
puts( "pthread_spin_lock( &spinlock ) -- EINVAL" );
status = pthread_spin_lock( &spinlock );
<font color='#880000'>- rtems_test_assert( status == EINVAL );
</font><font color='#000088'>+ rtems_test_assert( status == EINVAL );
</font>
puts( "pthread_spin_trylock( &spinlock ) -- EINVAL" );
status = pthread_spin_trylock( &spinlock );
<font color='#880000'>- rtems_test_assert( status == EINVAL );
</font><font color='#000088'>+ rtems_test_assert( status == EINVAL );
</font>
puts( "pthread_spin_unlock( &spinlock ) -- EINVAL" );
status = pthread_spin_unlock( &spinlock );
<font color='#880000'>- rtems_test_assert( status == EINVAL );
</font><font color='#000088'>+ rtems_test_assert( status == EINVAL );
</font>
puts( "pthread_spin_destroy( &spinlock ) -- EINVAL" );
status = pthread_spin_destroy( &spinlock );
<font color='#880000'>- rtems_test_assert( status == EINVAL );
</font><font color='#000088'>+ rtems_test_assert( status == EINVAL );
</font>
puts( "pthread_spin_unlock( &Spinlock ) -- already unlocked OK" );
status = pthread_spin_unlock( &Spinlock );
<font color='#880000'>- rtems_test_assert( status == 0 );
</font><font color='#000088'>+ rtems_test_assert( status == 0 );
</font>
/* Now some basic locking and unlocking with a deadlock verification */
puts( "pthread_spin_lock( &Spinlock ) -- OK" );
status = pthread_spin_lock( &Spinlock );
<font color='#880000'>- rtems_test_assert( status == 0 );
</font><font color='#000088'>+ rtems_test_assert( status == 0 );
</font>
puts( "pthread_spin_lock( &Spinlock ) -- EDEADLK" );
status = pthread_spin_lock( &Spinlock );
<font color='#880000'>- rtems_test_assert( status == EDEADLK );
</font><font color='#000088'>+ rtems_test_assert( status == EDEADLK );
</font>
puts( "pthread_spin_trylock( &Spinlock ) -- EDEADLK" );
status = pthread_spin_trylock( &Spinlock );
<font color='#880000'>- rtems_test_assert( status == EDEADLK );
</font><font color='#000088'>+ rtems_test_assert( status == EDEADLK );
</font>
puts( "pthread_spin_unlock( &Spinlock ) -- OK" );
status = pthread_spin_unlock( &Spinlock );
<font color='#880000'>- rtems_test_assert( status == 0 );
</font><font color='#000088'>+ rtems_test_assert( status == 0 );
</font>
/* Try lock/unlock pair */
puts( "pthread_spin_trylock( &Spinlock ) -- OK" );
status = pthread_spin_trylock( &Spinlock );
<font color='#880000'>- rtems_test_assert( status == 0 );
</font><font color='#000088'>+ rtems_test_assert( status == 0 );
</font>
puts( "pthread_spin_unlock( &Spinlock ) -- OK" );
status = pthread_spin_unlock( &Spinlock );
<font color='#880000'>- rtems_test_assert( status == 0 );
</font><font color='#000088'>+ rtems_test_assert( status == 0 );
</font>
/* Let another thread lock a spinlock and we contend with it */
<font color='#997700'>@@ -177,10 +177,10 @@
</font> RTEMS_DEFAULT_ATTRIBUTES,
&taskid
);
<font color='#880000'>- rtems_test_assert( rstatus == RTEMS_SUCCESSFUL );
</font><font color='#000088'>+ rtems_test_assert( rstatus == RTEMS_SUCCESSFUL );
</font>
rstatus = rtems_task_start( taskid, SpinlockThread, 0 );
<font color='#880000'>- rtems_test_assert( rstatus == RTEMS_SUCCESSFUL );
</font><font color='#000088'>+ rtems_test_assert( rstatus == RTEMS_SUCCESSFUL );
</font> /* We should be preempted immediately. The thread is expected to:
* + verify we haven't set the main thread spinning flag
* + lock the spinlock
<font color='#997700'>@@ -190,7 +190,7 @@
</font> mainThreadSpinning = 1;
puts( "pthread_spin_lock( &Spinlock ) -- OK" );
status = pthread_spin_lock( &Spinlock );
<font color='#880000'>- rtems_test_assert( status == 0 );
</font><font color='#000088'>+ rtems_test_assert( status == 0 );
</font>
/* The thread wakes up, unlocks spin lock, and deletes itself.
* So when we get back here, about a second has passed and we now
<font color='#997700'>@@ -200,16 +200,16 @@
</font> /* spin lock should be locked when we return so destroying it gives busy */
puts( "pthread_spin_destroy( &Spinlock ) -- EBUSY" );
status = pthread_spin_destroy( &Spinlock );
<font color='#880000'>- rtems_test_assert( status == EBUSY );
</font><font color='#000088'>+ rtems_test_assert( status == EBUSY );
</font>
/* Unlock it for a normal destroy */
puts( "pthread_spin_unlock( &Spinlock ) -- OK" );
status = pthread_spin_unlock( &Spinlock );
<font color='#880000'>- rtems_test_assert( status == 0 );
</font><font color='#000088'>+ rtems_test_assert( status == 0 );
</font>
puts( "pthread_spin_destroy( &Spinlock ) -- OK" );
status = pthread_spin_destroy( &Spinlock );
<font color='#880000'>- rtems_test_assert( status == 0 );
</font><font color='#000088'>+ rtems_test_assert( status == 0 );
</font>
/*************** END OF TEST *****************/
puts( "*** END OF POSIX SPINLOCK TEST 01 ***" );
<font color='#006600'>diff -u rtems/testsuites/psxtests/psxspin02/test.c:1.5 rtems/testsuites/psxtests/psxspin02/test.c:1.6
--- rtems/testsuites/psxtests/psxspin02/test.c:1.5 Tue Dec 8 15:16:02 2009
+++ rtems/testsuites/psxtests/psxspin02/test.c Thu Oct 21 16:22:25 2010
</font><font color='#997700'>@@ -28,11 +28,11 @@
</font>
puts( "pthread_spin_trylock( &Spinlock ) -- EBUSY" );
status = pthread_spin_trylock( &Spinlock );
<font color='#880000'>- rtems_test_assert( status == EBUSY );
</font><font color='#000088'>+ rtems_test_assert( status == EBUSY );
</font>
puts( "pthread_spin_unlock( &Spinlock ) -- EPERM" );
status = pthread_spin_unlock( &Spinlock );
<font color='#880000'>- rtems_test_assert( status == EPERM );
</font><font color='#000088'>+ rtems_test_assert( status == EPERM );
</font>
rtems_task_delete( RTEMS_SELF );
}
<font color='#997700'>@@ -59,12 +59,12 @@
</font> /* This successfully creates one */
puts( "pthread_spin_init( &Spinlock, PTHREAD_PROCESS_PRIVATE ) -- OK" );
status = pthread_spin_init( &Spinlock, PTHREAD_PROCESS_PRIVATE );
<font color='#880000'>- rtems_test_assert( status == 0 );
</font><font color='#000088'>+ rtems_test_assert( status == 0 );
</font>
/* Lock it */
puts( "pthread_spin_lock( &Spinlock ) -- OK" );
status = pthread_spin_lock( &Spinlock );
<font color='#880000'>- rtems_test_assert( status == 0 );
</font><font color='#000088'>+ rtems_test_assert( status == 0 );
</font>
/* Create a helper task */
rstatus = rtems_task_create(
<font color='#997700'>@@ -75,20 +75,20 @@
</font> RTEMS_DEFAULT_ATTRIBUTES,
&taskid
);
<font color='#880000'>- rtems_test_assert( rstatus == RTEMS_SUCCESSFUL );
</font><font color='#000088'>+ rtems_test_assert( rstatus == RTEMS_SUCCESSFUL );
</font>
rstatus = rtems_task_start( taskid, SpinlockThread, 0 );
<font color='#880000'>- rtems_test_assert( rstatus == RTEMS_SUCCESSFUL );
</font><font color='#000088'>+ rtems_test_assert( rstatus == RTEMS_SUCCESSFUL );
</font>
sleep(1);
puts( "pthread_spin_unlock( &Spinlock ) -- OK" );
status = pthread_spin_unlock( &Spinlock );
<font color='#880000'>- rtems_test_assert( status == 0 );
</font><font color='#000088'>+ rtems_test_assert( status == 0 );
</font>
puts( "pthread_spin_destroy( &Spinlock ) -- OK" );
status = pthread_spin_destroy( &Spinlock );
<font color='#880000'>- rtems_test_assert( status == 0 );
</font><font color='#000088'>+ rtems_test_assert( status == 0 );
</font>
/*************** END OF TEST *****************/
puts( "*** END OF POSIX SPINLOCK TEST 02 ***" );
<font color='#006600'>diff -u rtems/testsuites/psxtests/psxstack01/init.c:1.6 rtems/testsuites/psxtests/psxstack01/init.c:1.7
--- rtems/testsuites/psxtests/psxstack01/init.c:1.6 Mon Oct 4 10:53:45 2010
+++ rtems/testsuites/psxtests/psxstack01/init.c Thu Oct 21 16:22:25 2010
</font><font color='#997700'>@@ -60,23 +60,23 @@
</font>
puts( "Init - Initialize thread attribute for user provided stack" );
sc = pthread_attr_init( &attr );
<font color='#880000'>- rtems_test_assert( !sc );
</font><font color='#000088'>+ rtems_test_assert( !sc );
</font>
sc = pthread_attr_setstackaddr( &attr, Stack_Low );
<font color='#880000'>- rtems_test_assert( !sc );
</font><font color='#000088'>+ rtems_test_assert( !sc );
</font>
sc = pthread_attr_setstacksize( &attr, PTHREAD_MINIMUM_STACK_SIZE );
<font color='#880000'>- rtems_test_assert( !sc );
</font><font color='#000088'>+ rtems_test_assert( !sc );
</font>
/* create threads */
sc = pthread_create( &id, &attr, Test_Thread, NULL );
<font color='#880000'>- rtems_test_assert( !sc );
</font><font color='#000088'>+ rtems_test_assert( !sc );
</font>
puts( "Init - let other thread run" );
delay_request.tv_sec = 0;
delay_request.tv_nsec = 5 * 100000000;
sc = nanosleep( &delay_request, NULL );
<font color='#880000'>- rtems_test_assert( !sc );
</font><font color='#000088'>+ rtems_test_assert( !sc );
</font>
puts( "*** END OF POSIX STACK ATTRIBUTE TEST 01 ***" );
rtems_test_exit(0);
<font color='#006600'>diff -u rtems/testsuites/psxtests/psxstack02/init.c:1.1 rtems/testsuites/psxtests/psxstack02/init.c:1.2
--- rtems/testsuites/psxtests/psxstack02/init.c:1.1 Mon Oct 4 10:53:45 2010
+++ rtems/testsuites/psxtests/psxstack02/init.c Thu Oct 21 16:22:25 2010
</font><font color='#997700'>@@ -63,14 +63,14 @@
</font>
puts( "Init - Initialize thread attribute for user provided stack" );
sc = pthread_attr_init( &attr );
<font color='#880000'>- rtems_test_assert( !sc );
</font><font color='#000088'>+ rtems_test_assert( !sc );
</font>
sc = pthread_attr_setstack( &attr, Stack_Low, PTHREAD_MINIMUM_STACK_SIZE );
<font color='#880000'>- rtems_test_assert( !sc );
</font><font color='#000088'>+ rtems_test_assert( !sc );
</font>
/* create threads */
sc = pthread_create( &id, &attr, Test_Thread, NULL );
<font color='#880000'>- rtems_test_assert( !sc );
</font><font color='#000088'>+ rtems_test_assert( !sc );
</font>
puts( "Init - let other thread run" );
delay_request.tv_sec = 0;
<font color='#006600'>diff -u rtems/testsuites/psxtests/psxualarm/init.c:1.4 rtems/testsuites/psxtests/psxualarm/init.c:1.5
--- rtems/testsuites/psxtests/psxualarm/init.c:1.4 Tue Dec 8 11:52:53 2009
+++ rtems/testsuites/psxtests/psxualarm/init.c Thu Oct 21 16:22:25 2010
</font><font color='#997700'>@@ -79,12 +79,12 @@
</font>
/* unblock Signal and see if it happened */
status = sigemptyset( &mask );
<font color='#880000'>- rtems_test_assert( !status );
</font><font color='#000088'>+ rtems_test_assert( !status );
</font> status = sigaddset( &mask, SIGALRM );
<font color='#880000'>- rtems_test_assert( !status );
</font><font color='#000088'>+ rtems_test_assert( !status );
</font> puts( "Init: Unblock SIGALRM" );
status = sigprocmask( SIG_UNBLOCK, &mask, NULL );
<font color='#880000'>- rtems_test_assert( !status );
</font><font color='#000088'>+ rtems_test_assert( !status );
</font> status = sleep(10);
/* stop ularm */
</pre>
<p> </p>
<a name='cs2'></a>
<table border='0' cellspacing='0' cellpadding='5' width='100%' bgcolor='#eeeeee'>
<tr><td colspan='3' bgcolor='#dddddd'>
<font color='#bb2222'><strong>joel</strong></font>
</td></tr>
<tr><td colspan='3' bgcolor='#dddddd'><pre>2010-10-21 Joel Sherrill <joel.sherrill@oarcorp.com>
* Makefile.am, configure.ac: New test to ensure pthread_cond_wait() and
sleep() (e.g. interruptible blocking and sleeping) are interruptible
by signal.
* psxsignal06/.cvsignore, psxsignal06/Makefile.am, psxsignal06/init.c,
psxsignal06/psxsignal06.doc, psxsignal06/psxsignal06.scn: New files.
</pre></td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/testsuites/psxtests/ChangeLog.diff?r1=text&tr1=1.321&r2=text&tr2=1.322&diff_format=h">M</a></td><td width='1%'>1.322</td><td width='100%'>testsuites/psxtests/ChangeLog</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/testsuites/psxtests/Makefile.am.diff?r1=text&tr1=1.71&r2=text&tr2=1.72&diff_format=h">M</a></td><td width='1%'>1.72</td><td width='100%'>testsuites/psxtests/Makefile.am</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/testsuites/psxtests/configure.ac.diff?r1=text&tr1=1.77&r2=text&tr2=1.78&diff_format=h">M</a></td><td width='1%'>1.78</td><td width='100%'>testsuites/psxtests/configure.ac</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/testsuites/psxtests/psxsignal06/.cvsignore?rev=1.1&content-type=text/vnd.viewcvs-markup">A</a></td><td width='1%'><font color="#000088">1.1</font></td><td width='100%'><font color="#000088">testsuites/psxtests/psxsignal06/.cvsignore</font></td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/testsuites/psxtests/psxsignal06/Makefile.am?rev=1.1&content-type=text/vnd.viewcvs-markup">A</a></td><td width='1%'><font color="#000088">1.1</font></td><td width='100%'><font color="#000088">testsuites/psxtests/psxsignal06/Makefile.am</font></td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/testsuites/psxtests/psxsignal06/init.c?rev=1.1&content-type=text/vnd.viewcvs-markup">A</a></td><td width='1%'><font color="#000088">1.1</font></td><td width='100%'><font color="#000088">testsuites/psxtests/psxsignal06/init.c</font></td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/testsuites/psxtests/psxsignal06/psxsignal06.doc?rev=1.1&content-type=text/vnd.viewcvs-markup">A</a></td><td width='1%'><font color="#000088">1.1</font></td><td width='100%'><font color="#000088">testsuites/psxtests/psxsignal06/psxsignal06.doc</font></td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/testsuites/psxtests/psxsignal06/psxsignal06.scn?rev=1.1&content-type=text/vnd.viewcvs-markup">A</a></td><td width='1%'><font color="#000088">1.1</font></td><td width='100%'><font color="#000088">testsuites/psxtests/psxsignal06/psxsignal06.scn</font></td></tr>
</table>
<pre>
<font color='#006600'>diff -u rtems/testsuites/psxtests/ChangeLog:1.321 rtems/testsuites/psxtests/ChangeLog:1.322
--- rtems/testsuites/psxtests/ChangeLog:1.321 Thu Oct 21 16:22:24 2010
+++ rtems/testsuites/psxtests/ChangeLog Thu Oct 21 17:05:17 2010
</font><font color='#997700'>@@ -1,5 +1,13 @@
</font> 2010-10-21 Joel Sherrill <joel.sherrill@oarcorp.com>
<font color='#000088'>+ * Makefile.am, configure.ac: New test to ensure pthread_cond_wait() and
+ sleep() (e.g. interruptible blocking and sleeping) are interruptible
+ by signal.
+ * psxsignal06/.cvsignore, psxsignal06/Makefile.am, psxsignal06/init.c,
+ psxsignal06/psxsignal06.doc, psxsignal06/psxsignal06.scn: New files.
+
+2010-10-21 Joel Sherrill <joel.sherrill@oarcorp.com>
+
</font> * psx02/init.c, psx02/task.c, psx03/init.c, psx04/init.c,
psx04/task1.c, psx04/task2.c, psx04/task3.c, psx05/init.c,
psx05/task.c, psx05/task2.c, psx05/task3.c, psx06/init.c,
<font color='#006600'>diff -u rtems/testsuites/psxtests/Makefile.am:1.71 rtems/testsuites/psxtests/Makefile.am:1.72
--- rtems/testsuites/psxtests/Makefile.am:1.71 Mon Oct 4 10:53:45 2010
+++ rtems/testsuites/psxtests/Makefile.am Thu Oct 21 17:05:17 2010
</font><font color='#997700'>@@ -13,7 +13,8 @@
</font> psxcond01 psxenosys psxkey01 psxkey02 psxkey03 \
psxitimer psxmsgq01 psxmsgq02 psxmsgq03 psxmsgq04 \
psxmutexattr01 psxobj01 psxrwlock01 psxsem01 psxsignal01 psxsignal02 \
<font color='#880000'>- psxsignal03 psxsignal04 psxsignal05 psxspin01 psxspin02 psxsysconf \
</font><font color='#000088'>+ psxsignal03 psxsignal04 psxsignal05 psxsignal06 \
+ psxspin01 psxspin02 psxsysconf \
</font> psxtime psxtimer01 psxtimer02 psxualarm psxusleep psxfatal01 psxfatal02 \
psxintrcritical01 psxstack01 psxstack02
endif
<font color='#006600'>diff -u rtems/testsuites/psxtests/configure.ac:1.77 rtems/testsuites/psxtests/configure.ac:1.78
--- rtems/testsuites/psxtests/configure.ac:1.77 Mon Oct 4 10:53:45 2010
+++ rtems/testsuites/psxtests/configure.ac Thu Oct 21 17:05:17 2010
</font><font color='#997700'>@@ -142,6 +142,7 @@
</font> psxsignal03/Makefile
psxsignal04/Makefile
psxsignal05/Makefile
<font color='#000088'>+psxsignal06/Makefile
</font> psxspin01/Makefile
psxspin02/Makefile
psxstack01/Makefile
<font color='#006600'>diff -u /dev/null rtems/testsuites/psxtests/psxsignal06/.cvsignore:1.1
--- /dev/null Thu Oct 21 17:10:57 2010
+++ rtems/testsuites/psxtests/psxsignal06/.cvsignore Thu Oct 21 17:05:17 2010
</font><font color='#997700'>@@ -0,0 +1,2 @@
</font><font color='#000088'>+Makefile
+Makefile.in
</font>
<font color='#006600'>diff -u /dev/null rtems/testsuites/psxtests/psxsignal06/Makefile.am:1.1
--- /dev/null Thu Oct 21 17:10:57 2010
+++ rtems/testsuites/psxtests/psxsignal06/Makefile.am Thu Oct 21 17:05:17 2010
</font><font color='#997700'>@@ -0,0 +1,25 @@
</font><font color='#000088'>+##
+## $Id$
+##
+
+rtems_tests_PROGRAMS = psxsignal06
+psxsignal06_SOURCES = init.c
+
+dist_rtems_tests_DATA = psxsignal06.scn
+dist_rtems_tests_DATA += psxsignal06.doc
+
+include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
+include $(top_srcdir)/../automake/compile.am
+include $(top_srcdir)/../automake/leaf.am
+
+AM_CPPFLAGS += -I$(top_srcdir)/include
+AM_CPPFLAGS += -I$(top_srcdir)/../support/include
+
+LINK_OBJS = $(psxsignal06_OBJECTS) $(psxsignal06_LDADD)
+LINK_LIBS = $(psxsignal06_LDLIBS)
+
+psxsignal06$(EXEEXT): $(psxsignal06_OBJECTS) $(psxsignal06_DEPENDENCIES)
+ @rm -f psxsignal06$(EXEEXT)
+ $(make-exe)
+
+include $(top_srcdir)/../automake/local.am
</font>
<font color='#006600'>diff -u /dev/null rtems/testsuites/psxtests/psxsignal06/init.c:1.1
--- /dev/null Thu Oct 21 17:10:57 2010
+++ rtems/testsuites/psxtests/psxsignal06/init.c Thu Oct 21 17:05:17 2010
</font><font color='#997700'>@@ -0,0 +1,124 @@
</font><font color='#000088'>+/*
+ * COPYRIGHT (c) 1989-2010.
+ * 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 <tmacros.h>
+#include "test_support.h"
+#include <pthread.h>
+#include <errno.h>
+
+pthread_t ThreadId;
+pthread_cond_t CondVarId;
+pthread_mutex_t MutexId;
+
+void Handler(
+ int signo
+)
+{
+}
+
+void *TestThread(
+ void *argument
+)
+{
+ int status;
+ sigset_t mask;
+ struct sigaction act;
+ unsigned int left;
+
+ /* unblock SIGUSR1 */
+ status = sigemptyset( &mask );
+ rtems_test_assert( !status );
+
+ status = sigaddset( &mask, SIGUSR1 );
+ rtems_test_assert( !status );
+
+ puts( "Test: Unblock SIGUSR1" );
+ status = sigprocmask( SIG_UNBLOCK, &mask, NULL );
+ rtems_test_assert( !status );
+
+ /* install a signal handler for SIGUSR1 */
+ act.sa_handler = Handler;
+ act.sa_flags = 0;
+ sigaction( SIGUSR1, &act, NULL );
+
+ /* interrupting condition wait returns 0 */
+ puts( "Test: pthread_cond_wait - OK" );
+ status = pthread_cond_wait( &CondVarId, &MutexId );
+ rtems_test_assert( !status );
+ puts( "Test: pthread_cond_wait - interrupted by signal" );
+
+ left = sleep( 10 );
+ printf( "Test: seconds left=%d\n", left );
+
+ return NULL;
+}
+
+void *POSIX_Init(
+ rtems_task_argument argument
+)
+{
+ int status;
+
+ puts( "\n\n*** POSIX TEST SIGNAL 06 ***" );
+
+ puts( "Init: pthread_cond_init - OK" );
+ status = pthread_cond_init( &CondVarId, NULL );
+ rtems_test_assert( !status );
+
+ puts( "Init: pthread_mutex_init - OK" );
+ status = pthread_mutex_init( &MutexId, NULL );
+ rtems_test_assert( !status );
+
+ puts( "Init: pthread_create - OK" );
+ status = pthread_create( &ThreadId, NULL, TestThread, NULL );
+ rtems_test_assert( !status );
+
+ sleep( 1 );
+
+ /* let TestThread run */
+
+ puts( "Init: pthread_kill - SIGUSR to Test Thread - OK" );
+ status = pthread_kill( ThreadId, SIGUSR1 );
+ rtems_test_assert( !status );
+
+ sleep( 2 );
+
+ /* let TestThread run */
+
+ puts( "Init: pthread_kill - SIGUSR to Test Thread - OK" );
+ status = pthread_kill( ThreadId, SIGUSR1 );
+ rtems_test_assert( !status );
+
+ sleep( 1 );
+
+ /* let TestThread run */
+
+
+
+ puts( "*** END OF POSIX TEST SIGNAL 06 ***" );
+
+ rtems_test_exit(0);
+}
+
+/* configuration information */
+
+#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER
+#define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER
+
+#define CONFIGURE_MAXIMUM_POSIX_THREADS 2
+#define CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES 2
+#define CONFIGURE_MAXIMUM_POSIX_MUTEXES 1
+
+#define CONFIGURE_POSIX_INIT_THREAD_TABLE
+
+#define CONFIGURE_INIT
+#include <rtems/confdefs.h>
+/* end of file */
</font>
<font color='#006600'>diff -u /dev/null rtems/testsuites/psxtests/psxsignal06/psxsignal06.doc:1.1
--- /dev/null Thu Oct 21 17:10:57 2010
+++ rtems/testsuites/psxtests/psxsignal06/psxsignal06.doc Thu Oct 21 17:05:17 2010
</font><font color='#997700'>@@ -0,0 +1,24 @@
</font><font color='#000088'>+#
+# $Id$
+#
+# COPYRIGHT (c) 1989-2010.
+# On-Line Applications Research Corporation (OAR).
+#
+# The license and distribution terms for this file may be
+# found in the file LICENSE in this distribution or at
+# http://www.rtems.com/license/LICENSE.
+#
+
+This file describes the directives and concepts tested by this test set.
+
+test set name: psxsignal06
+
+directives:
+
+ pthread_cond_wait
+ sleep
+ pthread_kill
+
+concepts:
+
++ Ensure that sleep and pthread_cond_wait are properly interrupted by a signal.
</font>
<font color='#006600'>diff -u /dev/null rtems/testsuites/psxtests/psxsignal06/psxsignal06.scn:1.1
--- /dev/null Thu Oct 21 17:10:58 2010
+++ rtems/testsuites/psxtests/psxsignal06/psxsignal06.scn Thu Oct 21 17:05:17 2010
</font><font color='#997700'>@@ -0,0 +1,11 @@
</font><font color='#000088'>+*** POSIX TEST SIGNAL 06 ***
+Init: pthread_cond_init - OK
+Init: pthread_mutex_init - OK
+Init: pthread_create - OK
+Test: Unblock SIGUSR1
+Test: pthread_cond_wait - OK
+Init: pthread_kill - SIGUSR to Test Thread - OK
+Test: pthread_cond_wait - interrupted by signal
+Init: pthread_kill - SIGUSR to Test Thread - OK
+Test: seconds left=8
+*** END OF POSIX TEST SIGNAL 06 ***
</font></pre>
<p> </p>
<a name='cs3'></a>
<table border='0' cellspacing='0' cellpadding='5' width='100%' bgcolor='#eeeeee'>
<tr><td colspan='3' bgcolor='#dddddd'>
<font color='#bb2222'><strong>joel</strong></font>
</td></tr>
<tr><td colspan='3' bgcolor='#dddddd'><pre>2010-10-21 Joel Sherrill <joel.sherrill@oarcorp.com>
* psx05/init.c: Check for correct status returned.
* psxrwlock01/psxrwlock01.scn, psxrwlock01/test.c: Add test code
to exercise path when attempting to lock for reading but there
is at least one writer blocked waiting for access.
</pre></td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/testsuites/psxtests/ChangeLog.diff?r1=text&tr1=1.322&r2=text&tr2=1.323&diff_format=h">M</a></td><td width='1%'>1.323</td><td width='100%'>testsuites/psxtests/ChangeLog</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/testsuites/psxtests/psx05/init.c.diff?r1=text&tr1=1.35&r2=text&tr2=1.36&diff_format=h">M</a></td><td width='1%'>1.36</td><td width='100%'>testsuites/psxtests/psx05/init.c</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/testsuites/psxtests/psxrwlock01/psxrwlock01.scn.diff?r1=text&tr1=1.7&r2=text&tr2=1.8&diff_format=h">M</a></td><td width='1%'>1.8</td><td width='100%'>testsuites/psxtests/psxrwlock01/psxrwlock01.scn</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/testsuites/psxtests/psxrwlock01/test.c.diff?r1=text&tr1=1.14&r2=text&tr2=1.15&diff_format=h">M</a></td><td width='1%'>1.15</td><td width='100%'>testsuites/psxtests/psxrwlock01/test.c</td></tr>
</table>
<pre>
<font color='#006600'>diff -u rtems/testsuites/psxtests/ChangeLog:1.322 rtems/testsuites/psxtests/ChangeLog:1.323
--- rtems/testsuites/psxtests/ChangeLog:1.322 Thu Oct 21 17:05:17 2010
+++ rtems/testsuites/psxtests/ChangeLog Thu Oct 21 17:09:44 2010
</font><font color='#997700'>@@ -1,5 +1,12 @@
</font> 2010-10-21 Joel Sherrill <joel.sherrill@oarcorp.com>
<font color='#000088'>+ * psx05/init.c: Check for correct status returned.
+ * psxrwlock01/psxrwlock01.scn, psxrwlock01/test.c: Add test code
+ to exercise path when attempting to lock for reading but there
+ is at least one writer blocked waiting for access.
+
+2010-10-21 Joel Sherrill <joel.sherrill@oarcorp.com>
+
</font> * Makefile.am, configure.ac: New test to ensure pthread_cond_wait() and
sleep() (e.g. interruptible blocking and sleeping) are interruptible
by signal.
<font color='#006600'>diff -u rtems/testsuites/psxtests/psx05/init.c:1.35 rtems/testsuites/psxtests/psx05/init.c:1.36
--- rtems/testsuites/psxtests/psx05/init.c:1.35 Thu Oct 21 16:22:24 2010
+++ rtems/testsuites/psxtests/psx05/init.c Thu Oct 21 17:09:44 2010
</font><font color='#997700'>@@ -430,9 +430,9 @@
</font> calculate_abstimeout( ×, -1, (TOD_NANOSECONDS_PER_SECOND / 2) );
status = pthread_mutex_timedlock( &Mutex_id, × );
<font color='#880000'>- if ( status != EBUSY )
</font><font color='#000088'>+ if ( status != ETIMEDOUT )
</font> printf( "status = %d\n", status );
<font color='#880000'>- rtems_test_assert( status == EBUSY );
</font><font color='#000088'>+ rtems_test_assert( status == ETIMEDOUT );
</font>
/* switch to idle */
<font color='#006600'>diff -u rtems/testsuites/psxtests/psxrwlock01/psxrwlock01.scn:1.7 rtems/testsuites/psxtests/psxrwlock01/psxrwlock01.scn:1.8
--- rtems/testsuites/psxtests/psxrwlock01/psxrwlock01.scn:1.7 Sat Jul 4 15:26:18 2009
+++ rtems/testsuites/psxtests/psxrwlock01/psxrwlock01.scn Thu Oct 21 17:09:44 2010
</font><font color='#997700'>@@ -60,6 +60,7 @@
</font> pthread_rwlock_unlock(RWLock) -- OK
ReadThread - pthread_rwlock_rdlock(RWLock) unblocked -- OK
ReadThread - pthread_rwlock_rdlock(RWLock) unblocked -- OK
<font color='#000088'>+
</font> pthread_rwlock_trywrlock(RWLock) -- OK
pthread_rwlock_trywrlock(&RWLock) -- EBUSY
Init: pthread_create - thread 1 OK
<font color='#997700'>@@ -70,16 +71,27 @@
</font> WriteThread - pthread_rwlock_wrlock(RWLock) unblocked -- OK
WriteThread - pthread_rwlock_unlock(RWLock) -- OK
WriteThread - pthread_rwlock_wrlock(RWLock) unblocked -- OK
<font color='#000088'>+WriteThread - pthread_rwlock_unlock(RWLock) -- OK
+
+pthread_rwlock_tryrdlock(&RWLock) -- OK
+Init: pthread_create - thread reader & writer OK
+WriteThread - pthread_rwlock_wrlock(RWLock) blocking -- OK
+ReadThread - pthread_rwlock_rdlock(RWLock) blocking -- OK
+pthread_rwlock_tryrdlock(&RWLock) -- EBUSY
+pthread_rwlock_trywrlock(&RWLock) -- EBUSY
+pthread_rwlock_unlock(&RWLock) -- OK
+WriteThread - pthread_rwlock_wrlock(RWLock) unblocked -- OK
+WriteThread - pthread_rwlock_unlock(RWLock) -- OK
+ReadThread - pthread_rwlock_rdlock(RWLock) unblocked -- OK
</font> clock_gettime(CLOCK_REALTIME, &abstime) -- OK
pthread_rwlock_timedwrlock( &RWLock, &abstime) -- OK
<font color='#880000'>-WriteThread - pthread_rwlock_unlock(RWLock) -- OK
</font> pthread_rwlock_timedrdlock( &RWLock, &abstime) -- ETIMEDOUT
pthread_rwlock_timedrdlock( &RWLock, &abstime) -- ETIMEDOUT
pthread_rwlock_timedwrlock( &RWLock, &abstime) -- ETIMEDOUT
pthread_rwlock_timedrdlock( &RWLock, &abstime) -- in past -- OK
pthread_rwlock_timedwrlock( &RWLock, &abstime) -- in past -- OK
pthread_rwlock_destroy( &RWLock ) -- OK
<font color='#880000'>-pthread_rwlock_init( &rwlock, NULL ) -- OK<span style="background-color: #FF0000"><CR></span>
-pthread_rwlock_unlock ( &rwlock ) -- OK<span style="background-color: #FF0000"><CR></span>
</font><font color='#000088'>+pthread_rwlock_init( &rwlock, NULL ) -- OK
+pthread_rwlock_unlock ( &rwlock ) -- OK
</font> pthread_rwlock_unlock ( &rwlock ) -- OK
*** END OF POSIX RWLOCK TEST 01 ***
<font color='#006600'>diff -u rtems/testsuites/psxtests/psxrwlock01/test.c:1.14 rtems/testsuites/psxtests/psxrwlock01/test.c:1.15
--- rtems/testsuites/psxtests/psxrwlock01/test.c:1.14 Thu Oct 21 16:22:25 2010
+++ rtems/testsuites/psxtests/psxrwlock01/test.c Thu Oct 21 17:09:44 2010
</font><font color='#997700'>@@ -1,7 +1,7 @@
</font> /*
* This test exercises the POSIX RWLock manager.
*
<font color='#880000'>- * COPYRIGHT (c) 1989-2009.
</font><font color='#000088'>+ * COPYRIGHT (c) 1989-2010.
</font> * On-Line Applications Research Corporation (OAR).
*
* The license and distribution terms for this file may be
<font color='#997700'>@@ -57,10 +57,12 @@
</font> rtems_test_assert( !status );
puts( "WriteThread - pthread_rwlock_wrlock(RWLock) unblocked -- OK" );
<font color='#880000'>- sleep( 1 );
</font><font color='#000088'>+ sleep( 2 );
</font>
puts( "WriteThread - pthread_rwlock_unlock(RWLock) -- OK" );
status = pthread_rwlock_unlock(&RWLock);
<font color='#000088'>+ if ( status )
+ printf( "status=%s\n", strerror(status) );
</font> rtems_test_assert( !status );
return NULL;
}
<font color='#997700'>@@ -340,7 +342,7 @@
</font> sleep(2);
/*************** CREATE THREADS AND LET THEM OBTAIN WRITE LOCK *************/
<font color='#880000'>- puts( "pthread_rwlock_trywrlock(RWLock) -- OK" );
</font><font color='#000088'>+ puts( "\npthread_rwlock_trywrlock(RWLock) -- OK" );
</font> status = pthread_rwlock_trywrlock(&RWLock);
rtems_test_assert( !status );
<font color='#997700'>@@ -354,14 +356,47 @@
</font> pthread_create(&ThreadIds[i], NULL, WriteLockThread, &ThreadIds[i]);
rtems_test_assert( !status );
<font color='#880000'>- sleep(1);
</font><font color='#000088'>+ sleep(2);
</font> }
puts( "pthread_rwlock_unlock(RWLock) -- OK" );
status = pthread_rwlock_unlock(&RWLock);
rtems_test_assert( !status );
<font color='#880000'>- sleep(2);
</font><font color='#000088'>+ sleep(6);
+
+ /*************** CREATE THREADS AND LET THEM OBTAIN WRITE LOCK *************/
+ /*************** THEN ATTEMPT TO OBTAIN A READLOCK *************/
+<span style="background-color: #FF0000"> </span>
+ puts( "\npthread_rwlock_tryrdlock(&RWLock) -- OK" );
+ status = pthread_rwlock_tryrdlock(&RWLock);
+ rtems_test_assert( !status );
+
+ printf( "Init: pthread_create - thread reader & writer OK\n" );
+ status = pthread_create(&ThreadIds[0], NULL, WriteLockThread, &ThreadIds[0]);
+ rtems_test_assert( !status );
+
+ sleep(1);
+ status = pthread_create(&ThreadIds[1], NULL, ReadLockThread, &ThreadIds[1]);
+ rtems_test_assert( !status );
+
+ sleep(1);
+
+ puts( "pthread_rwlock_tryrdlock(&RWLock) -- EBUSY" );
+ status = pthread_rwlock_tryrdlock(&RWLock);
+ rtems_test_assert( status == EBUSY );
+
+ puts( "pthread_rwlock_trywrlock(&RWLock) -- EBUSY" );
+ status = pthread_rwlock_trywrlock(&RWLock);
+ rtems_test_assert( status == EBUSY );
+
+ sleep( 5 );
+
+ puts( "pthread_rwlock_unlock(&RWLock) -- OK" );
+ status = pthread_rwlock_unlock(&RWLock);
+ rtems_test_assert( !status );
+
+ sleep( 5 );
</font>
/*************** TIMEOUT ON RWLOCK ***************/
puts( "clock_gettime(CLOCK_REALTIME, &abstime) -- OK" );
</pre>
<p> </p>
<p>--<br />
<small>Generated by <a href="http://www.codewiz.org/projects/index.html#loginfo">Deluxe Loginfo</a> 2.122 by Bernardo Innocenti <bernie@develer.com></small></p>
</body>
</html>