Skip to content

Move test-related detail from INSTALL.md to new test/README.md#12232

Closed
DDvO wants to merge 2 commits intoopenssl:masterfrom
siemens:add_test_README.md
Closed

Move test-related detail from INSTALL.md to new test/README.md#12232
DDvO wants to merge 2 commits intoopenssl:masterfrom
siemens:add_test_README.md

Conversation

@DDvO
Copy link
Contributor

@DDvO DDvO commented Jun 22, 2020

as discussed in #12175 (comment).

@DDvO DDvO force-pushed the add_test_README.md branch 3 times, most recently from 091c31b to 08dbeb1 Compare June 22, 2020 19:09
@levitte
Copy link
Member

levitte commented Jun 22, 2020

Two points:

  1. There is a test/README, which is more like advice/reminders to ourselves when we write test recipes
  2. I think we need to ask the question "is this helpful for the user?", as the stuff that you're moving is intended for use consumption. Does it help them to have to go looking in another file when it comes to testing details?

@paulidale
Copy link
Contributor

Travis doesn't seem relevant.

@paulidale paulidale added approval: done This pull request has the required number of approvals branch: master Applies to master branch labels Jun 23, 2020
@paulidale
Copy link
Contributor

With the hyperlinks, going across to the other file is easy. I'm fine with this. @levitte, dismiss my review if you feel strongly.

@DDvO
Copy link
Contributor Author

DDvO commented Jun 23, 2020

@levitte,

  1. There is a test/README, which is more like advice/reminders to ourselves when we write test recipes.

Ah, yes! I somehow recalled that there was a README already, but then I overlooked it.
I suggest that I'll append that more internal info to the end of the new test/README.md, but to do this after this PR and #12109 have been merged because otherwise there would be a heavy merge conflict.
I suggest moving also the contents of NOTES.VALGRIND into test/README.md on that occasion.

BTW, would be good if #12109 gets approved soon..

  1. I think we need to ask the question "is this helpful for the user?", as the stuff that you're moving is intended for use consumption. Does it help them to have to go looking in another file when it comes to testing details?

I agree with @paulidale that due to the hyperlinks going to the other file should be convenient to do. Moreover, many users will expect info on using the tests in test/ folder, not within ./INSTALL.md.

@DDvO DDvO force-pushed the add_test_README.md branch from 086884f to 8c662ff Compare June 23, 2020 06:59
@DDvO
Copy link
Contributor Author

DDvO commented Jun 23, 2020

Yesterday I had started cleaning up of references and code/symbol quotation layout in INSTALL.md, and I've just completed this, adding a new commit for that.
Can you please re-approve?

@levitte
Copy link
Member

levitte commented Jun 23, 2020

hyperlinks

When you get a tarball and there's an WHATEVER.md, how do you read it? I usually run less or similar on it. Hyperlinks aren't the best in that case. A browser? If it knows a way to render markdown...

@levitte
Copy link
Member

levitte commented Jun 23, 2020

Moreover, many users will expect info on using the tests in test/ folder, not within ./INSTALL.md.

I do not know what users you speak for. To me, that signals that testing isn't that important.

@DDvO
Copy link
Contributor Author

DDvO commented Jun 23, 2020

hyperlinks

When you get a tarball and there's an WHATEVER.md, how do you read it? I usually run less or similar on it.

Me too.

Hyperlinks aren't the best in that case.

Agreed.
An alternative would be to put the same text in both places, which is even more sub-optimal in my view.

A browser? If it knows a way to render markdown...

If I use Firefox for file browsing with a URL like this: file:///home/david/openssl/prepare/
and then click on a .md file (or anything else with 'unknown' file extension) that silly thing does not even attempt rendering this as text. Instead, it asks me to open the file in an editor.
Chrome/Chromium does better here: it renders such files as plain text.

Yet when browsing the file via GitHub, e.g., via
https://github.com/siemens/openssl/blob/add_test_README.md/INSTALL.md#test-failures
everything works fine.

@DDvO DDvO closed this Jun 23, 2020
@DDvO DDvO reopened this Jun 23, 2020
@DDvO
Copy link
Contributor Author

DDvO commented Jun 23, 2020

Moreover, many users will expect info on using the tests in test/ folder, not within ./INSTALL.md.

