Commit graph

47 commits

Author SHA1 Message Date
Jesus Checa Hidalgo
804bb66567 shadow-stack-smoke: extend coverage to fedora 43 and newer 2026-08-24 08:52:35 +02:00
Jesus Checa Hidalgo
bc84e88208 Update rpmmacros test
Starting with rhel 9.8 we are using the same rpmmacros format as Fedora
and RHEL 10, while RHEL older than 9.8 and 8 are using the "legacy"
format which pass-through the arguments to the cargo macros.
2026-08-14 12:12:59 +02:00
Jesus Checa Hidalgo
b3bb3e8b77 shadow-stack-smoke test
Rust will start marking all x86_64 code with SHSTK for CET support
in RHEL, CentOS and Fedora, by default and without need to pass
any flags.

This new test verifies that rust code always contain the SHSTK mark,
testing both binary and cdylib cases
2026-08-14 11:49:56 +02:00
Jesus Checa Hidalgo
1ce23fd6bd rpm-rebuild/stratisd: limit paralellism
Newer versions of stratisd have an obscene memory consumption,
reaching peaks of >5GiB in some rustc calls. This commit adds
logic to calculate a ratio of MiB per core in the system running
the test, then apply that number of cores to RPM_BUILD_NCPUS.
Start using 4GiB for building stratisd.
Older versions (RHEL 9 and older) are not affected
2026-08-14 11:49:52 +02:00
Jesus Checa Hidalgo
ebef0ebe6c refactor(rpm-rebuild): reduce log verbosity and detect resource failures
- Add analyze_build_failure() to distinguish resource failures from build failures
- Add EXIT trap to guarantee cleanup on timeout/SIGTERM/rlDie
- Execute rpmbuild silently, show only command and result
- Detect patterns: disk full, SIGKILL, missing dependencies
2026-08-14 11:49:41 +02:00
Jesus Checa Hidalgo
875db0af2d net_err_suggests_fetch_with_cli: Try to fix timeouts once again
Do not rely on negative matches such as "cargo output does not
suggest using fetch_with_cli". Instead, verify that cargo actually
calls git fetch on the remote repo.

Use timeout to cover systems where git ignores the http timeout.
Increase test timeout to 15m
2026-06-24 08:45:55 +02:00
Jesus Checa Hidalgo
cca2ad09ef Add regression test for Cargo SCP-like Git submodule URLs
Add downstreamed version of upstream test git::dep_with_scp_like_submodule_url
to verify that Cargo correctly handles SCP-like URLs (git@host:path format) in
Git submodules and preserves them in error messages.

This is a regression test for https://github.com/rust-lang/cargo/pull/16727

The test is enabled on distributions with Rust >= 1.96.0.

Upstream reference:
https://github.com/rust-lang/cargo/blob/master/tests/testsuite/git.rs
2026-06-15 16:47:51 +02:00
Paul Murphy
ff5a5aa591 Update net_err_sugest_fetch_with_cli test
The case of the error message was updated in Rust 1.95, ignore
the case on this error message for backwards compatability.
2026-04-20 11:06:35 -05:00
Jesus Checa Hidalgo
78a9ec15fc net_err_suggests_fetch_with_cli: fix false positives
Some test systems have catch-all DNS resolvers that point
needs-proxy.invalid to loopback, resulting in a connection refused OS
error instead the expected Net error. This change uses a known invalid
IP to bypass any potential DNS, and also adds an extremely short timeout
to enforce a Net error.

Also make the test pattern matching a bit more fuzzy to avoid future
false positives.

Remove the standalone Cargo.toml file and integrate it into the main
script to be able to parametrize it.
2026-04-07 07:48:50 +00:00
Jesus Checa Hidalgo
58f9334383 Sanity/publish_to_crates_io_warns: create test
Verify that cargo warns when publishng to crates.io

