<!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-02)</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-02 Joel Sherrill <joel.sherrill@oarcorp.com>
* bspcmdline01/bspcmdline01.scn, bspcmdline01/init.c: Add test cases to
improve coverage.
</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.229&r2=text&tr2=1.230&diff_format=h">M</a></td><td width='1%'>1.230</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/bspcmdline01/bspcmdline01.scn.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/libtests/bspcmdline01/bspcmdline01.scn</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/testsuites/libtests/bspcmdline01/init.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/libtests/bspcmdline01/init.c</td></tr>
</table>
<pre>
<font color='#006600'>diff -u rtems/testsuites/libtests/ChangeLog:1.229 rtems/testsuites/libtests/ChangeLog:1.230
--- rtems/testsuites/libtests/ChangeLog:1.229 Fri Jul 30 22:07:34 2010
+++ rtems/testsuites/libtests/ChangeLog Mon Aug 2 13:11:53 2010
</font><font color='#997700'>@@ -1,3 +1,8 @@
</font><font color='#000088'>+2010-08-02 Joel Sherrill <joel.sherrill@oarcorp.com>
+
+ * bspcmdline01/bspcmdline01.scn, bspcmdline01/init.c: Add test cases to
+ improve coverage.
+
</font> 2010-07-31 Ralf Corsépius <ralf.corsepius@rtems.org>
* tar01/Makefile.am, tar02/Makefile.am: Apply clean-local to remove
<font color='#006600'>diff -u rtems/testsuites/libtests/bspcmdline01/bspcmdline01.scn:1.3 rtems/testsuites/libtests/bspcmdline01/bspcmdline01.scn:1.4
--- rtems/testsuites/libtests/bspcmdline01/bspcmdline01.scn:1.3 Mon Dec 28 10:42:08 2009
+++ rtems/testsuites/libtests/bspcmdline01/bspcmdline01.scn Mon Aug 2 13:11:53 2010
</font><font color='#997700'>@@ -9,6 +9,8 @@
</font> rtems_bsp_cmdline_get_param - bsp_boot_cmdline=NULL - returns NULL
rtems_bsp_cmdline_get_param_raw - bsp_boot_cmdline=NULL - returns NULL
rtems_bsp_cmdline_get_param - bsp_boot_cmdline = edit name = edit -no error
<font color='#000088'>+rtems_bsp_cmdline_get_param - too short buffer
+rtems_bsp_cmdline_get_param_rhs - short match
</font>
Testing for param=(--arg)
Command Line : (--arg=)
<font color='#006600'>diff -u rtems/testsuites/libtests/bspcmdline01/init.c:1.7 rtems/testsuites/libtests/bspcmdline01/init.c:1.8
--- rtems/testsuites/libtests/bspcmdline01/init.c:1.7 Sun Apr 25 14:12:22 2010
+++ rtems/testsuites/libtests/bspcmdline01/init.c Mon Aug 2 13:11:53 2010
</font><font color='#997700'>@@ -49,9 +49,21 @@
</font> rtems_test_assert( p == NULL );
bsp_boot_cmdline = "edit";
<font color='#880000'>- puts ( "rtems_bsp_cmdline_get_param - bsp_boot_cmdline = edit name = edit -no error" );
</font><font color='#000088'>+ puts (
+ "rtems_bsp_cmdline_get_param - bsp_boot_cmdline = edit name = "
+ "edit -no error" );
</font> p = rtems_bsp_cmdline_get_param("edit", result, 5);
rtems_test_assert( p != NULL );
<font color='#000088'>+
+ bsp_boot_cmdline = "joel=123456789";
+ puts( "rtems_bsp_cmdline_get_param - too short buffer" );
+ p = rtems_bsp_cmdline_get_param("joel", result, 5);
+ rtems_test_assert( p != NULL );
+
+ bsp_boot_cmdline = "--arg1=X`";
+ puts( "rtems_bsp_cmdline_get_param_rhs - short match" );
+ p = rtems_bsp_cmdline_get_param_rhs("arg", result, 10);
+ rtems_test_assert( p == NULL );
</font> }
void test_search(
</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-02 Joel Sherrill <joel.sherrill@oarcorp.com>
* Makefile.am, configure.ac: Add test for rtems_print_buffer().
* dumpbuf01/.cvsignore, dumpbuf01/Makefile.am, dumpbuf01/dumpbuf01.doc,
dumpbuf01/dumpbuf01.scn, dumpbuf01/init.c: New files.
</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.230&r2=text&tr2=1.231&diff_format=h">M</a></td><td width='1%'>1.231</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.45&r2=text&tr2=1.46&diff_format=h">M</a></td><td width='1%'>1.46</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.53&r2=text&tr2=1.54&diff_format=h">M</a></td><td width='1%'>1.54</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/dumpbuf01/.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/dumpbuf01/.cvsignore</font></td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/testsuites/libtests/dumpbuf01/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/dumpbuf01/Makefile.am</font></td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/testsuites/libtests/dumpbuf01/dumpbuf01.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/dumpbuf01/dumpbuf01.doc</font></td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/testsuites/libtests/dumpbuf01/dumpbuf01.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/dumpbuf01/dumpbuf01.scn</font></td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/testsuites/libtests/dumpbuf01/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/dumpbuf01/init.c</font></td></tr>
</table>
<pre>
<font color='#006600'>diff -u rtems/testsuites/libtests/ChangeLog:1.230 rtems/testsuites/libtests/ChangeLog:1.231
--- rtems/testsuites/libtests/ChangeLog:1.230 Mon Aug 2 13:11:53 2010
+++ rtems/testsuites/libtests/ChangeLog Mon Aug 2 13:17:10 2010
</font><font color='#997700'>@@ -1,5 +1,11 @@
</font> 2010-08-02 Joel Sherrill <joel.sherrill@oarcorp.com>
<font color='#000088'>+ * Makefile.am, configure.ac: Add test for rtems_print_buffer().
+ * dumpbuf01/.cvsignore, dumpbuf01/Makefile.am, dumpbuf01/dumpbuf01.doc,
+ dumpbuf01/dumpbuf01.scn, dumpbuf01/init.c: New files.
+
+2010-08-02 Joel Sherrill <joel.sherrill@oarcorp.com>
+
</font> * bspcmdline01/bspcmdline01.scn, bspcmdline01/init.c: Add test cases to
improve coverage.
<font color='#006600'>diff -u rtems/testsuites/libtests/Makefile.am:1.45 rtems/testsuites/libtests/Makefile.am:1.46
--- rtems/testsuites/libtests/Makefile.am:1.45 Tue Jul 27 13:16:49 2010
+++ rtems/testsuites/libtests/Makefile.am Mon Aug 2 13:17:10 2010
</font><font color='#997700'>@@ -7,7 +7,7 @@
</font> SUBDIRS = POSIX
SUBDIRS += bspcmdline01 cpuuse devfs01 devfs02 devfs03 devfs04 \
<font color='#880000'>- devnullfatal01 gxx01 gxx02 \
</font><font color='#000088'>+ 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.53 rtems/testsuites/libtests/configure.ac:1.54
--- rtems/testsuites/libtests/configure.ac:1.53 Fri Jul 30 03:42:37 2010
+++ rtems/testsuites/libtests/configure.ac Mon Aug 2 13:17:10 2010
</font><font color='#997700'>@@ -54,6 +54,7 @@
</font> devfs03/Makefile
devfs04/Makefile
devnullfatal01/Makefile
<font color='#000088'>+dumpbuf01/Makefile
</font> gxx01/Makefile
gxx02/Makefile
heapwalk/Makefile
<font color='#006600'>diff -u /dev/null rtems/testsuites/libtests/dumpbuf01/.cvsignore:1.1
--- /dev/null Mon Aug 2 14:11:22 2010
+++ rtems/testsuites/libtests/dumpbuf01/.cvsignore Mon Aug 2 13:17:11 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/dumpbuf01/Makefile.am:1.1
--- /dev/null Mon Aug 2 14:11:22 2010
+++ rtems/testsuites/libtests/dumpbuf01/Makefile.am Mon Aug 2 13:17:11 2010
</font><font color='#997700'>@@ -0,0 +1,26 @@
</font><font color='#000088'>+##
+## $Id$
+##
+
+MANAGERS = all
+
+rtems_tests_PROGRAMS = dumpbuf01
+dumpbuf01_SOURCES = init.c
+
+dist_rtems_tests_DATA = dumpbuf01.scn
+dist_rtems_tests_DATA += dumpbuf01.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 = $(dumpbuf01_OBJECTS) $(dumpbuf01_LDADD)
+LINK_LIBS = $(dumpbuf01_LDLIBS)
+
+dumpbuf01$(EXEEXT): $(dumpbuf01_OBJECTS) $(dumpbuf01_DEPENDENCIES)
+ @rm -f dumpbuf01$(EXEEXT)
+ $(make-exe)
+
+include $(top_srcdir)/../automake/local.am
</font>
<font color='#006600'>diff -u /dev/null rtems/testsuites/libtests/dumpbuf01/dumpbuf01.doc:1.1
--- /dev/null Mon Aug 2 14:11:22 2010
+++ rtems/testsuites/libtests/dumpbuf01/dumpbuf01.doc Mon Aug 2 13:17:11 2010
</font><font color='#997700'>@@ -0,0 +1,22 @@
</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: dumpbuf01
+
+directives:
+
+ rtems_print_buffer
+
+concepts:
+
++ Fully exercise rtems_print_buffer and provide full coverage of all paths.
</font>
<font color='#006600'>diff -u /dev/null rtems/testsuites/libtests/dumpbuf01/dumpbuf01.scn:1.1
--- /dev/null Mon Aug 2 14:11:22 2010
+++ rtems/testsuites/libtests/dumpbuf01/dumpbuf01.scn Mon Aug 2 13:17:11 2010
</font><font color='#997700'>@@ -0,0 +1,189 @@
</font><font color='#000088'>+*** TEST DUMPBUF01 ***
+====== Printing 0 Bytes ======
+===============================
+
+====== Printing 1 Bytes ======
+41 |A |
+===============================
+
+====== Printing 2 Bytes ======
+41 42 |AB |
+===============================
+
+====== Printing 3 Bytes ======
+41 42 43 |ABC |
+===============================
+
+====== Printing 4 Bytes ======
+41 42 43 44 |ABCD |
+===============================
+
+====== Printing 5 Bytes ======
+41 42 43 44 45 |ABCDE |
+===============================
+
+====== Printing 6 Bytes ======
+41 42 43 44 45 46 |ABCDEF |
+===============================
+
+====== Printing 7 Bytes ======
+41 42 43 44 45 46 47 |ABCDEFG |
+===============================
+
+====== Printing 8 Bytes ======
+41 42 43 44 45 46 47 48 |ABCDEFGH |
+===============================
+
+====== Printing 9 Bytes ======
+41 42 43 44 45 46 47 48 49 |ABCDEFGHI |
+===============================
+
+====== Printing 10 Bytes ======
+41 42 43 44 45 46 47 48 49 4a |ABCDEFGHIJ |
+===============================
+
+====== Printing 11 Bytes ======
+41 42 43 44 45 46 47 48 49 4a 4b |ABCDEFGHIJK |
+===============================
+
+====== Printing 12 Bytes ======
+41 42 43 44 45 46 47 48 49 4a 4b 4c |ABCDEFGHIJKL |
+===============================
+
+====== Printing 13 Bytes ======
+41 42 43 44 45 46 47 48 49 4a 4b 4c 4d |ABCDEFGHIJKLM |
+===============================
+
+====== Printing 14 Bytes ======
+41 42 43 44 45 46 47 48 49 4a 4b 4c 4d 4e |ABCDEFGHIJKLMN |
+===============================
+
+====== Printing 15 Bytes ======
+41 42 43 44 45 46 47 48 49 4a 4b 4c 4d 4e 4f |ABCDEFGHIJKLMNO |
+===============================
+
+====== Printing 16 Bytes ======
+41 42 43 44 45 46 47 48 49 4a 4b 4c 4d 4e 4f 50 |ABCDEFGHIJKLMNOP|
+===============================
+
+====== Printing 17 Bytes ======
+41 42 43 44 45 46 47 48 49 4a 4b 4c 4d 4e 4f 50 |ABCDEFGHIJKLMNOP|
+51 |Q |
+===============================
+
+====== Printing 18 Bytes ======
+41 42 43 44 45 46 47 48 49 4a 4b 4c 4d 4e 4f 50 |ABCDEFGHIJKLMNOP|
+51 52 |QR |
+===============================
+
+====== Printing 19 Bytes ======
+41 42 43 44 45 46 47 48 49 4a 4b 4c 4d 4e 4f 50 |ABCDEFGHIJKLMNOP|
+51 52 53 |QRS |
+===============================
+
+====== Printing 20 Bytes ======
+41 42 43 44 45 46 47 48 49 4a 4b 4c 4d 4e 4f 50 |ABCDEFGHIJKLMNOP|
+51 52 53 54 |QRST |
+===============================
+
+====== Printing 21 Bytes ======
+41 42 43 44 45 46 47 48 49 4a 4b 4c 4d 4e 4f 50 |ABCDEFGHIJKLMNOP|
+51 52 53 54 55 |QRSTU |
+===============================
+
+====== Printing 22 Bytes ======
+41 42 43 44 45 46 47 48 49 4a 4b 4c 4d 4e 4f 50 |ABCDEFGHIJKLMNOP|
+51 52 53 54 55 56 |QRSTUV |
+===============================
+
+====== Printing 23 Bytes ======
+41 42 43 44 45 46 47 48 49 4a 4b 4c 4d 4e 4f 50 |ABCDEFGHIJKLMNOP|
+51 52 53 54 55 56 57 |QRSTUVW |
+===============================
+
+====== Printing 24 Bytes ======
+41 42 43 44 45 46 47 48 49 4a 4b 4c 4d 4e 4f 50 |ABCDEFGHIJKLMNOP|
+51 52 53 54 55 56 57 58 |QRSTUVWX |
+===============================
+
+====== Printing 25 Bytes ======
+41 42 43 44 45 46 47 48 49 4a 4b 4c 4d 4e 4f 50 |ABCDEFGHIJKLMNOP|
+51 52 53 54 55 56 57 58 59 |QRSTUVWXY |
+===============================
+
+====== Printing 26 Bytes ======
+41 42 43 44 45 46 47 48 49 4a 4b 4c 4d 4e 4f 50 |ABCDEFGHIJKLMNOP|
+51 52 53 54 55 56 57 58 59 5a |QRSTUVWXYZ |
+===============================
+
+====== Printing 27 Bytes ======
+41 42 43 44 45 46 47 48 49 4a 4b 4c 4d 4e 4f 50 |ABCDEFGHIJKLMNOP|
+51 52 53 54 55 56 57 58 59 5a 30 |QRSTUVWXYZ0 |
+===============================
+
+====== Printing 28 Bytes ======
+41 42 43 44 45 46 47 48 49 4a 4b 4c 4d 4e 4f 50 |ABCDEFGHIJKLMNOP|
+51 52 53 54 55 56 57 58 59 5a 30 31 |QRSTUVWXYZ01 |
+===============================
+
+====== Printing 29 Bytes ======
+41 42 43 44 45 46 47 48 49 4a 4b 4c 4d 4e 4f 50 |ABCDEFGHIJKLMNOP|
+51 52 53 54 55 56 57 58 59 5a 30 31 32 |QRSTUVWXYZ012 |
+===============================
+
+====== Printing 30 Bytes ======
+41 42 43 44 45 46 47 48 49 4a 4b 4c 4d 4e 4f 50 |ABCDEFGHIJKLMNOP|
+51 52 53 54 55 56 57 58 59 5a 30 31 32 33 |QRSTUVWXYZ0123 |
+===============================
+
+====== Printing 31 Bytes ======
+41 42 43 44 45 46 47 48 49 4a 4b 4c 4d 4e 4f 50 |ABCDEFGHIJKLMNOP|
+51 52 53 54 55 56 57 58 59 5a 30 31 32 33 34 |QRSTUVWXYZ01234 |
+===============================
+
+====== Printing 32 Bytes ======
+41 42 43 44 45 46 47 48 49 4a 4b 4c 4d 4e 4f 50 |ABCDEFGHIJKLMNOP|
+51 52 53 54 55 56 57 58 59 5a 30 31 32 33 34 35 |QRSTUVWXYZ012345|
+===============================
+
+====== Printing 33 Bytes ======
+41 42 43 44 45 46 47 48 49 4a 4b 4c 4d 4e 4f 50 |ABCDEFGHIJKLMNOP|
+51 52 53 54 55 56 57 58 59 5a 30 31 32 33 34 35 |QRSTUVWXYZ012345|
+36 |6 |
+===============================
+
+====== Printing 34 Bytes ======
+41 42 43 44 45 46 47 48 49 4a 4b 4c 4d 4e 4f 50 |ABCDEFGHIJKLMNOP|
+51 52 53 54 55 56 57 58 59 5a 30 31 32 33 34 35 |QRSTUVWXYZ012345|
+36 37 |67 |
+===============================
+
+====== Printing 35 Bytes ======
+41 42 43 44 45 46 47 48 49 4a 4b 4c 4d 4e 4f 50 |ABCDEFGHIJKLMNOP|
+51 52 53 54 55 56 57 58 59 5a 30 31 32 33 34 35 |QRSTUVWXYZ012345|
+36 37 38 |678 |
+===============================
+
+====== Printing 36 Bytes ======
+41 42 43 44 45 46 47 48 49 4a 4b 4c 4d 4e 4f 50 |ABCDEFGHIJKLMNOP|
+51 52 53 54 55 56 57 58 59 5a 30 31 32 33 34 35 |QRSTUVWXYZ012345|
+36 37 38 39 |6789 |
+===============================
+
+====== Printing 37 Bytes ======
+41 42 43 44 45 46 47 48 49 4a 4b 4c 4d 4e 4f 50 |ABCDEFGHIJKLMNOP|
+51 52 53 54 55 56 57 58 59 5a 30 31 32 33 34 35 |QRSTUVWXYZ012345|
+36 37 38 39 30 |67890 |
+===============================
+
+====== Printing 38 Bytes ======
+41 42 43 44 45 46 47 48 49 4a 4b 4c 4d 4e 4f 50 |ABCDEFGHIJKLMNOP|
+51 52 53 54 55 56 57 58 59 5a 30 31 32 33 34 35 |QRSTUVWXYZ012345|
+36 37 38 39 30 0a |67890. |
+===============================
+
+====== Printing -1 Bytes ======
+ | |
+===============================
+
+*** END OF TEST DUMPBUF01 ***
</font>
<font color='#006600'>diff -u /dev/null rtems/testsuites/libtests/dumpbuf01/init.c:1.1
--- /dev/null Mon Aug 2 14:11:22 2010
+++ rtems/testsuites/libtests/dumpbuf01/init.c Mon Aug 2 13:17:11 2010
</font><font color='#997700'>@@ -0,0 +1,57 @@
</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/dumpbuf.h>
+
+unsigned char Buffer[] =<span style="background-color: #FF0000"> </span>
+"ABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890\n";
+
+void do_test(
+ int length
+)
+{
+ printf( "====== Printing %d Bytes ======\n", length );
+ rtems_print_buffer( Buffer, length );
+ printf( "===============================\n\n" );
+}
+
+rtems_task Init(
+ rtems_task_argument argument
+)
+{
+ int i;
+
+ puts( "\n\n*** TEST DUMPBUF01 ***" );
+
+ for ( i = 0 ; i < sizeof(Buffer) ; i++ ) {
+ do_test( i );
+ }
+ do_test( -1 );
+<span style="background-color: #FF0000"> </span>
+ puts( "*** END OF TEST DUMPBUF01 ***" );
+
+ rtems_test_exit(0);
+}
+
+/* configuration information */
+
+#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER
+#define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER
+
+#define CONFIGURE_MAXIMUM_TASKS 1
+#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
+
+#define CONFIGURE_INIT
+
+#include <rtems/confdefs.h>
+/* end of file */
</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-07-30 Bharath Suri <bharath.s.jois@gmail.com>
PR 1642/testing
* psximfs02/init.c, psximfs02/psximfs02.scn,
psximfs02/psximfs02.doc: Added test cases to exercise chmod(),
chown() and routines in imfs_debug.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.301&r2=text&tr2=1.302&diff_format=h">M</a></td><td width='1%'>1.302</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/psximfs02/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/psximfs02/init.c</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/testsuites/psxtests/psximfs02/psximfs02.doc.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/psximfs02/psximfs02.doc</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.1&r2=text&tr2=1.2&diff_format=h">M</a></td><td width='1%'>1.2</td><td width='100%'>testsuites/psxtests/psximfs02/psximfs02.scn</td></tr>
</table>
<pre>
<font color='#006600'>diff -u rtems/testsuites/psxtests/ChangeLog:1.301 rtems/testsuites/psxtests/ChangeLog:1.302
--- rtems/testsuites/psxtests/ChangeLog:1.301 Thu Jul 29 17:40:49 2010
+++ rtems/testsuites/psxtests/ChangeLog Mon Aug 2 13:19:35 2010
</font><font color='#997700'>@@ -1,3 +1,9 @@
</font><font color='#000088'>+2010-07-30 Bharath Suri <bharath.s.jois@gmail.com>
+
+ PR 1642/testing
+ * psximfs02/init.c, psximfs02/psximfs02.scn,
+ psximfs02/psximfs02.doc: Added test cases to exercise chmod(),
+ chown() and routines in imfs_debug.c.
</font> 2010-07-29 Bharath Suri <bharath.s.jois@gmail.com>
PR 1642/testing
<font color='#006600'>diff -u rtems/testsuites/psxtests/psximfs02/init.c:1.1 rtems/testsuites/psxtests/psximfs02/init.c:1.2
--- rtems/testsuites/psxtests/psximfs02/init.c:1.1 Thu Jul 29 17:40:50 2010
+++ rtems/testsuites/psxtests/psximfs02/init.c Mon Aug 2 13:19:35 2010
</font><font color='#997700'>@@ -20,7 +20,7 @@
</font> #include <rtems/libio.h>
extern Heap_Control *RTEMS_Malloc_Heap;
<font color='#880000'>-
</font><font color='#000088'>+void IMFS_dump( void );
</font> rtems_task Init(
rtems_task_argument argument
)
<font color='#997700'>@@ -129,11 +129,38 @@
</font> rtems_test_assert( status == -1 );
rtems_test_assert( errno == ENOMEM );
<font color='#000088'>+ puts( "Freeing allocated memory" );
+ free( alloc_ptr );
+
</font> puts( "Attempt to stat a hardlink -- expect ENOTSUP" );
status = lstat( "/node-link", &stat_buf );
rtems_test_assert( status == -1 );
rtems_test_assert( errno == ENOTSUP );
<font color='#000088'>+ puts( "Changing euid to 10" );
+ status = seteuid( 10 );
+ rtems_test_assert( status == 0 );
+
+ puts( "Attempt chmod on /node -- expect EPERM" );
+ status = chmod( "/node", S_IRUSR );
+ rtems_test_assert( status == -1 );
+ rtems_test_assert( errno == EPERM );
+
+ puts( "Attempt chown on /node -- expect EPERM" );
+ status = chown( "/node", 10, 10 );
+ rtems_test_assert( status == -1 );
+ rtems_test_assert( errno == EPERM );
+
+ puts( "Changing euid back to 0 [root]" );
+ status = seteuid( 0 );
+ rtems_test_assert( status == 0 );
+
+ puts( "Creating a fifo -- OK" );
+ status = mkfifo( "/fifo", S_IRWXU );
+ rtems_test_assert( status == 0 );
+
+ IMFS_dump();
+<span style="background-color: #FF0000"> </span>
</font> puts( "*** END OF TEST IMFS 02 ***" );
rtems_test_exit(0);
}
<font color='#997700'>@@ -149,5 +176,8 @@
</font>
#define CONFIGURE_INIT
<font color='#000088'>+#define CONFIGURE_FIFOS_ENABLED
+#define CONFIGURE_MAXIMUM_FIFOS 1
+
</font> #include <rtems/confdefs.h>
/* end of file */
<font color='#006600'>diff -u rtems/testsuites/psxtests/psximfs02/psximfs02.doc:1.1 rtems/testsuites/psxtests/psximfs02/psximfs02.doc:1.2
--- rtems/testsuites/psxtests/psximfs02/psximfs02.doc:1.1 Thu Jul 29 17:40:50 2010
+++ rtems/testsuites/psxtests/psximfs02/psximfs02.doc Mon Aug 2 13:19:35 2010
</font><font color='#997700'>@@ -22,6 +22,9 @@
</font> + symlink
+ mount
+ lstat
<font color='#000088'>+ + IMFS_dump
+ + chmod
+ + chown
</font>
concepts:
<font color='#006600'>diff -u rtems/testsuites/psxtests/psximfs02/psximfs02.scn:1.1 rtems/testsuites/psxtests/psximfs02/psximfs02.scn:1.2
--- rtems/testsuites/psxtests/psximfs02/psximfs02.scn:1.1 Thu Jul 29 17:40:50 2010
+++ rtems/testsuites/psxtests/psximfs02/psximfs02.scn Mon Aug 2 13:19:35 2010
</font><font color='#997700'>@@ -33,5 +33,29 @@
</font> Freeing allocated memory
Allocate most of heap
Attempt to create /node-slink-2 for /node -- expect ENOMEM
<font color='#000088'>+Freeing allocated memory
</font> Attempt to stat a hardlink -- expect ENOTSUP
<font color='#000088'>+Changing euid to 10
+Attempt chmod on /node -- expect EPERM
+Attempt chown on /node -- expect EPERM
+Changing euid back to 0 [root]
+Creating a fifo -- OK
+*************** Dump of Entire IMFS ***************
+/
+....dev/
+........console (device 0, 0)
+....dir00/
+........dir01/
+........dir01-link0 links not printed
+........dir01-link1 links not printed
+........dir01-link2 links not printed
+........dir01-link3 links not printed
+........dir01-link4 links not printed
+........dir01-link5 links not printed
+........dir01-link6 links not printed
+....node (file 0)
+....node-link links not printed
+....node-slink links not printed
+....fifo FIFO not printed
+*************** End of Dump ***************
</font> *** END OF TEST IMFS 02 ***
</pre>
<p> </p>
<a name='cs4'></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-02 Joel Sherrill <joel.sherrill@oarcorp.com>
* libcsupport/src/base_fs.c, libcsupport/src/rtems_mkdir.c: Formatting.
</pre></td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/ChangeLog.diff?r1=text&tr1=1.2540&r2=text&tr2=1.2541&diff_format=h">M</a></td><td width='1%'>1.2541</td><td width='100%'>cpukit/ChangeLog</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/libcsupport/src/base_fs.c.diff?r1=text&tr1=1.22&r2=text&tr2=1.23&diff_format=h">M</a></td><td width='1%'>1.23</td><td width='100%'>cpukit/libcsupport/src/base_fs.c</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/libcsupport/src/rtems_mkdir.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%'>cpukit/libcsupport/src/rtems_mkdir.c</td></tr>
</table>
<pre>
<font color='#006600'>diff -u rtems/cpukit/ChangeLog:1.2540 rtems/cpukit/ChangeLog:1.2541
--- rtems/cpukit/ChangeLog:1.2540 Mon Aug 2 13:08:01 2010
+++ rtems/cpukit/ChangeLog Mon Aug 2 13:24:15 2010
</font><font color='#997700'>@@ -1,3 +1,7 @@
</font><font color='#000088'>+2010-08-02 Joel Sherrill <joel.sherrill@oarcorp.com>
+
+ * libcsupport/src/base_fs.c, libcsupport/src/rtems_mkdir.c: Formatting.
+
</font> 2010-07-30 Bharath Suri <bharath.s.jois@gmail.com>
PR 1645/cpukit
<font color='#006600'>diff -u rtems/cpukit/libcsupport/src/base_fs.c:1.22 rtems/cpukit/libcsupport/src/base_fs.c:1.23
--- rtems/cpukit/libcsupport/src/base_fs.c:1.22 Mon May 31 08:56:36 2010
+++ rtems/cpukit/libcsupport/src/base_fs.c Mon Aug 2 13:24:15 2010
</font><font color='#997700'>@@ -48,14 +48,12 @@
</font> /*
* mount the first filesystem.
*/
<font color='#880000'>-
</font> if ( rtems_filesystem_mount_table_size == 0 )
rtems_fatal_error_occurred( 0xABCD0001 );
mt = &rtems_filesystem_mount_table[0];
status = mount( mt->device, mt->mount_point, mt->type, mt->fsoptions, NULL );
<font color='#880000'>-
</font> if ( status == -1 )
rtems_fatal_error_occurred( 0xABCD0002 );
<font color='#006600'>diff -u rtems/cpukit/libcsupport/src/rtems_mkdir.c:1.1 rtems/cpukit/libcsupport/src/rtems_mkdir.c:1.2
--- rtems/cpukit/libcsupport/src/rtems_mkdir.c:1.1 Tue Jun 8 08:05:11 2010
+++ rtems/cpukit/libcsupport/src/rtems_mkdir.c Mon Aug 2 13:24:15 2010
</font><font color='#997700'>@@ -12,7 +12,7 @@
</font> * Copyright (c) 2010 embedded brains GmbH.
*
* Copyright (c) 1983, 1992, 1993
<font color='#880000'>- * The Regents of the University of California. All rights reserved.
</font><font color='#000088'>+ * The Regents of the University of California. All rights reserved.
</font> *
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
<font color='#997700'>@@ -60,82 +60,82 @@
</font> static int
build(char *path, mode_t omode)
{
<font color='#880000'>- struct stat sb;
- mode_t numask, oumask;
- int first, last, retval;
- char *p;
-
- p = path;
- oumask = 0;
- retval = 1;
- if (p[0] == '/') /* Skip leading '/'. */
- ++p;
- for (first = 1, last = 0; !last ; ++p) {
- if (p[0] == '\0')
- last = 1;
- else if (p[0] != '/')
- continue;
- *p = '\0';
- if (!last && p[1] == '\0')
- last = 1;
- if (first) {
- /*
- * POSIX 1003.2:
- * For each dir operand that does not name an existing
- * directory, effects equivalent to those caused by the
- * following command shall occcur:
- *
- * mkdir -p -m $(umask -S),u+wx $(dirname dir) &&
- * mkdir [-m mode] dir
- *
- * We change the user's umask and then restore it,
- * instead of doing chmod's.
- */
- oumask = umask(0);
- numask = oumask & ~(S_IWUSR | S_IXUSR);
- (void)umask(numask);
- first = 0;
- }
- if (last)
- (void)umask(oumask);
- if (mkdir(path, last ? omode : S_IRWXU | S_IRWXG | S_IRWXO) < 0) {
- if (errno == EEXIST || errno == EISDIR) {
- if (stat(path, &sb) < 0) {
- retval = 0;
- break;
- } else if (!S_ISDIR(sb.st_mode)) {
- if (last)
- errno = EEXIST;
- else
- errno = ENOTDIR;
- retval = 0;
- break;
- }
- if (last)
- retval = 2;
- } else {
- retval = 0;
- break;
- }
- }
- if (!last)
- *p = '/';
- }
- if (!first && !last)
- (void)umask(oumask);
- return (retval);
</font><font color='#000088'>+ struct stat sb;
+ mode_t numask, oumask;
+ int first, last, retval;
+ char *p;
+
+ p = path;
+ oumask = 0;
+ retval = 1;
+ if (p[0] == '/') /* Skip leading '/'. */
+ ++p;
+ for (first = 1, last = 0; !last ; ++p) {
+ if (p[0] == '\0')
+ last = 1;
+ else if (p[0] != '/')
+ continue;
+ *p = '\0';
+ if (!last && p[1] == '\0')
+ last = 1;
+ if (first) {
+ /*
+ * POSIX 1003.2:
+ * For each dir operand that does not name an existing
+ * directory, effects equivalent to those caused by the
+ * following command shall occcur:
+ *
+ * mkdir -p -m $(umask -S),u+wx $(dirname dir) &&
+ * mkdir [-m mode] dir
+ *
+ * We change the user's umask and then restore it,
+ * instead of doing chmod's.
+ */
+ oumask = umask(0);
+ numask = oumask & ~(S_IWUSR | S_IXUSR);
+ (void)umask(numask);
+ first = 0;
+ }
+ if (last)
+ (void)umask(oumask);
+ if (mkdir(path, last ? omode : S_IRWXU | S_IRWXG | S_IRWXO) < 0) {
+ if (errno == EEXIST || errno == EISDIR) {
+ if (stat(path, &sb) < 0) {
+ retval = 0;
+ break;
+ } else if (!S_ISDIR(sb.st_mode)) {
+ if (last)
+ errno = EEXIST;
+ else
+ errno = ENOTDIR;
+ retval = 0;
+ break;
+ }
+ if (last)
+ retval = 2;
+ } else {
+ retval = 0;
+ break;
+ }
+ }
+ if (!last)
+ *p = '/';
+ }
+ if (!first && !last)
+ (void)umask(oumask);
+ return (retval);
</font> }
int
rtems_mkdir(const char *path, mode_t mode)
{
<font color='#880000'>- int success = 0;
- char *dup_path = strdup(path);
</font><font color='#000088'>+ int success = 0;
+ char *dup_path = strdup(path);
</font>
<font color='#880000'>- if (dup_path != NULL) {
- success = build(dup_path, mode);
- free(dup_path);
- }
</font><font color='#000088'>+ if (dup_path != NULL) {
+ success = build(dup_path, mode);
+ free(dup_path);
+ }
</font>
<font color='#880000'>- return success != 0 ? 0 : -1;
</font><font color='#000088'>+ return success != 0 ? 0 : -1;
</font> }
</pre>
<p> </p>
<a name='cs5'></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-02 Joel Sherrill <joel.sherrill@oarcorp.com>
* libmisc/stackchk/check.c: If this port does not allocate the
interrupt stack, then it must always be a thread stack. Do not
include code to print the interrupt stack information.
</pre></td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/ChangeLog.diff?r1=text&tr1=1.2541&r2=text&tr2=1.2542&diff_format=h">M</a></td><td width='1%'>1.2542</td><td width='100%'>cpukit/ChangeLog</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/libmisc/stackchk/check.c.diff?r1=text&tr1=1.69&r2=text&tr2=1.70&diff_format=h">M</a></td><td width='1%'>1.70</td><td width='100%'>cpukit/libmisc/stackchk/check.c</td></tr>
</table>
<pre>
<font color='#006600'>diff -u rtems/cpukit/ChangeLog:1.2541 rtems/cpukit/ChangeLog:1.2542
--- rtems/cpukit/ChangeLog:1.2541 Mon Aug 2 13:24:15 2010
+++ rtems/cpukit/ChangeLog Mon Aug 2 13:26:30 2010
</font><font color='#997700'>@@ -1,5 +1,11 @@
</font> 2010-08-02 Joel Sherrill <joel.sherrill@oarcorp.com>
<font color='#000088'>+ * libmisc/stackchk/check.c: If this port does not allocate the
+ interrupt stack, then it must always be a thread stack. Do not
+ include code to print the interrupt stack information.
+
+2010-08-02 Joel Sherrill <joel.sherrill@oarcorp.com>
+
</font> * libcsupport/src/base_fs.c, libcsupport/src/rtems_mkdir.c: Formatting.
2010-07-30 Bharath Suri <bharath.s.jois@gmail.com>
<font color='#006600'>diff -u rtems/cpukit/libmisc/stackchk/check.c:1.69 rtems/cpukit/libmisc/stackchk/check.c:1.70
--- rtems/cpukit/libmisc/stackchk/check.c:1.69 Sun Jul 4 09:53:47 2010
+++ rtems/cpukit/libmisc/stackchk/check.c Mon Aug 2 13:26:30 2010
</font><font color='#997700'>@@ -420,16 +420,23 @@
</font> else
used = 0;
<font color='#880000'>- if ( the_thread ) {
- (*print_handler)(
- print_context,
- "0x%08" PRIx32 " %4s",
- the_thread->Object.id,
- rtems_object_get_name( the_thread->Object.id, sizeof(name), name )
- );
- } else {
- (*print_handler)( print_context, "0x%08" PRIx32 " INTR", ~0 );
- }
</font><font color='#000088'>+
+ #if (CPU_ALLOCATE_INTERRUPT_STACK == TRUE)
+ if ( the_thread )
+ #endif
+ {
+ (*print_handler)(
+ print_context,
+ "0x%08" PRIx32 " %4s",
+ the_thread->Object.id,
+ rtems_object_get_name( the_thread->Object.id, sizeof(name), name )
+ );
+ }
+ #if (CPU_ALLOCATE_INTERRUPT_STACK == TRUE)
+ else {
+ (*print_handler)( print_context, "0x%08" PRIx32 " INTR", ~0 );
+ }
+ #endif
</font>
(*print_handler)(
print_context,
</pre>
<p> </p>
<a name='cs6'></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-02 Joel Sherrill <joel.sherrill@oarcorp.com>
* libfs/src/imfs/imfs_creat.c, libfs/src/imfs/imfs_eval.c,
libfs/src/imfs/imfs_mknod.c, libfs/src/imfs/imfs_readlink.c,
libfs/src/pipe/fifo.c: Clean up for coverage improvements and
formatting.
</pre></td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/ChangeLog.diff?r1=text&tr1=1.2542&r2=text&tr2=1.2543&diff_format=h">M</a></td><td width='1%'>1.2543</td><td width='100%'>cpukit/ChangeLog</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/libfs/src/imfs/imfs_creat.c.diff?r1=text&tr1=1.19&r2=text&tr2=1.20&diff_format=h">M</a></td><td width='1%'>1.20</td><td width='100%'>cpukit/libfs/src/imfs/imfs_creat.c</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/libfs/src/imfs/imfs_eval.c.diff?r1=text&tr1=1.28&r2=text&tr2=1.29&diff_format=h">M</a></td><td width='1%'>1.29</td><td width='100%'>cpukit/libfs/src/imfs/imfs_eval.c</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/libfs/src/imfs/imfs_mknod.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%'>cpukit/libfs/src/imfs/imfs_mknod.c</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/libfs/src/imfs/imfs_readlink.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%'>cpukit/libfs/src/imfs/imfs_readlink.c</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/libfs/src/pipe/fifo.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%'>cpukit/libfs/src/pipe/fifo.c</td></tr>
</table>
<pre>
<font color='#006600'>diff -u rtems/cpukit/ChangeLog:1.2542 rtems/cpukit/ChangeLog:1.2543
--- rtems/cpukit/ChangeLog:1.2542 Mon Aug 2 13:26:30 2010
+++ rtems/cpukit/ChangeLog Mon Aug 2 13:27:22 2010
</font><font color='#997700'>@@ -1,5 +1,12 @@
</font> 2010-08-02 Joel Sherrill <joel.sherrill@oarcorp.com>
<font color='#000088'>+ * libfs/src/imfs/imfs_creat.c, libfs/src/imfs/imfs_eval.c,
+ libfs/src/imfs/imfs_mknod.c, libfs/src/imfs/imfs_readlink.c,
+ libfs/src/pipe/fifo.c: Clean up for coverage improvements and
+ formatting.
+
+2010-08-02 Joel Sherrill <joel.sherrill@oarcorp.com>
+
</font> * libmisc/stackchk/check.c: If this port does not allocate the
interrupt stack, then it must always be a thread stack. Do not
include code to print the interrupt stack information.
<font color='#006600'>diff -u rtems/cpukit/libfs/src/imfs/imfs_creat.c:1.19 rtems/cpukit/libfs/src/imfs/imfs_creat.c:1.20
--- rtems/cpukit/libfs/src/imfs/imfs_creat.c:1.19 Fri Jul 30 17:36:32 2010
+++ rtems/cpukit/libfs/src/imfs/imfs_creat.c Mon Aug 2 13:27:22 2010
</font><font color='#997700'>@@ -64,42 +64,28 @@
</font> /*
* Set the type specific information
*/
<font color='#880000'>- switch (type) {
- case IMFS_DIRECTORY:
- rtems_chain_initialize_empty(&node->info.directory.Entries);
- break;
-
- case IMFS_HARD_LINK:
- node->info.hard_link.link_node = info->hard_link.link_node;
- break;
-
- case IMFS_SYM_LINK:
- node->info.sym_link.name = info->sym_link.name;
- break;
-
- case IMFS_DEVICE:
- node->info.device.major = info->device.major;
- node->info.device.minor = info->device.minor;
- break;
-
- case IMFS_LINEAR_FILE:
- node->info.linearfile.size = 0;
- node->info.linearfile.direct = 0;
-
- case IMFS_MEMORY_FILE:
</font><font color='#000088'>+ if ( type == IMFS_DIRECTORY ) {
+ rtems_chain_initialize_empty(&node->info.directory.Entries);
+ } else if ( type == IMFS_HARD_LINK ) {
+ node->info.hard_link.link_node = info->hard_link.link_node;
+ } else if ( type == IMFS_SYM_LINK ) {
+ node->info.sym_link.name = info->sym_link.name;
+ } else if ( type == IMFS_DEVICE ) {
+ node->info.device.major = info->device.major;
+ node->info.device.minor = info->device.minor;
+ } else if ( type == IMFS_LINEAR_FILE ) {
+ node->info.linearfile.size = 0;
+ node->info.linearfile.direct = 0;
+ if ( type == IMFS_MEMORY_FILE ) {
</font> node->info.file.size = 0;
node->info.file.indirect = 0;
node->info.file.doubly_indirect = 0;
node->info.file.triply_indirect = 0;
<font color='#880000'>- break;
-
- case IMFS_FIFO:
- node->info.fifo.pipe = NULL;
- break;
-
- default:
- IMFS_assert(0);
- break;
</font><font color='#000088'>+ }
+ } else if ( type == IMFS_FIFO ) {
+ node->info.fifo.pipe = NULL;
+ } else {
+ IMFS_assert(0);
</font> }
/*
<font color='#006600'>diff -u rtems/cpukit/libfs/src/imfs/imfs_eval.c:1.28 rtems/cpukit/libfs/src/imfs/imfs_eval.c:1.29
--- rtems/cpukit/libfs/src/imfs/imfs_eval.c:1.28 Thu Jun 24 16:31:22 2010
+++ rtems/cpukit/libfs/src/imfs/imfs_eval.c Mon Aug 2 13:27:23 2010
</font><font color='#997700'>@@ -70,7 +70,6 @@
</font> * The following routine evaluates that we have permission
* to do flags on the node.
*/
<font color='#880000'>-
</font> int IMFS_evaluate_permission(
rtems_filesystem_location_info_t *node,
int flags
<font color='#997700'>@@ -136,14 +135,11 @@
</font> /*
* Check for things that should never happen.
*/
<font color='#880000'>-
- if ( jnode->type != IMFS_HARD_LINK )
- rtems_fatal_error_occurred (0xABCD0000);
</font><font color='#000088'>+ IMFS_assert( jnode->type == IMFS_HARD_LINK );
</font>
/*
* Set the hard link value and the handlers.
*/
<font color='#880000'>-
</font> node->node_access = jnode->info.hard_link.link_node;
IMFS_Set_handlers( node );
<font color='#997700'>@@ -177,19 +173,13 @@
</font> /*
* Check for things that should never happen.
*/
<font color='#880000'>-
- if ( jnode->type != IMFS_SYM_LINK )
- rtems_fatal_error_occurred (0xABCD0000);
-
- if ( !jnode->Parent )
- rtems_fatal_error_occurred( 0xBAD00000 );
-
</font><font color='#000088'>+ IMFS_assert( jnode->type == IMFS_SYM_LINK )
+ IMFS_assert( jnode->Parent )
</font>
/*
* Move the node_access to either the symbolic links parent or
* root depending on the symbolic links path.
*/
<font color='#880000'>-
</font> node->node_access = jnode->Parent;
rtems_filesystem_get_sym_start_loc(
<font color='#997700'>@@ -201,7 +191,6 @@
</font> /*
* Use eval path to evaluate the path of the symbolic link.
*/
<font color='#880000'>-
</font> result = IMFS_eval_path(
&jnode->info.sym_link.name[i],
strlen( &jnode->info.sym_link.name[i] ),
<font color='#997700'>@@ -214,7 +203,6 @@
</font> /*
* Verify we have the correct permissions for this node.
*/
<font color='#880000'>-
</font> if ( !IMFS_evaluate_permission( node, flags ) )
rtems_set_errno_and_return_minus_one( EACCES );
<font color='#997700'>@@ -226,7 +214,6 @@
</font> *
* The following routine returns the real node pointed to by a link.
*/
<font color='#880000'>-
</font> int IMFS_evaluate_link(
rtems_filesystem_location_info_t *node, /* IN/OUT */
int flags /* IN */
<font color='#997700'>@@ -578,19 +565,23 @@
</font> /*
* If we are at a link follow it.
*/
<font color='#880000'>-
</font> if ( node->type == IMFS_HARD_LINK ) {
<font color='#880000'>-
</font> IMFS_evaluate_hard_link( pathloc, 0 );
<font color='#880000'>-
</font> node = pathloc->node_access;
<font color='#880000'>- if ( !node )
- rtems_set_errno_and_return_minus_one( ENOTDIR );
</font><font color='#000088'>+<span style="background-color: #FF0000"> </span>
+ /*
+ * It would be a design error if we evaluated the link and
+ * was broken.
+ */
+ IMFS_assert( node );
</font>
} else if ( node->type == IMFS_SYM_LINK ) {
<font color='#880000'>-
</font> result = IMFS_evaluate_sym_link( pathloc, 0 );
<font color='#000088'>+ /*
+ * In contrast to a hard link, it is possible to have a broken
+ * symbolic link.
+ */
</font> node = pathloc->node_access;
if ( result == -1 )
return -1;
<font color='#997700'>@@ -599,7 +590,6 @@
</font> /*
* Only a directory can be decended into.
*/
<font color='#880000'>-
</font> if ( node->type != IMFS_DIRECTORY )
rtems_set_errno_and_return_minus_one( ENOTDIR );
<font color='#997700'>@@ -607,7 +597,6 @@
</font> * If we are at a node that is a mount point. Set loc to the
* new fs root node and let them finish evaluating the path.
*/
<font color='#880000'>-
</font> if ( node->info.directory.mt_fs != NULL ) {
newloc = node->info.directory.mt_fs->mt_fs_root;
*pathloc = newloc;
<font color='#997700'>@@ -619,7 +608,6 @@
</font> /*
* Otherwise find the token name in the present location.
*/
<font color='#880000'>-
</font> node = IMFS_find_match_in_dir( node, token );
if ( !node )
rtems_set_errno_and_return_minus_one( ENOENT );
<font color='#006600'>diff -u rtems/cpukit/libfs/src/imfs/imfs_mknod.c:1.14 rtems/cpukit/libfs/src/imfs/imfs_mknod.c:1.15
--- rtems/cpukit/libfs/src/imfs/imfs_mknod.c:1.14 Tue Jan 19 13:31:00 2010
+++ rtems/cpukit/libfs/src/imfs/imfs_mknod.c Mon Aug 2 13:27:23 2010
</font><font color='#997700'>@@ -53,12 +53,10 @@
</font> else if ( S_ISBLK(mode) || S_ISCHR(mode) ) {
type = IMFS_DEVICE;
rtems_filesystem_split_dev_t( dev, info.device.major, info.device.minor );
<font color='#880000'>- }
- else if (S_ISFIFO(mode))
</font><font color='#000088'>+ } else if (S_ISFIFO(mode))
</font> type = IMFS_FIFO;
<font color='#880000'>- else {
- rtems_set_errno_and_return_minus_one( EINVAL );
- }
</font><font color='#000088'>+ else<span style="background-color: #FF0000"> </span>
+ IMFS_assert( 0 );
</font>
/*
* Allocate and fill in an IMFS jnode
<font color='#997700'>@@ -70,14 +68,7 @@
</font> * existed. The result was simpler code which should not have
* this path.<span style="background-color: #FF0000"> </span>
*/
<font color='#880000'>- new_node = IMFS_create_node(
- pathloc,
- type,
- new_name,
- mode,
- &info
- );
-
</font><font color='#000088'>+ new_node = IMFS_create_node( pathloc, type, new_name, mode, &info );
</font> if ( !new_node )
rtems_set_errno_and_return_minus_one( ENOMEM );
<font color='#006600'>diff -u rtems/cpukit/libfs/src/imfs/imfs_readlink.c:1.7 rtems/cpukit/libfs/src/imfs/imfs_readlink.c:1.8
--- rtems/cpukit/libfs/src/imfs/imfs_readlink.c:1.7 Sat Apr 17 03:34:41 2004
+++ rtems/cpukit/libfs/src/imfs/imfs_readlink.c Mon Aug 2 13:27:23 2010
</font><font color='#997700'>@@ -34,8 +34,7 @@
</font>
node = loc->node_access;
<font color='#880000'>- if ( node->type != IMFS_SYM_LINK )
- rtems_set_errno_and_return_minus_one( EINVAL );
</font><font color='#000088'>+ IMFS_assert( node->type == IMFS_SYM_LINK );
</font>
for( i=0; ((i<bufsize) && (node->info.sym_link.name[i] != '\0')); i++ )
buf[i] = node->info.sym_link.name[i];
<font color='#006600'>diff -u rtems/cpukit/libfs/src/pipe/fifo.c:1.9 rtems/cpukit/libfs/src/pipe/fifo.c:1.10
--- rtems/cpukit/libfs/src/pipe/fifo.c:1.9 Thu Jun 24 14:57:58 2010
+++ rtems/cpukit/libfs/src/pipe/fifo.c Mon Aug 2 13:27:23 2010
</font><font color='#997700'>@@ -190,10 +190,11 @@
</font> rtems_status_code sc = RTEMS_SUCCESSFUL;
sc = rtems_semaphore_release(pipe_semaphore);
<font color='#880000'>- if (sc != RTEMS_SUCCESSFUL) {
- /* FIXME */
- rtems_fatal_error_occurred(0xdeadbeef);
- }
</font><font color='#000088'>+ #ifdef RTEMS_DEBUG
+ if (sc != RTEMS_SUCCESSFUL) {
+ rtems_fatal_error_occurred(0xdeadbeef);
+ }
+ #endif
</font> }
/*
<font color='#997700'>@@ -248,15 +249,15 @@
</font> pipe_control_t *pipe = *pipep;
uint32_t mode;
<font color='#880000'>- if (pipe_lock())
</font><font color='#000088'>+ #if defined(RTEMS_DEBUG)
</font> /* WARN pipe not freed and pipep not set to NULL! */
<font color='#880000'>- /* FIXME */
- rtems_fatal_error_occurred(0xdeadbeef);
</font><font color='#000088'>+ if (pipe_lock())
+ rtems_fatal_error_occurred(0xdeadbeef);
</font>
<font color='#880000'>- if (!PIPE_LOCK(pipe))
</font> /* WARN pipe not released! */
<font color='#880000'>- /* FIXME */
- rtems_fatal_error_occurred(0xdeadbeef);
</font><font color='#000088'>+ if (!PIPE_LOCK(pipe))
+ rtems_fatal_error_occurred(0xdeadbeef);
+ #endif
</font>
mode = LIBIO_ACCMODE(iop);
if (mode & LIBIO_FLAGS_READ)
</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>