I do not know what users you speak for. To me, that signals that testing isn't that important.

When I as a user wanna know details about testing, I'd expect them in the test/ folder README, not buried under ./INSTALL.md.
And I did not say that all users think this way but just many of them 😉

We do still stress the importance of running the tests in INSTALL.md at the points where it makes most sense:

Test OpenSSL

After a successful build, and before installing, the libraries should be tested. Run:

make test                                      # Unix
mms test                                       ! OpenVMS
nmake test                                     # Windows

Warning: you MUST run the tests from an unprivileged account (or disable your privileges temporarily if your platform allows it).

See the file test/README.md for further details.

and

Running Selected Tests

You can specify a set of tests to be performed using the make variable TESTS.

See the section Running Selected Tests of test/README.md.

and

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 an OS malfunction or a Perl issue).

You may want increased verbosity, that can be accomplished as described in section Test Failures of test/README.md.

If you find a problem with OpenSSL itself, try removing any compiler optimization flags from the CFLAGS line in the 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 of test/README.md.

Note also that I did not remove any of these sections regarding tests but just moved the details (namely on selecting specific tests and choosing verbosity) to test/README.md.

@DDvO
Copy link
Contributor Author

DDvO commented Jun 23, 2020

@romen since you brought up the idea for such a change, WDYT about the current state of this PR?

@DDvO DDvO changed the title Move test-related info from INSTALL.md to new test/README.md Move test-related detail from INSTALL.md to new test/README.md Jun 23, 2020
@levitte
Copy link
Member

levitte commented Jun 23, 2020

An alternative would be to put the same text in both places, which is even more sub-optimal in my view.

No, please, that's a maintenance issue waiting to happen.

Yet when browsing the file via GitHub, e.g., via
https://github.com/siemens/openssl/blob/add_test_README.md/INSTALL.md#test-failures
everything works fine.

Yeeeeeah, and the user will intuitively know to go there when they see INSTALL.md in their source tree. Right.

@DDvO
Copy link
Contributor Author

DDvO commented Jun 23, 2020

An alternative would be to put the same text in both places, which is even more sub-optimal in my view.

No, please, that's a maintenance issue waiting to happen.

Good that we agree here.

Yet when browsing the file via GitHub, e.g., via
https://github.com/siemens/openssl/blob/add_test_README.md/INSTALL.md#test-failures
everything works fine.

Yeeeeeah, and the user will intuitively know to go there when they see INSTALL.md in their source tree. Right.

Sure 😉

Of course this is not what we can always expect.
Yet whenever a user starts looking at the project via the natural entry point https://github.com/openssl/openssl all those .md files are rendered well, including their hyperlinks.

There is the inherent problem after we started switching to .md files that local file browser support is (so far) bad. Non-clickable references, being discussed here, is just one of the resulting nuisances.

@levitte
Copy link
Member

levitte commented Jun 23, 2020

Yet whenever a user starts looking at the project via the natural entry point https://github.com/openssl/openssl all those .md files are rendered well, including their hyperlinks.

Please stop. We announce tarballs when releasing, they are downloadable from https://www.openssl.org/source/, that's what most users are going to go for. From that point of view, there's nothing "natural" about the github repo.

@DDvO
Copy link
Contributor Author

DDvO commented Jun 23, 2020

Yet whenever a user starts looking at the project via the natural entry point https://github.com/openssl/openssl all those .md files are rendered well, including their hyperlinks.

Please stop. We announce tarballs when releasing, they are downloadable from https://www.openssl.org/source/, that's what most users are going to go for. From that point of view, there's nothing "natural" about the github repo.

Well, I was not thinking about the way users obtain the sources (I agree that for most of them it will be via the sources linked from https://www.openssl.org/, but could also be via git etc.),
but how new users would approach OpenSSL. When googling for 'openssl', the GitHub repo is already the 3nd hit after the normal project home page and the Wikipedia entry), and more and more folks will be using that for its convenience.

You are right we cannot generally expect people to use the online browsing approach.
BUT, following this logic, we should not have converted any of the doc/text files to MarkDown.
As mentioned, their offline file browsing support is not yet wide-spread,
and this pertains not only to hyperlinks but also to their general rendering (layout etc.).
This is an inherent problem, by far not only affecting the changes proposed in this PR.

