Skip to content

Conversation

@ywkaras
Copy link
Contributor

@ywkaras ywkaras commented Nov 8, 2018

No description provided.

@ywkaras
Copy link
Contributor Author

ywkaras commented Nov 8, 2018

This PR is dependent on #4566 .

@bryancall bryancall added the Tests label Nov 8, 2018
@bryancall bryancall added this to the 9.0.0 milestone Nov 8, 2018
@ywkaras ywkaras force-pushed the TestHooks branch 2 times, most recently from 73658bf to 149749c Compare November 10, 2018 02:37
zwoop
zwoop previously requested changes Nov 11, 2018
shinrich
shinrich previously approved these changes Nov 12, 2018
Copy link
Member

@shinrich shinrich left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems reasonable to have a test that does a nominal invocation of all the hooks it can. The TLS hooks are tested more extensively in the tls_hook* tests. We need to write something similar for the tls_session hooks.

@ywkaras
Copy link
Contributor Author

ywkaras commented Nov 12, 2018

Don't merge till underlying PRs are resolved.

@ywkaras
Copy link
Contributor Author

ywkaras commented Nov 30, 2018

What else @zwoop ? Cut down the tallest tree in the forest with a herring?

#4651

@SolidWallOfCode
Copy link
Member

The precursor PRs for this are all merged, as far as I can tell. @zwoop is probably on vacation and we'll have to wait till next week or so to move forward.

@ywkaras
Copy link
Contributor Author

ywkaras commented Jan 3, 2019

@zwoop please keep your block on this, the test does not run consistently. I think it's showing a problem with the VCONN start/end hooks. Sometimes they are executed for non-TLS VCONNs, sometimes they aren't. But when they are executed, the VCONNs are incorrectly considered to be SSL VCONNs.

C$ goldtst -f test_hooks
Running Test test_hooks:... Passed

Generating Report: --------------
Total of 1 test
  Unknown: 0
  Exception: 0
  Failed: 0
  Warning: 0
  Skipped: 0
  Passed: 1
wkaras ~/REPOS/TS/tests
C$ goldtst -f test_hooks
Running Test test_hooks:... Passed

Generating Report: --------------
Total of 1 test
  Unknown: 0
  Exception: 0
  Failed: 0
  Warning: 0
  Skipped: 0
  Passed: 1
wkaras ~/REPOS/TS/tests
C$ goldtst -f test_hooks
Running Test test_hooks:..F Failed

Generating Report: --------------
 Test: test_hooks: Failed
    File: test_hooks.test.py
    Directory: /Users/wkaras/REPOS/TS/tests/gold_tests/pluginTest/test_hooks
   Starting Test test_hooks : No issues found - Passed
      Reason: Started!
   Process: server: Passed
     Setting up : Lamda - Passed
     Setting up : MakeDir - Passed
     Test : Checking that any test passes - Passed
        Reason: One or more tests passed
     
       Test : Checking that ReturnCode == None - Failed
          Reason: Returned Value 0 != None
       
     
       Test : Checking that ReturnCode == 0 - Passed
          Reason: Returned Value: 0 == 0
       
   Process: ts: Passed
     Setting up : MakeDir - Passed
     Setting up : Copy - Passed
     Setting up : CopyAs - Passed
     Setting up : CopyAs - Passed
     Setting up : CopyAs - Passed
     Setting up : CopyAs - Passed
     Setting up : CopyAs - Passed
     Setting up : CopyAs - Passed
     Setting up : CopyAs - Passed
     Setting up : CopyAs - Passed
     Setting up : CopyAs - Passed
     Setting up : CopyAs - Passed
     Setting up : Copy - Passed
     Setting up : MakeDir - Passed
     Setting up : Copy - Passed
     Setting up : MakeDir - Passed
     Setting up : Chown - Passed
     Setting up : MakeDir - Passed
     Setting up : MakeDir - Passed
     Setting up : MakeDir - Passed
     Setting up : Chown - Passed
     Setting up : MakeDir - Passed
     Setting up : Chown - Passed
     Setting up : Lamda - Passed
     Setting up : Lamda - Passed
     Setting up : CopyAs - Passed
     Setting up : CopyAs - Passed
     Setting up : Copy - Passed
     Setting up : RunCommand - Passed
     Test : Checking that ReturnCode == 0 - Passed
        Reason: Returned Value: 0 == 0
     file /Users/wkaras/REPOS/TS/tests/_sandbox/test_hooks/ts/log/diags.log : diags.log should not contain errors - Passed
        Reason: Contents of /Users/wkaras/REPOS/TS/tests/_sandbox/test_hooks/ts/log/diags.log excludes expression
     file /Users/wkaras/REPOS/TS/tests/_sandbox/test_hooks/ts/log/diags.log : diags.log should not contain errors - Passed
        Reason: Contents of /Users/wkaras/REPOS/TS/tests/_sandbox/test_hooks/ts/log/diags.log excludes expression
     Appending File /Users/wkaras/REPOS/TS/tests/_sandbox/test_hooks/ts/config/records.config : Writing config file records.config - Passed
        Reason: Success
     Appending File /Users/wkaras/REPOS/TS/tests/_sandbox/test_hooks/ts/config/ssl_multicert.config : Appended file /Users/wkaras/REPOS/TS/tests/_sandbox/test_hooks/ts/config/ssl_multicert.config - Passed
        Reason: Success
     Appending File /Users/wkaras/REPOS/TS/tests/_sandbox/test_hooks/ts/config/plugin.config : Appended file /Users/wkaras/REPOS/TS/tests/_sandbox/test_hooks/ts/config/plugin.config - Passed
        Reason: Success
     Appending File /Users/wkaras/REPOS/TS/tests/_sandbox/test_hooks/ts/config/remap.config : Appended file /Users/wkaras/REPOS/TS/tests/_sandbox/test_hooks/ts/config/remap.config - Passed
        Reason: Success
   Process: Default: Skipped
      Reason: Was not started
   Process: Default: Skipped
      Reason: Was not started
   Run: 0-tr: Passed
     Process: Default: Passed
       Test : Checking that ReturnCode == 0 - Passed
          Reason: Returned Value: 0 == 0
     Process: Default: Passed
       Test : Checking that ReturnCode == 0 - Passed
          Reason: Returned Value: 0 == 0
   Run: 1-tr: Passed
     Process: Default: Passed
       Test : Checking that ReturnCode == 0 - Passed
          Reason: Returned Value: 0 == 0
     Process: Default: Passed
       Test : Checking that ReturnCode == 0 - Passed
          Reason: Returned Value: 0 == 0
   Run: 2-tr: Failed
     file log.txt : Checking that log.txt matches log.gold - Failed
        Reason: File differences
         Gold File : /Users/wkaras/REPOS/TS/tests/gold_tests/pluginTest/test_hooks/log.gold
         Data File : /Users/wkaras/REPOS/TS/tests/_sandbox/test_hooks/log.txt
         + Global: event=TS_EVENT_VCONN_START
         + Global: ssl flag=1
         + Global: event=TS_EVENT_VCONN_CLOSE
         + Global: ssl flag=1
           Global: event=TS_EVENT_HTTP_SSN_START
           Global: event=TS_EVENT_HTTP_TXN_START
           Session: event=TS_EVENT_HTTP_TXN_START
           Global: event=TS_EVENT_HTTP_READ_REQUEST_HDR
           Session: event=TS_EVENT_HTTP_READ_REQUEST_HDR
           Transaction: event=TS_EVENT_HTTP_READ_REQUEST_HDR
           Global: event=TS_EVENT_HTTP_TXN_CLOSE
           Session: event=TS_EVENT_HTTP_TXN_CLOSE
           Transaction: event=TS_EVENT_HTTP_TXN_CLOSE
           Global: event=TS_EVENT_HTTP_SSN_CLOSE
           Session: event=TS_EVENT_HTTP_SSN_CLOSE
           Global: event=TS_EVENT_VCONN_START
           Global: ssl flag=1
           Global: event=TS_EVENT_SSL_SERVERNAME
           Global: ssl flag=1
           Global: event=TS_EVENT_SSL_CERT
           Global: ssl flag=1
           Global: event=TS_EVENT_HTTP_SSN_START
           Global: event=TS_EVENT_HTTP_TXN_START
           Session: event=TS_EVENT_HTTP_TXN_START
           Global: event=TS_EVENT_HTTP_READ_REQUEST_HDR
           Session: event=TS_EVENT_HTTP_READ_REQUEST_HDR
           Transaction: event=TS_EVENT_HTTP_READ_REQUEST_HDR
           Global: event=TS_EVENT_HTTP_TXN_CLOSE
           Session: event=TS_EVENT_HTTP_TXN_CLOSE
           Transaction: event=TS_EVENT_HTTP_TXN_CLOSE
           Global: event=TS_EVENT_HTTP_SSN_CLOSE
           Session: event=TS_EVENT_HTTP_SSN_CLOSE
           Global: event=TS_EVENT_VCONN_CLOSE
           Global: ssl flag=1
     Starting TestRun 2-tr : No Issues found - Passed
        Reason: Started!
     Process: Default: Passed
       Test : Checking that ReturnCode == 0 - Passed
          Reason: Returned Value: 0 == 0
     Process: Default: Passed
       Test : Checking that ReturnCode == 0 - Passed
          Reason: Returned Value: 0 == 0

Total of 1 test
  Unknown: 0
  Exception: 0
  Failed: 1
  Warning: 0
  Skipped: 0
  Passed: 0
wkaras ~/REPOS/TS/tests
C$ goldtst -f test_hooks
Running Test test_hooks:..F Failed

Generating Report: --------------
 Test: test_hooks: Failed
    File: test_hooks.test.py
    Directory: /Users/wkaras/REPOS/TS/tests/gold_tests/pluginTest/test_hooks
   Starting Test test_hooks : No issues found - Passed
      Reason: Started!
   Process: server: Passed
     Setting up : Lamda - Passed
     Setting up : MakeDir - Passed
     Test : Checking that any test passes - Passed
        Reason: One or more tests passed
     
       Test : Checking that ReturnCode == None - Failed
          Reason: Returned Value 0 != None
       
     
       Test : Checking that ReturnCode == 0 - Passed
          Reason: Returned Value: 0 == 0
       
   Process: ts: Passed
     Setting up : MakeDir - Passed
     Setting up : Copy - Passed
     Setting up : CopyAs - Passed
     Setting up : CopyAs - Passed
     Setting up : CopyAs - Passed
     Setting up : CopyAs - Passed
     Setting up : CopyAs - Passed
     Setting up : CopyAs - Passed
     Setting up : CopyAs - Passed
     Setting up : CopyAs - Passed
     Setting up : CopyAs - Passed
     Setting up : CopyAs - Passed
     Setting up : Copy - Passed
     Setting up : MakeDir - Passed
     Setting up : Copy - Passed
     Setting up : MakeDir - Passed
     Setting up : Chown - Passed
     Setting up : MakeDir - Passed
     Setting up : MakeDir - Passed
     Setting up : MakeDir - Passed
     Setting up : Chown - Passed
     Setting up : MakeDir - Passed
     Setting up : Chown - Passed
     Setting up : Lamda - Passed
     Setting up : Lamda - Passed
     Setting up : CopyAs - Passed
     Setting up : CopyAs - Passed
     Setting up : Copy - Passed
     Setting up : RunCommand - Passed
     Test : Checking that ReturnCode == 0 - Passed
        Reason: Returned Value: 0 == 0
     file /Users/wkaras/REPOS/TS/tests/_sandbox/test_hooks/ts/log/diags.log : diags.log should not contain errors - Passed
        Reason: Contents of /Users/wkaras/REPOS/TS/tests/_sandbox/test_hooks/ts/log/diags.log excludes expression
     file /Users/wkaras/REPOS/TS/tests/_sandbox/test_hooks/ts/log/diags.log : diags.log should not contain errors - Passed
        Reason: Contents of /Users/wkaras/REPOS/TS/tests/_sandbox/test_hooks/ts/log/diags.log excludes expression
     Appending File /Users/wkaras/REPOS/TS/tests/_sandbox/test_hooks/ts/config/records.config : Writing config file records.config - Passed
        Reason: Success
     Appending File /Users/wkaras/REPOS/TS/tests/_sandbox/test_hooks/ts/config/ssl_multicert.config : Appended file /Users/wkaras/REPOS/TS/tests/_sandbox/test_hooks/ts/config/ssl_multicert.config - Passed
        Reason: Success
     Appending File /Users/wkaras/REPOS/TS/tests/_sandbox/test_hooks/ts/config/plugin.config : Appended file /Users/wkaras/REPOS/TS/tests/_sandbox/test_hooks/ts/config/plugin.config - Passed
        Reason: Success
     Appending File /Users/wkaras/REPOS/TS/tests/_sandbox/test_hooks/ts/config/remap.config : Appended file /Users/wkaras/REPOS/TS/tests/_sandbox/test_hooks/ts/config/remap.config - Passed
        Reason: Success
   Process: Default: Skipped
      Reason: Was not started
   Process: Default: Skipped
      Reason: Was not started
   Run: 0-tr: Passed
     Process: Default: Passed
       Test : Checking that ReturnCode == 0 - Passed
          Reason: Returned Value: 0 == 0
     Process: Default: Passed
       Test : Checking that ReturnCode == 0 - Passed
          Reason: Returned Value: 0 == 0
   Run: 1-tr: Passed
     Process: Default: Passed
       Test : Checking that ReturnCode == 0 - Passed
          Reason: Returned Value: 0 == 0
     Process: Default: Passed
       Test : Checking that ReturnCode == 0 - Passed
          Reason: Returned Value: 0 == 0
   Run: 2-tr: Failed
     file log.txt : Checking that log.txt matches log.gold - Failed
        Reason: File differences
         Gold File : /Users/wkaras/REPOS/TS/tests/gold_tests/pluginTest/test_hooks/log.gold
         Data File : /Users/wkaras/REPOS/TS/tests/_sandbox/test_hooks/log.txt
         + Global: event=TS_EVENT_VCONN_START
         + Global: ssl flag=1
         + Global: event=TS_EVENT_VCONN_CLOSE
         + Global: ssl flag=1
           Global: event=TS_EVENT_HTTP_SSN_START
           Global: event=TS_EVENT_HTTP_TXN_START
           Session: event=TS_EVENT_HTTP_TXN_START
           Global: event=TS_EVENT_HTTP_READ_REQUEST_HDR
           Session: event=TS_EVENT_HTTP_READ_REQUEST_HDR
           Transaction: event=TS_EVENT_HTTP_READ_REQUEST_HDR
           Global: event=TS_EVENT_HTTP_TXN_CLOSE
           Session: event=TS_EVENT_HTTP_TXN_CLOSE
           Transaction: event=TS_EVENT_HTTP_TXN_CLOSE
           Global: event=TS_EVENT_HTTP_SSN_CLOSE
           Session: event=TS_EVENT_HTTP_SSN_CLOSE
           Global: event=TS_EVENT_VCONN_START
           Global: ssl flag=1
           Global: event=TS_EVENT_SSL_SERVERNAME
           Global: ssl flag=1
           Global: event=TS_EVENT_SSL_CERT
           Global: ssl flag=1
           Global: event=TS_EVENT_HTTP_SSN_START
           Global: event=TS_EVENT_HTTP_TXN_START
           Session: event=TS_EVENT_HTTP_TXN_START
           Global: event=TS_EVENT_HTTP_READ_REQUEST_HDR
           Session: event=TS_EVENT_HTTP_READ_REQUEST_HDR
           Transaction: event=TS_EVENT_HTTP_READ_REQUEST_HDR
           Global: event=TS_EVENT_HTTP_TXN_CLOSE
           Session: event=TS_EVENT_HTTP_TXN_CLOSE
           Transaction: event=TS_EVENT_HTTP_TXN_CLOSE
           Global: event=TS_EVENT_HTTP_SSN_CLOSE
           Session: event=TS_EVENT_HTTP_SSN_CLOSE
           Global: event=TS_EVENT_VCONN_CLOSE
           Global: ssl flag=1
     Starting TestRun 2-tr : No Issues found - Passed
        Reason: Started!
     Process: Default: Passed
       Test : Checking that ReturnCode == 0 - Passed
          Reason: Returned Value: 0 == 0
     Process: Default: Passed
       Test : Checking that ReturnCode == 0 - Passed
          Reason: Returned Value: 0 == 0

Total of 1 test
  Unknown: 0
  Exception: 0
  Failed: 1
  Warning: 0
  Skipped: 0
  Passed: 0
wkaras ~/REPOS/TS/tests
C$ goldtst -f test_hooks
Running Test test_hooks:... Passed

Generating Report: --------------
Total of 1 test
  Unknown: 0
  Exception: 0
  Failed: 0
  Warning: 0
  Skipped: 0
  Passed: 1
wkaras ~/REPOS/TS/tests
C$

@ywkaras
Copy link
Contributor Author

ywkaras commented Jan 5, 2019

OK @zwoop I think this is ready to be merged now.

@ywkaras
Copy link
Contributor Author

ywkaras commented Jan 8, 2019

changed per @shinrich 's requests

Copy link
Contributor

@zwoop zwoop left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ship it.

@zwoop zwoop merged commit 97b3511 into apache:master Jan 15, 2019
@bryancall bryancall changed the title Add Session and SSL hooks to test_hooks Au test. Add Session and SSL hooks to test_hooks Au test. Sep 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants