X-Git-Url: http://www.aleph1.co.uk/gitweb/?p=yaffs2.git;a=blobdiff_plain;f=direct%2Ftimothy_tests%2Fquick_tests%2Ftest_yaffs_link_EROFS.c;h=bfbd48b0c22f8a8bb715b2cb35934f7d05f9de1c;hp=31c0900b19072c2b92dfe379d568876c94756934;hb=41a39f326b4b732a36310275c0f4489c07117679;hpb=c744d74c2f562bb505c3086585ae9beb359c85a3 diff --git a/direct/timothy_tests/quick_tests/test_yaffs_link_EROFS.c b/direct/timothy_tests/quick_tests/test_yaffs_link_EROFS.c index 31c0900..bfbd48b 100644 --- a/direct/timothy_tests/quick_tests/test_yaffs_link_EROFS.c +++ b/direct/timothy_tests/quick_tests/test_yaffs_link_EROFS.c @@ -11,37 +11,34 @@ * published by the Free Software Foundation. */ -#include "test_yaffs_link_ELOOP_dir.h" +#include "test_yaffs_link_EROFS.h" -int test_yaffs_link_ELOOP_dir(void) +int test_yaffs_link_EROFS(void) { int output=0; int error =0; - if (set_up_ELOOP()<0){ - print_message("failed to setup symlinks\n",2); - return -1; - } + EROFS_setup(); - output = yaffs_link(ELOOP_PATH "/file",HARD_LINK_PATH); + output = yaffs_link(FILE_PATH,HARD_LINK_PATH); if (output<0){ error=yaffs_get_error(); - if (abs(error)==ELOOP){ + if (abs(error)==EROFS){ return 1; } else { print_message("different error than expected\n",2); return -1; } } else { - print_message("created a hard link to a non-existing-dir (which is a bad thing)\n",2); + print_message("created a hard link with EROFS set (which is a bad thing)\n",2); return -1; } } -int test_yaffs_link_ELOOP_dir_clean(void) +int test_yaffs_link_EROFS_clean(void) { int output=0; int error =0; @@ -50,13 +47,13 @@ int test_yaffs_link_ELOOP_dir_clean(void) error=yaffs_get_error(); if (abs(error)==ENOENT){ //if the file does not exist then the error should be ENOENT. - return 1; + return EROFS_clean(); } else { print_message("different error than expected\n",2); return -1; } } else { - return 1; /* the file failed to open so there is no need to close it */ + return EROFS_clean(); /* the file failed to open so there is no need to close it */ } }