<!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-08-06)</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-08-06 Bharath Suri <bharath.s.jois@gmail.com>
PR 1654/testing
* psx13/test.c, psx13/psx13.scn: Test case to improve testing of
dup2 routine.
* psxfile01/test.c, psxfile01/psxfile01.scn: New test to improve
testing of fcntl routine.
* psximfs01/init.c, psximfs01/psximfs01.scn: Improve testing of
imfs routines.
* psximfs02/init.c, psximfs02/psximfs02.scn: Improve coverage of
imfs routines.
* psxpasswd02/init.c, psxpasswd02/psxpasswd02.scn: New tests to
improve coverage of getpwent.c.
</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.303&r2=text&tr2=1.304&diff_format=h">M</a></td><td width='1%'>1.304</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/psx13/psx13.scn.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/psx13/psx13.scn</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/testsuites/psxtests/psx13/test.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/psx13/test.c</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/testsuites/psxtests/psxfile01/psxfile01.scn.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/psxfile01/psxfile01.scn</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/testsuites/psxtests/psxfile01/test.c.diff?r1=text&tr1=1.29&r2=text&tr2=1.30&diff_format=h">M</a></td><td width='1%'>1.30</td><td width='100%'>testsuites/psxtests/psxfile01/test.c</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/testsuites/psxtests/psximfs01/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/psximfs01/init.c</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/testsuites/psxtests/psximfs01/psximfs01.scn.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/psximfs01/psximfs01.scn</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/testsuites/psxtests/psximfs02/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/psximfs02/init.c</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/testsuites/psxtests/psximfs02/psximfs02.scn.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/psximfs02/psximfs02.scn</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/testsuites/psxtests/psxpasswd02/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/psxpasswd02/init.c</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/testsuites/psxtests/psxpasswd02/psxpasswd02.scn.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/psxpasswd02/psxpasswd02.scn</td></tr>
</table>
<pre>
<font color='#006600'>diff -u rtems/testsuites/psxtests/ChangeLog:1.303 rtems/testsuites/psxtests/ChangeLog:1.304
--- rtems/testsuites/psxtests/ChangeLog:1.303 Fri Aug 6 02:44:22 2010
+++ rtems/testsuites/psxtests/ChangeLog Fri Aug 6 19:22:45 2010
</font><font color='#997700'>@@ -1,3 +1,17 @@
</font><font color='#000088'>+2010-08-06 Bharath Suri <bharath.s.jois@gmail.com>
+
+ PR 1654/testing
+ * psx13/test.c, psx13/psx13.scn: Test case to improve testing of
+ dup2 routine.
+ * psxfile01/test.c, psxfile01/psxfile01.scn: New test to improve
+ testing of fcntl routine.
+ * psximfs01/init.c, psximfs01/psximfs01.scn: Improve testing of
+ imfs routines.
+ * psximfs02/init.c, psximfs02/psximfs02.scn: Improve coverage of
+ imfs routines.
+ * psxpasswd02/init.c, psxpasswd02/psxpasswd02.scn: New tests to
+ improve coverage of getpwent.c.
+
</font> 2010-08-06 Ralf Corsépius <ralf.corsepius@rtems.org>
PR 1652/GCC:
<font color='#006600'>diff -u rtems/testsuites/psxtests/psx13/psx13.scn:1.9 rtems/testsuites/psxtests/psx13/psx13.scn:1.10
--- rtems/testsuites/psxtests/psx13/psx13.scn:1.9 Mon Jul 19 08:13:20 2010
+++ rtems/testsuites/psxtests/psx13/psx13.scn Fri Aug 6 19:22:46 2010
</font><font color='#997700'>@@ -1,10 +1,9 @@
</font><font color='#880000'>-
</font> *** POSIX TEST 13 ***
Files initialized successfully.
Testing device_lseek()... Failed!!!
Testing dup()............ Failed!!!
<font color='#880000'>-Testing dup2()........... Failed!!!
</font><font color='#000088'>+Testing dup2()........... Success.
</font> Testing fdatasync()...... Success.
Testing umask().......... Success.
Testing utime().......... Success.
<font color='#006600'>diff -u rtems/testsuites/psxtests/psx13/test.c:1.17 rtems/testsuites/psxtests/psx13/test.c:1.18
--- rtems/testsuites/psxtests/psx13/test.c:1.17 Mon Jul 19 08:13:20 2010
+++ rtems/testsuites/psxtests/psx13/test.c Fri Aug 6 19:22:46 2010
</font><font color='#997700'>@@ -142,7 +142,7 @@
</font> else
retval = FALSE;
<font color='#880000'>- /* assert (retval == TRUE);*/
</font><font color='#000088'>+ close( fd ); /* assert (retval == TRUE);*/
</font>
return (retval);
}
<font color='#997700'>@@ -187,6 +187,8 @@
</font> else
retval = FALSE;
<font color='#000088'>+ close( fd1 );
+ close( fd2 );
</font> /* assert (retval == TRUE);*/
return (retval);
<font color='#997700'>@@ -257,7 +259,7 @@
</font> }
close (fd1);
<font color='#880000'>-
</font><font color='#000088'>+ close (fd2);
</font> /* assert (retval == TRUE);*/
return (retval);
<font color='#006600'>diff -u rtems/testsuites/psxtests/psxfile01/psxfile01.scn:1.13 rtems/testsuites/psxtests/psxfile01/psxfile01.scn:1.14
--- rtems/testsuites/psxtests/psxfile01/psxfile01.scn:1.13 Mon Jul 19 08:13:20 2010
+++ rtems/testsuites/psxtests/psxfile01/psxfile01.scn Fri Aug 6 19:22:46 2010
</font><font color='#997700'>@@ -1,10 +1,9 @@
</font><font color='#880000'>-
</font> *** FILE TEST 1 ***
*************** Dump of Entire IMFS ***************
/
....dev/
........console (device 0, 0)
<font color='#880000'>-*************** End of Dump ***************
</font><font color='#000088'>+*************** End of Dump ***************
</font> stat of /dev/console
....st_dev (0xfffe:0x0)
....st_ino 3 may vary by small amount
<font color='#997700'>@@ -55,6 +54,7 @@
</font> Unlink /tmp/bha using the reentrant version -- OK
mknod with bad type - expect EINVAL
open /tmp/bha in write only mode -- OK
<font color='#000088'>+attempt fcntl on opened file -- OK
</font> attempt to read from /tmp/bha - expect EINVAL
closing and unlinking /tmp/bha
open /tmp/bha in read only mode -- OK
<font color='#997700'>@@ -192,7 +192,7 @@
</font> ........j (file 130)
....imfs/
........hidden_on_mount/
<font color='#880000'>-*************** End of Dump ***************
</font><font color='#000088'>+*************** End of Dump ***************
</font> truncate /tmp/j to length of 40
....st_dev (0xfffe:0x0)
....st_ino 17 may vary by small amount
<font color='#997700'>@@ -221,7 +221,7 @@
</font> ........j (file 40)
....imfs/
........hidden_on_mount/
<font color='#880000'>-*************** End of Dump ***************
</font><font color='#000088'>+*************** End of Dump ***************
</font> truncate /tmp/j to length of 0
truncate /tmp to length of 0 should fail with EISDIR
<font color='#997700'>@@ -242,7 +242,7 @@
</font> ........j (file 0)
....imfs/
........hidden_on_mount/
<font color='#880000'>-*************** End of Dump ***************
</font><font color='#000088'>+*************** End of Dump ***************
</font> Writing First File
Writing Second File
(0)this is a test line
<font color='#006600'>diff -u rtems/testsuites/psxtests/psxfile01/test.c:1.29 rtems/testsuites/psxtests/psxfile01/test.c:1.30
--- rtems/testsuites/psxtests/psxfile01/test.c:1.29 Mon Jul 19 08:13:20 2010
+++ rtems/testsuites/psxtests/psxfile01/test.c Fri Aug 6 19:22:46 2010
</font><font color='#997700'>@@ -374,7 +374,11 @@
</font> puts( "open /tmp/bha in write only mode -- OK" );
fd = open( "/tmp/bha", O_CREAT | O_WRONLY, S_IRWXU|S_IRWXG|S_IRWXO );
rtems_test_assert( fd != -1 );
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
+ puts( "attempt fcntl on opened file -- OK" );
+ status = fcntl( fd, F_SETFD, 0 );
+ rtems_test_assert( status == 0 );
+
</font> puts( "attempt to read from /tmp/bha - expect EINVAL" );
status = read( fd, buffer, 10 );
rtems_test_assert( status == -1 );
<font color='#006600'>diff -u rtems/testsuites/psxtests/psximfs01/init.c:1.4 rtems/testsuites/psxtests/psximfs01/init.c:1.5
--- rtems/testsuites/psxtests/psximfs01/init.c:1.4 Thu Jul 29 17:35:36 2010
+++ rtems/testsuites/psxtests/psximfs01/init.c Fri Aug 6 19:22:46 2010
</font><font color='#997700'>@@ -147,7 +147,6 @@
</font>
position = lseek( TestFd, 0, SEEK_END );
printf( "Seek to end .. returned %d\n", (int) position );
<font color='#880000'>- rtems_test_assert( position == 1 );
</font>
/*<span style="background-color: #FF0000"> </span>
* test case to ftruncate a file to a length > its size<span style="background-color: #FF0000"> </span>
<font color='#997700'>@@ -179,6 +178,7 @@
</font> rc,
strerror( errno )
);
<font color='#000088'>+ break;
</font> }
else {
break;
<font color='#997700'>@@ -216,6 +216,8 @@
</font> int i;
void *alloc_ptr = (void *)0;
Heap_Information_block Info;
<font color='#000088'>+ int position = 0;
+ int status = 0;
</font>
puts( "\n\n*** TEST IMFS 01 ***" );
<font color='#997700'>@@ -248,6 +250,12 @@
</font> */
free(alloc_ptr);
<font color='#000088'>+ extend_helper();
+ position = lseek( TestFd , 0, SEEK_END );
+ status = lseek( TestFd, position+2, SEEK_SET );
+ rtems_test_assert( status == -1 );
+ rtems_test_assert( errno == ENOSPC );
+
</font> close_it();
unlink_it();
<font color='#006600'>diff -u rtems/testsuites/psxtests/psximfs01/psximfs01.scn:1.2 rtems/testsuites/psxtests/psximfs01/psximfs01.scn:1.3
--- rtems/testsuites/psxtests/psximfs01/psximfs01.scn:1.2 Thu Jul 29 17:35:36 2010
+++ rtems/testsuites/psxtests/psximfs01/psximfs01.scn Fri Aug 6 19:22:46 2010
</font><font color='#997700'>@@ -14,6 +14,8 @@
</font> lseek/ftruncate loop..
Seek to end .. returned 1
lseek/ftruncate loop..
<font color='#000088'>+Seek to end .. returned 1295
+lseek/ftruncate loop..
</font> close(biggie) - OK<span style="background-color: #FF0000"> </span>
unlink(biggie) - OK
*** END OF TEST IMFS 01 ***
<font color='#006600'>diff -u rtems/testsuites/psxtests/psximfs02/init.c:1.2 rtems/testsuites/psxtests/psximfs02/init.c:1.3
--- rtems/testsuites/psxtests/psximfs02/init.c:1.2 Mon Aug 2 13:19:35 2010
+++ rtems/testsuites/psxtests/psximfs02/init.c Fri Aug 6 19:22:46 2010
</font><font color='#997700'>@@ -161,6 +161,22 @@
</font>
IMFS_dump();
<font color='#000088'>+ puts( "chown /fifo to 10 -- OK" );
+ status = chown( "/fifo", 10, 10 );
+ rtems_test_assert( status == 0 );
+
+ puts( "Changing euid to 10" );
+ status = seteuid( 10 );
+ rtems_test_assert( status == 0 );
+
+ puts( "chmod /fifo -- OK" );
+ status = chmod( "/fifo", S_IRWXU );
+ rtems_test_assert( status == 0 );
+
+ printk( "chown /fifo to %o -- OK", 0 );
+ status = chown( "/fifo", 0, 0 );
+ rtems_test_assert( status == 0 );
+
</font> puts( "*** END OF TEST IMFS 02 ***" );
rtems_test_exit(0);
}
<font color='#006600'>diff -u rtems/testsuites/psxtests/psximfs02/psximfs02.scn:1.2 rtems/testsuites/psxtests/psximfs02/psximfs02.scn:1.3
--- rtems/testsuites/psxtests/psximfs02/psximfs02.scn:1.2 Mon Aug 2 13:19:35 2010
+++ rtems/testsuites/psxtests/psximfs02/psximfs02.scn Fri Aug 6 19:22:46 2010
</font><font color='#997700'>@@ -57,5 +57,8 @@
</font> ....node-link links not printed
....node-slink links not printed
....fifo FIFO not printed
<font color='#880000'>-*************** End of Dump ***************
-*** END OF TEST IMFS 02 ***
</font><font color='#000088'>+*************** End of Dump ***************
+chown /fifo to 10 -- OK
+Changing euid to 10
+chmod /fifo -- OK
+chown /fifo to 0 -- OK*** END OF TEST IMFS 02 ***
</font>
<font color='#006600'>diff -u rtems/testsuites/psxtests/psxpasswd02/init.c:1.1 rtems/testsuites/psxtests/psxpasswd02/init.c:1.2
--- rtems/testsuites/psxtests/psxpasswd02/init.c:1.1 Thu Jul 1 12:26:35 2010
+++ rtems/testsuites/psxtests/psxpasswd02/init.c Fri Aug 6 19:22:46 2010
</font><font color='#997700'>@@ -17,6 +17,7 @@
</font> #include <unistd.h>
#include <fcntl.h>
#include <errno.h>
<font color='#000088'>+#include <limits.h>
</font>
void print_passwd(
struct passwd *pw
<font color='#997700'>@@ -63,6 +64,9 @@
</font> struct passwd *pw;
struct group *gr;
int status = -1;
<font color='#000088'>+ char str[100] = {0};
+ int max_int = INT_MAX;
+ int limit_value = 0;
</font>
FILE *fp = NULL;
<font color='#997700'>@@ -127,6 +131,28 @@
</font> rtems_test_assert( !pw );<span style="background-color: #FF0000"> </span>
rtems_test_assert( errno == EINVAL );
<font color='#000088'>+ fp = fopen( "/etc/passwd", "w" );
+ rtems_test_assert( fp != NULL );
+ fprintf( fp, "user:x:999999999999:1:dummy::/:/bin/sh\n" );
+ fclose( fp );
+
+ puts( "Init - getpwnam(\"root\") -- expected EINVAL" );
+ pw = getpwnam( "root" );
+ rtems_test_assert( !pw );<span style="background-color: #FF0000"> </span>
+ rtems_test_assert( errno == EINVAL );
+
+ sprintf( str, "user:x:%d%d:1:dummy::/:/bin/sh\n", max_int/10, max_int%10+1 );
+
+ fp = fopen( "/etc/passwd", "w" );
+ rtems_test_assert( fp != NULL );
+ fprintf( fp, str );
+ fclose( fp );
+
+ puts( "Init - getpwnam(\"root\") -- expected EINVAL" );
+ pw = getpwnam( "root" );
+ rtems_test_assert( !pw );<span style="background-color: #FF0000"> </span>
+ rtems_test_assert( errno == EINVAL );
+
</font> puts( "Init - getgrent() -- OK" );
gr = getgrent();
rtems_test_assert( gr != NULL );
<font color='#006600'>diff -u rtems/testsuites/psxtests/psxpasswd02/psxpasswd02.scn:1.1 rtems/testsuites/psxtests/psxpasswd02/psxpasswd02.scn:1.2
--- rtems/testsuites/psxtests/psxpasswd02/psxpasswd02.scn:1.1 Thu Jul 1 12:26:37 2010
+++ rtems/testsuites/psxtests/psxpasswd02/psxpasswd02.scn Fri Aug 6 19:22:46 2010
</font><font color='#997700'>@@ -9,6 +9,8 @@
</font> Init - getpwnam("root") -- expected EINVAL
Init - getpwnam("root") -- expected EINVAL
Init - getpwnam("root") -- expected EINVAL
<font color='#000088'>+Init - getpwnam("root") -- expected EINVAL
+Init - getpwnam("root") -- expected EINVAL
</font> Init - getgrent() -- OK
group name: admin
group password:<span style="background-color: #FF0000"> </span>
</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-08-06 Bharath Suri <bharath.s.jois@gmail.com>
PR 1654/testing
* deviceio01/init.c, deviceio01/deviceio01.doc,
deviceio01/deviceio01.scn, deviceio01/test_driver.c,
deviceio01/test_driver.h, deviceio01/Makefile.am: New test added.
* Makefile.am, configure.ac: Changes to added above test.
* tar02/init.c, tar02/tar02.scn: New test case added: IMFS_dump().
</pre></td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/testsuites/libtests/ChangeLog.diff?r1=text&tr1=1.231&r2=text&tr2=1.232&diff_format=h">M</a></td><td width='1%'>1.232</td><td width='100%'>testsuites/libtests/ChangeLog</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/testsuites/libtests/Makefile.am.diff?r1=text&tr1=1.46&r2=text&tr2=1.47&diff_format=h">M</a></td><td width='1%'>1.47</td><td width='100%'>testsuites/libtests/Makefile.am</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/testsuites/libtests/configure.ac.diff?r1=text&tr1=1.54&r2=text&tr2=1.55&diff_format=h">M</a></td><td width='1%'>1.55</td><td width='100%'>testsuites/libtests/configure.ac</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/testsuites/libtests/deviceio01/.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/libtests/deviceio01/.cvsignore</font></td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/testsuites/libtests/deviceio01/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/libtests/deviceio01/Makefile.am</font></td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/testsuites/libtests/deviceio01/deviceio01.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/libtests/deviceio01/deviceio01.doc</font></td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/testsuites/libtests/deviceio01/deviceio01.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/libtests/deviceio01/deviceio01.scn</font></td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/testsuites/libtests/deviceio01/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/libtests/deviceio01/init.c</font></td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/testsuites/libtests/deviceio01/test_driver.h?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/libtests/deviceio01/test_driver.h</font></td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/testsuites/libtests/deviceio01/test_driver.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/libtests/deviceio01/test_driver.c</font></td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/testsuites/libtests/tar02/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/libtests/tar02/init.c</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/testsuites/libtests/tar02/tar02.scn.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/libtests/tar02/tar02.scn</td></tr>
</table>
<pre>
<font color='#006600'>diff -u rtems/testsuites/libtests/ChangeLog:1.231 rtems/testsuites/libtests/ChangeLog:1.232
--- rtems/testsuites/libtests/ChangeLog:1.231 Mon Aug 2 13:17:10 2010
+++ rtems/testsuites/libtests/ChangeLog Fri Aug 6 19:24:47 2010
</font><font color='#997700'>@@ -1,3 +1,12 @@
</font><font color='#000088'>+2010-08-06 Bharath Suri <bharath.s.jois@gmail.com>
+
+ PR 1654/testing
+ * deviceio01/init.c, deviceio01/deviceio01.doc,
+ deviceio01/deviceio01.scn, deviceio01/test_driver.c,
+ deviceio01/test_driver.h, deviceio01/Makefile.am: New test added.
+ * Makefile.am, configure.ac: Changes to added above test.
+ * tar02/init.c, tar02/tar02.scn: New test case added: IMFS_dump().
+
</font> 2010-08-02 Joel Sherrill <joel.sherrill@oarcorp.com>
* Makefile.am, configure.ac: Add test for rtems_print_buffer().
<font color='#006600'>diff -u rtems/testsuites/libtests/Makefile.am:1.46 rtems/testsuites/libtests/Makefile.am:1.47
--- rtems/testsuites/libtests/Makefile.am:1.46 Mon Aug 2 13:17:10 2010
+++ rtems/testsuites/libtests/Makefile.am Fri Aug 6 19:24:47 2010
</font><font color='#997700'>@@ -7,7 +7,7 @@
</font> SUBDIRS = POSIX
SUBDIRS += bspcmdline01 cpuuse devfs01 devfs02 devfs03 devfs04 \
<font color='#880000'>- devnullfatal01 dumpbuf01 gxx01 gxx02 \
</font><font color='#000088'>+ deviceio01 devnullfatal01 dumpbuf01 gxx01 gxx02 \
</font> malloctest malloc02 malloc03 malloc04 malloc05 heapwalk \
putenvtest monitor monitor02 rtmonuse stackchk stackchk01 \
termios termios01 termios02 termios03 termios04 termios05 \
<font color='#006600'>diff -u rtems/testsuites/libtests/configure.ac:1.54 rtems/testsuites/libtests/configure.ac:1.55
--- rtems/testsuites/libtests/configure.ac:1.54 Mon Aug 2 13:17:10 2010
+++ rtems/testsuites/libtests/configure.ac Fri Aug 6 19:24:47 2010
</font><font color='#997700'>@@ -53,6 +53,7 @@
</font> devfs02/Makefile
devfs03/Makefile
devfs04/Makefile
<font color='#000088'>+deviceio01/Makefile
</font> devnullfatal01/Makefile
dumpbuf01/Makefile
gxx01/Makefile
<font color='#006600'>diff -u /dev/null rtems/testsuites/libtests/deviceio01/.cvsignore:1.1
--- /dev/null Fri Aug 6 20:12:28 2010
+++ rtems/testsuites/libtests/deviceio01/.cvsignore Fri Aug 6 19:24:48 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/libtests/deviceio01/Makefile.am:1.1
--- /dev/null Fri Aug 6 20:12:28 2010
+++ rtems/testsuites/libtests/deviceio01/Makefile.am Fri Aug 6 19:24:48 2010
</font><font color='#997700'>@@ -0,0 +1,24 @@
</font><font color='#000088'>+##
+## $Id$
+##
+
+rtems_tests_PROGRAMS = deviceio01
+deviceio01_SOURCES = init.c test_driver.c
+
+dist_rtems_tests_DATA = deviceio01.scn
+dist_rtems_tests_DATA += deviceio01.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)/../support/include
+
+LINK_OBJS = $(deviceio01_OBJECTS) $(deviceio01_LDADD)
+LINK_LIBS = $(deviceio01_LDLIBS)
+
+deviceio01$(EXEEXT): $(deviceio01_OBJECTS) $(deviceio01_DEPENDENCIES)
+ @rm -f deviceio01$(EXEEXT)
+ $(make-exe)
+
+include $(top_srcdir)/../automake/local.am
</font>
<font color='#006600'>diff -u /dev/null rtems/testsuites/libtests/deviceio01/deviceio01.doc:1.1
--- /dev/null Fri Aug 6 20:12:28 2010
+++ rtems/testsuites/libtests/deviceio01/deviceio01.doc Fri Aug 6 19:24:48 2010
</font><font color='#997700'>@@ -0,0 +1,28 @@
</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: devfs04
+
+directives:
+
++ device_read
++ device_write
++ device_ioctl
+
+concepts:
+
++ Custom driver for a device /dev/test lets us exercise the error
+paths in the read / write routines for devFS. These are invoked using
+the system calls read() and write().
+
++ Mostly hits the error paths in the above mentioned routines
</font>
<font color='#006600'>diff -u /dev/null rtems/testsuites/libtests/deviceio01/deviceio01.scn:1.1
--- /dev/null Fri Aug 6 20:12:28 2010
+++ rtems/testsuites/libtests/deviceio01/deviceio01.scn Fri Aug 6 19:24:48 2010
</font><font color='#997700'>@@ -0,0 +1,7 @@
</font><font color='#000088'>+*** TEST DEVICEIO - 01 ***
+Init - attempt to open the /dev/test WR mode -- OK
+Init - attempt to write to /dev/test - expect ENOSYS
+Init - attempt to open the /dev/test RD mode -- OK
+Init - attempt to read from /dev/test - expect ENOSYS
+Init - attempt ioctl on the device - expect ENOSYS
+*** END OF TEST DEVICEIO - 01 ***
</font>
<font color='#006600'>diff -u /dev/null rtems/testsuites/libtests/deviceio01/init.c:1.1
--- /dev/null Fri Aug 6 20:12:28 2010
+++ rtems/testsuites/libtests/deviceio01/init.c Fri Aug 6 19:24:48 2010
</font><font color='#997700'>@@ -0,0 +1,78 @@
</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 <rtems/devfs.h>
+#include <errno.h>
+#include <unistd.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <fcntl.h>
+#include "test_driver.h"
+#include <rtems/devnull.h>
+
+rtems_task Init(
+ rtems_task_argument argument
+)
+{
+ int status;
+ int fdr = 0, fdw = 0;
+ char buf[10];
+
+ puts( "\n\n*** TEST DEVICEIO - 01 ***" );
+
+ puts( "Init - attempt to open the /dev/test WR mode -- OK" );
+ fdw = open( "/dev/test", O_WRONLY );
+ rtems_test_assert( fdw != -1 );
+<span style="background-color: #FF0000"> </span>
+ puts( "Init - attempt to write to /dev/test - expect ENOSYS" );
+ status = write( fdw, "data", 10 );
+ rtems_test_assert( status == -1 );
+ rtems_test_assert( errno == ENOSYS );
+
+ puts( "Init - attempt to open the /dev/test RD mode -- OK" );
+ fdr = open( "/dev/test", O_RDONLY );
+ rtems_test_assert( fdr != -1 );
+
+ puts( "Init - attempt to read from /dev/test - expect ENOSYS" );
+ status = read( fdr, buf, 10 );
+ rtems_test_assert( status == -1 );
+ rtems_test_assert( errno == ENOSYS );
+
+ puts( "Init - attempt ioctl on the device - expect ENOSYS" );
+ status = ioctl( fdr, -1 );
+ rtems_test_assert( status == -1 );
+ rtems_test_assert( errno == ENOSYS );
+
+ puts( "*** END OF TEST DEVICEIO - 01 ***" );
+ rtems_test_exit(0);
+}
+
+/* configuration information */
+
+#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER
+#define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER
+#define CONFIGURE_APPLICATION_EXTRA_DRIVERS TEST_DRIVER_TABLE_ENTRY
+
+/* include an extra slot for registering the termios one dynamically */
+#define CONFIGURE_MAXIMUM_DRIVERS 3
+
+#define CONFIGURE_LIBIO_MAXIMUM_FILE_DESCRIPTORS 5
+
+#define CONFIGURE_MAXIMUM_TASKS 1
+#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
+
+#define CONFIGURE_USE_IMFS_AS_BASE_FILESYSTEM
+
+#define CONFIGURE_INIT
+#include <rtems/confdefs.h>
+/* end of file */
</font>
<font color='#006600'>diff -u /dev/null rtems/testsuites/libtests/deviceio01/test_driver.h:1.1
--- /dev/null Fri Aug 6 20:12:28 2010
+++ rtems/testsuites/libtests/deviceio01/test_driver.h Fri Aug 6 19:24:48 2010
</font><font color='#997700'>@@ -0,0 +1,64 @@
</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$
+ */
+
+#ifndef __TEST_DRIVER_h
+#define __TEST_DRIVER_h
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#define TEST_DRIVER_TABLE_ENTRY \
+ { testDriver_initialize, testDriver_open, testDriver_close, testDriver_read, \
+ testDriver_write, testDriver_control }
+
+rtems_device_driver testDriver_initialize(
+ rtems_device_major_number,
+ rtems_device_minor_number,
+ void *
+);
+
+rtems_device_driver testDriver_open(
+ rtems_device_major_number,
+ rtems_device_minor_number,
+ void *
+);
+
+rtems_device_driver testDriver_close(
+ rtems_device_major_number,
+ rtems_device_minor_number,
+ void *
+);
+
+rtems_device_driver testDriver_read(
+ rtems_device_major_number,
+ rtems_device_minor_number,
+ void *
+);
+
+rtems_device_driver testDriver_write(
+ rtems_device_major_number,
+ rtems_device_minor_number,
+ void *
+);
+
+rtems_device_driver testDriver_control(
+ rtems_device_major_number,
+ rtems_device_minor_number,
+ void *
+);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
+/* end of include file */
</font>
<font color='#006600'>diff -u /dev/null rtems/testsuites/libtests/deviceio01/test_driver.c:1.1
--- /dev/null Fri Aug 6 20:12:28 2010
+++ rtems/testsuites/libtests/deviceio01/test_driver.c Fri Aug 6 19:24:48 2010
</font><font color='#997700'>@@ -0,0 +1,190 @@
</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$
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <rtems.h>
+#include "test_driver.h"
+#include <rtems/libio.h>
+#include <rtems/devnull.h>
+/*<span style="background-color: #FF0000"> </span>
+ * The test driver routines are mostly derived from the null driver routines.
+ */
+uint32_t TEST_major;
+static char initialized;
+
+/* testDriver_initialize
+ *
+ * This routine is the test device driver init routine.
+ *
+ * Input parameters:
+ * major - device major number
+ * minor - device minor number
+ * pargp - pointer to parameter block
+ *
+ * Output parameters:
+ * rval - RTEMS_SUCCESSFUL
+ */
+rtems_device_driver testDriver_initialize(
+ rtems_device_major_number major,
+ rtems_device_minor_number minor __attribute__((unused)),
+ void *pargp __attribute__((unused))
+)
+{
+ rtems_device_driver status;
+
+ if ( !initialized ) {
+ initialized = 1;
+
+ status = rtems_io_register_name(
+ "/dev/test",
+ major,
+ (rtems_device_minor_number) 0
+ );
+
+ if (status != RTEMS_SUCCESSFUL)
+ rtems_fatal_error_occurred(status);
+
+ TEST_major = major;
+ }
+
+ return RTEMS_SUCCESSFUL;
+}
+
+/* testDriver_open
+ *
+ * This routine is the test device driver open routine.
+ *
+ * Input parameters:
+ * major - device major number
+ * minor - device minor number
+ * pargb - pointer to open parameter block
+ *
+ * Output parameters:
+ * rval - RTEMS_SUCCESSFUL
+ */
+rtems_device_driver testDriver_open(
+ rtems_device_major_number major __attribute__((unused)),
+ rtems_device_minor_number minor __attribute__((unused)),
+ void *pargp __attribute__((unused))
+)
+{
+ return RTEMS_SUCCESSFUL;
+}
+
+/* testDriver_close
+ *
+ * This routine is the test device driver close routine.
+ *
+ * Input parameters:
+ * major - device major number
+ * minor - device minor number
+ * pargb - pointer to close parameter block
+ *
+ * Output parameters:
+ * rval - RTEMS_SUCCESSFUL
+ */
+rtems_device_driver testDriver_close(
+ rtems_device_major_number major __attribute__((unused)),
+ rtems_device_minor_number minor __attribute__((unused)),
+ void *pargp __attribute__((unused))
+)
+{
+ return RTEMS_SUCCESSFUL;
+}
+
+/* testDriver_read
+ *
+ * This routine is the test device driver read routine.
+ *
+ * Input parameters:
+ * major - device major number
+ * minor - device minor number
+ * pargp - pointer to read parameter block
+ *
+ * Output parameters:
+ * rval - RTEMS_SUCCESSFUL
+ */
+rtems_device_driver testDriver_read(
+ rtems_device_major_number major __attribute__((unused)),
+ rtems_device_minor_number minor __attribute__((unused)),
+ void *pargp
+)
+{
+ rtems_libio_rw_args_t *rw_args = (rtems_libio_rw_args_t *) pargp;
+
+ if ( rw_args ) {
+ if( rw_args->count == 5 )
+ rw_args->bytes_moved = 0;
+ else {
+ rw_args->bytes_moved = 0;
+ return RTEMS_NOT_IMPLEMENTED;
+ }
+ }
+<span style="background-color: #FF0000"> </span>
+ return RTEMS_SUCCESSFUL;
+}
+
+/* testDriver_write
+ *
+ * This routine is the test device driver write routine.
+ *
+ * Input parameters:
+ * major - device major number
+ * minor - device minor number
+ * pargp - pointer to write parameter block
+ *
+ * Output parameters:
+ * rval - RTEMS_SUCCESSFUL
+ */
+rtems_device_driver testDriver_write(
+ rtems_device_major_number major __attribute__((unused)),
+ rtems_device_minor_number minor __attribute__((unused)),
+ void *pargp
+)
+{
+ rtems_libio_rw_args_t *rw_args = (rtems_libio_rw_args_t *) pargp;
+
+ if ( rw_args ) {
+ if( rw_args->count == 5 )
+ return null_write( 0, 0, pargp );
+ else {
+ rw_args->bytes_moved = 0;
+ return RTEMS_NOT_IMPLEMENTED;
+ }
+ }
+
+ return RTEMS_SUCCESSFUL;
+}
+
+/* testDriver_control
+ *
+ * This routine is the test device driver control routine.
+ *
+ * Input parameters:
+ * major - device major number
+ * minor - device minor number
+ * pargp - pointer to cntrl parameter block
+ *
+ * Output parameters:
+ * rval - RTEMS_SUCCESSFUL
+ */
+
+rtems_device_driver testDriver_control(
+ rtems_device_major_number major __attribute__((unused)),
+ rtems_device_minor_number minor __attribute__((unused)),
+ void *pargp __attribute__((unused))
+)
+{
+ return RTEMS_NOT_IMPLEMENTED;
+}
</font>
<font color='#006600'>diff -u rtems/testsuites/libtests/tar02/init.c:1.1 rtems/testsuites/libtests/tar02/init.c:1.2
--- rtems/testsuites/libtests/tar02/init.c:1.1 Tue Jul 27 13:16:50 2010
+++ rtems/testsuites/libtests/tar02/init.c Fri Aug 6 19:24:48 2010
</font><font color='#997700'>@@ -63,6 +63,7 @@
</font> printf( "\n\n*** TAR02 TEST ***\n" );
test_tarfs_load();
<font color='#000088'>+ IMFS_dump();
</font>
printf( "*** END OF TAR02 TEST ***\n" );
exit( 0 );
<font color='#006600'>diff -u rtems/testsuites/libtests/tar02/tar02.scn:1.1 rtems/testsuites/libtests/tar02/tar02.scn:1.2
--- rtems/testsuites/libtests/tar02/tar02.scn:1.1 Tue Jul 27 13:16:50 2010
+++ rtems/testsuites/libtests/tar02/tar02.scn Fri Aug 6 19:24:48 2010
</font><font color='#997700'>@@ -5,4 +5,11 @@
</font> initial tar image.
*** Skipping symlink -- NOT CURRENTLY SUPPORTED ***
<font color='#000088'>+*************** Dump of Entire IMFS ***************
+/
+....dev/
+........console (device 0, 0)
+....home/
+........test_file (file 73 0x12022c)
+*************** End of Dump ***************
</font> *** END OF TAR02 TEST ***
</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>