summaryrefslogtreecommitdiffstats
path: root/testsuites/psxtests/psxfile01
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2013-04-11 13:58:33 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2013-04-11 13:58:33 +0200
commit7b369afba9fecbf8a87a42375376d4ca8af7560c (patch)
tree5633949494ff207b4e7835ba6ab51164af66bf6f /testsuites/psxtests/psxfile01
parentsapi: Fix unified workspace option (diff)
downloadrtems-7b369afba9fecbf8a87a42375376d4ca8af7560c.tar.bz2
testsuites: Fix warnings
Diffstat (limited to 'testsuites/psxtests/psxfile01')
-rw-r--r--testsuites/psxtests/psxfile01/psxfile01.scn47
-rw-r--r--testsuites/psxtests/psxfile01/test.c12
2 files changed, 37 insertions, 22 deletions
diff --git a/testsuites/psxtests/psxfile01/psxfile01.scn b/testsuites/psxtests/psxfile01/psxfile01.scn
index 6a80e542f2..5cdd609613 100644
--- a/testsuites/psxtests/psxfile01/psxfile01.scn
+++ b/testsuites/psxtests/psxfile01/psxfile01.scn
@@ -2,11 +2,14 @@
*************** Dump of Entire IMFS ***************
/
....dev/
+........console_a (device 0, 0)
........console (device 0, 0)
+........console_b (device 0, 1)
*************** End of Dump ***************
stat of /dev/console
....st_dev (0xfffe:0x0)
-....st_ino 3 may vary by small amount
+....st_rdev (0x0:0x0)
+....st_ino 4 may vary by small amount
....mode = 00020755
....nlink = 1
....uid = 0
@@ -14,7 +17,7 @@ stat of /dev/console
....atime = Fri Jan 1 00:00:00 1988
....mtime = Fri Jan 1 00:00:00 1988
....ctime = Fri Jan 1 00:00:00 1988
-....st_blksize 80
+....st_blksize 0
....st_blocks 0
mkdir /dev/tty
@@ -31,7 +34,6 @@ rmdir /usr
rmdir /dev
rmdir /fred
rmdir /tmp/bha
-unlink /dev/tty
mknod /dev/test_console
mknod /dev/tty/S3
mknod /etc/passwd
@@ -48,7 +50,6 @@ unlink /tmp
create and close /tmp/tom
Attempt to recreate /tmp/tom
create /tmp/john
-tcdrain /tmp/john
Attempt to create a file, open in read-only mode and truncate it
Exercise the reentrant version _link_r -- Expect ENOENT
Unlink /tmp/bha using the reentrant version -- OK
@@ -85,7 +86,8 @@ End of _rename_r tests
stat( /tmp/joel ) returned
....st_dev (0xfffe:0x0)
-....st_ino 15 may vary by small amount
+....st_rdev (0x0:0x0)
+....st_ino 17 may vary by small amount
....mode = 00100700
....nlink = 1
....uid = 0
@@ -118,7 +120,8 @@ Skipping maximum file size test since max_size is 4329344 bytes
That is likely to be bigger than the available RAM on many targets.
stat( /tmp/joel ) returned
....st_dev (0xfffe:0x0)
-....st_ino 16 may vary by small amount
+....st_rdev (0x0:0x0)
+....st_ino 18 may vary by small amount
....mode = 00100700
....nlink = 1
....uid = 0
@@ -130,16 +133,17 @@ stat( /tmp/joel ) returned
....st_blocks 0
stat of /tmp/j
stat(/tmp/j) returned -1 (errno=2)
-....st_dev (0xfffe:0x0)
-....st_ino 3 may vary by small amount
-....mode = 00020755
-....nlink = 1
+....st_dev (0x0:0x0)
+....st_rdev (0x0:0x0)
+....st_ino 0 may vary by small amount
+....mode = 00000000
+....nlink = 0
....uid = 0
....gid = 0
-....atime = Fri Jan 1 00:00:00 1988
-....mtime = Fri Jan 1 00:00:00 1988
-....ctime = Fri Jan 1 00:00:00 1988
-....st_blksize 80
+....atime = Thu Jan 1 00:00:00 1970
+....mtime = Thu Jan 1 00:00:00 1970
+....ctime = Thu Jan 1 00:00:00 1970
+....st_blksize 0
....st_blocks 0
fopen of /tmp/j
fprintf to /tmp/j
@@ -149,7 +153,8 @@ fprintf to /tmp/j
(4) 26 characters written to the file
(5) 26 characters written to the file
....st_dev (0xfffe:0x0)
-....st_ino 17 may vary by small amount
+....st_rdev (0x0:0x0)
+....st_ino 19 may vary by small amount
....mode = 00100644
....nlink = 1
....uid = 0
@@ -165,7 +170,8 @@ This is call 3 to fprintf
This is call 4 to fprintf
This is call 5 to fprintf
....st_dev (0xfffe:0x0)
-....st_ino 17 may vary by small amount
+....st_rdev (0x0:0x0)
+....st_ino 19 may vary by small amount
....mode = 00100644
....nlink = 1
....uid = 0
@@ -178,7 +184,9 @@ This is call 5 to fprintf
*************** Dump of Entire IMFS ***************
/
....dev/
+........console_a (device 0, 0)
........console (device 0, 0)
+........console_b (device 0, 1)
........tty/
............S3 (device 255, 128)
........test_console (device 0, 0)
@@ -195,7 +203,8 @@ This is call 5 to fprintf
*************** End of Dump ***************
truncate /tmp/j to length of 40
....st_dev (0xfffe:0x0)
-....st_ino 17 may vary by small amount
+....st_rdev (0x0:0x0)
+....st_ino 19 may vary by small amount
....mode = 00100644
....nlink = 1
....uid = 0
@@ -208,7 +217,9 @@ truncate /tmp/j to length of 40
*************** Dump of Entire IMFS ***************
/
....dev/
+........console_a (device 0, 0)
........console (device 0, 0)
+........console_b (device 0, 1)
........tty/
............S3 (device 255, 128)
........test_console (device 0, 0)
@@ -229,7 +240,9 @@ truncate /tmp to length of 0 should fail with EISDIR
*************** Dump of Entire IMFS ***************
/
....dev/
+........console_a (device 0, 0)
........console (device 0, 0)
+........console_b (device 0, 1)
........tty/
............S3 (device 255, 128)
........test_console (device 0, 0)
diff --git a/testsuites/psxtests/psxfile01/test.c b/testsuites/psxtests/psxfile01/test.c
index d817e655ab..4d7fe0b6eb 100644
--- a/testsuites/psxtests/psxfile01/test.c
+++ b/testsuites/psxtests/psxfile01/test.c
@@ -35,6 +35,7 @@
#include <unistd.h>
#include <errno.h>
#include <string.h>
+#include <inttypes.h>
#include <ctype.h>
#include <reent.h>
#include <rtems/imfs.h>
@@ -80,15 +81,16 @@ void test_extend(
*/
void dump_statbuf( struct stat *buf )
{
- int major1;
- int minor1;
- int major2;
- int minor2;
+ rtems_device_major_number major1;
+ rtems_device_minor_number minor1;
+ rtems_device_major_number major2;
+ rtems_device_minor_number minor2;
rtems_filesystem_split_dev_t( buf->st_dev, major1, minor1 );
rtems_filesystem_split_dev_t( buf->st_rdev, major2, minor2 );
- printf( "....st_dev (0x%x:0x%x)\n", major1, minor1 );
+ printf( "....st_dev (0x%" PRIx32 ":0x%" PRIx32 ")\n", major1, minor1 );
+ printf( "....st_rdev (0x%" PRIx32 ":0x%" PRIx32 ")\n", major2, minor2 );
printf( "....st_ino %" PRIxino_t " may vary by small amount\n", buf->st_ino );
printf( "....mode = %08" PRIomode_t "\n", buf->st_mode );
printf( "....nlink = %d\n", buf->st_nlink );