- **summary**: log: logtest sometimes gets failed at test case 15, 18 of suite
6 --> log: logtest sometimes gets failed at test case 15, 38 of suite 6
---
** [tickets:#1584] log: logtest sometimes gets failed at test case 15, 38 of
suite 6**
**Status:** accepted
**Milestone:** 4.6.2
**Created:** Wed Nov 04, 2015 07:41 AM UTC by Vu Minh Nguyen
**Last Updated:** Wed Nov 04, 2015 07:41 AM UTC
**Owner:** Vu Minh Nguyen
1) In test case 15 and 38 @ suite 8, they declare an static array with 220
elements, but leaved 219th one uninitialized. As the result, the output of
character at that position is unknown. There is trouble when passing the string
to /bin/sh shell if that character is special such as single/double quote.
char fileName[220];
memset(fileName, 'A', 218); // should be memset(filename, ‘A’,
sizeof(filename));
fileName[219] = '\0'; // << 220th element to NULL, leave 218th one unitialized
Here is the trace when running logtest 6 15 there is a character - single quote
(') in saLogStreamFileName :
Suite 6: LOG OI tests, Stream configuration object attribute validation
immcfg -c SaLogStreamConfig safLgStrCfg=TestLength -a
saLogStreamFileName="AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA`"
-a saLogStreamPathName=. 2> /dev/null
sh: 1: Syntax error: Unterminated quoted string
15 FAILED (expected EXIT_FAILURE, got UNKNOWN (2)) Modify:
saLogStreamFileName > 218 characters, ER
2) Also, the test case 38 @suite 6 is intented to test modifying
`saLogStreamFileName`, but wrongly passed it to `saLogStreamPathName`.
---
Sent from sourceforge.net because [email protected] is
subscribed to https://sourceforge.net/p/opensaf/tickets/
To unsubscribe from further messages, a project admin can change settings at
https://sourceforge.net/p/opensaf/admin/tickets/options. Or, if this is a
mailing list, you can unsubscribe from the mailing list.------------------------------------------------------------------------------
_______________________________________________
Opensaf-tickets mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensaf-tickets