yaffs Found another bug.
[yaffs2.git] / direct / timothy_tests / quick_tests / test_yaffs_open_file_ENOENT.c
1 #include "test_yaffs_open_file_ENOENT.h"
2
3 static int handle=0;
4 int test_yaffs_open_file_ENOENT(void){
5         int output=0;
6         int error_code=0;
7         /*printf("path %s\n",path); */
8         handle=yaffs_open("/yaffs2/non_existant_file", O_TRUNC| O_RDWR,FILE_MODE );
9         if (handle==-1){
10                 error_code=yaffs_get_error();
11                 if (error_code==ENOENT){
12                         return 1;
13                 }
14         }
15         else if (output >=0){
16                 printf("non existant file opened.(which is a bad thing)\n");
17                 return -1;
18         }
19
20 }
21 int test_yaffs_open_file_ENOENT_clean(void){
22         return 1;
23 }
24