Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions .github/workflows/CICD.yml
Original file line number Diff line number Diff line change
Expand Up @@ -919,11 +919,6 @@ jobs:
shell: bash
run: |
cargo build --no-default-features --features "${{ matrix.job.features }}"
if ldd target/debug/coreutils 2>&1 | grep -iE 'libssl|libcrypto'; then
echo "ERROR: coreutils dynamically links libssl/libcrypto despite vendored feature"
exit 1
fi
echo "OK: no dynamic libssl/libcrypto linkage"
# Second linking mode: OPENSSL_NO_VENDOR=1 links dynamically against
# the system libcrypto/libssl.
- name: Test checksum utilities with OpenSSL (system / dynamic)
Expand Down
16 changes: 16 additions & 0 deletions tests/by-util/test_cksum.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,22 @@ fn sha_fixture_name(algo: &str, len: u32, prefix: &str, suffix: &str) -> String
}
}

#[test]
#[cfg(feature = "openssl")]
fn test_openssl_link() {
let Ok(out) = std::process::Command::new("ldd")
.arg(uutests::util::get_tests_binary())
.output()
else {
return; // missing ldd
};
let dynamic = String::from_utf8_lossy(&out.stdout).contains("crypto"); // covering MSYS/MinGW too
assert_eq!(
std::env::var("OPENSSL_NO_VENDOR") == Ok("1".to_string()),
dynamic
);
}

#[test]
fn test_invalid_arg() {
new_ucmd!().arg("--definitely-invalid").fails_with_code(1);
Expand Down
Loading