@levitte
Copy link
Member

levitte commented Jun 23, 2020

BUT, following this logic, we should not have converted any of the doc/text files to MarkDown.

Why not? They are still readable as plain text, that's actually the most central feature with MarkDown!

@DDvO
Copy link
Contributor Author

DDvO commented Jun 23, 2020

Why not? They are still readable as plain text, that's actually the most central feature with MarkDown!

Ok, for most part they are pretty well readable.
Yet already the existing (intra- and inter-file) cross-references are hard to read and use manually, in particular at the beginning of INSTALL.md:

Table of Contents
=================

 - [Prerequisites](#prerequisites)
 - [Notational Conventions](#notational-conventions)
 - [Quick Installation Guide](#quick-installation-guide)
   - [Building OpenSSL](#building-openssl)
   - [Installing OpenSSL](#installing-openssl)
 - [Configuration Options](#configuration-options)
   - [API Level](#api-level)
   - [Cross Compile Prefix](#cross-compile-prefix)
   - [Build Type](#build-type)
   - [Directories](#directories)
   - [Compiler Warnings](#compiler-warnings)
   - [ZLib Flags](#zlib-flags)
   - [Seeding the Random Generator](#seeding-the-random-generator)
   - [Enable and Disable Features](#enable-and-disable-features)
   - [Displaying configuration data](#displaying-configuration-data)
 - [Installation Steps in Detail](#installation-steps-in-detail)
   - [Configure](#configure-openssl)
   - [Build](#build-openssl)
   - [Test](#test-openssl)
   - [Install](#install-openssl)
 - [Advanced Build Options](#advanced-build-options)
   - [Environment Variables](#environment-variables)
   - [Makefile Targets](#makefile-targets)
   - [Running Selected Tests](#running-selected-tests)
 - [Troubleshooting](#troubleshooting)
   - [Configuration Problems](#configuration-problems)
   - [Build Failures](#build-failures)
   - [Test Failures](#test-failures)
 - [Notes](#notes)
   - [Notes on multi-threading](#notes-on-multi-threading)
   - [Notes on shared libraries](#notes-on-shared-libraries)
   - [Notes on random number generation](#notes-on-random-number-generation)

Prerequisites
=============

To install OpenSSL, you will need:

 * A make implementation
 * Perl 5 with core modules (please read [NOTES.PERL](NOTES.PERL))
 * The Perl module Text::Template (please read [NOTES.PERL](NOTES.PERL))
 * an ANSI C compiler
 * a development environment in the form of development libraries and C
   header files
 * a supported operating system

For additional platform specific requirements, solutions to specific
issues and other details, please read one of these:

 * [NOTES.UNIX](NOTES.UNIX) - notes for Unix like systems
 * [NOTES.VMS](NOTES.VMS) - notes related to OpenVMS
 * [NOTES.WIN](NOTES.WIN) - notes related to the Windows platform
 * [NOTES.DJGPP](NOTES.DJGPP) - building for DOS with DJGPP
 * [NOTES.ANDROID](NOTES.ANDROID) - building for Android platforms (using NDK)
 * [NOTES.VALGRIND](NOTES.VALGRIND) - testing with Valgrind
 * [NOTES.PERL](NOTES.PERL) - some notes on Perl

@levitte
Copy link
Member

levitte commented Jun 23, 2020

It's a matter of taste... the titles in the table of contents match the headings further down, and it's true that we have separate NOTES files for the non-common stuff.

This still doesn't change my opinion on moving the test specific stuff (which is common for all platforms, I might add)

@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.

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.

Left some comments

Also, maybe we should rename the old test/README as test/AUTHORING_TESTS.md or something similar, and add a link somewhere in the new test/README.md that is more user oriented.

INSTALL.md Outdated
Copy link
Member

Choose a reason for hiding this comment

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

Not sure about adding / as for non Unix users it might be confusing

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Possibly, but at least for Unix users it immediately makes clear that this is a directory name.

Copy link
Member

Choose a reason for hiding this comment

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

Isn't "The name of the directory" clear enough?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

In this case it would be clear enough.

INSTALL.md Outdated
Copy link
Member

Choose a reason for hiding this comment

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

/ is not universally the dir separator

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'm not so sure about this. Even on Windows one can use / (as a less well-known alternative to that terrible backslash notation \).
Also note that we already use the forward slash universally in many places, such as include/openssl/configuration.h.

Copy link
Member

@levitte levitte Jun 24, 2020

Choose a reason for hiding this comment

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

Even on Windows one can use /

That totally depends. In CMD, you cannot necessarily do so, it very much depends on the program that's being invoked.

Copy link
Member

Choose a reason for hiding this comment

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

Also note that we already use the forward slash universally in many places, such as include/openssl/configuration.h.

CL is one of those programs

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That totally depends. In CMD, you cannot necessarily do so, it very much depends on the program that's being invoked.

What you cannot do with CMD is path completion involving a / (using the Tab key).
Yet you can do, e.g., cd include/openssl/.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

So even Windows users should not be too surprised about a trailing /,
and if so, they can learn something new about their wonderful OS 😉

Copy link
Member

Choose a reason for hiding this comment

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

I was under the impression than in most non-platform-specific sections there was a deliberate intent to avoid using platform-specific things, like path separators.

But then again, as you noted we are not consistent about this and I don't think this should block this PR!

So unless @levitte feels strongly otherwise I would approve it as it is.

@romen
Copy link
Member

romen commented Jun 24, 2020

Re: hyperlinks

I might be weird, but even when reading markdown on the terminal, if I find an hyperlink to another file in the Repo I have no problem in pointing my editor/viewer/pager to the file I am pointed to, and actually I prefer to have logical separation among different files (when it is worth it) instead of a monolithic single long file.

E.g. I'd rather avoid to merge the current content of test/README or test/NOTES.VALGRIND into test/README.md and I would rather provide links.

My preference for individual files is that I tend to read the whole file only once (case in which split files is annoying) and many more times I am more likely to be looking for some details about a specific topic. In the latter case having separate files means that I can still use git grep (or a recursive grep/ack/ag/pt/whatever if dealing with a source tarball without git info) if memory fails me and I want to quickly check which file covered which topic, and grepping for keywords within that file leads to less false positives than grepping for a pattern in a single monolithic file.

@DDvO
Copy link
Contributor Author

DDvO commented Jun 24, 2020

Re: hyperlinks

I might be weird, but even when reading markdown on the terminal, if I find an hyperlink to another file in the Repo I have no problem in pointing my editor/viewer/pager to the file I am pointed to,

Interesting - with which offline tool does this work for you?
It does not work for me with less run in a Bash shell,
neither with Emacs within the terminal or on a separate window.

and actually I prefer to have logical separation among different files (when it is worth it) instead of a monolithic single long file.

Me too. This is another reason I don't like all those details on tests in INSTALL.md.

E.g. I'd rather avoid to merge the current content of test/README or test/NOTES.VALGRIND into test/README.md and I would rather provide links.

Fine by me.

My preference for individual files is that I tend to read the whole file only once (case in which split files is annoying) and many more times I am more likely to be looking for some details about a specific topic. In the latter case having separate files means that I can still use git grep (or a recursive grep/ack/ag/pt/whatever if dealing with a source tarball without git info) if memory fails me and I want to quickly check which file covered which topic, and grepping for keywords within that file leads to less false positives than grepping for a pattern in a single monolithic file.

Good point.

@levitte
Copy link
Member

levitte commented Jun 24, 2020

[foo/bar.md](foo/bar.md) is equivalent to just [foo/bar.md]

Let's put that to the test, shall we?

  • [foo/bar.md](foo/bar.md) : foo/bar.md
  • [foo/bar.md] : [foo/bar.md]

@levitte
Copy link
Member

levitte commented Jun 24, 2020

I would prefer to simply append the current contents of test/README to test/README.md,

Two very different audiences. I would rather not.

@DDvO
Copy link
Contributor Author

DDvO commented Jun 24, 2020

I would prefer to simply append the current contents of test/README to test/README.md,

Two very different audiences. I would rather not.

All right.

@levitte
Copy link
Member

levitte commented Jun 24, 2020

Re: readability of links

[foo/bar.md](foo/bar.md) is equivalent to just [foo/bar.md], but in many instances we are still using the explicit link form: readability without markdown renderers could be improved switching to the implicit form.

Argh, after doing this in all of INSTALL.md I found that although this seems to be possible according to https://github.com/adam-p/markdown-here/wiki/Markdown-Cheatsheet#links

That's because you misunderstand. [link text itself] is a reference link, the actual link is a few lines down, looking like this:

[link text itself]: http://www.reddit.com

Note that we have external links in this form

@DDvO
Copy link
Contributor Author

DDvO commented Jun 24, 2020

Re: readability of links
[foo/bar.md](foo/bar.md) is equivalent to just [foo/bar.md], but in many instances we are still using the explicit link form: readability without markdown renderers could be improved switching to the implicit form.

Argh, after doing this in all of INSTALL.md I found that although this seems to be possible according to https://github.com/adam-p/markdown-here/wiki/Markdown-Cheatsheet#links

That's because you misunderstand. [link text itself] is a reference link, the actual link is a few lines down, looking like this:

[link text itself]: http://www.reddit.com

Note that we have external links in this form

Got it - thanks @levitte for the clarification!

@DDvO DDvO mentioned this pull request Jun 24, 2020
@romen
Copy link
Member

romen commented Jun 24, 2020

I am sorry for the confusion and the extra work I caused about implicit links!

I was clearly mistaken!

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.

All my feedback was addressed and the leftover items are fine by me if they stay as currently proposed or not.

Thanks @DDvO !

@romen romen added approval: done This pull request has the required number of approvals and removed approval: done This pull request has the required number of approvals labels Jun 24, 2020
@DDvO DDvO force-pushed the add_test_README.md branch from c100c41 to 891cd2a Compare June 25, 2020 09:09
@DDvO
Copy link
Contributor Author

DDvO commented Jun 25, 2020

All my feedback was addressed and the leftover items are fine by me if they stay as currently proposed or not.

Thanks @romen for your further comments and approval.

I just changed the compiler name references as mentioned above,
and reverted the removal of the $ command prefix that I had done also in this PR because @levitte and others did not like that (as discussed e.g. in #12257).

@DDvO
Copy link
Contributor Author

DDvO commented Jun 25, 2020

What still remains open here:

@levitte, you questioned the idea of moving (as I clarified, just the details of) the information about testing out of INSTALL.md into test/README.md. After having discussed this a bit, is this meanwhile acceptable to you?

@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 force-pushed the add_test_README.md branch 2 times, most recently from ad5e11a to 8af13bb Compare June 27, 2020 14:07
@DDvO
Copy link
Contributor Author

DDvO commented Jun 27, 2020

I've rebased this PR to solve merge conflicts on INSTALL.md
and did a further little improvement on its Test Failures section.

Could any OTC member please re-approve.

@levitte
Copy link
Member

levitte commented Jun 28, 2020

@levitte, you questioned the idea of moving (as I clarified, just the details of) the information about testing out of INSTALL.md into test/README.md. After having discussed this a bit, is this meanwhile acceptable to you?

I haven't changed my mind, but am clearly a minority, and I don't care enough to fight harder. Que sera, sera...

@DDvO
Copy link
Contributor Author

DDvO commented Jun 28, 2020

@levitte, you questioned the idea of moving (as I clarified, just the details of) the information about testing out of INSTALL.md into test/README.md. After having discussed this a bit, is this meanwhile acceptable to you?

I haven't changed my mind, but am clearly a minority, and I don't care enough to fight harder. Que sera, sera...

Thanks - so I'm taking this as an implicit approval, or at least no objection against the two existing ones :)

@DDvO DDvO force-pushed the add_test_README.md branch from 8af13bb to 5322bcb Compare June 28, 2020 19:12
openssl-machine pushed a commit that referenced this pull request Jun 28, 2020
…g references

Reviewed-by: Paul Dale <[email protected]>
Reviewed-by: Nicola Tuveri <[email protected]>
(Merged from #12232)
openssl-machine pushed a commit that referenced this pull request Jun 28, 2020
…/symbol quotation layout

Reviewed-by: Paul Dale <[email protected]>
Reviewed-by: Nicola Tuveri <[email protected]>
(Merged from #12232)
@DDvO
Copy link
Contributor Author

DDvO commented Jun 28, 2020

Rebased, solved conflicts, and merged.
Thanks to all who took part discussing this.

@DDvO DDvO closed this Jun 28, 2020
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 branch: master Applies to master branch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants