From acdf21cadc3a942b47f154c1964151f6a1883ddc Mon Sep 17 00:00:00 2001 From: Ingo Huerner Date: Mon, 4 Nov 2013 15:29:56 +0100 Subject: [PATCH] Added notifications for custom keys; added creat path function --- include/persistence_client_library_error_def.h | 2 + include/persistence_client_library_file.h | 31 +++++ include/persistence_client_library_key.h | 14 +-- src/persistence_client_library_db_access.c | 16 ++- src/persistence_client_library_file.c | 155 ++++++++++++++++++++++++- src/persistence_client_library_handle.c | 12 +- src/persistence_client_library_handle.h | 5 + src/persistence_client_library_key.c | 29 +++-- test/persistence_client_library_dbus_test.c | 2 + test/persistence_client_library_test.c | 29 +++++ 10 files changed, 263 insertions(+), 32 deletions(-) diff --git a/include/persistence_client_library_error_def.h b/include/persistence_client_library_error_def.h index fd9f403..f23c6da 100644 --- a/include/persistence_client_library_error_def.h +++ b/include/persistence_client_library_error_def.h @@ -101,6 +101,8 @@ extern "C" { #define EPERS_REGISTER_LIFECYCLE (-35) // failed register admin service dbus #define EPERS_REGISTER_ADMIN (-36) +// registration on this key is not allowed +#define EPERS_NOTIFY_NOT_ALLOWED (-37) #ifdef __cplusplus diff --git a/include/persistence_client_library_file.h b/include/persistence_client_library_file.h index b1aa70a..8ffd48b 100644 --- a/include/persistence_client_library_file.h +++ b/include/persistence_client_library_file.h @@ -172,6 +172,37 @@ int pclFileUnmapData(void* address, long size); */ int pclFileWriteData(int fd, const void * buffer, int buffer_size); + + +/** + * @brief create a path to a file + * + * @param ldbid logical database ID + * @param resource_id the resource ID + * @param user_no the user ID; user_no=0 can not be used as user-ID beacause ‘0’ is defined as System/node + * @param seat_no the seat number + * @param path the path to the file + * @param size the size of the path + * + * @return positive value on success, which must be used when pclFileReleasePath will be called + * On error a negative value will be returned with th follwoing error codes: + * EPERS_LOCKFS or EPERS_COMMON + */ +int pclFileCreatePath(unsigned int ldbid, const char* resource_id, unsigned int user_no, unsigned int seat_no, char** path, unsigned int* size); + + +/** + * @brief release a file path + * + * @param pathHandle the path to the file + * @param path the path + * + * @return positive value: success; + * On error a negative value will be returned with th follwoing error codes: + * EPERS_LOCKFS or EPERS_COMMON + */ +int pclFileReleasePath(int pathPandle, char* path); + /** \} */ #ifdef __cplusplus diff --git a/include/persistence_client_library_key.h b/include/persistence_client_library_key.h index 8474f32..42bfd98 100644 --- a/include/persistence_client_library_key.h +++ b/include/persistence_client_library_key.h @@ -103,7 +103,7 @@ typedef int(* pclChangeNotifyCallback_t)(pclNotification_s * notifyStruct); * @param seat_no the seat number * * @return positive value: success; On error a negative value will be returned with the following error codes: - * ::EPERS_LOCKFS + * ::EPERS_LOCKFS ::EPERS_NOTIFY_SIG */ int pclKeyDelete(unsigned int ldbid, const char* resource_id, unsigned int user_no, unsigned int seat_no); @@ -183,7 +183,7 @@ int pclKeyHandleReadData(int key_handle, unsigned char* buffer, int buffer_size) * @param callback notification callback * * @return positive value: registration OK; On error a negative value will be returned with the following error codes: - * ::EPERS_LOCKFS + * ::EPERS_LOCKFS ::EPERS_MAXHANDLE ::EPERS_NOTIFY_NOT_ALLOWED */ int pclKeyHandleRegisterNotifyOnChange(int key_handle, pclChangeNotifyCallback_t callback); @@ -194,7 +194,7 @@ int pclKeyHandleRegisterNotifyOnChange(int key_handle, pclChangeNotifyCallback_t * @param callback notification callback * * @return positive value: registration OK; On error a negative value will be returned with the following error codes: - * ::EPERS_LOCKFS + * ::EPERS_LOCKFS ::EPERS_MAXHANDLE ::EPERS_NOTIFY_NOT_ALLOWED */ int pclKeyHandleUnRegisterNotifyOnChange(int key_handle, pclChangeNotifyCallback_t callback); @@ -207,7 +207,7 @@ int pclKeyHandleUnRegisterNotifyOnChange(int key_handle, pclChangeNotifyCallback * use environment variable PERS_MAX_KEY_VAL_DATA_SIZE to modify default size in bytes * * @return positive value: the bytes written; On error a negative value will be returned with the following error codes: - * ::EPERS_LOCKFS ::EPERS_MAX_BUFF_SIZE + * ::EPERS_LOCKFS ::EPERS_MAX_BUFF_SIZE ::EPERS_NOTIFY_SIG */ int pclKeyHandleWriteData(int key_handle, unsigned char* buffer, int buffer_size); @@ -240,7 +240,7 @@ int pclKeyReadData(unsigned int ldbid, const char* resource_id, unsigned int use * @param callback notification callback * * @return positive value: registration OK; On error a negative value will be returned with the following error codes: - * ::EPERS_RES_NO_KEY ::EPERS_NOKEYDATA ::EPERS_NOPRCTABLE + * ::EPERS_RES_NO_KEY ::EPERS_NOKEYDATA ::EPERS_NOPRCTABLE ::EPERS_NOTIFY_NOT_ALLOWED */ int pclKeyRegisterNotifyOnChange(unsigned int ldbid, const char* resource_id, unsigned int user_no, unsigned int seat_no, pclChangeNotifyCallback_t callback); @@ -256,7 +256,7 @@ int pclKeyRegisterNotifyOnChange(unsigned int ldbid, const char* resource_id, un * @param callback notification callback * * @return positive value: registration OK; On error a negative value will be returned with the following error codes: - * ::EPERS_RES_NO_KEY ::EPERS_NOKEYDATA ::EPERS_NOPRCTABLE + * ::EPERS_RES_NO_KEY ::EPERS_NOKEYDATA ::EPERS_NOPRCTABLE ::EPERS_NOTIFY_NOT_ALLOWED */ int pclKeyUnRegisterNotifyOnChange( unsigned int ldbid, const char * resource_id, unsigned int user_no, unsigned int seat_no, pclChangeNotifyCallback_t callback); @@ -272,7 +272,7 @@ int pclKeyUnRegisterNotifyOnChange( unsigned int ldbid, const char * resource_ * use environment variable PERS_MAX_KEY_VAL_DATA_SIZE to modify default size in bytes * * @return positive value: the bytes written; On error a negative value will be returned with the following error codes: - * ::EPERS_LOCKFS + * ::EPERS_LOCKFS ::EPERS_NOTIFY_NOT_ALLOWED */ int pclKeyWriteData(unsigned int ldbid, const char* resource_id, unsigned int user_no, unsigned int seat_no, unsigned char* buffer, int buffer_size); diff --git a/src/persistence_client_library_db_access.c b/src/persistence_client_library_db_access.c index 589fdb3..c3c4abb 100644 --- a/src/persistence_client_library_db_access.c +++ b/src/persistence_client_library_db_access.c @@ -111,7 +111,7 @@ itzam_btree* pers_db_open(PersistenceInfo_s* info, const char* dbPath) itzam_btree* btree = NULL; // create array index: index is a combination of resource config table type and group - arrayIdx = info->configKey.storage + info->context.ldbid ; + arrayIdx = info->configKey.storage + info->context.ldbid; //if(arrayIdx <= DbTableSize) if(arrayIdx < DbTableSize) @@ -384,14 +384,13 @@ int pers_db_write_key(char* dbPath, char* key, PersistenceInfo_s* info, unsigned write_size = EPERS_DB_ERROR_INTERNAL; } - itzam_btree_transaction_commit(btree); // transaction end // ----------------------------------------------------------------------------- if(PersistenceStorage_shared == info->configKey.storage) { - pers_send_Notification_Signal(key, &info->context, pclNotifyStatus_changed); + write_size = pers_send_Notification_Signal(key, &info->context, pclNotifyStatus_changed); } } else @@ -427,6 +426,11 @@ int pers_db_write_key(char* dbPath, char* key, PersistenceInfo_s* info, unsigned snprintf(pathKeyString, 128, "0x%08X/%s", info->context.ldbid, info->configKey.customID); } write_size = gPersCustomFuncs[idx].custom_plugin_set_data(pathKeyString, (char*)buffer, buffer_size); + + if(write_size >= 0) // success ==> send deleted notification + { + write_size = pers_send_Notification_Signal(key, &info->context, pclNotifyStatus_changed); + } } else { @@ -539,7 +543,7 @@ int pers_db_delete_key(char* dbPath, char* key, PersistenceInfo_s* info) if(PersistenceStorage_shared == info->configKey.storage) { - pers_send_Notification_Signal(key, &info->context, pclNotifyStatus_deleted); + ret = pers_send_Notification_Signal(key, &info->context, pclNotifyStatus_deleted); } } else @@ -569,6 +573,10 @@ int pers_db_delete_key(char* dbPath, char* key, PersistenceInfo_s* info) snprintf(pathKeyString, 128, "0x%08X/%s", info->context.ldbid, info->configKey.customID); } ret = gPersCustomFuncs[idx].custom_plugin_delete_data(pathKeyString); + if(ret >= 0) // success ==> send deleted notification + { + ret = pers_send_Notification_Signal(key, &info->context, pclNotifyStatus_deleted); + } } else { diff --git a/src/persistence_client_library_file.c b/src/persistence_client_library_file.c index 0809488..c76c27a 100644 --- a/src/persistence_client_library_file.c +++ b/src/persistence_client_library_file.c @@ -50,7 +50,6 @@ int pclCalcCrc32Csum(int fd, char crc32sum[]); int pclVerifyConsistency(const char* origPath, const char* backupPath, const char* csumPath, int openFlags); int pclBackupNeeded(const char* path); - //------------------------------------------------------------- @@ -171,17 +170,15 @@ int pclFileOpen(unsigned int ldbid, const char* resource_id, unsigned int user_n snprintf(backupPath, DbPathMaxLen, "%s%s", dbPath, "~"); snprintf(csumPath, DbPathMaxLen, "%s%s", dbPath, "~.crc"); - if((handle = pclVerifyConsistency(dbPath, backupPath, csumPath, flags)) == -1) + if(pclVerifyConsistency(dbPath, backupPath, csumPath, flags) == -1) { DLT_LOG(gDLTContext, DLT_LOG_ERROR, DLT_STRING("pclFileOpen: error => file inconsistent, recovery N O T possible!")); return -1; } } - if(handle <= 0) // check if open is needed or already done in verifyConsistency - { - handle = open(dbPath, flags); - } + // open file + handle = open(dbPath, flags); if(handle != -1) { @@ -391,6 +388,148 @@ int pclFileWriteData(int fd, const void * buffer, int buffer_size) } +int pclFileCreatePath(unsigned int ldbid, const char* resource_id, unsigned int user_no, unsigned int seat_no, char** path, unsigned int* size) +{ + int handle = EPERS_NOT_INITIALIZED; + + if(gPclInitialized >= PCLinitialized) + { + int shared_DB = 0; + PersistenceInfo_s dbContext; + + char dbKey[DbKeyMaxLen] = {0}; // database key + char dbPath[DbPathMaxLen] = {0}; // database location + char backupPath[DbKeyMaxLen] = {0}; // backup file + char csumPath[DbPathMaxLen] = {0}; // checksum file + + //DLT_LOG(gDLTContext, DLT_LOG_INFO, DLT_STRING("pclFileOpen: "), DLT_INT(ldbid), DLT_STRING(resource_id) ); + + dbContext.context.ldbid = ldbid; + dbContext.context.seat_no = seat_no; + dbContext.context.user_no = user_no; + + // get database context: database path and database key + shared_DB = get_db_context(&dbContext, resource_id, ResIsFile, dbKey, dbPath); + + if( (shared_DB >= 0) // check valid database context + && (dbContext.configKey.type == PersistenceResourceType_file) ) // check if type matches + { + int flags = dbContext.configKey.permission; + + // file will be opened writable, so check about data consistency + if( dbContext.configKey.permission != PersistencePermission_ReadOnly + && pclBackupNeeded(dbPath) ) + { + snprintf(backupPath, DbPathMaxLen, "%s%s", dbPath, "~"); + snprintf(csumPath, DbPathMaxLen, "%s%s", dbPath, "~.crc"); + + if((pclVerifyConsistency(dbPath, backupPath, csumPath, flags)) == -1) + { + DLT_LOG(gDLTContext, DLT_LOG_ERROR, DLT_STRING("pclFileOpen: error => file inconsistent, recovery N O T possible!")); + return -1; + } + } + + handle = get_persistence_handle_idx(); + + if(handle != -1) + { + if(handle < MaxPersHandle) + { + __sync_fetch_and_add(&gOpenHandleArray[handle], FileOpen); // set open flag + + if(dbContext.configKey.permission != PersistencePermission_ReadOnly) + { + strcpy(gOssHandleArray[handle].backupPath, backupPath); + strcpy(gOssHandleArray[handle].csumPath, csumPath); + + gOssHandleArray[handle].backupCreated = 0; + gOssHandleArray[handle].permission = dbContext.configKey.permission; + } + + *size = strlen(dbPath); + *path = malloc(*size); + memcpy(*path, dbPath, *size); + } + else + { + set_persistence_handle_close_idx(handle); + handle = EPERS_MAXHANDLE; + } + } + } + else + { + // assemble file string for local cached location + snprintf(dbPath, DbPathMaxLen, gLocalCacheFilePath, gAppId, user_no, seat_no, resource_id); + + handle = get_persistence_handle_idx(); + + if(handle != -1) + { + if(handle < MaxPersHandle) + { + snprintf(backupPath, DbPathMaxLen, "%s%s", dbPath, "~"); + snprintf(csumPath, DbPathMaxLen, "%s%s", dbPath, "~.crc"); + + __sync_fetch_and_add(&gOpenHandleArray[handle], FileOpen); // set open flag + strcpy(gOssHandleArray[handle].backupPath, backupPath); + strcpy(gOssHandleArray[handle].csumPath, csumPath); + gOssHandleArray[handle].backupCreated = 0; + gOssHandleArray[handle].permission = PersistencePermission_ReadWrite; // make it writable + } + else + { + set_persistence_handle_close_idx(handle); + handle = EPERS_MAXHANDLE; + } + } + } + } + + return handle; +} + + + +int pclFileReleasePath(int pathPandle, char* path) +{ + int rval = EPERS_NOT_INITIALIZED; + + //DLT_LOG(gDLTContext, DLT_LOG_INFO, DLT_STRING("pclFileClose fd: "), DLT_INT(fd)); + + if(gPclInitialized >= PCLinitialized) + { + if(pathPandle < MaxPersHandle) + { + // check if a backup and checksum file needs to bel deleted + if( gFileHandleArray[pathPandle].permission != PersistencePermission_ReadOnly) + { + // remove backup file + remove(gOssHandleArray[pathPandle].backupPath); // we don't care about return value + + // remove checksum file + remove(gOssHandleArray[pathPandle].csumPath); // we don't care about return value + + } + __sync_fetch_and_sub(&gOpenHandleArray[pathPandle], FileClosed); // set closed flag + set_persistence_handle_close_idx(pathPandle); + free(path); + path = NULL; + rval = 1; + } + else + { + rval = EPERS_MAXHANDLE; + } + } + + return rval; +} + + + + /**************************************************************************************** * Functions to create backup files @@ -625,6 +764,10 @@ int pclVerifyConsistency(const char* origPath, const char* backupPath, const cha remove(backupPath); remove(csumPath); } + else + { + close(handle); + } return handle; } diff --git a/src/persistence_client_library_handle.c b/src/persistence_client_library_handle.c index a6a952d..f83178e 100644 --- a/src/persistence_client_library_handle.c +++ b/src/persistence_client_library_handle.c @@ -31,22 +31,26 @@ static int gInitialized = 0; /// open file descriptor handle array int gOpenFdArray[MaxPersHandle] = {0}; +/// handle array +int gOpenHandleArray[MaxPersHandle] = {0}; + /// persistence key handle array PersistenceKeyHandle_s gKeyHandleArray[MaxPersHandle]; - -/// persistence key handle array +/// persistence file handle array PersistenceFileHandle_s gFileHandleArray[MaxPersHandle]; +/// persistence handle array for OSS and third party handles +PersistenceFileHandle_s gOssHandleArray[MaxPersHandle]; + /// free handle array int gFreeHandleArray[MaxPersHandle] = {0}; - int gFreeHandleIdxHead = 0; - pthread_mutex_t gMtx; + /// get persistence handle int get_persistence_handle_idx() { diff --git a/src/persistence_client_library_handle.h b/src/persistence_client_library_handle.h index 6d56c46..50adc22 100644 --- a/src/persistence_client_library_handle.h +++ b/src/persistence_client_library_handle.h @@ -53,10 +53,15 @@ extern PersistenceKeyHandle_s gKeyHandleArray[MaxPersHandle]; /// persistence file handle array extern PersistenceFileHandle_s gFileHandleArray[MaxPersHandle]; +/// persistence handle array for OSS and third party handles +extern PersistenceFileHandle_s gOssHandleArray[MaxPersHandle]; + /// open file descriptor handle array extern int gOpenFdArray[MaxPersHandle]; +/// handle array +extern int gOpenHandleArray[MaxPersHandle]; /** * @brief get persistence handle diff --git a/src/persistence_client_library_key.c b/src/persistence_client_library_key.c index 4986bef..9050e13 100644 --- a/src/persistence_client_library_key.c +++ b/src/persistence_client_library_key.c @@ -240,16 +240,16 @@ int pclKeyHandleReadData(int key_handle, unsigned char* buffer, int buffer_size) int pclKeyHandleRegisterNotifyOnChange(int key_handle, pclChangeNotifyCallback_t callback) { - DLT_LOG(gDLTContext, DLT_LOG_INFO, DLT_STRING("pclKeyHandleRegisterNotifyOnChange: "), - DLT_INT(gKeyHandleArray[key_handle].info.context.ldbid), DLT_STRING(gKeyHandleArray[key_handle].resourceID) ); + //DLT_LOG(gDLTContext, DLT_LOG_INFO, DLT_STRING("pclKeyHandleRegisterNotifyOnChange: "), + // DLT_INT(gKeyHandleArray[key_handle].info.context.ldbid), DLT_STRING(gKeyHandleArray[key_handle].resourceID) ); return handleRegNotifyOnChange(key_handle, callback, Notify_register); } int pclKeyHandleUnRegisterNotifyOnChange(int key_handle, pclChangeNotifyCallback_t callback) { - DLT_LOG(gDLTContext, DLT_LOG_INFO, DLT_STRING("pclKeyHandleUnRegisterNotifyOnChange: "), - DLT_INT(gKeyHandleArray[key_handle].info.context.ldbid), DLT_STRING(gKeyHandleArray[key_handle].resourceID) ); + //DLT_LOG(gDLTContext, DLT_LOG_INFO, DLT_STRING("pclKeyHandleUnRegisterNotifyOnChange: "), + // DLT_INT(gKeyHandleArray[key_handle].info.context.ldbid), DLT_STRING(gKeyHandleArray[key_handle].resourceID) ); return handleRegNotifyOnChange(key_handle, callback, Notify_unregister); } @@ -303,6 +303,12 @@ int pclKeyHandleWriteData(int key_handle, unsigned char* buffer, int buffer_size if( (idx < PersCustomLib_LastEntry) && (gPersCustomFuncs[idx].custom_plugin_handle_set_data != NULL) ) { size = gPersCustomFuncs[idx].custom_plugin_handle_set_data(key_handle, (char*)buffer, buffer_size-1); + + if(size >= 0) // success ==> send change notification + { + size = pers_send_Notification_Signal(gKeyHandleArray[key_handle].dbKey, + &(gKeyHandleArray[key_handle].info.context), pclNotifyStatus_changed); + } } else { @@ -555,8 +561,8 @@ int pclKeyWriteData(unsigned int ldbid, const char* resource_id, unsigned int us int pclKeyUnRegisterNotifyOnChange( unsigned int ldbid, const char * resource_id, unsigned int user_no, unsigned int seat_no, pclChangeNotifyCallback_t callback) { - DLT_LOG(gDLTContext, DLT_LOG_INFO, DLT_STRING("pclKeyUnRegisterNotifyOnChange: "), - DLT_INT(ldbid), DLT_STRING(resource_id) ); + //DLT_LOG(gDLTContext, DLT_LOG_INFO, DLT_STRING("pclKeyUnRegisterNotifyOnChange: "), + // DLT_INT(ldbid), DLT_STRING(resource_id) ); return regNotifyOnChange(ldbid, resource_id, user_no, seat_no, callback, Notify_unregister); } @@ -564,8 +570,9 @@ int pclKeyUnRegisterNotifyOnChange( unsigned int ldbid, const char * resource_ int pclKeyRegisterNotifyOnChange(unsigned int ldbid, const char* resource_id, unsigned int user_no, unsigned int seat_no, pclChangeNotifyCallback_t callback) { - DLT_LOG(gDLTContext, DLT_LOG_INFO, DLT_STRING("pclKeyRegisterNotifyOnChange: "), - DLT_INT(ldbid), DLT_STRING(resource_id) ); + //DLT_LOG(gDLTContext, DLT_LOG_INFO, DLT_STRING("pclKeyRegisterNotifyOnChange: "), + // DLT_INT(ldbid), DLT_STRING(resource_id) ); + return regNotifyOnChange(ldbid, resource_id, user_no, seat_no, callback, Notify_register); } @@ -593,8 +600,8 @@ int regNotifyOnChange(unsigned int ldbid, const char* resource_id, unsigned int // get database context: database path and database key rval = get_db_context(&dbContext, resource_id, ResIsNoFile, dbKey, dbPath); - // registration is only on shared key possible - if( (dbContext.configKey.storage == PersistenceStorage_shared) + // registration is only on shared and custom keys possible + if( (dbContext.configKey.storage != PersistenceStorage_local) && (dbContext.configKey.type == PersistenceResourceType_key) ) { rval = persistence_notify_on_change(dbPath, dbKey, ldbid, user_no, seat_no, callback, regPolicy); @@ -602,7 +609,7 @@ int regNotifyOnChange(unsigned int ldbid, const char* resource_id, unsigned int else { DLT_LOG(gDLTContext, DLT_LOG_ERROR, DLT_STRING("pclKeyRegisterNotifyOnChange: error - resource is not a shared resource or resource is not a key")); - rval = EPERS_RES_NO_KEY; + rval = EPERS_NOTIFY_NOT_ALLOWED; } } diff --git a/test/persistence_client_library_dbus_test.c b/test/persistence_client_library_dbus_test.c index cd4d7c6..2bb63f2 100644 --- a/test/persistence_client_library_dbus_test.c +++ b/test/persistence_client_library_dbus_test.c @@ -29,11 +29,13 @@ int myChangeCallback(pclNotification_s * notifyStruct) { printf(" ==> * - * myChangeCallback * - *\n"); + printf("Notification received ==> lbid: %d | resource_id: %s | seat: %d | user: %d | status: %d \n", notifyStruct->ldbid, notifyStruct->resource_id, notifyStruct->seat_no, notifyStruct->user_no, notifyStruct->pclKeyNotify_Status ); + printf(" <== * - * myChangeCallback * - *\n"); return 1; diff --git a/test/persistence_client_library_test.c b/test/persistence_client_library_test.c index c4c7d04..836f313 100644 --- a/test/persistence_client_library_test.c +++ b/test/persistence_client_library_test.c @@ -913,6 +913,31 @@ END_TEST +START_TEST(test_GetPath) +{ + int ret = 0; + char* path = NULL; + const char* thePath = "/Data/mnt-wt/lt-persistence_client_library_test/user/1/seat/1/media/mediaDB.db"; + unsigned int pathSize = 0; + + unsigned int shutdownReg = PCL_SHUTDOWN_TYPE_FAST | PCL_SHUTDOWN_TYPE_NORMAL; + + ret = pclInitLibrary(gTheAppId, shutdownReg); + fail_unless(ret <= 1, "Failed to init PCL"); + + ret = pclFileCreatePath(0xFF, "media/mediaDB.db", 1, 1, &path, &pathSize); + printf("PATH: %s \n", path); + fail_unless(strncmp((char*)path, thePath, strlen((char*)path)) == 0, "Path not correct"); + fail_unless(pathSize == strlen((char*)path), "Path size not correct"); + + free(path); + + pclDeinitLibrary(); +} +END_TEST + + + static Suite * persistencyClientLib_suite() { Suite * s = suite_create("Persistency client library"); @@ -959,6 +984,9 @@ static Suite * persistencyClientLib_suite() TCase * tc_ReadConfDefault = tcase_create("ReadConfDefault"); tcase_add_test(tc_ReadConfDefault, test_ReadConfDefault); + TCase * tc_GetPath = tcase_create("GetPath"); + tcase_add_test(tc_GetPath, test_GetPath); + suite_add_tcase(s, tc_persGetData); suite_add_tcase(s, tc_persSetData); suite_add_tcase(s, tc_persSetDataNoPRCT); @@ -972,6 +1000,7 @@ static Suite * persistencyClientLib_suite() suite_add_tcase(s, tc_Cursor); suite_add_tcase(s, tc_ReadDefault); suite_add_tcase(s, tc_ReadConfDefault); + suite_add_tcase(s, tc_GetPath); //suite_add_tcase(s, tc_Plugin); // activate only if the plugins are available return s; -- 2.7.4