1 #include "test_yaffs_open_ENOTDIR.h"
4 int test_yaffs_open_ENOTDIR(void){
7 /*printf("path %s\n",path); */
8 handle=yaffs_open("/nonexisting_dir/foo", O_TRUNC| O_RDWR,FILE_MODE );
10 error_code=yaffs_get_error();
11 if (abs(error_code)==ENOTDIR){
15 printf("different error than expected\n");
20 printf("non existant directory opened.(which is a bad thing)\n");
25 int test_yaffs_open_ENOTDIR_clean(void){
27 return yaffs_close(handle);
30 return 1; /* the file failed to open so there is no need to close it*/