tests/logsv/tet_LogOiOps.c | 11 +++++++++++
1 files changed, 11 insertions(+), 0 deletions(-)
Not wait for apply callback in logtest 5 2 done before removing test directory
(in this test case, it changes 'logRootDirectory' attribute, then there are
action of renames files)
The patch adds a check loop to make sure all apply callback (rename log files)
done
before removing the log test directory.
diff --git a/tests/logsv/tet_LogOiOps.c b/tests/logsv/tet_LogOiOps.c
--- a/tests/logsv/tet_LogOiOps.c
+++ b/tests/logsv/tet_LogOiOps.c
@@ -969,6 +969,7 @@ void saLogOi_52(void)
void saLogOi_48(void)
{
int rc = 0, tst_stat = 0;
+ unsigned int count = 100;
char command[256];
char tstdir[256];
@@ -1011,6 +1012,16 @@ void saLogOi_48(void)
}
done_remove:
+ /* Check if all files have been renamed in 'tstdir' before remove them*/
+ for (int i = 0; i < count; i++) {
+ usleep(100*1000);
+ /* Find if any files in 'tstdir' have not been rename (append
time_stamp). */
+ sprintf(command, "find %s -type f | egrep -v
\".*_[0-9]{8}_[0-9]{6}.*\" 1> /dev/null",
+ tstdir);
+ rc = system(command);
+ if (WEXITSTATUS(rc) != 0)
+ break;
+ }
/* Remove xxtest no longer used */
sprintf(command, "rm -rf %s/", tstdir);
rc = tet_system(command);
------------------------------------------------------------------------------
_______________________________________________
Opensaf-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensaf-devel