Skip to content

Fix CMP CLI tests#12175

Closed
DDvO wants to merge 8 commits intoopenssl:masterfrom
siemens:fix_cmp_cli_tests
Closed

Fix CMP CLI tests#12175
DDvO wants to merge 8 commits intoopenssl:masterfrom
siemens:fix_cmp_cli_tests

Conversation

@DDvO
Copy link
Contributor

@DDvO DDvO commented Jun 17, 2020

@slontis
Copy link
Member

slontis commented Jun 17, 2020

Is this still WIP?

@DDvO
Copy link
Contributor Author

DDvO commented Jun 18, 2020

Is this still WIP?

Yes. Currently I'm waiting on further input on #12145.

@DDvO DDvO force-pushed the fix_cmp_cli_tests branch from 2684529 to e7c5cd4 Compare June 18, 2020 05:31
@DDvO DDvO changed the title WIP: Fix CMP CLI tests Fix CMP CLI tests Jun 18, 2020
@DDvO
Copy link
Contributor Author

DDvO commented Jun 18, 2020

I think I've meanwhile fixed all reported issues.

@DDvO
Copy link
Contributor Author

DDvO commented Jun 18, 2020

Is this still WIP?

Not anymore.

@DDvO DDvO requested a review from kroeckx June 19, 2020 18:32
@DDvO DDvO force-pushed the fix_cmp_cli_tests branch from 98c210e to 2ae3512 Compare June 20, 2020 15:25
@DDvO
Copy link
Contributor Author

DDvO commented Jun 20, 2020

I've just added three more fixes:

  • Speed-up for tests in 81-test_cmp_cli_data/test_connection.csv
  • test/run_tests.pl: Improve indentation parsing workaround for VFO and VFP mode
  • test/run_tests.pl: Improve newline output for VFO and VFP mode

@DDvO DDvO force-pushed the fix_cmp_cli_tests branch from 2ae3512 to ad506f6 Compare June 20, 2020 15:36
@DDvO DDvO force-pushed the fix_cmp_cli_tests branch from ad506f6 to db15402 Compare June 20, 2020 15:46
@romen
Copy link
Member

romen commented Jun 21, 2020

@DDvO given you are fixing VFO and VFP, what about documenting them? Do you think it would fit in this PR or is it better left as a separate one?

At the moment we have this:

openssl/INSTALL.md

Lines 1657 to 1704 in 200ae2e

Test Failures
-------------
If some tests fail, look at the output. There may be reasons for the failure
that isn't a problem in OpenSSL itself (like a malfunction with Perl).
You may want increased verbosity, that can be accomplished like this:
Verbosity on failure only (make macro VERBOSE_FAILURE or VF):
$ make VF=1 test # Unix
$ mms /macro=(VF=1) test ! OpenVMS
$ nmake VF=1 test # Windows
Full verbosity (make macro VERBOSE or V):
$ make V=1 test # Unix
$ mms /macro=(V=1) test ! OpenVMS
$ nmake V=1 test # Windows
If you want to run just one or a few specific tests, you can use
the make variable TESTS to specify them, like this:
$ make TESTS='test_rsa test_dsa' test # Unix
$ mms/macro="TESTS=test_rsa test_dsa" test ! OpenVMS
$ nmake TESTS='test_rsa test_dsa' test # Windows
And of course, you can combine (Unix example shown):
$ make VF=1 TESTS='test_rsa test_dsa' test
You can find the list of available tests like this:
$ make list-tests # Unix
$ mms list-tests ! OpenVMS
$ nmake list-tests # Windows
Have a look at the manual for the perl module Test::Harness to
see what other HARNESS_* variables there are.
If you find a problem with OpenSSL itself, try removing any
compiler optimization flags from the CFLAGS line in Makefile and
run "make clean; make" or corresponding.
To report a bug please open an issue on GitHub, at
<https://github.com/openssl/openssl/issues>.
For more details on how the make variables TESTS can be used,
see section [Running Selected Tests](#running-selected-tests) below.

I don't know what would be best: expanding that section or having a new markdown file inside test/ describing in detail the various verbosity options while adding just a reference to it in INSTALL.md?

What do you think?

@romen romen added the branch: master Applies to master branch label Jun 21, 2020
Copy link
Member

@romen romen left a comment

Choose a reason for hiding this comment

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

LGTM.

I left a note about documenting the VFO/VFP options, but I will leave to @DDvO to decide if it should be done in a separate PR.

@romen romen added the approval: done This pull request has the required number of approvals label Jun 21, 2020
Copy link
Member

@romen romen left a comment

Choose a reason for hiding this comment

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

LGTM, thanks @DDvO !

@DDvO
Copy link
Contributor Author

DDvO commented Jun 21, 2020

Thanks @romen for reviewing this and your comments:

@DDvO given you are fixing VFO and VFP, what about documenting them?

Very good point!

Do you think it would fit in this PR or is it better left as a separate one?

I don't know what would be best: expanding that section or having a new markdown file inside test/ describing in detail the various verbosity options while adding just a reference to it in INSTALL.md?

What do you think?

I'd say it makes most sense to do a quick documentation extension as part of this PR
(I've just added a respective commit).

After this one has been merged I'll do a further PR for cleaning up INSTALL.md, by moving test-related documentation to test/README.md and referencing it from INSTALL.md (there are at least two sections in that file where such a reference would be helpful in my view).

@openssl-machine
Copy link
Collaborator

24 hours has passed since 'approval: done' was set, but as this PR has been updated in that time the label 'approval: ready to merge' is not being automatically set. Please review the updates and set the label manually.

@DDvO DDvO added the approval: ready to merge The 24 hour grace period has passed, ready to merge label Jun 22, 2020
@DDvO
Copy link
Contributor Author

DDvO commented Jun 22, 2020

Merged - thanks @kroeckx and @romen!

@DDvO DDvO closed this Jun 22, 2020
openssl-machine pushed a commit that referenced this pull request Jun 22, 2020
openssl-machine pushed a commit that referenced this pull request Jun 22, 2020
openssl-machine pushed a commit that referenced this pull request Jun 22, 2020
openssl-machine pushed a commit that referenced this pull request Jun 22, 2020
…ODE_UNSAFE_FOR_PRODUCTION

Reviewed-by: Nicola Tuveri <[email protected]>
(Merged from #12175)
openssl-machine pushed a commit that referenced this pull request Jun 22, 2020
openssl-machine pushed a commit that referenced this pull request Jun 22, 2020
openssl-machine pushed a commit that referenced this pull request Jun 22, 2020
openssl-machine pushed a commit that referenced this pull request Jun 22, 2020
$ ./config
./config
Operating system: x86-whatever-minix
This system (minix) is not supported. See file INSTALL for details.
Copy link
Member

Choose a reason for hiding this comment

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

Damnit, I didn't pay enough attention.

A reason for the $ was to clearly mark what is prompted commands and what is command output. It's even explained here (which, interestingly enough, you ignored in all kinds of ways):

openssl/INSTALL.md

Lines 73 to 81 in 922f156

Commands
--------
Any line starting with a dollar sign is a command line.
$ command
The dollar sign indicates the shell prompt and is not to be entered as
part of the command.

Copy link
Member

Choose a reason for hiding this comment

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

I find it incredibly irritating that things like this get "slipped in" in PRs that have nothing to do with it.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Indeed I overlooked that explanation, but I did suspect that the $ was used for that purpose.

Still I don't like it, because in particular if there is a number of shell commands in a row, such as in

    $ mkdir /var/tmp/openssl-build
    $ cd /var/tmp/openssl-build
    $ whatever

you cannot simply copy&paste that series of commands, while with

    mkdir /var/tmp/openssl-build
    cd /var/tmp/openssl-build
    whatever

you can.

And I suppose there are just a few cases where command input and output could be confused.
In such cases we could, e.g., insert a blank line to help understanding this distinction.

Copy link
Member

Choose a reason for hiding this comment

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

Regardless, if you want to change that, having that "slip in" in a PR that's about something different is not a good way to do it.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I find it incredibly irritating that things like this get "slipped in" in PRs that have nothing to do with it.

Yeah, I should better have done this in a separate PR for clarity.
It just had come up along with the review of this PR, so for simplicity I added a commit for that here.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Regardless, if you want to change that, having that "slip in" in a PR that's about something different is not a good way to do it.

Sorry for that.

Copy link
Contributor Author

@DDvO DDvO Jun 24, 2020

Choose a reason for hiding this comment

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

I've just checked: in this (merged) PR this is the only case where command input and output got mixed.
Here I suggest simply dropping the line

    ./config

because it is already mentioned in the sentence above it.

@levitte, are you okay if I do this nit fix along with #12109 or #12232,
or should I also in this case do a separate PR for it?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

And of course we should be consistent about using $ or not,
and if there is consensus to drop it also remove the remark in INSTALL.md on its purpose quoted above.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

BTW, the $ symbols is not commonly used under Windows, where typically a > is printed as prompt.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I just realized that already today at noon (CEST) a PR restoring the $ has been done: #12257.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approval: done This pull request has the required number of approvals approval: ready to merge The 24 hour grace period has passed, ready to merge branch: master Applies to master branch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Master fails "81-test_cmp.cli.t" Extended tests are failing cmp tests

6 participants