-
Notifications
You must be signed in to change notification settings - Fork 48
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
tests: tls test without sleep #319
Conversation
Ooh nice, I wanted to do something like this for ages, thanks! |
Ignore the softhsm failures, there is a bug in GnuTLS 3.8.2 that causes it |
However this MacOS/softoken failure is an actual issue:
|
I don't have access to a Mac at the moment. I'll try to fix it but it may take a few days. |
6e76eb3
to
db66a33
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Not sure why shellcheck is complaining, looks like a false positive
@Jakuje could you review and merge if it is good for you as well.
There was a comment that was removed which disabled this check as I probably hit the same issue before:
Returning this back should silence the shellcheck. |
tests/ttls
Outdated
set timeout 60; | ||
expect { | ||
\"ACCEPT\" {}; | ||
default {exit 1;}; | ||
} | ||
set server_ready [open \"${TMPPDIR}/s_server_ready\" w+]; | ||
puts \$server_ready \"READY\n\"; | ||
close \$server_ready; | ||
expect { | ||
\"END SSL SESSION PARAMETERS\" {}; | ||
default {exit 1;}; | ||
} | ||
send \" TLS SUCCESSFUL \n\" | ||
send \"Q\n\" | ||
expect { | ||
eof {exit 0;}; | ||
default {exit 1;}; | ||
}" > "${TMPPDIR}/s_server_output" & |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
only nit I would have against the extensive first indent and just two spaces indent in the expect blocks. I would just keep it flat with 4 spaces for each. The same for the expect below.
|
||
# Make sure we terminate programs if test fails in the middle | ||
# shellcheck disable=SC2317 # Shellcheck for some reason does not follow trap |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
keep this comment before the trap function to avoid the shellcheck failure.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are some memory leaks in the CI (as fedora already picked up good versions of gnutls package), but they are not related to your changes so after squashing the changes I think we are good to go.
memory leak fixed separately in #326. |
Synchronizing server and client command using a fifo instead of sleep. Signed-off-by: Florian Wernli <[email protected]>
214ee78
to
220097e
Compare
Thanks @0pq76r this looks good now, merging. |
I ran into some flakeyness when running the TLS tests with a HSM.
I changed the test to use expect such that the timing for sending stuff to the server and the client process depends on the program output.