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_truncate_ENOTDIR.c;fp=direct%2Ftest-framework%2Ftimothy_tests%2Fquick_tests%2Ftest_yaffs_truncate_ENOTDIR.c;h=ce621a0cf83ee7427591043bd52b19698d309227;hp=a2d010f646508deb91b98b7db8bcfbe6bde09247;hb=a175efe13e14f1be10ed4691cd1b8eee32abc046;hpb=17c2897913447766bfd88fd49ca897821a3d2205 diff --git a/direct/test-framework/timothy_tests/quick_tests/test_yaffs_truncate_ENOTDIR.c b/direct/test-framework/timothy_tests/quick_tests/test_yaffs_truncate_ENOTDIR.c index a2d010f..ce621a0 100644 --- a/direct/test-framework/timothy_tests/quick_tests/test_yaffs_truncate_ENOTDIR.c +++ b/direct/test-framework/timothy_tests/quick_tests/test_yaffs_truncate_ENOTDIR.c @@ -19,9 +19,12 @@ int test_yaffs_truncate_ENOTDIR(void) { int error=0; int output=0; + 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_truncate("/yaffs2/foo/file",FILE_SIZE_TRUNCATED ); + output= yaffs_truncate("/yaffs2/test_dir/foo/file",FILE_SIZE_TRUNCATED ); if (output<0){ error=yaffs_get_error(); if (abs(error)==ENOTDIR){