From: Timothy Manning Date: Fri, 25 Jun 2021 02:39:45 +0000 (+1200) Subject: Updated is_yaffs_working_test_fix X-Git-Url: https://yaffs.net/gitweb/?p=yaffs2.git;a=commitdiff_plain;h=b672d46fe8d9f68bc6b5690424a29a595fb7608e Updated is_yaffs_working_test_fix Added pthread library to the makefile and changed the mountpoint to the new "yflash2". Signed-off-by: Timothy Manning --- diff --git a/direct/test-framework/timothy_tests/handle_tests/Makefile b/direct/test-framework/timothy_tests/handle_tests/Makefile index 2e847a6..af64f28 100644 --- a/direct/test-framework/timothy_tests/handle_tests/Makefile +++ b/direct/test-framework/timothy_tests/handle_tests/Makefile @@ -34,10 +34,10 @@ include $(YDI_FRAMEWORK_DIR)/FrameworkRules.mk yaffs_test: $(FRAMEWORK_SOURCES) $(YAFFS_TEST_OBJS) - gcc $(CFLAGS) -o $@ $(YAFFS_TEST_OBJS) + gcc $(CFLAGS) -o $@ $(YAFFS_TEST_OBJS) -lpthread handle_test: $(FRAMEWORK_SOURCES) $(YAFFS_TEST_OBJS) - gcc $(CFLAGS) -o $@ $(YAFFS_TEST_OBJS) + gcc $(CFLAGS) -o $@ $(YAFFS_TEST_OBJS) -lpthread diff --git a/direct/test-framework/timothy_tests/handle_tests/handle_test.c b/direct/test-framework/timothy_tests/handle_tests/handle_test.c index b27f2af..ed721fb 100644 --- a/direct/test-framework/timothy_tests/handle_tests/handle_test.c +++ b/direct/test-framework/timothy_tests/handle_tests/handle_test.c @@ -22,7 +22,7 @@ int main() int output =0; unsigned int total_number_of_tests_run=0; yaffs_start_up(); - yaffs_mount("yaffs2"); + yaffs_mount(YAFFS_MOUNT_POINT); printf("running tests\n"); @@ -62,7 +62,7 @@ int dup_test(void){ output=yaffs_lseek(handle,20,SEEK_SET); if (output >= 0) { output = yaffs_lseek(handle,0,SEEK_CUR); - if (output = 20){ + if (output == 20){ printf("dup is working\n"); return 1; } else if (output <0){ diff --git a/direct/test-framework/timothy_tests/handle_tests/handle_test.h b/direct/test-framework/timothy_tests/handle_tests/handle_test.h index bc6c2f8..35a41e9 100644 --- a/direct/test-framework/timothy_tests/handle_tests/handle_test.h +++ b/direct/test-framework/timothy_tests/handle_tests/handle_test.h @@ -18,9 +18,12 @@ #include #include "yaffsfs.h" -#define FILE_PATH "/yaffs2/foo" +#define YAFFS_MOUNT_POINT "/yflash2/" +#define FILE_PATH "/yflash2/foo" int open_close_handle_test(int num_of_tests); int open_handle(void); void get_error(void); +int dup_test(void); + #endif