Commit 89619e43fa for openssl.org

commit 89619e43fa814749e9e057985681aa5d569ab432
Author: Richard Levitte <levitte@openssl.foundation>
Date:   Mon Sep 7 09:03:59 2026 +0200

    cmake config test: run cmake and ctest unwrapped

    Running the host tools through util/wrap.pl puts the build
    directory first on the loader path.  On 3.x build trees, the
    build's shared libraries carry the same sonames as the system ones,
    so the loader substitutes the build's libcrypto into the tools' own
    processes; it is not ABI-equivalent to the system one (built with
    no-deprecated, for example), and the tools fail to start, exiting
    127 on missing symbols such as MD5_Init@OPENSSL_3.0.0.

    The dummy executables still run through the wrapper at the ctest
    level.

    Suggestion-by: Mounir IDRASSI <mounir.idrassi@amcrypto.jp>
    Assisted-by: Pi:moonshotai/kimi-k3
    Signed-off-by: Richard Levitte <levitte@openssl.foundation>
    Reviewed-by: Andrew Dinh <andrewd@openssl.org>
    Reviewed-by: Tomas Mraz <tomas@openssl.foundation>
    Merge-date: Sat Nov 14 17:36:40 2026
    Merged-from: https://github.com/openssl/openssl/pull/32442

diff --git a/test/recipes/94-test_cmake_config.t b/test/recipes/94-test_cmake_config.t
index 1acf35f062..411130cd57 100644
--- a/test/recipes/94-test_cmake_config.t
+++ b/test/recipes/94-test_cmake_config.t
@@ -96,10 +96,26 @@ push @cmake_configure, "-DCMAKE_C_FLAGS=" . join(" ", @abi_cflags)
 push @cmake_configure, "-DTEST_LEGACY_PROVIDER=OFF"
     if disabled("legacy") || disabled("module");

-ok(run(cmd([@cmake_configure])),
+# cmake and ctest are host tools; wrap.pl (run by OpenSSL::Test::run())
+# would substitute the build's shared libraries into their processes
+# where sonames match (such as 3.x trees, currently), breaking them when
+# the ABIs differ. Only the dummy executables should be run through the
+# wrapper (OPENSSL_WRAP_PL in the consumer project).
+sub run_host_command {
+    my ($command) = @_;
+    my ($success, $error, $output) =
+        IPC::Cmd::run(command => $command);
+    if (!$success) {
+        diag($error) if defined $error;
+        diag(join("", @{$output})) if defined $output;
+    }
+    return $success;
+}
+
+ok(run_host_command(\@cmake_configure),
    "configure the cmake test project");
-ok(run(cmd(["cmake", "--build", $cmake_build_dir, "--config", "Release"])),
+ok(run_host_command(["cmake", "--build", $cmake_build_dir, "--config", "Release"]),
    "build the cmake test project");
-ok(run(cmd(["ctest", "--test-dir", $cmake_build_dir,
-            "-C", "Release", "--output-on-failure"])),
+ok(run_host_command(["ctest", "--test-dir", $cmake_build_dir,
+                     "-C", "Release", "--output-on-failure"]),
    "run the cmake test project");