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/quick_tests
[yaffs2.git]
/
direct
/
timothy_tests
/
quick_tests
/
test_yaffs_rmdir_ELOOP_dir.c
diff --git
a/direct/timothy_tests/quick_tests/test_yaffs_rename_ELOOP.c
b/direct/timothy_tests/quick_tests/test_yaffs_rmdir_ELOOP_dir.c
similarity index 64%
rename from
direct/timothy_tests/quick_tests/test_yaffs_rename_ELOOP.c
rename to
direct/timothy_tests/quick_tests/test_yaffs_rmdir_ELOOP_dir.c
index 8d648a233118d0d1b6adaf4c1c51d9714554c6e9..13c0ae08a01b4f2b78ce96e6d2632c1750bb4942 100644
(file)
--- a/
direct/timothy_tests/quick_tests/test_yaffs_rename_ELOOP.c
+++ b/
direct/timothy_tests/quick_tests/test_yaffs_rmdir_ELOOP_dir.c
@@
-11,22
+11,28
@@
* published by the Free Software Foundation.
*/
* published by the Free Software Foundation.
*/
-#include "test_yaffs_r
ename_ELOOP
.h"
+#include "test_yaffs_r
mdir_ELOOP_dir
.h"
-int test_yaffs_r
ename_ELOOP
(void)
+int test_yaffs_r
mdir_ELOOP_dir
(void)
{
int output=0;
int error_code =0;
{
int output=0;
int error_code =0;
-
if (set_up_ELOOP()<0){
print_message("failed to setup symlinks\n",2);
return -1;
}
if (set_up_ELOOP()<0){
print_message("failed to setup symlinks\n",2);
return -1;
}
- output = yaffs_rename(ELOOP_PATH , RENAME_PATH);
+ if (0 != yaffs_access(DIR_PATH,0)) {
+ output = yaffs_mkdir(DIR_PATH,S_IWRITE | S_IREAD);
+ if (output < 0) {
+ print_message("failed to create directory\n",2);
+ return -1;
+ }
+ }
+ output = yaffs_rmdir(ELOOP_PATH "/file");
if (output<0){
error_code=yaffs_get_error();
if (abs(error_code)==ELOOP){
if (output<0){
error_code=yaffs_get_error();
if (abs(error_code)==ELOOP){
@@
-36,17
+42,17
@@
int test_yaffs_rename_ELOOP(void)
return -1;
}
} else{
return -1;
}
} else{
- print_message("re
named a ELOOP
(which is a bad thing)\n",2);
+ print_message("re
moved /yaffs2/ directory
(which is a bad thing)\n",2);
return -1;
}
}
return -1;
}
}
-int test_yaffs_r
ename_ELOOP
_clean(void)
+int test_yaffs_r
mdir_ELOOP_dir
_clean(void)
{
int output = 0;
{
int output = 0;
- if (0 == yaffs_access(
RENAME
_PATH,0)) {
- output = yaffs_r
ename(RENAME_PATH,FILE
_PATH);
+ if (0 == yaffs_access(
DIR
_PATH,0)) {
+ output = yaffs_r
mdir(DIR
_PATH);
if (output < 0) {
print_message("failed to remove the directory\n",2);
return -1;
if (output < 0) {
print_message("failed to remove the directory\n",2);
return -1;