yaffs Added more tests to direct/timothy_tests/quick_tests
[yaffs2.git] / direct / timothy_tests / quick_tests / test_yaffs_freespace_NULL.c
similarity index 69%
rename from direct/timothy_tests/quick_tests/test_yaffs_flush_NULL.c
rename to direct/timothy_tests/quick_tests/test_yaffs_freespace_NULL.c
index d6bd625ff98b5c954b7dee24343fd3e5b973c21a..bac5471ab59b8e5d1a8c5735537173b7a749cd82 100644 (file)
  * published by the Free Software Foundation.
  */
 
-#include "test_yaffs_flush_NULL.h"
+#include "test_yaffs_freespace_NULL.h"
 
 
 
-int test_yaffs_flush_NULL(void)
+int test_yaffs_freespace_NULL(void)
 {
        int output=0;
-       int error =0;
-       output = yaffs_flush(NULL);
+       int error=0;
+       output = yaffs_freespace(NULL);
        if (output<0){
                error=yaffs_get_error();
-               if (abs(error)==EBADF){
+               if (abs(error)==EFAULT){
                        return 1;
                } else {
                        print_message("different error than expected\n",2);
                        return -1;
                }
        } else {
-               print_message("flushed a bad handle (which is a bad thing)\n",2);
+               print_message("got the free space of a NULL mountpoint (which is a bad thing)\n",2);
                return -1;
        }
-
 }
 
 
-int test_yaffs_flush_NULL_clean(void)
+int test_yaffs_freespace_NULL_clean(void)
 {
        return 1;
 }