X-Git-Url: https://yaffs.net/gitweb/?p=yaffs2.git;a=blobdiff_plain;f=direct%2Ftest-framework%2Funit_tests%2F64_and_32_bit_time%2F64_bit%2Ftime_64_tests.c;fp=direct%2Ftest-framework%2Funit_tests%2F64_and_32_bit_time%2F64_bit%2Ftime_64_tests.c;h=19abe9415ebded33551540bb76631d52c8ff18fd;hp=44cd7ebe989e3299d4eaf72d3df4f810a9d7224d;hb=710cfd1ea71e27185612b0bdca50a23cab88907c;hpb=858769090d82e03c0556aaa46af4274d8a791580 diff --git a/direct/test-framework/unit_tests/64_and_32_bit_time/64_bit/time_64_tests.c b/direct/test-framework/unit_tests/64_and_32_bit_time/64_bit/time_64_tests.c index 44cd7eb..19abe94 100644 --- a/direct/test-framework/unit_tests/64_and_32_bit_time/64_bit/time_64_tests.c +++ b/direct/test-framework/unit_tests/64_and_32_bit_time/64_bit/time_64_tests.c @@ -19,6 +19,11 @@ int main() return 1; } + struct yaffs_obj obj; + if (sizeof(obj.yst_atime) != 8) { + printf("Error: size of yaffs_obj.yst_atime is not 64 bits\n"); + return 1; + } //create several times and save them // @@ -41,11 +46,19 @@ int main() yaffs_do_endian_oh(&dev,&oh); //check that the endianess is correct - u64 expected = 0xb03217af; - if (oh.yst_atime != expected || oh.yst_mtime != expected || oh.yst_ctime != expected) { - printf("endian test failed, got %x\n",oh.yst_atime); + u32 expected = 0xb03217af; + if (oh.yst_atime != expected ) { + printf("endian test failed for yst_atime, got %x expected %x\n",oh.yst_atime,expected); return 1; } + if (oh.yst_mtime != expected) { + printf("endian test failed for yst_mtime, got %x, expected %x\n",oh.yst_mtime,expected); + return 1; + } + if (oh.yst_ctime != expected) { + printf("endian test failed for yst_ctime, got %x, expected %x\n",oh.yst_ctime,expected); + return 1; + } printf("all tests pass\n"); return 0;