Downstreamed version of the upstream test publish_to_crates_io_warns:
https://github.com/rust-lang/cargo/blob/0.94.0/tests/testsuite/package.rs#L7741

Originally implemented in https://github.com/rust-lang/cargo/pull/16241
2026-03-18 17:48:53 +01:00
Jesus Checa Hidalgo
31f14ab146 rpm-rebulid: update requirement
Replace yum-utils with the proper dnf plugins package depending on
wether dnf4 or dnf5 is used
2026-03-11 09:56:17 +01:00
Jesus Checa Hidalgo
9a016593cb rpm-rebuild: remove use of yum, move to dnf 2026-03-10 19:32:47 +00:00
Jesus Checa Hidalgo
6a6a8ff0ec rust-wasi-smoke-test: relax string matching
Remove the "failed to find a pre-opened file..." string, as "error
opening" is enough. The specific error message is subject to change
and cause false positives.
2026-03-10 19:50:25 +01:00
Jesus Checa Hidalgo
0bb39d1c34 Improve rpm-rebuild test
Cleanup rpmbuild directory after test.
Minor code cleaning.
2026-02-04 15:39:16 +01:00
Paul Murphy
e071728eed Update rust-profiler sanity test
Desugar the for-loop to minimize ambiguity when testing the profiler.

The original regression is tracked upstream as rust#151554.

For: RUST-52
2026-02-03 15:35:46 -06:00
Jesus Checa Hidalgo
1e333e6189 rust-wasi-smoke-test: Fix warning in installed requirements assertion 2026-01-28 12:56:18 +01:00
Jesus Checa Hidalgo
11e16f99f1 Add Sanity/net_err_suggests_fetch_with_cli test.
Downstreamed version of the upstream test net_fetch_with_cli:
37b85ad9/tests/testsuite/git_auth.rs (L350)
This test needs DNS resolving so cargo is unable to reach the git repo provided
as dependency, hence suggesting to enable the git-fetch-with-cli config:
https://doc.rust-lang.org/cargo/reference/config.html#netgit-fetch-with-cli

We need to downstream this test because koji builders don't have DNS resolving
hence it's impossible to pass the test there.

