X-Git-Url: http://www.aleph1.co.uk/gitweb/?p=yaffs2.git;a=blobdiff_plain;f=direct%2Ftest-framework%2Funit_tests%2F64_and_32_bit_time%2F64_bit%2Fcreate_64_bit.c;h=d73d45a2a63ccf9aa040bb40c26c33130aa9ae48;hp=1b8f03e89c7b518f5b36cd19b99ea90a884122b7;hb=HEAD;hpb=9de407bd16e3a59ab43bced7ebf488b93dda1217;ds=sidebyside diff --git a/direct/test-framework/unit_tests/64_and_32_bit_time/64_bit/create_64_bit.c b/direct/test-framework/unit_tests/64_and_32_bit_time/64_bit/create_64_bit.c deleted file mode 100644 index 1b8f03e..0000000 --- a/direct/test-framework/unit_tests/64_and_32_bit_time/64_bit/create_64_bit.c +++ /dev/null @@ -1,45 +0,0 @@ -//#include -#include -#include "yaffsfs.h" - -#define TEST_PASS 0 -#define TEST_FAIL 1 - -#define YAFFS_MOUNT_POINT "/yflash2/" -#define FILE_PATH "/yflash2/foo.txt" - -int random_seed; -int simulate_power_failure = 0; - - -int setup_yaffs() { - yaffs_start_up(); - yaffs_set_trace(0); - if (yaffs_mount(YAFFS_MOUNT_POINT) < 0) { - printf("failed to mount %s/n", YAFFS_MOUNT_POINT); - return TEST_FAIL; - } - - return TEST_PASS; -} -int shared_create(int argc, char *argv[]){ - - if (argc != 3) { - printf("wrong number of arguments\n"); - printf("requires $ create file_name time\n"); - return TEST_FAIL; - } - - setup_yaffs(); - uint time = atoi(argv[2]); - char *file_path = argv[1]; - if (yaffs_open(FILE_PATH, O_CREAT | O_RDWR, S_IREAD |S_IWRITE)) { - printf("failed to open the file %s/n", FILE_PATH); - return TEST_FAIL; - } - printf("created file: %s, with time: %d\n", file_path, time); - return TEST_PASS; -} -int main(int argc, char *argv[] ){ - return shared_create(argc, argv); -} diff --git a/direct/test-framework/unit_tests/64_and_32_bit_time/64_bit/create_64_bit.c b/direct/test-framework/unit_tests/64_and_32_bit_time/64_bit/create_64_bit.c new file mode 120000 index 0000000..d73d45a --- /dev/null +++ b/direct/test-framework/unit_tests/64_and_32_bit_time/64_bit/create_64_bit.c @@ -0,0 +1 @@ +../shared/create_file.c \ No newline at end of file