Added pthread library to the makefile and changed
the mountpoint to the new "yflash2".
Signed-off-by: Timothy Manning <codedraftsman@gmail.com>
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
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");
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){
#include <stdio.h>
#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