1 #include "test_yaffs_stat.h"
3 int test_yaffs_stat(void){
6 mode =yaffs_test_stat_mode();
7 printf("\nmode %o\n",mode);
8 printf("expected mode %o \n",FILE_MODE);
9 printf("anding together %o\n",FILE_MODE & mode);
10 printf("%d\n",FILE_MODE == (FILE_MODE & mode));
11 if (FILE_MODE == (FILE_MODE & mode)){
15 printf("mode did not match expected file mode\n");
18 if (yaffs_test_stat_size()==FILE_SIZE){
22 printf("mode did not match expected file mode\n");
36 int test_yaffs_stat_clean(void){
37 return test_open_file();
40 int yaffs_test_stat_mode(void){
41 struct yaffs_stat stat;
43 output=yaffs_stat(FILE_PATH, &stat);
44 printf("output: %d\n",output);
49 printf("failed to stat file\n") ;
54 int yaffs_test_stat_size(void){
55 struct yaffs_stat stat;
57 output=yaffs_stat(FILE_PATH, &stat);
62 printf("failed to stat file\n") ;