Menu

#1584 log: logtest sometimes gets failed at test case 15, 38 of suite 6

4.6.2
fixed
nobody
None
defect
log
tests
major
2015-11-18
2015-11-04
No

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.

Related

Tickets: #1584
Wiki: ChangeLog-4.6.2

Discussion

  • Vu Minh Nguyen

    Vu Minh Nguyen - 2015-11-04
    • 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
     
  • Vu Minh Nguyen

    Vu Minh Nguyen - 2015-11-04
    • status: accepted --> review
     
  • elunlen

    elunlen - 2015-11-18
    • status: review --> fixed
    • assigned_to: Vu Minh Nguyen --> nobody
     
  • elunlen

    elunlen - 2015-11-18

    changeset: 7121:a1396c204d2d
    tag: tip
    parent: 7118:9b7aca203999
    user: Vu Minh Nguyen vu.m.nguyen@dektech.com.au
    date: Wed Nov 04 14:52:37 2015 +0700
    summary: log: logtest sometimes gets failed at test case 15 and 38 of suite 6 [#1584]

    rev: a1396c204d2db6aecefbcf1299bdb46b7b3a7f32

    changeset: 7120:02bdfab72a71
    branch: opensaf-4.7.x
    parent: 7116:faff2d5ec18c
    user: Vu Minh Nguyen vu.m.nguyen@dektech.com.au
    date: Wed Nov 04 14:52:37 2015 +0700
    summary: log: logtest sometimes gets failed at test case 15 and 38 of suite 6 [#1584]

    rev: 02bdfab72a718730d0973428cd39da8ba3b0dc58

    changeset: 7119:98f5b609882a
    branch: opensaf-4.6.x
    parent: 7112:f57a2c452a5e
    user: Vu Minh Nguyen vu.m.nguyen@dektech.com.au
    date: Wed Nov 18 08:34:54 2015 +0700
    summary: log: logtest sometimes gets failed at test case 15 and 38 of suite 6 [#1584]

    rev: 98f5b609882a2fc704e938cf3c7115213551d926

     

    Related

    Tickets: #1584


Log in to post a comment.