Skip to content

Add a simple method to run regression tests#5619

Closed
levitte wants to merge 5 commits intoopenssl:masterfrom
levitte:regression-test
Closed

Add a simple method to run regression tests#5619
levitte wants to merge 5 commits intoopenssl:masterfrom
levitte:regression-test

Conversation

@levitte
Copy link
Member

@levitte levitte commented Mar 14, 2018

This is only useful when building shared libraries. This allows us to
run our tests against newer libraries when the time comes. Simply do
this:

OPENSSL_REGRESSION=/other/OpenSSL/build/tree make test

($OPENSSL_REGRESSION must be an absolute path)

@levitte levitte added the branch: master Applies to master branch label Mar 14, 2018
@levitte
Copy link
Member Author

levitte commented Mar 14, 2018

This isn't terribly interesting for master until there's a letter update for 1.1.1 or when/if 1.1.2 comes along.

However, I'm also backporting to 1.1.0, and that could prove interesting...

@mattcaswell
Copy link
Member

However, I'm also backporting to 1.1.0, and that could prove interesting...

Probably it will fail miserably due to lots of in-built assumptions in the tests about TLSv1.2 being the maximum available protocol.

@levitte
Copy link
Member Author

levitte commented Mar 14, 2018

Yup, I know, and perhaps we should modify the tests accordingly. However, I've found other regression failures that do worry me, among others in test_tsa

@richsalz
Copy link
Contributor

What is the output of the cd command? This syntax confuses me.

@levitte
Copy link
Member Author

levitte commented Mar 14, 2018

Ah, I forgot pwd. Fixed in the description, will fix the commit message

Copy link
Contributor

Choose a reason for hiding this comment

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

Wouldn't it be more appropriate to check for -x? Secondly one can wonder if it would be appropriate to handle the error instead of ignoring. I mean if you set OPENSSL_REGRESSION and there is nothing there, you might appreciate an error message that there is nothing there, rather than silent execution with shared libraries in current build tree. Otherwise you give an impression that it regression test succeeded.

Copy link
Member Author

Choose a reason for hiding this comment

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

Good points. Will fix.

levitte added 4 commits March 18, 2018 19:51
This is only useful when building shared libraries.  This allows us to
run our tests against newer libraries when the time comes.  Simply do
this:

    OPENSSL_REGRESSION=/other/OpenSSL/build/tree make test

($OPENSSL_REGRESSION *must* be an absolute path)
When doing a regression test, it's obvious that the version
test/shlibloadtest is built for will not be the same as the library
version.  So we change the test to check for assumed compatibility.
# we exec also support that mechanism...
OPENSSL_REGRESSION= exec "$shlibwrap" "$@"
else
if [ -f "$OPENSSL_REGRESSION" ]; then
Copy link
Contributor

Choose a reason for hiding this comment

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

I suppose you meant to check -f "$shlibwrap", not $OPENSSL_REGRESSION. I also sense inconsistency in quoting. For example -n "$OPENSSL_REGRESSION" suggests that you are willing to tolerate white spaces in $OPENSSL_REGRESSION. But next line, shlibwrap won't tolerate them.

Copy link
Member Author

Choose a reason for hiding this comment

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

Right. Fixed.

@levitte
Copy link
Member Author

levitte commented Mar 19, 2018

Merged.

b4d46ad Add a simple method to run regression tests
00c8f1b Stop test/shlibloadtest.c from failing in a regression test

@levitte levitte closed this Mar 19, 2018
levitte added a commit that referenced this pull request Mar 19, 2018
This is only useful when building shared libraries.  This allows us to
run our tests against newer libraries when the time comes.  Simply do
this:

    OPENSSL_REGRESSION=/other/OpenSSL/build/tree make test

($OPENSSL_REGRESSION *must* be an absolute path)

Reviewed-by: Andy Polyakov <[email protected]>
(Merged from #5619)
levitte added a commit that referenced this pull request Mar 19, 2018
When doing a regression test, it's obvious that the version
test/shlibloadtest is built for will not be the same as the library
version.  So we change the test to check for assumed compatibility.

Reviewed-by: Andy Polyakov <[email protected]>
(Merged from #5619)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

branch: master Applies to master branch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants