summaryrefslogtreecommitdiffstats
path: root/testsuites/psxtests/psxreaddir/test.c
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2011-05-05 16:45:52 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2011-05-05 16:45:52 +0000
commitff7ff62a0f1598e5db1ccd76b9efac49e0959689 (patch)
tree878e7bcf59316e24d0d3459417ef5303983ecb58 /testsuites/psxtests/psxreaddir/test.c
parent2011-05-05 Joel Sherrill <joel.sherrill@oarcorp.com> (diff)
downloadrtems-ff7ff62a0f1598e5db1ccd76b9efac49e0959689.tar.bz2
2011-05-05 Joel Sherrill <joel.sherrill@oarcorp.com>
* psx04/task3.c, psxfile01/test.c, psxhdrs/Makefile.am, psxmsgq01/init.c, psxreaddir/test.c, psxsignal01/init.c, psxtimes01/init.c, psxualarm/init.c: Remove warnings.
Diffstat (limited to '')
-rw-r--r--testsuites/psxtests/psxreaddir/test.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/testsuites/psxtests/psxreaddir/test.c b/testsuites/psxtests/psxreaddir/test.c
index 25377fd08e..b0900cb3b7 100644
--- a/testsuites/psxtests/psxreaddir/test.c
+++ b/testsuites/psxtests/psxreaddir/test.c
@@ -15,7 +15,7 @@
* implementation of this appears to seek to the ((off/DIRENT_SIZE) + 1)
* record where DIRENT_SIZE seems to be 12 bytes.
*
- * COPYRIGHT (c) 1989-2009.
+ * COPYRIGHT (c) 1989-2011.
* On-Line Applications Research Corporation (OAR).
*
* The license and distribution terms for this file may be
@@ -79,8 +79,10 @@ void complete_printdir( char *path )
the_dir = opendir( path );
rtems_test_assert( the_dir );
+
printdir( the_dir );
status = closedir( the_dir );
+ rtems_test_assert( status );
}
char *many_files[] = {
@@ -145,13 +147,13 @@ char *dnames[] = {
"END"
};
-int select1 ( struct dirent *entry )
+int select1 ( const struct dirent *entry )
{
printf("SCANDIR SELECT1 accepts nodename: %s\n", entry->d_name );
return 1;
}
-int select2 ( struct dirent *entry )
+int select2 ( const struct dirent *entry )
{
if( strcmp( entry->d_name, "y") == 0 ) {
printf("SCANDIR SELECT accepted nodename: %s\n", entry->d_name );
@@ -273,6 +275,7 @@ int main(
directory_not = opendir( "/many" );
printdir ( directory_not );
d_not = readdir( directory_not );
+ rtems_test_assert( d_not == 0 );
printf("open /b/myfile\n");
fd = open ("/b/my_file", O_CREAT, S_IRWXU);