projects
/
yaffs2.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
yaffs Added more tests to direct/timothy_tests/quicktests
[yaffs2.git]
/
direct
/
timothy_tests
/
quick_tests
/
test_yaffs_link_EROFS.c
diff --git
a/direct/timothy_tests/quick_tests/test_yaffs_link_EROFS.c
b/direct/timothy_tests/quick_tests/test_yaffs_link_EROFS.c
index 31c0900b19072c2b92dfe379d568876c94756934..bfbd48b0c22f8a8bb715b2cb35934f7d05f9de1c 100644
(file)
--- a/
direct/timothy_tests/quick_tests/test_yaffs_link_EROFS.c
+++ b/
direct/timothy_tests/quick_tests/test_yaffs_link_EROFS.c
@@
-11,37
+11,34
@@
* published by the Free Software Foundation.
*/
* published by the Free Software Foundation.
*/
-#include "test_yaffs_link_E
LOOP_dir
.h"
+#include "test_yaffs_link_E
ROFS
.h"
-int test_yaffs_link_E
LOOP_dir
(void)
+int test_yaffs_link_E
ROFS
(void)
{
int output=0;
int error =0;
{
int output=0;
int error =0;
- if (set_up_ELOOP()<0){
- print_message("failed to setup symlinks\n",2);
- return -1;
- }
+ EROFS_setup();
- output = yaffs_link(
ELOOP_PATH "/file"
,HARD_LINK_PATH);
+ output = yaffs_link(
FILE_PATH
,HARD_LINK_PATH);
if (output<0){
error=yaffs_get_error();
if (output<0){
error=yaffs_get_error();
- if (abs(error)==E
LOOP
){
+ if (abs(error)==E
ROFS
){
return 1;
} else {
print_message("different error than expected\n",2);
return -1;
}
} else {
return 1;
} else {
print_message("different error than expected\n",2);
return -1;
}
} else {
- print_message("created a hard link
to a non-existing-dir
(which is a bad thing)\n",2);
+ print_message("created a hard link
with EROFS set
(which is a bad thing)\n",2);
return -1;
}
}
return -1;
}
}
-int test_yaffs_link_E
LOOP_dir
_clean(void)
+int test_yaffs_link_E
ROFS
_clean(void)
{
int output=0;
int error =0;
{
int output=0;
int error =0;
@@
-50,13
+47,13
@@
int test_yaffs_link_ELOOP_dir_clean(void)
error=yaffs_get_error();
if (abs(error)==ENOENT){
//if the file does not exist then the error should be ENOENT.
error=yaffs_get_error();
if (abs(error)==ENOENT){
//if the file does not exist then the error should be ENOENT.
- return
1
;
+ return
EROFS_clean()
;
} else {
print_message("different error than expected\n",2);
return -1;
}
} else {
} else {
print_message("different error than expected\n",2);
return -1;
}
} else {
- return
1;
/* the file failed to open so there is no need to close it */
+ return
EROFS_clean();
/* the file failed to open so there is no need to close it */
}
}
}
}