From 529984f4a8f8bdcfd75866462ba6b89695b0b9b0 Mon Sep 17 00:00:00 2001 From: Timothy Manning Date: Mon, 15 Nov 2010 15:17:49 +1300 Subject: [PATCH] yaffs A few changes to quick tests. Signed-off-by: Timothy Manning --- direct/timothy_tests/quick_tests/Makefile | 1 - .../timothy_tests/quick_tests/quick_tests.h | 3 +- .../quick_tests/test_yaffs_chmod_EINVAL2.c | 39 ------------------- .../quick_tests/test_yaffs_chmod_EINVAL2.h | 26 ------------- .../quick_tests/test_yaffs_fchmod.c | 1 - 5 files changed, 1 insertion(+), 69 deletions(-) delete mode 100644 direct/timothy_tests/quick_tests/test_yaffs_chmod_EINVAL2.c delete mode 100644 direct/timothy_tests/quick_tests/test_yaffs_chmod_EINVAL2.h diff --git a/direct/timothy_tests/quick_tests/Makefile b/direct/timothy_tests/quick_tests/Makefile index 001f512..a966301 100644 --- a/direct/timothy_tests/quick_tests/Makefile +++ b/direct/timothy_tests/quick_tests/Makefile @@ -61,7 +61,6 @@ TESTFILES = quick_tests.o lib.o \ test_yaffs_fstat.o test_yaffs_fstat_EBADF.o \ test_yaffs_close_EBADF.o\ test_yaffs_chmod.o test_yaffs_chmod_ENOENT.o test_yaffs_chmod_ENOTDIR.o test_yaffs_chmod_EINVAL.o \ - test_yaffs_chmod_EINVAL2.o\ test_yaffs_fchmod.o test_yaffs_fchmod_EBADF.o diff --git a/direct/timothy_tests/quick_tests/quick_tests.h b/direct/timothy_tests/quick_tests/quick_tests.h index dacb276..110e3ee 100644 --- a/direct/timothy_tests/quick_tests/quick_tests.h +++ b/direct/timothy_tests/quick_tests/quick_tests.h @@ -88,7 +88,7 @@ #include "test_yaffs_chmod_ENOENT.h" #include "test_yaffs_chmod_ENOTDIR.h" #include "test_yaffs_chmod_EINVAL.h" -#include "test_yaffs_chmod_EINVAL2.h" + #include "test_yaffs_fchmod.h" #include "test_yaffs_fchmod_EBADF.h" @@ -179,7 +179,6 @@ test_template test_list[]={ {test_yaffs_chmod_ENOENT,test_yaffs_chmod_ENOENT_clean,"test_yaffs_chmod_ENOENT"}, {test_yaffs_chmod_ENOTDIR,test_yaffs_chmod_ENOTDIR_clean,"test_yaffs_chmod_ENOTDIR"}, {test_yaffs_chmod_EINVAL,test_yaffs_chmod_EINVAL_clean,"test_yaffs_chmod_EINVAL"}, - {test_yaffs_chmod_EINVAL2,test_yaffs_chmod_EINVAL2_clean,"test_yaffs_chmod_EINVAL2"}, {test_yaffs_fchmod,test_yaffs_fchmod_clean,"test_yaffs_fchmod"}, {test_yaffs_fchmod_EBADF,test_yaffs_fchmod_EBADF_clean,"test_yaffs_fchmod_EBADF"} diff --git a/direct/timothy_tests/quick_tests/test_yaffs_chmod_EINVAL2.c b/direct/timothy_tests/quick_tests/test_yaffs_chmod_EINVAL2.c deleted file mode 100644 index a5b6bb1..0000000 --- a/direct/timothy_tests/quick_tests/test_yaffs_chmod_EINVAL2.c +++ /dev/null @@ -1,39 +0,0 @@ -/* - * 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 - * - * 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_chmod_EINVAL2.h" - -int test_yaffs_chmod_EINVAL2(void) -{ - int error=0; - int output=yaffs_chmod("/non_existing_directory/foo",255); - - if (output<0){ - error=yaffs_get_error(); - if (abs(error)==EINVAL){ - return 1; - } else { - print_message("different error than expected\n",2); - return -1; - } - } else { - print_message("chmoded the file (which is a bad thing)\n",2); - return -1; - } - -} - -int test_yaffs_chmod_EINVAL2_clean(void) -{ - return test_yaffs_chmod(); -} diff --git a/direct/timothy_tests/quick_tests/test_yaffs_chmod_EINVAL2.h b/direct/timothy_tests/quick_tests/test_yaffs_chmod_EINVAL2.h deleted file mode 100644 index 663b717..0000000 --- a/direct/timothy_tests/quick_tests/test_yaffs_chmod_EINVAL2.h +++ /dev/null @@ -1,26 +0,0 @@ -/* - * 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 - * - * 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_chmod_EINVAL2_h__ -#define __test_yaffs_chmod_EINVAL2_h__ - -#include "lib.h" -#include "yaffsfs.h" -#include "test_yaffs_chmod.h" - -int test_yaffs_chmod_EINVAL2(void); -int test_yaffs_chmod_EINVAL2_clean(void); - -#endif diff --git a/direct/timothy_tests/quick_tests/test_yaffs_fchmod.c b/direct/timothy_tests/quick_tests/test_yaffs_fchmod.c index 3560235..896a33b 100644 --- a/direct/timothy_tests/quick_tests/test_yaffs_fchmod.c +++ b/direct/timothy_tests/quick_tests/test_yaffs_fchmod.c @@ -41,7 +41,6 @@ int test_yaffs_fchmod(void) int test_yaffs_fchmod_clean(void) { if (handle >= 0) { - printf("handle %d\n",handle); return yaffs_close(handle); } return 1; -- 2.30.2