2
0

90-test_shlibload.t 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. #! /usr/bin/env perl
  2. # Copyright 2016-2018 The OpenSSL Project Authors. All Rights Reserved.
  3. #
  4. # Licensed under the OpenSSL license (the "License"). You may not use
  5. # this file except in compliance with the License. You can obtain a copy
  6. # in the file LICENSE in the source distribution or at
  7. # https://www.openssl.org/source/license.html
  8. use OpenSSL::Test qw/:DEFAULT bldtop_dir/;
  9. use OpenSSL::Test::Utils;
  10. #Load configdata.pm
  11. BEGIN {
  12. setup("test_shlibload");
  13. }
  14. use lib bldtop_dir('.');
  15. use configdata;
  16. plan skip_all => "Test only supported in a shared build" if disabled("shared");
  17. plan skip_all => "Test is disabled on AIX" if config('target') =~ m|^aix|;
  18. plan tests => 4;
  19. my $libcrypto_idx = $unified_info{rename}->{libcrypto} // "libcrypto";
  20. my $libssl_idx = $unified_info{rename}->{libssl} // "libssl";
  21. my $libcrypto =
  22. $unified_info{sharednames}->{$libcrypto_idx}.$target{shared_extension_simple};
  23. my $libssl =
  24. $unified_info{sharednames}->{$libssl_idx}.$target{shared_extension_simple};
  25. ok(run(test(["shlibloadtest", "-crypto_first", $libcrypto, $libssl])),
  26. "running shlibloadtest -crypto_first");
  27. ok(run(test(["shlibloadtest", "-ssl_first", $libcrypto, $libssl])),
  28. "running shlibloadtest -ssl_first");
  29. ok(run(test(["shlibloadtest", "-just_crypto", $libcrypto, $libssl])),
  30. "running shlibloadtest -just_crypto");
  31. ok(run(test(["shlibloadtest", "-dso_ref", $libcrypto, $libssl])),
  32. "running shlibloadtest -dso_ref");