Compare commits
No commits in common. "c10s" and "c8" have entirely different histories.
2
.gitignore
vendored
2
.gitignore
vendored
@ -1 +1 @@
|
|||||||
/smc-tools-*.tar.gz
|
SOURCES/1.8.3.tar.gz
|
||||||
|
29
SOURCES/smc-tools-1.6.0-smc_chk-py3.patch
Normal file
29
SOURCES/smc-tools-1.6.0-smc_chk-py3.patch
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
--- a/smc_chk 2021-07-02 12:23:56.000000000 +0200
|
||||||
|
+++ b/smc_chk 2021-07-16 14:48:40.988000000 +0200
|
||||||
|
@@ -108,7 +108,7 @@
|
||||||
|
}
|
||||||
|
|
||||||
|
function is_python3_available() {
|
||||||
|
- if ! which python3 >/dev/null; then
|
||||||
|
+ if ! which /usr/libexec/platform-python >/dev/null; then
|
||||||
|
echo "Error: python3 is not available";
|
||||||
|
signal_handler;
|
||||||
|
fi
|
||||||
|
@@ -124,7 +124,7 @@
|
||||||
|
port6=`get_free_port $(expr $port + 1)`;
|
||||||
|
srv=`mktemp /tmp/echo-srv.XXXXXX`;
|
||||||
|
cat <<-EOF > $srv
|
||||||
|
-#!/usr/bin/env python3
|
||||||
|
+#!/usr/libexec/platform-python
|
||||||
|
|
||||||
|
import argparse
|
||||||
|
import signal
|
||||||
|
@@ -171,7 +171,7 @@
|
||||||
|
is_python3_available;
|
||||||
|
clt=`mktemp /tmp/echo-clt.XXXXXX`;
|
||||||
|
cat <<-EOF > $clt
|
||||||
|
-#!/usr/bin/env python3
|
||||||
|
+#!/usr/libexec/platform-python
|
||||||
|
|
||||||
|
import argparse
|
||||||
|
import socket
|
143
SPECS/smc-tools.spec
Normal file
143
SPECS/smc-tools.spec
Normal file
@ -0,0 +1,143 @@
|
|||||||
|
%define debug_package %{nil}
|
||||||
|
|
||||||
|
Name: smc-tools
|
||||||
|
Version: 1.8.3
|
||||||
|
Release: 1%{?dist}
|
||||||
|
Summary: Shared Memory Communication Tools
|
||||||
|
|
||||||
|
License: EPL
|
||||||
|
URL: https://www.ibm.com/developerworks/linux/linux390/smc-tools.html
|
||||||
|
|
||||||
|
Requires: man
|
||||||
|
BuildRequires: gcc
|
||||||
|
BuildRequires: libnl3-devel
|
||||||
|
BuildRequires: bash-completion
|
||||||
|
|
||||||
|
Source0: https://github.com/ibm-s390-linux/%{name}/archive/refs/tags/%{version}.tar.gz
|
||||||
|
|
||||||
|
Patch0: smc-tools-1.6.0-smc_chk-py3.patch
|
||||||
|
|
||||||
|
%description
|
||||||
|
The Shared Memory Communication Tools (smc-tools) package enables usage of SMC
|
||||||
|
sockets in Linux.
|
||||||
|
|
||||||
|
%prep
|
||||||
|
%forgesetup
|
||||||
|
%patch0 -p1
|
||||||
|
|
||||||
|
%build
|
||||||
|
%make_build CFLAGS="%{build_cflags} -I%{_includedir}/libnl3" LDFLAGS="%{build_ldflags}" V=1
|
||||||
|
|
||||||
|
%install
|
||||||
|
%make_install V=1
|
||||||
|
|
||||||
|
%files
|
||||||
|
%license LICENSE
|
||||||
|
%doc README.md
|
||||||
|
%{_datadir}/bash-completion/
|
||||||
|
%{_mandir}/man7/af_smc.7.gz
|
||||||
|
%{_mandir}/man8/smc*
|
||||||
|
%{_bindir}/smc_pnet
|
||||||
|
%{_bindir}/smc_run
|
||||||
|
%{_bindir}/smcss
|
||||||
|
%{_bindir}/smcd
|
||||||
|
%{_bindir}/smcr
|
||||||
|
%{_bindir}/smc_dbg
|
||||||
|
%ifarch s390x
|
||||||
|
%{_bindir}/smc_rnics
|
||||||
|
%{_bindir}/smc_chk
|
||||||
|
%endif
|
||||||
|
%{_bindir}/smc_dbg
|
||||||
|
%{_libdir}/libsmc-preload.so*
|
||||||
|
|
||||||
|
%changelog
|
||||||
|
* Mon Oct 09 2023 Čestmír Kalina <ckalina@redhat.com> - 1.8.3-1
|
||||||
|
- Resolves: RHEL-11417 Upgrade smc-tools to latest version
|
||||||
|
- smc_stats: Fix man page name
|
||||||
|
- Bump version.
|
||||||
|
|
||||||
|
* Mon Dec 05 2022 Čestmír Kalina <ckalina@redhat.com> - 1.8.2-1
|
||||||
|
- Resolves: #2110414 Upgrade smc-tools to latest version
|
||||||
|
|
||||||
|
* Thu Jun 23 2022 Čestmír Kalina <ckalina@redhat.com> - 1.8.1-1
|
||||||
|
- Upgrade smc-tools to latest version
|
||||||
|
- Add User-defined EID (Enterprise ID) Support
|
||||||
|
- Resolves: #1919228
|
||||||
|
- Resolves: #2043841
|
||||||
|
|
||||||
|
* Mon Oct 18 2021 Čestmír Kalina <ckalina@redhat.com> - 1.6.1-1
|
||||||
|
- Upgrade smc-tools to latest version
|
||||||
|
- Resolves: #1984975
|
||||||
|
|
||||||
|
* Fri Jul 16 2021 Čestmír Kalina <ckalina@redhat.com> - 1.6.0-3
|
||||||
|
- Patch stats.c to fix overruns
|
||||||
|
- Patch stats.c to fix leaks
|
||||||
|
- Patch stats.c to fix fallback counter values
|
||||||
|
- Resolves: #1993469
|
||||||
|
|
||||||
|
* Fri Jul 16 2021 Čestmír Kalina <ckalina@redhat.com> - 1.6.0-2
|
||||||
|
- Patch smc_chk to use platform-python
|
||||||
|
- Resolves: #1981727
|
||||||
|
|
||||||
|
* Fri Jul 02 2021 Čestmír Kalina <ckalina@redhat.com> - 1.6.0-1
|
||||||
|
- Resolves: #1869292 Statistics Support - smc-tools part
|
||||||
|
- Resolves: #1919225 Add SMC-D Setup Check (smc-tools)
|
||||||
|
- Resolves: #1919240 Upgrade smc-tools to latest version
|
||||||
|
* Wed Feb 10 2021 Čestmír Kalina <ckalina@redhat.com> - 1.5.0-2
|
||||||
|
- Resolves: #1924787
|
||||||
|
- Add python3/man requires
|
||||||
|
* Mon Feb 08 2021 Čestmír Kalina <ckalina@redhat.com> - 1.5.0-1
|
||||||
|
- Resolves: #1924787
|
||||||
|
- Upgrade to 1.5.0
|
||||||
|
* Mon Jan 04 2021 Čestmír Kalina <ckalina@redhat.com> - 1.4.0-3
|
||||||
|
- Resolves: #1879128
|
||||||
|
- Add bash-completion to build requires
|
||||||
|
|
||||||
|
* Mon Jan 04 2021 Čestmír Kalina <ckalina@redhat.com> - 1.4.0-1
|
||||||
|
- Resolves: #1851143
|
||||||
|
- Update to 1.4.0
|
||||||
|
- Explicitly state libnl3 in include path
|
||||||
|
|
||||||
|
* Tue Jun 23 2020 Čestmír Kalina <ckalina@redhat.com> - 1.3.0-1
|
||||||
|
- Resolves: #1780304
|
||||||
|
- Update to 1.3.0
|
||||||
|
|
||||||
|
* Wed Nov 06 2019 Čestmír Kalina <ckalina@redhat.com> - 1.2.2-3
|
||||||
|
- Resolves: rhbz#1726264
|
||||||
|
- Release bump to force brew rebuild due to tagging failure.
|
||||||
|
|
||||||
|
* Wed Nov 06 2019 Čestmír Kalina <ckalina@redhat.com> - 1.2.2-2
|
||||||
|
- Resolves: rhbz#1726264
|
||||||
|
- update to 1.2.2
|
||||||
|
|
||||||
|
* Mon May 20 2019 Čestmír Kalina <ckalina@redhat.com> - 1.2.1-2
|
||||||
|
- Resolves: rhbz#1706015
|
||||||
|
- guards smc_rnics man with %ifarch s390x to avoid build failure
|
||||||
|
|
||||||
|
* Mon May 20 2019 Čestmír Kalina <ckalina@redhat.com> - 1.2.1-1
|
||||||
|
- Resolves: rhbz#1706015
|
||||||
|
|
||||||
|
* Tue Apr 02 2019 Čestmír Kalina <ckalina@redhat.com> - 1.2.0-2
|
||||||
|
- Resolves: rhbz#1683274
|
||||||
|
- guards smc_rnics with %ifarch s390x
|
||||||
|
|
||||||
|
* Tue Apr 02 2019 Čestmír Kalina <ckalina@redhat.com> - 1.2.0-1
|
||||||
|
- Resolves: rhbz#1683274
|
||||||
|
- update to 1.2.0
|
||||||
|
|
||||||
|
* Mon Jul 09 2018 Dan Horák <dan@danny.cz> - 1.1.0-1
|
||||||
|
- update to 1.1.0
|
||||||
|
|
||||||
|
* Mon Apr 16 2018 Dan Horák <dan@danny.cz> - 1.0.0-4
|
||||||
|
- fix LDFLAGS injection (#1567902)
|
||||||
|
|
||||||
|
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.0-3
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
|
||||||
|
|
||||||
|
* Wed Jan 10 2018 Dan Horák <dan@danny.cz> - 1.0.0-2
|
||||||
|
- use make macro
|
||||||
|
- comment patches
|
||||||
|
- use distro LDFLAGS in build
|
||||||
|
|
||||||
|
* Mon Jan 8 2018 Dan Horák <dan@danny.cz> - 1.0.0-1
|
||||||
|
- initial Fedora version
|
@ -1,7 +0,0 @@
|
|||||||
--- !Policy
|
|
||||||
product_versions:
|
|
||||||
- rhel-*
|
|
||||||
decision_context: osci_compose_gate
|
|
||||||
rules:
|
|
||||||
- !PassingTestCaseRule {test_case_name: osci.brew-build.tier0.functional}
|
|
||||||
|
|
154
smc-tools.spec
154
smc-tools.spec
@ -1,154 +0,0 @@
|
|||||||
Name: smc-tools
|
|
||||||
Version: 1.8.3
|
|
||||||
Release: 4%{?dist}
|
|
||||||
Summary: Shared Memory Communication Tools
|
|
||||||
|
|
||||||
License: EPL-1.0
|
|
||||||
URL: https://github.com/ibm-s390-linux/smc-tools
|
|
||||||
Source0: https://github.com/ibm-s390-linux/%{name}/archive/%{version}/%{name}-%{version}.tar.gz
|
|
||||||
|
|
||||||
BuildRequires: make
|
|
||||||
BuildRequires: gcc
|
|
||||||
BuildRequires: libnl3-devel
|
|
||||||
BuildRequires: bash-completion
|
|
||||||
|
|
||||||
%ifarch s390 s390x
|
|
||||||
# for smc_chk
|
|
||||||
Requires: python3
|
|
||||||
Requires: man
|
|
||||||
%endif
|
|
||||||
|
|
||||||
|
|
||||||
%description
|
|
||||||
The Shared Memory Communication Tools (smc-tools) package enables usage of SMC
|
|
||||||
sockets in Linux.
|
|
||||||
|
|
||||||
%prep
|
|
||||||
%autosetup
|
|
||||||
|
|
||||||
|
|
||||||
%build
|
|
||||||
%ifarch ppc64le
|
|
||||||
# see arch/powerpc/include/uapi/asm/types.h
|
|
||||||
%global optflags %optflags -D__SANE_USERSPACE_TYPES__
|
|
||||||
%endif
|
|
||||||
%set_build_flags
|
|
||||||
%make_build
|
|
||||||
|
|
||||||
|
|
||||||
%install
|
|
||||||
%make_install V=1
|
|
||||||
|
|
||||||
|
|
||||||
%files
|
|
||||||
%license LICENSE
|
|
||||||
%doc README.md
|
|
||||||
%{_bindir}/smcd
|
|
||||||
%{_bindir}/smcr
|
|
||||||
%{_bindir}/smc_dbg
|
|
||||||
%{_bindir}/smc_pnet
|
|
||||||
%{_bindir}/smc_run
|
|
||||||
%{_bindir}/smcss
|
|
||||||
%{_libdir}/libsmc-preload.so*
|
|
||||||
%{_mandir}/man7/af_smc.7*
|
|
||||||
%{_mandir}/man8/smcd*.8*
|
|
||||||
%{_mandir}/man8/smcr*.8*
|
|
||||||
%{_mandir}/man8/smc_pnet.8*
|
|
||||||
%{_mandir}/man8/smc_run.8*
|
|
||||||
%{_mandir}/man8/smcss.8*
|
|
||||||
%ifarch s390 s390x
|
|
||||||
%{_bindir}/smc_chk
|
|
||||||
%{_bindir}/smc_rnics
|
|
||||||
%{_mandir}/man8/smc_chk.8*
|
|
||||||
%{_mandir}/man8/smc_rnics.8*
|
|
||||||
%endif
|
|
||||||
%{_datadir}/bash-completion/
|
|
||||||
|
|
||||||
|
|
||||||
%changelog
|
|
||||||
* Tue Oct 29 2024 Troy Dawson <tdawson@redhat.com> - 1.8.3-4
|
|
||||||
- Bump release for October 2024 mass rebuild:
|
|
||||||
Resolves: RHEL-64018
|
|
||||||
|
|
||||||
* Mon Jun 24 2024 Troy Dawson <tdawson@redhat.com> - 1.8.3-3
|
|
||||||
- Bump release for June 2024 mass rebuild
|
|
||||||
|
|
||||||
* Sat Jan 27 2024 Fedora Release Engineering <releng@fedoraproject.org> - 1.8.3-2
|
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
|
|
||||||
|
|
||||||
* Sat Jul 29 2023 Fedora Release Monitoring <release-monitoring@fedoraproject.org> - 1.8.3-1
|
|
||||||
- Update to 1.8.3 (rhbz#2227386)
|
|
||||||
|
|
||||||
* Sat Jul 22 2023 Fedora Release Engineering <releng@fedoraproject.org> - 1.8.2-3
|
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
|
|
||||||
|
|
||||||
* Sat Jan 21 2023 Fedora Release Engineering <releng@fedoraproject.org> - 1.8.2-2
|
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
|
|
||||||
|
|
||||||
* Mon Oct 03 2022 Dan Horák <dan@danny.cz> - 1.8.2-1
|
|
||||||
- update to 1.8.2 (#2131304)
|
|
||||||
|
|
||||||
* Sat Jul 23 2022 Fedora Release Engineering <releng@fedoraproject.org> - 1.8.1-2
|
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
|
|
||||||
|
|
||||||
* Tue Apr 19 2022 Dan Horák <dan@danny.cz> - 1.8.1-1
|
|
||||||
- update to 1.8.1 (#2075668)
|
|
||||||
|
|
||||||
* Sat Jan 22 2022 Fedora Release Engineering <releng@fedoraproject.org> - 1.7.0-2
|
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
|
|
||||||
|
|
||||||
* Mon Nov 01 2021 Dan Horák <dan@danny.cz> - 1.7.0-1
|
|
||||||
- update to 1.7.0 (#2018668)
|
|
||||||
|
|
||||||
* Fri Oct 01 2021 Dan Horák <dan@danny.cz> - 1.6.1-1
|
|
||||||
- update to 1.6.1 (#2009798)
|
|
||||||
|
|
||||||
* Fri Jul 23 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1.6.0-2
|
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
|
|
||||||
|
|
||||||
* Wed Jul 07 2021 Dan Horák <dan@danny.cz> - 1.6.0-1
|
|
||||||
- update to 1.6.0 (#1978846)
|
|
||||||
|
|
||||||
* Wed Mar 17 2021 Dan Horák <dan@danny.cz> - 1.5.0-1
|
|
||||||
- update to 1.5.0
|
|
||||||
|
|
||||||
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1.3.1-2
|
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
|
|
||||||
|
|
||||||
* Wed Sep 23 2020 Dan Horák <dan@danny.cz> - 1.3.1-1
|
|
||||||
- update to 1.3.1
|
|
||||||
|
|
||||||
* Wed Jul 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.2.0-4
|
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
|
|
||||||
|
|
||||||
* Thu Jan 30 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.2.0-3
|
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
|
|
||||||
|
|
||||||
* Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.2.0-2
|
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
|
|
||||||
|
|
||||||
* Thu Feb 28 2019 Dan Horák <dan@danny.cz> - 1.2.0-1
|
|
||||||
- update to 1.2.0
|
|
||||||
|
|
||||||
* Sat Feb 02 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.0-3
|
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
|
|
||||||
|
|
||||||
* Sat Jul 14 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.0-2
|
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
|
|
||||||
|
|
||||||
* Mon Jul 09 2018 Dan Horák <dan@danny.cz> - 1.1.0-1
|
|
||||||
- update to 1.1.0
|
|
||||||
|
|
||||||
* Mon Apr 16 2018 Dan Horák <dan@danny.cz> - 1.0.0-4
|
|
||||||
- fix LDFLAGS injection (#1567902)
|
|
||||||
|
|
||||||
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.0-3
|
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
|
|
||||||
|
|
||||||
* Wed Jan 10 2018 Dan Horák <dan@danny.cz> - 1.0.0-2
|
|
||||||
- use make macro
|
|
||||||
- comment patches
|
|
||||||
- use distro LDFLAGS in build
|
|
||||||
|
|
||||||
* Mon Jan 8 2018 Dan Horák <dan@danny.cz> - 1.0.0-1
|
|
||||||
- initial Fedora version
|
|
1
sources
1
sources
@ -1 +0,0 @@
|
|||||||
SHA512 (smc-tools-1.8.3.tar.gz) = ced6b5814e2aabf1af11c190734ef77dd929382bfb4031193e3ef720d690fd2e19cc4279213f278e2d5b6a128c0369e436b9072d203b52eb73b387f859595b3e
|
|
@ -1,90 +0,0 @@
|
|||||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
||||||
#
|
|
||||||
# Makefile of smc-tools/sanity
|
|
||||||
# Description: smc-tools test
|
|
||||||
#
|
|
||||||
# 2019-04-01
|
|
||||||
# Author: Čestmír Kalina <ckalina@redhat.com>
|
|
||||||
#
|
|
||||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
||||||
#
|
|
||||||
# Copyright (c) 2019 Red Hat, Inc.
|
|
||||||
#
|
|
||||||
# This copyrighted material is made available to anyone wishing
|
|
||||||
# to use, modify, copy, or redistribute it subject to the terms
|
|
||||||
# and conditions of the GNU General Public License version 2.
|
|
||||||
#
|
|
||||||
# This program is distributed in the hope that it will be
|
|
||||||
# useful, but WITHOUT ANY WARRANTY; without even the implied
|
|
||||||
# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
|
||||||
# PURPOSE. See the GNU General Public License for more details.
|
|
||||||
#
|
|
||||||
# You should have received a copy of the GNU General Public
|
|
||||||
# License along with this program; if not, write to the Free
|
|
||||||
# Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
|
||||||
# Boston, MA 02110-1301, USA.
|
|
||||||
#
|
|
||||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
||||||
|
|
||||||
TENV=_env
|
|
||||||
ifeq ($(PKG_TOP_DIR),)
|
|
||||||
export PKG_TOP_DIR := $(shell p=$$PWD; while :; do \
|
|
||||||
[ -e $$p/env.mk -o -z "$$p" ] && { echo $$p; break; }; p=$${p%/*}; done)
|
|
||||||
export _TOP_DIR := $(shell p=$$PWD; while :; do \
|
|
||||||
[ -d $$p/.git -o -z "$$p" ] && { echo $$p; break; }; p=$${p%/*}; done)
|
|
||||||
-include $(PKG_TOP_DIR)/env.mk
|
|
||||||
endif
|
|
||||||
include $(TENV)
|
|
||||||
ifeq ($(_TOP_DIR),)
|
|
||||||
_TOP_DIR=/mnt/tests/$(TOPLEVEL_NAMESPACE)
|
|
||||||
endif
|
|
||||||
|
|
||||||
export TESTVERSION=1.0
|
|
||||||
|
|
||||||
BUILT_FILES=
|
|
||||||
|
|
||||||
FILES=$(TENV) $(METADATA) Makefile common-tests.sh runtest.sh
|
|
||||||
|
|
||||||
.PHONY: all install download clean
|
|
||||||
|
|
||||||
run: $(FILES) build
|
|
||||||
( set +o posix; . /usr/bin/rhts_environment.sh; \
|
|
||||||
. /usr/share/beakerlib/beakerlib.sh; \
|
|
||||||
. runtest.sh )
|
|
||||||
|
|
||||||
build: $(BUILT_FILES)
|
|
||||||
test -x runtest.sh || chmod a+x runtest.sh
|
|
||||||
|
|
||||||
clean:
|
|
||||||
rm -fr *~ $(BUILT_FILES)
|
|
||||||
|
|
||||||
include /usr/share/rhts/lib/rhts-make.include
|
|
||||||
|
|
||||||
$(METADATA): Makefile
|
|
||||||
@echo "Owner: Čestmír Kalina <ckalina@redhat.com>" > $(METADATA)
|
|
||||||
@echo "Name: $(TEST)" >> $(METADATA)
|
|
||||||
@echo "TestVersion: $(TESTVERSION)" >> $(METADATA)
|
|
||||||
@echo "Path: $(TEST_DIR)" >> $(METADATA)
|
|
||||||
@echo "Description: smc-tools tests">> $(METADATA)
|
|
||||||
@echo "Type: Regression" >> $(METADATA)
|
|
||||||
@echo "TestTime: 1h" >> $(METADATA)
|
|
||||||
@echo "RunFor: smc-tools" >> $(METADATA)
|
|
||||||
@echo "Requires: bash" >> $(METADATA)
|
|
||||||
@echo "Requires: coreutils" >> $(METADATA)
|
|
||||||
@echo "Requires: kernel" >> $(METADATA)
|
|
||||||
@echo "Requires: kmod" >> $(METADATA)
|
|
||||||
@echo "Requires: kernel-devel" >> $(METADATA)
|
|
||||||
@echo "Requires: kernel-modules" >> $(METADATA)
|
|
||||||
@echo "Requires: kernel-abi-whitelists" >> $(METADATA)
|
|
||||||
@echo "Requires: xz" >> $(METADATA)
|
|
||||||
@echo "Requires: bzip2" >> $(METADATA)
|
|
||||||
@echo "Requires: gzip" >> $(METADATA)
|
|
||||||
@echo "ExclusiveArch: s390x" >> $(METADATA)
|
|
||||||
@echo "Requires: $(PACKAGE_NAME) rpm wget iputils" >> $(METADATA)
|
|
||||||
@echo "Priority: Normal" >> $(METADATA)
|
|
||||||
@echo "License: GPLv2" >> $(METADATA)
|
|
||||||
@echo "Confidential: no" >> $(METADATA)
|
|
||||||
@echo "Destructive: no" >> $(METADATA)
|
|
||||||
rhts-lint $(METADATA)
|
|
||||||
|
|
||||||
|
|
@ -1,9 +0,0 @@
|
|||||||
#This file was generated automatically,do not manually change it.
|
|
||||||
export TOPLEVEL_NAMESPACE=kernel
|
|
||||||
export PKG_NAMESPACE=kernel/general
|
|
||||||
export RELATIVE_PATH=smc-tools/sanity
|
|
||||||
export PACKAGE=general
|
|
||||||
export PACKAGE_NAME=general
|
|
||||||
export PKG_LIST=
|
|
||||||
export TEST=/kernel/general/smc-tools/sanity
|
|
||||||
|
|
@ -1,148 +0,0 @@
|
|||||||
if test -z "$MANUAL"
|
|
||||||
then
|
|
||||||
export COLOR_NC=
|
|
||||||
export COLOR_WHITE=
|
|
||||||
export COLOR_BLACK=
|
|
||||||
export COLOR_BLUE=
|
|
||||||
export COLOR_LIGHT_BLUE=
|
|
||||||
export COLOR_GREEN=
|
|
||||||
export COLOR_LIGHT_GREEN=
|
|
||||||
export COLOR_CYAN=
|
|
||||||
export COLOR_LIGHT_CYAN=
|
|
||||||
export COLOR_RED=
|
|
||||||
export COLOR_LIGHT_RED=
|
|
||||||
export COLOR_PURPLE=
|
|
||||||
export COLOR_LIGHT_PURPLE=
|
|
||||||
export COLOR_BROWN=
|
|
||||||
export COLOR_YELLOW=
|
|
||||||
export COLOR_GRAY=
|
|
||||||
export COLOR_LIGHT_GRAY=
|
|
||||||
else
|
|
||||||
export COLOR_NC='\e[0m'
|
|
||||||
export COLOR_WHITE='\e[1;37m'
|
|
||||||
export COLOR_BLACK='\e[0;30m'
|
|
||||||
export COLOR_BLUE='\e[0;34m'
|
|
||||||
export COLOR_LIGHT_BLUE='\e[1;34m'
|
|
||||||
export COLOR_GREEN='\e[0;32m'
|
|
||||||
export COLOR_LIGHT_GREEN='\e[1;32m'
|
|
||||||
export COLOR_CYAN='\e[0;36m'
|
|
||||||
export COLOR_LIGHT_CYAN='\e[1;36m'
|
|
||||||
export COLOR_RED='\e[0;31m'
|
|
||||||
export COLOR_LIGHT_RED='\e[1;31m'
|
|
||||||
export COLOR_PURPLE='\e[0;35m'
|
|
||||||
export COLOR_LIGHT_PURPLE='\e[1;35m'
|
|
||||||
export COLOR_BROWN='\e[0;33m'
|
|
||||||
export COLOR_YELLOW='\e[1;33m'
|
|
||||||
export COLOR_GRAY='\e[0;30m'
|
|
||||||
export COLOR_LIGHT_GRAY='\e[0;37m'
|
|
||||||
fi
|
|
||||||
|
|
||||||
function pass()
|
|
||||||
{
|
|
||||||
if ! test -z "$MANUAL"
|
|
||||||
then
|
|
||||||
echo -en " $COLOR_GRAY$(printf "%0.s-" {1..35})"
|
|
||||||
echo -en "[ ${COLOR_GREEN}PASS ]"
|
|
||||||
echo -e "$COLOR_GRAY$(printf "%0.s-" {1..36})$COLOR_NC"
|
|
||||||
else
|
|
||||||
rlPass
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
function fail()
|
|
||||||
{
|
|
||||||
if ! test -z "$MANUAL"
|
|
||||||
then
|
|
||||||
echo -en " $COLOR_GRAY$(printf "%0.s-" {1..35})"
|
|
||||||
echo -en "[ ${COLOR_RED}FAIL ]"
|
|
||||||
echo -e "$COLOR_GRAY$(printf "%0.s-" {1..36})$COLOR_NC"
|
|
||||||
else
|
|
||||||
rlFail
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
function print_test_case()
|
|
||||||
{
|
|
||||||
if test -z "$MANUAL"
|
|
||||||
then
|
|
||||||
return 0
|
|
||||||
fi
|
|
||||||
echo
|
|
||||||
local msg=" $COLOR_GRAY[${COLOR_BLUE}TEST $1$COLOR_GRAY]"
|
|
||||||
eval msg="\$msg\$(printf "%0.s-" {1..$[80-${#msg}+${#COLOR_BLUE}+2*${#COLOR_GRAY}]})"
|
|
||||||
echo -e "$msg$COLOR_NC"
|
|
||||||
}
|
|
||||||
|
|
||||||
function print_description()
|
|
||||||
{
|
|
||||||
desc=()
|
|
||||||
eval desc=\(\"\${DESCRIPTION_$1[@]}\"\)
|
|
||||||
for desc_line in "${desc[@]}"
|
|
||||||
do
|
|
||||||
echo " $desc_line"
|
|
||||||
done
|
|
||||||
echo
|
|
||||||
}
|
|
||||||
|
|
||||||
#
|
|
||||||
# Perform a test
|
|
||||||
#
|
|
||||||
# $1 test function
|
|
||||||
#
|
|
||||||
function run_test()
|
|
||||||
{
|
|
||||||
rlPhaseStartTest "$1"
|
|
||||||
|
|
||||||
if test $# -eq 0 -o -z $1
|
|
||||||
then
|
|
||||||
rlFail "ERROR: Expected test name to be passed to run_test" \
|
|
||||||
"function." >&2
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
local stdout_log="$2"
|
|
||||||
local stderr_log="$3"
|
|
||||||
|
|
||||||
if test -z $stdout_log -o ! -e $stdout_log
|
|
||||||
then
|
|
||||||
rlFail "ERROR: Test inconsistency, STDOUT log file missing or" \
|
|
||||||
"non-existent." >&2
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
if test -z $stderr_log -o ! -e $stderr_log
|
|
||||||
then
|
|
||||||
rlFail "ERROR: Test inconsistency, STDERR log file missing or" \
|
|
||||||
"non-existent." >&2
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo > $stdout_log
|
|
||||||
echo > $stderr_log
|
|
||||||
|
|
||||||
print_test_case "$1"
|
|
||||||
|
|
||||||
$1 "$stdout_log" "$stderr_log"
|
|
||||||
ret=$?
|
|
||||||
|
|
||||||
print_description "$1"
|
|
||||||
|
|
||||||
if test $ret -eq 0
|
|
||||||
then
|
|
||||||
pass
|
|
||||||
else
|
|
||||||
fail
|
|
||||||
|
|
||||||
echo "STDOUT {"
|
|
||||||
cat $stdout_log
|
|
||||||
echo "}"
|
|
||||||
|
|
||||||
echo "STDERR {"
|
|
||||||
cat $stderr_log
|
|
||||||
echo "}"
|
|
||||||
|
|
||||||
return 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
rlPhaseEnd
|
|
||||||
}
|
|
@ -1,149 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
function cleanup()
|
|
||||||
{
|
|
||||||
rlPhaseStartCleanup
|
|
||||||
rm -rf "${TEMPFILES[@]}"
|
|
||||||
rlPhaseEnd
|
|
||||||
}
|
|
||||||
trap cleanup 0 1 9 15
|
|
||||||
|
|
||||||
# --- Globals -----------------------------------------------------------------
|
|
||||||
|
|
||||||
SCRIPT_ROOT="$(dirname "$(realpath "${BASH_SOURCE[0]}")")"
|
|
||||||
|
|
||||||
# A list of temporary files; used by cleanup to delete on signals 0 1 9 15.
|
|
||||||
TEMPFILES=()
|
|
||||||
|
|
||||||
# A list of dependencies to include.
|
|
||||||
INCLUDES=()
|
|
||||||
|
|
||||||
# A list of files containing test definitions.
|
|
||||||
# These are auto-discovered using test-*.sh pattern.
|
|
||||||
TESTS_FILES=()
|
|
||||||
|
|
||||||
# A list of tests to run.
|
|
||||||
# These are automatically added by test files.
|
|
||||||
TESTS=()
|
|
||||||
|
|
||||||
# The following can be overriden to force a particular setting.
|
|
||||||
|
|
||||||
# RPM_BIN_DIR is not defined
|
|
||||||
# RPM_DATA_DIR is not defined
|
|
||||||
# KSC_BIN is not defined
|
|
||||||
# MOD_PATH is not defined
|
|
||||||
# MANUAL is not defined
|
|
||||||
|
|
||||||
# --- Initialization ----------------------------------------------------------
|
|
||||||
|
|
||||||
echo
|
|
||||||
echo " :: smc-tools Gating for RHEL"
|
|
||||||
echo
|
|
||||||
|
|
||||||
# Requires: restraint-rhts
|
|
||||||
. /usr/bin/rhts-environment.sh || exit 1
|
|
||||||
# Requires: beakerlib
|
|
||||||
. /usr/share/beakerlib/beakerlib.sh || exit 1
|
|
||||||
|
|
||||||
INCLUDES+=("$SCRIPT_ROOT/common-tests.sh")
|
|
||||||
|
|
||||||
TESTS_FILES+=("$SCRIPT_ROOT/test-"*".sh")
|
|
||||||
|
|
||||||
# --- bkr journal -------------------------------------------------------------
|
|
||||||
|
|
||||||
rlJournalStart
|
|
||||||
|
|
||||||
rlPhaseStartSetup
|
|
||||||
|
|
||||||
# --- Load dependencies -------------------------------------------------------
|
|
||||||
|
|
||||||
for path in ${INCLUDES[@]} ${TESTS_FILES[@]}
|
|
||||||
do
|
|
||||||
if ! test -r $path
|
|
||||||
then
|
|
||||||
rlFail "Path \`$path' does not exist or is not readable"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
source $path && {
|
|
||||||
rlPass "File \`$(basename "$path")' loaded."
|
|
||||||
} || {
|
|
||||||
rlFail "Unable to load \`$path'."
|
|
||||||
exit 1
|
|
||||||
}
|
|
||||||
done
|
|
||||||
|
|
||||||
# --- Temporary files ---------------------------------------------------------
|
|
||||||
|
|
||||||
echo ":: Initialization: Temporary files."
|
|
||||||
|
|
||||||
__stdout_log=$(mktemp -p /tmp smc-tools-test-stdout.XXXXX)
|
|
||||||
TEMPFILES+=("$__stdout_log")
|
|
||||||
|
|
||||||
__stderr_log=$(mktemp -p /tmp smc-tools-test-stderr.XXXXX)
|
|
||||||
TEMPFILES+=("$__stderr_log")
|
|
||||||
|
|
||||||
# --- Evaluate RPM-specific macros --------------------------------------------
|
|
||||||
# This is required not to hardcode install location should %{_bindir} and
|
|
||||||
# %{_datadir} be changed.
|
|
||||||
|
|
||||||
echo ":: Initialization: Evaluating RPM macros."
|
|
||||||
|
|
||||||
if test -z "$RPM_BIN_DIR"
|
|
||||||
then
|
|
||||||
RPM_BIN_DIR="$(rpm --eval '%{_bindir}')"
|
|
||||||
echo " * RPM %{_bindir} determined as: $RPM_BIN_DIR"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if test -z "$RPM_DATA_DIR"
|
|
||||||
then
|
|
||||||
RPM_DATA_DIR="$(rpm --eval '%{_datadir}')"
|
|
||||||
echo " * RPM %{_datadir} determined as: $RPM_DATA_DIR"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if test -z "$RPM_LIB_DIR"
|
|
||||||
then
|
|
||||||
RPM_LIB_DIR="$(rpm --eval '%{_libdir}')"
|
|
||||||
echo " * RPM %{_libdir} determined as: $RPM_LIB_DIR"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# --- Determine scm location --------------------------------------------------
|
|
||||||
|
|
||||||
if test -z "$PLD_LD"
|
|
||||||
then
|
|
||||||
PLD_LD="$RPM_LIB_DIR/libsmc-preload.so"
|
|
||||||
echo ":: libsmc-preload.so determined as: $PLD_LD"
|
|
||||||
fi
|
|
||||||
|
|
||||||
rlPass "Initialization passed."
|
|
||||||
|
|
||||||
rlPhaseEnd
|
|
||||||
|
|
||||||
# --- Run tests ---------------------------------------------------------------
|
|
||||||
|
|
||||||
overall_status=0
|
|
||||||
for test in ${TESTS[@]}
|
|
||||||
do
|
|
||||||
run_test $test "$__stdout_log" "$__stderr_log"
|
|
||||||
if test $? -gt 0
|
|
||||||
then
|
|
||||||
overall_status=1
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
|
|
||||||
rlPhaseStartTest
|
|
||||||
|
|
||||||
if test $overall_status -gt 0
|
|
||||||
then
|
|
||||||
rlFail "Some tests failed."
|
|
||||||
exit 1
|
|
||||||
else
|
|
||||||
rlPass "All tests passed."
|
|
||||||
fi
|
|
||||||
echo
|
|
||||||
|
|
||||||
rlPhaseEnd
|
|
||||||
|
|
||||||
rlJournalPrintText
|
|
||||||
|
|
||||||
rlJournalEnd
|
|
||||||
|
|
@ -1,43 +0,0 @@
|
|||||||
#!/usr/bin/env sh
|
|
||||||
#
|
|
||||||
# smc-tools gating
|
|
||||||
#
|
|
||||||
# verify that LD_PRELOAD works
|
|
||||||
#
|
|
||||||
|
|
||||||
|
|
||||||
TESTS+=(test_smc_tools_ld_preload)
|
|
||||||
|
|
||||||
DESCRIPTION_test_smc_tools_ld_preload=(
|
|
||||||
"Verify that smc-tools's libsmc-preload.so can be LD_PRELOAD-ed."
|
|
||||||
)
|
|
||||||
|
|
||||||
function test_smc_tools_ld_preload()
|
|
||||||
{
|
|
||||||
local stdout_log="$1"
|
|
||||||
local stderr_log="$2"
|
|
||||||
shift 2
|
|
||||||
|
|
||||||
echo > $stdout_log
|
|
||||||
echo > $stderr_log
|
|
||||||
|
|
||||||
echo "# Calling LD_PRELOAD=\"$PLD_LD\" ping -4 google.com -c 1" \
|
|
||||||
>> $stdout_log
|
|
||||||
LD_PRELOAD="$PLD_LD" ping -4 google.com -c 1 >> $stdout_log 2>> $stderr_log
|
|
||||||
|
|
||||||
if test $? -gt 0
|
|
||||||
then
|
|
||||||
echo
|
|
||||||
echo "ERROR: Failed with non-zero return code." >&2
|
|
||||||
|
|
||||||
echo "STDOUT {"
|
|
||||||
cat $stdout_log
|
|
||||||
echo "}"
|
|
||||||
|
|
||||||
echo "STDERR {"
|
|
||||||
cat $stderr_log
|
|
||||||
echo "}"
|
|
||||||
|
|
||||||
return 1
|
|
||||||
fi
|
|
||||||
}
|
|
@ -1,12 +0,0 @@
|
|||||||
- hosts: localhost
|
|
||||||
tags:
|
|
||||||
- classic
|
|
||||||
roles:
|
|
||||||
- role: standard-test-beakerlib
|
|
||||||
tests:
|
|
||||||
- sanity
|
|
||||||
required_packages:
|
|
||||||
- bash
|
|
||||||
- coreutils
|
|
||||||
- iputils
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user