Additionally, we use https instead ssh for the remote because cargo does not
support libssh2 in RHEL/CentOS.
2025-11-17 18:34:13 +01:00
Jesus Checa Hidalgo
c64c527829 Update wasm/wasi tests
This commit contains the following changes:
* Remove wasm32-wasi package requirement in rust-1.84 and newer
* Compatibility fixes for nodejs in older RHEL, which is used
to test wasi.
2025-01-10 18:45:50 +01:00
Jesus Checa Hidalgo
1716d90a4a rust-rpmmacros: Improve test functionality
* Use arguments in cargo_build/install/test/license rpmmacros
* RHEL and CentOS 10 behaves like Fedora.
2025-01-10 10:31:38 +01:00
Jesus Checa Hidalgo
1b22a7bf43 rust-wasi-smoke-test: Support all wasi targets
* Updated script to test all the installed wasi targets
* Updated tmt metadata to install the new wasip1 target when relevant
* Moved nodejs dependency to tmt metadata on distro != rhel-8
2024-08-13 17:28:07 +02:00
Jesus Checa Hidalgo
7ff77ffed0 rpm-sequoia: Add tier:1 tag 2024-08-05 12:40:35 +02:00
Jesus Checa Hidalgo
021a9522eb Add test for x86_64-unknown-none target 2024-07-30 13:27:04 +02:00
Jesus Checa Hidalgo
d2c570acd2 Minor adjustments to rpmbuild tests for RHEL 10
* Disable librsvg2 in rhel 10 due to false positives
* Increase duration for stratisd as it times out in some archs
* Add extra logging with system resources at the script setup phase
2024-07-05 12:06:01 +02:00
Jesus Checa Hidalgo
e24a393f01 static-pie: fix broken test (from rust commit 9ab6e36d8d1c)
Casting &main to *const _ does not guarantee an ASLR'd pointer.
2024-06-17 13:22:46 +02:00
Jesus Checa Hidalgo
46a8772916 Add tmt plan to run all local tests 2024-06-14 12:43:03 +02:00
Jesus Checa Hidalgo
a67199d633 Bring changes from downstream tests 2024-06-14 12:29:03 +02:00
Jesus Checa Hidalgo
6e779bdcdc Remove outdated cargo-test test 2024-06-14 11:48:24 +02:00
Jesus Checa Hidalgo
b3ea9f2461 rust-rpmmacros: Make test compatible with rpm 4.20+ 2024-06-14 11:25:17 +02:00
Jesus Checa Hidalgo
b4fdda2408 Upstream rust-rpmmacros test 2024-06-14 10:47:36 +02:00
Jesus Checa Hidalgo
7977a6f734 Upstream cargo-smoke test 2024-06-13 18:44:55 +02:00
Jesus Checa Hidalgo
67742a1690 Upstream rust-profiler test 2024-06-13 18:41:11 +02:00
Jesus Checa Hidalgo
4f2d6d68e9 Upstream static-pie test 2024-06-13 18:33:39 +02:00
Jesus Checa Hidalgo
1c56214f19 Upstream rust-wasi-smoke-test 2024-06-13 18:32:25 +02:00
Jesus Checa Hidalgo
ca2e0129ee Bring tests from rpms/rust repo 2024-06-13 18:04:39 +02:00
Jesus Checa Hidalgo
f7c54f0ee5 Add basic pre-commit config 2024-06-13 18:00:50 +02:00
Jesus Checa Hidalgo
e547abccea Add tmt tests documentation 2024-06-13 17:59:13 +02:00
09271f4feb
install +default package
Signed-off-by: Igor Gnatenko <ignatenkobrain@fedoraproject.org>
2018-11-03 13:15:42 +01:00
12c7a7db07
cargo-test: install xargs by path
Signed-off-by: Igor Gnatenko <ignatenkobrain@fedoraproject.org>
2018-07-21 11:59:34 +02:00
0855ae0066
cargo-test: do not use sudo
Signed-off-by: Igor Gnatenko <ignatenkobrain@fedoraproject.org>
2018-07-21 11:58:15 +02:00
38b3d26853
cargo-test: do not expect that xargs is present
Signed-off-by: Igor Gnatenko <ignatenkobrain@fedoraproject.org>
2018-07-21 11:58:03 +02:00
c0a1800c11
cargo-test: do not expect that any 'test' repo exist
Signed-off-by: Igor Gnatenko <ignatenkobrain@fedoraproject.org>
2018-07-21 11:56:28 +02:00
e22db71d55
cargo-test: do not run dnf install if no dev deps
Signed-off-by: Igor Gnatenko <ignatenkobrain@fedoraproject.org>
2018-07-21 01:02:26 +02:00
500fc19623
cargo-test: adjust regex to match multiple digits in version
Signed-off-by: Igor Gnatenko <ignatenkobrain@fedoraproject.org>
2018-07-21 00:46:12 +02:00
ef0342d728
cargo-test: use eval'd %cargo_test for tests
Signed-off-by: Igor Gnatenko <ignatenkobrain@fedoraproject.org>
2018-07-21 00:38:19 +02:00
707af2fb8d
cargo-test: remove unneeded eval
Signed-off-by: Igor Gnatenko <ignatenkobrain@fedoraproject.org>
2018-07-21 00:37:47 +02:00
f3539c402d
add cargo-test
It's same as we would be running in %check.

Signed-off-by: Igor Gnatenko <ignatenkobrain@fedoraproject.org>
2018-07-20 17:44:31 +02:00
71b502f36a
initial commit
Signed-off-by: Igor Gnatenko <ignatenkobrain@fedoraproject.org>
2018-07-20 17:20:57 +02:00