2 * YAFFS: Yet another FFS. A NAND-flash specific file system.
4 * Copyright (C) 2002-2010 Aleph One Ltd.
5 * for Toby Churchill Ltd and Brightstar Engineering
7 * Created by Timothy Manning <timothy@yaffs.net>
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License version 2 as
11 * published by the Free Software Foundation.
14 #include "test_yaffs_stat.h"
16 int test_yaffs_stat(void)
23 mode =yaffs_test_stat_mode();
25 if (FILE_MODE == (FILE_MODE & mode)){
28 print_message("mode did not match expected file mode\n",2);
35 size=yaffs_test_stat_size();
40 sprintf(message,"file size %d, expected file size %d\n",size,FILE_SIZE);
41 print_message(message,2);
42 print_message("mode did not match expected file mode\n",2);
50 if ((mode>0) && (size>0)){
53 /* one of the tests failed*/
58 int test_yaffs_stat_clean(void)
63 int yaffs_test_stat_mode(void)
65 struct yaffs_stat stat;
67 output=yaffs_stat(FILE_PATH, &stat);
68 //printf("output: %d\n",output);
72 print_message("failed to stat file mode\n",2) ;
77 int yaffs_test_stat_size(void){
78 struct yaffs_stat stat;
80 output=yaffs_stat(FILE_PATH, &stat);
84 print_message("failed to stat file size\n",2) ;