X-Git-Url: http://www.aleph1.co.uk/gitweb/?p=yaffs2.git;a=blobdiff_plain;f=direct%2Ftest-framework%2Ftimothy_tests%2Fquick_tests%2Ftest_yaffs_link_ENOTDIR.c;h=0d54023a44143a7ee84937fcd89d4dba1248d74d;hp=62c8065a51b47aed91aee83aa417465045b150f7;hb=a175efe13e14f1be10ed4691cd1b8eee32abc046;hpb=17c2897913447766bfd88fd49ca897821a3d2205 diff --git a/direct/test-framework/timothy_tests/quick_tests/test_yaffs_link_ENOTDIR.c b/direct/test-framework/timothy_tests/quick_tests/test_yaffs_link_ENOTDIR.c index 62c8065..0d54023 100644 --- a/direct/test-framework/timothy_tests/quick_tests/test_yaffs_link_ENOTDIR.c +++ b/direct/test-framework/timothy_tests/quick_tests/test_yaffs_link_ENOTDIR.c @@ -19,7 +19,11 @@ int test_yaffs_link_ENOTDIR(void) { 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){