diff options
author | Ingo Huerner <ingo.huerner@xse.de> | 2015-01-22 11:24:12 +0100 |
---|---|---|
committer | Ingo Huerner <ingo.huerner@xse.de> | 2015-01-22 11:24:12 +0100 |
commit | b596d8b27f952ab1bbc049b384c465d2e139e135 (patch) | |
tree | 75aaef2b3229939929eaf55b449b7b387ac83d23 /test | |
parent | ddccbec6d938dd3b7b8a644d5a191d1f673173a0 (diff) | |
download | persistence-client-library-b596d8b27f952ab1bbc049b384c465d2e139e135.tar.gz |
Minor changes after code review; replaced static arrays for handles by a tree
Diffstat (limited to 'test')
-rw-r--r-- | test/persistence_client_library_benchmark.c | 4 | ||||
-rw-r--r-- | test/persistence_client_library_dbus_test.c | 4 | ||||
-rw-r--r-- | test/persistence_client_library_test.c | 16 | ||||
-rw-r--r-- | test/persistence_pfs_test.c | 4 |
4 files changed, 8 insertions, 20 deletions
diff --git a/test/persistence_client_library_benchmark.c b/test/persistence_client_library_benchmark.c index c37e972..a9b4a98 100644 --- a/test/persistence_client_library_benchmark.c +++ b/test/persistence_client_library_benchmark.c @@ -24,8 +24,8 @@ #include <string.h> #include <stdlib.h> /* atoi */ -#include <dlt/dlt.h> -#include <dlt/dlt_common.h> +#include <dlt.h> +#include <dlt_common.h> #include <sys/time.h> #include <sys/resource.h> diff --git a/test/persistence_client_library_dbus_test.c b/test/persistence_client_library_dbus_test.c index dae3bc2..1b83c34 100644 --- a/test/persistence_client_library_dbus_test.c +++ b/test/persistence_client_library_dbus_test.c @@ -22,8 +22,8 @@ #include <stdio.h> -#include <dlt/dlt.h> -#include <dlt/dlt_common.h> +#include <dlt.h> +#include <dlt_common.h> int myChangeCallback(pclNotification_s * notifyStruct) diff --git a/test/persistence_client_library_test.c b/test/persistence_client_library_test.c index db3a1e8..24238b8 100644 --- a/test/persistence_client_library_test.c +++ b/test/persistence_client_library_test.c @@ -943,7 +943,7 @@ START_TEST(test_DataHandle) X_TEST_REPORT_DESCRIPTION("Test of data handle"); X_TEST_REPORT_TYPE(GOOD); */ - int handle1 = 0, handle2 = 0, i = 0; + int handle1 = 0, handle2 = 0; int handleArray[4] = {0}; int ret = 0; unsigned char buffer[READ_SIZE] = {0}; @@ -1018,19 +1018,7 @@ START_TEST(test_DataHandle) fail_unless(handle1 != -1, "Could not closefile ==> /media/mediaDB.db"); ret = pclFileClose(1024); - fail_unless(ret == EPERS_MAXHANDLE, "Could close file, but should not!!"); - - for(i = 0; i<1024; i++) - { - if( fcntl(i, F_GETFD) == -1 ) //search for an invalid fd, and try to close it. - { - ret = pclFileClose(i); - fail_unless(ret == -1, "Could close file, but should not!!"); - - break; - } - } - + fail_unless(ret == EPERS_MAXHANDLE, "1. Could close file, but should not!!"); #endif } END_TEST diff --git a/test/persistence_pfs_test.c b/test/persistence_pfs_test.c index 82290a0..dee4d9c 100644 --- a/test/persistence_pfs_test.c +++ b/test/persistence_pfs_test.c @@ -37,8 +37,8 @@ #include <stdlib.h> #include <pthread.h> -#include <dlt/dlt.h> -#include <dlt/dlt_common.h> +#include <dlt.h> +#include <dlt_common.h> #include <sys/types.h> #include <sys/stat.h> |