X-Git-Url: http://www.aleph1.co.uk/gitweb/?a=blobdiff_plain;f=direct%2Ftimothy_tests%2Fquick_tests%2Flib.c;h=bc004043d11b33b87006fbe941feac8e220ac166;hb=d05dbe42354154b7c4d27f3debf2831223b31b4d;hp=8c7608e563081c0a3e315803408cd02a430482a8;hpb=8d1e14f0254f27ca2b96089a24628548d176944e;p=yaffs2.git diff --git a/direct/timothy_tests/quick_tests/lib.c b/direct/timothy_tests/quick_tests/lib.c index 8c7608e..bc00404 100644 --- a/direct/timothy_tests/quick_tests/lib.c +++ b/direct/timothy_tests/quick_tests/lib.c @@ -14,7 +14,7 @@ #include "lib.h" static int EXIT_ON_ERROR = 1; -static int PRINT_LEVEL = 1; //This sets the level of detail which is printed. There are 3 levels 0,1,2 and 3 +static int PRINT_LEVEL = 2; //This sets the level of detail which is printed. There are 3 levels 0,1,2 and 3 //0 just prints the number of tests passed and failed. //1 is the basic print level. it will print the details of a failed test. //2 will print if a test passes and cleans. @@ -33,6 +33,38 @@ int get_exit_on_error(void) return EXIT_ON_ERROR; } + +int set_up_ELOOP(void){ + int output1=1; + int output2=1; + int error =0; + + output1=yaffs_symlink(ELOOP_PATH,ELOOP2_PATH); + if (output1 <0){ + error=yaffs_get_error(); + if (abs(error)==EEXIST){ + output1= 1; + } else { + output1=-1; + } + } + + output2=yaffs_symlink(ELOOP2_PATH,ELOOP_PATH); + + if (output2 <0){ + error=yaffs_get_error(); + if (abs(error)==EEXIST){ + output2= 1; + } else { + output2=-1; + } + } + + + yaffs_set_error(0); /*reset the last error to 0 */ + return (output1|output2); +} + void join_paths(char *path1,char *path2,char *new_path ) {