TESTFILES = quick_tests.o lib.o \
test_yaffs_mount.o test_yaffs_mount_ENODEV.o test_yaffs_mount_ENAMETOOLONG.o test_yaffs_mount_EBUSY.o \
test_yaffs_unmount.o test_yaffs_unmount_ENODEV.o test_yaffs_unmount_ENAMETOOLONG.o test_yaffs_unmount_EBUSY.o \
- test_yaffs_open.o test_yaffs_open_ENOENT.o test_yaffs_open_ENOTDIR.o test_yaffs_open_EEXIST.o test_yaffs_open_EISDIR.o test_yaffs_open_ENAMETOOLONG.o \
+ test_yaffs_open.o test_yaffs_open_ENOENT.o test_yaffs_open_ENOTDIR.o test_yaffs_open_EEXIST.o test_yaffs_open_EISDIR.o \
+ test_yaffs_open_ENAMETOOLONG.o \
test_yaffs_open_EINVAL.o test_yaffs_open_EINVAL2.o \
- test_yaffs_unlink.o test_yaffs_unlink_EISDIR.o test_yaffs_unlink_ENOENT.o test_yaffs_unlink_ENAMETOOLONG.o test_yaffs_unlink_ENOTDIR.o\
+ test_yaffs_unlink.o test_yaffs_unlink_EISDIR.o test_yaffs_unlink_ENOENT.o test_yaffs_unlink_ENAMETOOLONG.o \
+ test_yaffs_unlink_ENOTDIR.o \
test_yaffs_ftruncate.o test_yaffs_ftruncate_EBADF.o test_yaffs_ftruncate_EINVAL.o test_yaffs_ftruncate_big_file.o \
- test_yaffs_truncate.o test_yaffs_truncate_ENOTDIR.o test_yaffs_truncate_EISDIR.o test_yaffs_truncate_ENOENT.o test_yaffs_truncate_EINVAL.o \
+ test_yaffs_truncate.o test_yaffs_truncate_ENOTDIR.o test_yaffs_truncate_EISDIR.o test_yaffs_truncate_ENOENT.o \
+ test_yaffs_truncate_EINVAL.o \
test_yaffs_truncate_big_file.o\
test_yaffs_write.o test_yaffs_write_EBADF.o test_yaffs_write_big_file.o \
test_yaffs_read.o test_yaffs_read_EBADF.o test_yaffs_read_EINVAL.o\
test_yaffs_freespace.o test_yaffs_freespace_EINVAL.o \
test_yaffs_totalspace.o test_yaffs_totalspace_EINVAL.o \
test_yaffs_inodecount.o test_yaffs_inodecount_EINVAL.o \
- test_yaffs_link.o test_yaffs_link_ENOENT.o test_yaffs_link_EEXIST.o test_yaffs_link_ENOTDIR.o test_yaffs_link_ENOTDIR2.o
+ test_yaffs_link.o test_yaffs_link_ENOENT.o test_yaffs_link_EEXIST.o test_yaffs_link_ENOTDIR.o \
+ test_yaffs_link_ENOTDIR2.o \
+ test_yaffs_rmdir.o
test_yaffs_link
test_yaffs_link_EEXIST
- test_yaffs_link_ENOENT
+ test_yaffs_link_ENOENT //note ENOENT2 does not exist because the second path is trying to create a file.
test_yaffs_link_ENOTDIR
-
+ test_yaffs_link_ENOTDIR2
+
test_yaffs_lseek
test_yaffs_lseek_EBADF
test_yaffs_lseek_EINVAL
#include "test_yaffs_link_ENOTDIR.h"
#include "test_yaffs_link_ENOTDIR2.h"
+#include "test_yaffs_rmdir.h"
+
#include "yaffsfs.h"
#include "yaffs_error_converter.h"
#include "lib.h"
{test_yaffs_link_ENOENT,test_yaffs_link_ENOENT_clean,"test_yaffs_link_ENOENT"},
{test_yaffs_link_EEXIST,test_yaffs_link_EEXIST_clean,"test_yaffs_link_EEXIST"},
{test_yaffs_link_ENOTDIR,test_yaffs_link_ENOTDIR_clean,"test_yaffs_link_ENOTDIR"},
- {test_yaffs_link_ENOTDIR2,test_yaffs_link_ENOTDIR2_clean,"test_yaffs_link_ENOTDIR2"}
+ {test_yaffs_link_ENOTDIR2,test_yaffs_link_ENOTDIR2_clean,"test_yaffs_link_ENOTDIR2"},
+ {test_yaffs_rmdir,test_yaffs_rmdir_clean,"test_yaffs_rmdir"}
};
void init_quick_tests(int argc, char *argv[]);
--- /dev/null
+/*
+ * YAFFS: Yet another FFS. A NAND-flash specific file system.
+ *
+ * Copyright (C) 2002-2010 Aleph One Ltd.
+ * for Toby Churchill Ltd and Brightstar Engineering
+ *
+ * Created by Timothy Manning <timothy@yaffs.net>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+
+#include "test_yaffs_open.h"
+
+
+int test_yaffs_rmdir(void)
+{
+ int output=0;
+ 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 yaffs_rmdir(DIR_PATH);
+}
+
+
+int test_yaffs_rmdir_clean(void)
+{
+ return -1;
+}
+
--- /dev/null
+/*
+ * YAFFS: Yet another Flash File System . A NAND-flash specific file system.
+ *
+ * Copyright (C) 2002-2010 Aleph One Ltd.
+ * for Toby Churchill Ltd and Brightstar Engineering
+ *
+ * Created by Timothy Manning <timothy@yaffs.net>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 2.1 as
+ * published by the Free Software Foundation.
+ *
+ * Note: Only YAFFS headers are LGPL, YAFFS C code is covered by GPL.
+ */
+
+#ifndef __test_yaffs_rmdir_h__
+#define __test_yaffs_rmdir_h__
+
+#include "lib.h"
+#include "yaffsfs.h"
+
+int test_yaffs_rmdir(void);
+int test_yaffs_rmdir_clean(void);
+
+#endif