]> git.ipfire.org Git - thirdparty/openssl.git/commit
test/recipes/90-test_shlibload.t: Modify to work with known file names
authorRichard Levitte <levitte@openssl.org>
Wed, 23 Jun 2021 06:10:37 +0000 (08:10 +0200)
committerPauli <pauli@openssl.org>
Thu, 24 Jun 2021 05:55:14 +0000 (15:55 +1000)
commit505fcdb5de382623aa8a1230579334b58aa72b45
treef7d300529787e18ee8962915844c9acbd32e583a
parent2fee3a77f8179c8e4c0e33d622549270b380fa8a
test/recipes/90-test_shlibload.t: Modify to work with known file names

Using File::Temp::tempfile() is admirable, but isn't necessary for the
sort of thing we use it for.

Furthermore, since tempfile() returns an opened file handle for
reading for the file in question, it may have effect that the file
becomes unwritable.  This is the default on VMS, and since tempfile()
doesn't seem to have any option to affect this, it means that
test/shlibloadtest.c can't write the magic line to that file.

Also, if we consider forensics, to be able to see what a test produced
to determine what went wrong, it's better to use specific and known
file names.

Therefore, this test is modified to use well known file names, and to
open them for reading after the shlibloadtest program has been run
instead of before.

Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/15872)
test/recipes/90-test_shlibload.t