Removed old test from timothy_tests/quick_tests
authorTimothy Manning <codedraftsman@gmail.com>
Fri, 25 Jun 2021 03:11:45 +0000 (15:11 +1200)
committerTimothy Manning <codedraftsman@gmail.com>
Thu, 1 Jul 2021 02:36:33 +0000 (14:36 +1200)
Linux now allows directories to be opened.
When quick_tests were written, open was supposed to
return the error code EISDIR.

Signed-off-by: Timothy Manning <codedraftsman@gmail.com>
direct/test-framework/timothy_tests/quick_tests/Makefile
direct/test-framework/timothy_tests/quick_tests/quick_tests.h
direct/test-framework/timothy_tests/quick_tests/test_yaffs_open_EISDIR.c [deleted file]
direct/test-framework/timothy_tests/quick_tests/test_yaffs_open_EISDIR.h [deleted file]

index 614ae390fb4b13eff0b47fcb325ea478d6122d01..b25f9c4620deeba5c46abbd9220156c300329208 100644 (file)
@@ -23,7 +23,7 @@ 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_mount_NULL.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.o test_yaffs_open_ENOENT.o test_yaffs_open_ENOTDIR.o test_yaffs_open_EEXIST.o \
                test_yaffs_open_ENAMETOOLONG.o test_yaffs_open_EINVAL.o test_yaffs_open_EINVAL2.o test_yaffs_open_ELOOP.o \
                test_yaffs_open_ELOOP_dir.o test_yaffs_open_EROFS.o test_yaffs_open_EACCES.o test_yaffs_open_NULL.o \
                test_yaffs_unlink.o  test_yaffs_unlink_EISDIR.o test_yaffs_unlink_ENOENT.o test_yaffs_unlink_ENAMETOOLONG.o \
index ce49d069194fbac33acd001f96464d64676f3b23..2586fa157f81810aa10400c340925d0cc18450d7 100644 (file)
@@ -29,7 +29,6 @@
 #include "test_yaffs_unmount_EBUSY.h"
 
 #include "test_yaffs_open.h"
-#include "test_yaffs_open_EISDIR.h"
 #include "test_yaffs_open_EEXIST.h"
 #include "test_yaffs_open_ENOENT.h"
 #include "test_yaffs_open_ENOTDIR.h"
@@ -286,7 +285,6 @@ test_template test_list[]={
        {test_yaffs_unmount_EBUSY,test_yaffs_unmount_EBUSY_clean,"test_yaffs_unmount_EBUSY"},
 
        {test_yaffs_open,test_yaffs_open_clean,"test_yaffs_open"},
-       {test_yaffs_open_EISDIR,test_yaffs_open_EISDIR_clean,"test_yaffs_open_EISDIR"},
        {test_yaffs_open_EEXIST,test_yaffs_open_EEXIST_clean,"test_yaffs_open_EEXIST"},
        {test_yaffs_open_ENOTDIR,test_yaffs_open_ENOTDIR_clean,"test_yaffs_open_ENOTDIR"},
        {test_yaffs_open_ENOENT,test_yaffs_open_ENOENT_clean,"test_yaffs_open_ENOENT"},
diff --git a/direct/test-framework/timothy_tests/quick_tests/test_yaffs_open_EISDIR.c b/direct/test-framework/timothy_tests/quick_tests/test_yaffs_open_EISDIR.c
deleted file mode 100644 (file)
index 8ca3cea..0000000
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- * YAFFS: Yet another FFS. A NAND-flash specific file system.
- *
- * Copyright (C) 2002-2018 Aleph One Ltd.
- *
- * 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_EISDIR.h"
-
-/*EISDIR is caused by trying to open a directory */
-
-static int handle = -1;
-
-int test_yaffs_open_EISDIR(void)
-{
-       int error_code=0;
-
-       handle=yaffs_open(YAFFS_MOUNT_POINT, O_CREAT | O_TRUNC| O_RDWR ,FILE_MODE );
-       if (handle == -1){
-               error_code=yaffs_get_error();
-               if (abs(error_code)== EISDIR){
-                       return 1;
-               } else {
-                       print_message("different error than expected\n", 2);
-                       return -1;
-               }
-       } else {
-               print_message("non existant directory opened.(which is a bad thing)\n", 2);
-               return -1;
-       }
-
-}
-int test_yaffs_open_EISDIR_clean(void)
-{
-       if (handle >=0){
-               return yaffs_close(handle);
-       } else {
-               return 1;       /* the file failed to open so there is no need to close it*/
-       }
-}
-
diff --git a/direct/test-framework/timothy_tests/quick_tests/test_yaffs_open_EISDIR.h b/direct/test-framework/timothy_tests/quick_tests/test_yaffs_open_EISDIR.h
deleted file mode 100644 (file)
index 4282ae4..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-/*
- * YAFFS: Yet another Flash File System . A NAND-flash specific file system. 
- *
- * Copyright (C) 2002-2018 Aleph One Ltd.
- *
- * 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_open_EISDIR_h__
-#define __test_yaffs_open_EISDIR_h__
-
-#include "lib.h"
-#include "yaffsfs.h"
-
-int test_yaffs_open_EISDIR(void);
-int test_yaffs_open_EISDIR_clean(void);
-
-#endif