fixed up all the quick tests
[yaffs2.git] / direct / test-framework / timothy_tests / quick_tests / test_yaffs_link_ENOTDIR.c
index 62c8065a51b47aed91aee83aa417465045b150f7..0d54023a44143a7ee84937fcd89d4dba1248d74d 100644 (file)
@@ -19,7 +19,11 @@ int test_yaffs_link_ENOTDIR(void)
 {
        int output=0;   
        int error =0;
 {
        int output=0;   
        int error =0;
-       output = yaffs_link("/yaffs2/foo/file",HARD_LINK_PATH);
+       if (yaffs_close(yaffs_open(FILE_PATH,O_CREAT | O_RDWR, FILE_MODE))==-1){
+               print_message("failed to create file\n",1);
+               return -1;
+       }
+       output = yaffs_link("/yaffs2/test_dir/foo/file",HARD_LINK_PATH);
        if (output<0){
                error=yaffs_get_error();
                if (abs(error)==ENOTDIR){
        if (output<0){
                error=yaffs_get_error();
                if (abs(error)==ENOTDIR){