In test case logtest 4 56, it verifies that whether written log file format is reflected correctly. It finds and checks the log file that has been closed (FILENAME_YYYYMMDD_HHMMSS_YYYYMMDD_HHMMSS.log). But sometimes the log file has not been closed successfully due to timeout reason, this cause that test case can not find the log file to check the content.
The test case should also check with file format name: FILENAME_YYYYMMDD_HHMMSS.log --- src/log/apitest/tet_LogOiOps.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/src/log/apitest/tet_LogOiOps.c b/src/log/apitest/tet_LogOiOps.c index 86da4f862..28abf862f 100644 --- a/src/log/apitest/tet_LogOiOps.c +++ b/src/log/apitest/tet_LogOiOps.c @@ -3858,10 +3858,10 @@ void verDefaultLogFileFmt(void) The description for this macro is same as one for VERIFY_CMD. Except, it includes close timestamp. */ -#define VERIFY_CMD_ \ - "find %s -type f -mmin -1" \ - " | egrep \"%s_[0-9]{8}_[0-9]{6}_[0-9]{8}_[0-9]{6}\\.log$\"" \ - " | xargs egrep \" %s \"" \ +#define VERIFY_CMD_ \ + "find %s -type f -mmin -1" \ + " | egrep \"%s_[0-9]{8}_[0-9]{6}.*\\.log$\"" \ + " | xargs egrep \" %s \"" \ " 1> /dev/null" /* Get current value of the attribute */ @@ -3896,10 +3896,8 @@ void verDefaultLogFileFmt(void) if (rc == -1) { /* Failed to execute command on the shell. Report error, * then exit */ - fprintf( - stderr, - "Failed to execute command (%s) on the shell. \n", - VERIFY_CMD_); + fprintf(stderr, "Failed to execute command (%s) on " + "the shell. \n", VERIFY_CMD_); test_validate(rc, 0); return; } -- 2.13.0 ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot _______________________________________________ Opensaf-devel mailing list Opensaf-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/opensaf-devel