#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.
//printf("x %d\n",x);
yaffs_set_error(0); /*reset the last error to 0 */
sprintf(message,"\nrunning test: %s \n",test_list[x].name_of_test);
- print_message(message,2);
+ print_message(message,3);
output=test_list[x].p_function(); /*run test*/
if (output>=0){
/*test has passed*/
sprintf(message,"\ttest %s passed\n",test_list[x].name_of_test);
- print_message(message,2);
+ print_message(message,3);
num_of_tests_pass++;
} else {
/*test is assumed to have failed*/
} else {
sprintf(message,"\ttest clean: %s passed\n",test_list[x].name_of_test);
- print_message(message,2);
+ print_message(message,3);
}
}
/*this is where the loop should break to*/
if (output < 0){
error_code = yaffs_get_error();
if (abs(error_code) == EBADF){
+ handle =-1;
return 1;
} else {
print_message("different error than expected\n",2);
int test_yaffs_close_EBADF_clean(void)
{
- if (handle <= 0){
+ if (handle >= 0){
+ printf("handle %d\n",handle);
return yaffs_close(handle);
} else {
return 1;