diff --git a/gating.yaml b/gating.yaml new file mode 100644 index 0000000..648918d --- /dev/null +++ b/gating.yaml @@ -0,0 +1,6 @@ +--- !Policy +product_versions: + - rhel-9 +decision_context: osci_compose_gate +rules: + - !PassingTestCaseRule {test_case_name: osci.brew-build.tier0.functional} diff --git a/libtracefs.spec b/libtracefs.spec index 08adad5..92cfc3d 100644 --- a/libtracefs.spec +++ b/libtracefs.spec @@ -11,7 +11,7 @@ Name: libtracefs Version: 1.3.1 -Release: 2%{?dist} +Release: 3%{?dist} License: LGPLv2+ and GPLv2+ Summary: Library for access kernel tracefs @@ -65,6 +65,9 @@ rm -rf %{buildroot}/%{_libdir}/libtracefs.a %{_libdir}/%{name}.so %changelog +* Thu Sep 07 2023 Jerome Marchand - 1.3.1-3 +- Add gating (rhbz#2171394) + * Thu Feb 2 2023 Michael Petlan - 1.3.1-2 - Remove conflict with trace-cmd Related: rhbz#2159965 diff --git a/tests/scripts/run_tests.sh b/tests/scripts/run_tests.sh new file mode 100755 index 0000000..a0f5c9c --- /dev/null +++ b/tests/scripts/run_tests.sh @@ -0,0 +1,47 @@ +#!/usr/bin/bash + +if rpm -q --quiet libtracefs; then + : +else + sudo dnf install -y libtracefs + if [[ $? != 0 ]]; then + echo "install of libtracefs failed!" + exit 1 + fi +fi + +echo "The libtracefs is meant to be used by rtla. Check installation." +if [[ ! -f /usr/lib64/libtracefs.so.1 ]]; then + echo "/usr/lib64/libtracefs.so.1 not found!" + exit 1 +fi + +echo "Check that rtla works." +if ! rpm -q --quiet rtla; then + sudo dnf install -y rtla + if [[ $? != 0 ]]; then + echo "install rtla failed when libtracefs exist!" + exit 1 + fi +fi + +rtla +if [[ $? != 1 ]]; then + # When you run rtla without a command, it exits with a failure + echo "rtla failed to run" + exit 1 +fi + +rtla timerlat -h +if [[ $? != 0 ]]; then + echo "rtla timerlat -h failed" + exit 1 +fi + +rtla osnoise -h +if [[ $? != 0 ]]; then + echo "rtla osnoise -h failed" + exit 1 +fi + +exit 0 diff --git a/tests/tests.yml b/tests/tests.yml new file mode 100644 index 0000000..3d79b1d --- /dev/null +++ b/tests/tests.yml @@ -0,0 +1,11 @@ +- hosts: localhost + roles: + - role: standard-test-basic + tags: + - classic + tests: + - simple: + dir: scripts + run: ./run_tests.sh + required_packages: + - libtracefs trace-cmd