diff --git a/openhpi-3.8.0-openssl-no-engine.patch b/openhpi-3.8.0-openssl-no-engine.patch deleted file mode 100644 index 40d7cdd..0000000 --- a/openhpi-3.8.0-openssl-no-engine.patch +++ /dev/null @@ -1,20 +0,0 @@ -diff --git a/ssl/oh_ssl.c b/ssl/oh_ssl.c -index 45748d40..b5499eb2 100644 ---- a/ssl/oh_ssl.c -+++ b/ssl/oh_ssl.c -@@ -66,7 +66,6 @@ - #include - #include - #include --#include - #include - #include - #include -@@ -363,7 +362,6 @@ void oh_ssl_finit(void) - { - /* TODO: Check whether any other SSL library cleanup should be called */ - thread_cleanup(); -- ENGINE_cleanup(); - CONF_modules_unload(0); - ERR_free_strings(); - EVP_cleanup(); diff --git a/openhpi-c99.patch b/openhpi-c99.patch deleted file mode 100644 index 99a18bb..0000000 --- a/openhpi-c99.patch +++ /dev/null @@ -1,17 +0,0 @@ -Avoid an int-conversion C type error and a build failure with GCC 14. - -Submitted upstream: - -diff --git a/plugins/ov_rest/ov_rest_re_discover.c b/plugins/ov_rest/ov_rest_re_discover.c -index 5ad542793f628041..7cdd13d8c395f5d6 100644 ---- a/plugins/ov_rest/ov_rest_re_discover.c -+++ b/plugins/ov_rest/ov_rest_re_discover.c -@@ -704,7 +704,7 @@ SaErrorT remove_composer(struct oh_handler_state *handler, - byte bayNumber) - { - -- SaErrorT rv = NULL; -+ SaErrorT rv = 0; - SaHpiResourceIdT resource_id = 0; - struct oh_event event = {0}; - struct ovRestHotswapState *hotswap_state = NULL; diff --git a/openhpi-snmp-disable-des.patch b/openhpi-snmp-disable-des.patch deleted file mode 100644 index 8280e86..0000000 --- a/openhpi-snmp-disable-des.patch +++ /dev/null @@ -1,35 +0,0 @@ -This patch is required because net-smp is not build with DES support, -so usmDESPrivProtocol is not available. - -diff --git a/plugins/snmp_bc/snmp_bc_session.c b/plugins/snmp_bc/snmp_bc_session.c -index 767cdb1a77ee420e..cb724fcee0668bd5 100644 ---- a/plugins/snmp_bc/snmp_bc_session.c -+++ b/plugins/snmp_bc/snmp_bc_session.c -@@ -239,23 +239,10 @@ void *snmp_bc_open(GHashTable *handler_config, - err("Cannot find \"privacy_passwd\" configuration parameter."); - return NULL; - } -- -- custom_handle->session.securityLevel = SNMP_SEC_LEVEL_AUTHPRIV; -- custom_handle->session.securityPrivProto = usmDESPrivProtocol; -- custom_handle->session.securityPrivProtoLen = USM_PRIV_PROTO_DES_LEN; -- custom_handle->session.securityPrivKeyLen = USM_PRIV_KU_LEN; -- if (generate_Ku(custom_handle->session.securityAuthProto, -- custom_handle->session.securityAuthProtoLen, -- (u_char *) privacy_passwd, strlen(privacy_passwd), -- custom_handle->session.securityPrivKey, -- &(custom_handle->session.securityPrivKeyLen)) != SNMPERR_SUCCESS) { -- snmp_perror("snmp_bc"); -- snmp_log(LOG_ERR, -- "Error generating Ku from private passphrase.\n"); -- err("Unable to establish SNMP authpriv session."); -- return NULL; -- } -- -+ snmp_perror("snmp_bc"); -+ snmp_log(LOG_ERR, "DES authentication is not supported.\n"); -+ err("Unable to establish SNMP authpriv session."); -+ return NULL; - } - - diff --git a/openhpi.spec b/openhpi.spec index fad680a..c5a11ad 100644 --- a/openhpi.spec +++ b/openhpi.spec @@ -1,35 +1,19 @@ -# defining macros needed by SELinux -%global selinuxtype targeted -%global modulename openhpid -%global with_selinux 1 - Summary: Hardware Platform Interface library and tools Name: openhpi Version: 3.8.0 -Release: 32%{?dist} -# Automatically converted from old format: BSD - review is highly recommended. -License: LicenseRef-Callaway-BSD +Release: 8%{?dist} +License: BSD URL: http://www.openhpi.org Source0: http://downloads.sourceforge.net/%{name}/%{name}-%{version}.tar.gz -# selinux policy for openhpi, Policy files where extracted from -# https://github.com/fedora-selinux/selinux-policy -Source1: openhpid.fc -Source2: openhpid.if -Source3: openhpid.te +# convert from initscript to systemd unit Patch0: %{name}-3.4.0-systemd.patch Patch1: %{name}-3.6.1-ssl.patch Patch2: %{name}-3.7.0-multilib.patch Patch3: %{name}-3.8.0-manpage-scan.patch Patch4: %{name}-3.8.0-ipv6-ipmidirect.patch Patch5: %{name}-3.8.0-link-libopenhpi.patch -Patch6: %{name}-snmp-disable-des.patch -Patch7: %{name}-c99.patch -Patch8: %{name}-3.8.0-openssl-no-engine.patch -BuildRequires: make BuildRequires: gcc-c++ -%if 0%{?fedora} || 0%{?rhel} < 9 BuildRequires: libsysfs-devel -%endif BuildRequires: net-snmp-devel BuildRequires: OpenIPMI-devel BuildRequires: glib2-devel @@ -46,11 +30,6 @@ BuildRequires: systemd BuildRequires: autoconf automake libtool BuildRequires: libgcrypt-devel BuildRequires: net-snmp -%if 0%{?with_selinux} -# This ensures that the *-selinux package and all it’s dependencies are not pulled -# into containers and other systems that do not use SELinux -Requires: (%{name}-selinux if selinux-policy-%{selinuxtype}) -%endif Requires(post): systemd Requires(preun): systemd Requires(postun): systemd @@ -71,12 +50,14 @@ easily. Many plug-ins exist in the OpenHPI source tree to provide access to various types of hardware. This includes, but is not limited to, IPMI based servers, Blade Center, and machines which export data via sysfs. + %package libs Summary: The system libraries for the OpenHPI project %description libs The system libraries for the OpenHPI project. + %package devel Summary: The development environment for the OpenHPI project Requires: %{name}-libs%{?_isa} = %{version}-%{release} @@ -85,19 +66,6 @@ Requires: glib2-devel %description devel The development libraries and header files for the OpenHPI project. -%if 0%{?with_selinux} -# SELinux subpackage -%package selinux -Summary: openhpi SELinux policy -BuildArch: noarch -Requires: selinux-policy-%{selinuxtype} -Requires(post): selinux-policy-%{selinuxtype} -BuildRequires: selinux-policy-devel -%{?selinux_requires} - -%description selinux -Custom SELinux policy module -%endif %prep %autosetup -p1 @@ -117,6 +85,7 @@ if [ $UID -eq 0 ]; then find . -name openhpi.conf -execdir chown root:root . \; fi + %build export CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing" %configure --disable-static --with-systemdsystemunitdir=%{_unitdir} --docdir=%{_docdir}/%{name}-%{version} @@ -127,14 +96,6 @@ sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool make %{?_smp_mflags} -%if 0%{?with_selinux} -# SELinux policy (originally from selinux-policy-contrib) -# this policy module will override the production module -mkdir selinux -cp -p %{SOURCE1} %{SOURCE2} %{SOURCE3} selinux/ -make -f %{_datadir}/selinux/devel/Makefile %{modulename}.pp -bzip2 -9 %{modulename}.pp -%endif %install mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/%{name} @@ -146,33 +107,9 @@ rm -rf $RPM_BUILD_ROOT/%{_libdir}/%{name}/*.la cp plugins/dynamic_simulator/README $RPM_BUILD_ROOT/%{_docdir}/%{name}-%{version}/README-dynamic_simulator -# install selinux module -install -D -m 0644 %{modulename}.pp.bz2 %{buildroot}%{_datadir}/selinux/packages/%{selinuxtype}/%{modulename}.pp.bz2 - %check make check -%if 0%{?with_selinux} -# SELinux contexts are saved so that only affected files can be -# relabeled after the policy module installation -%pre selinux -%selinux_relabel_pre -s %{selinuxtype} - -%post selinux -%selinux_modules_install -s %{selinuxtype} %{_datadir}/selinux/packages/%{selinuxtype}/%{modulename}.pp.bz2 -%selinux_relabel_post -s %{selinuxtype} - -if [ "$1" -le "1" ]; then # First install - %systemd_postun_with_restart openhpid.service -fi - -%postun selinux -if [ $1 -eq 0 ]; then - %selinux_modules_uninstall -s %{selinuxtype} %{modulename} - %selinux_relabel_post -s %{selinuxtype} - %systemd_postun_with_restart openhpid.service -fi -%endif %post %systemd_post openhpid.service @@ -183,6 +120,7 @@ fi %postun %systemd_postun_with_restart openhpid.service + %files %license %{_docdir}/%{name}-%{version}/COPYING %doc %{_docdir}/%{name}-%{version}/ChangeLog @@ -209,85 +147,8 @@ fi %{_includedir}/%{name} %{_libdir}/pkgconfig/*.pc -%if 0%{?with_selinux} -%files selinux -%{_datadir}/selinux/packages/%{selinuxtype}/%{modulename}.pp.* -%ghost %{_sharedstatedir}/selinux/%{selinuxtype}/active/modules/200/%{modulename} -%endif %changelog -* Thu Jul 24 2025 Fedora Release Engineering - 3.8.0-32 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild - -* Fri Jan 17 2025 Fedora Release Engineering - 3.8.0-31 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild - -* Mon Sep 02 2024 Miroslav Suchý - 3.8.0-30 -- convert license to SPDX - -* Fri Jul 19 2024 Dan Horák - 3.8.0-29 -- fix build without OpenSSL engines - -* Thu Jul 18 2024 Fedora Release Engineering - 3.8.0-28 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild - -* Thu Jan 25 2024 Fedora Release Engineering - 3.8.0-27 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild - -* Sun Jan 21 2024 Fedora Release Engineering - 3.8.0-26 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild - -* Fri Jan 05 2024 Florian Weimer - 3.8.0-25 -- Fix C compatibility issue - -* Thu Jul 20 2023 Fedora Release Engineering - 3.8.0-24 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild - -* Thu Jan 19 2023 Fedora Release Engineering - 3.8.0-23 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild - -* Fri Jul 22 2022 Fedora Release Engineering - 3.8.0-22 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild - -* Thu Jan 20 2022 Fedora Release Engineering - 3.8.0-21 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild - -* Tue Sep 14 2021 Sahana Prasad - 3.8.0-20 -- Rebuilt with OpenSSL 3.0.0 - -* Thu Jul 22 2021 Fedora Release Engineering - 3.8.0-19 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild - -* Sat Jul 10 2021 Björn Esser - 3.8.0-18 -- Rebuild for versioned symbols in json-c - -* Wed Jun 30 2021 Than Ngo - 3.8.0-17 -- Port to net-snmp without DES support - -* Wed Mar 31 2021 Than Ngo - 3.8.0-16 -- Add openhpi-selinux subpackage containing selinux policy for openhpi - -* Tue Mar 02 2021 Than Ngo - 3.8.0-15 -- drop BR on sysfs in rhel >=9 - -* Tue Jan 26 2021 Fedora Release Engineering - 3.8.0-14 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild - -* Thu Aug 27 2020 Josef Řídký - 3.8.0-13 -- Rebuilt for new net-snmp release - -* Tue Jul 28 2020 Fedora Release Engineering - 3.8.0-12 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild - -* Tue Apr 21 2020 Björn Esser - 3.8.0-11 -- Rebuild (json-c) - -* Wed Jan 29 2020 Fedora Release Engineering - 3.8.0-10 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild - -* Thu Jul 25 2019 Fedora Release Engineering - 3.8.0-9 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild - * Fri Feb 01 2019 Fedora Release Engineering - 3.8.0-8 - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild diff --git a/openhpid.fc b/openhpid.fc deleted file mode 100644 index df219e6..0000000 --- a/openhpid.fc +++ /dev/null @@ -1,10 +0,0 @@ - -/etc/rc\.d/init\.d/openhpid -- gen_context(system_u:object_r:openhpid_initrc_exec_t,s0) - -/usr/sbin/openhpid -- gen_context(system_u:object_r:openhpid_exec_t,s0) - -/var/lib/openhpi(/.*)? gen_context(system_u:object_r:openhpid_var_lib_t,s0) - -/var/log/dynsim[0-9]*\.log -- gen_context(system_u:object_r:openhpid_log_t,s0) - -/var/run/openhpid\.pid -- gen_context(system_u:object_r:openhpid_var_run_t,s0) diff --git a/openhpid.if b/openhpid.if deleted file mode 100644 index 598789a..0000000 --- a/openhpid.if +++ /dev/null @@ -1,159 +0,0 @@ - -## policy for openhpid - - -######################################## -## -## Transition to openhpid. -## -## -## -## Domain allowed to transition. -## -## -# -interface(`openhpid_domtrans',` - gen_require(` - type openhpid_t, openhpid_exec_t; - ') - - corecmd_search_bin($1) - domtrans_pattern($1, openhpid_exec_t, openhpid_t) -') - - -######################################## -## -## Execute openhpid server in the openhpid domain. -## -## -## -## Domain allowed access. -## -## -# -interface(`openhpid_initrc_domtrans',` - gen_require(` - type openhpid_initrc_exec_t; - ') - - init_labeled_script_domtrans($1, openhpid_initrc_exec_t) -') - - -######################################## -## -## Search openhpid lib directories. -## -## -## -## Domain allowed access. -## -## -# -interface(`openhpid_search_lib',` - gen_require(` - type openhpid_var_lib_t; - ') - - allow $1 openhpid_var_lib_t:dir search_dir_perms; - files_search_var_lib($1) -') - -######################################## -## -## Read openhpid lib files. -## -## -## -## Domain allowed access. -## -## -# -interface(`openhpid_read_lib_files',` - gen_require(` - type openhpid_var_lib_t; - ') - - files_search_var_lib($1) - read_files_pattern($1, openhpid_var_lib_t, openhpid_var_lib_t) -') - -######################################## -## -## Manage openhpid lib files. -## -## -## -## Domain allowed access. -## -## -# -interface(`openhpid_manage_lib_files',` - gen_require(` - type openhpid_var_lib_t; - ') - - files_search_var_lib($1) - manage_files_pattern($1, openhpid_var_lib_t, openhpid_var_lib_t) -') - -######################################## -## -## Manage openhpid lib directories. -## -## -## -## Domain allowed access. -## -## -# -interface(`openhpid_manage_lib_dirs',` - gen_require(` - type openhpid_var_lib_t; - ') - - files_search_var_lib($1) - manage_dirs_pattern($1, openhpid_var_lib_t, openhpid_var_lib_t) -') - - -######################################## -## -## All of the rules required to administrate -## an openhpid environment -## -## -## -## Domain allowed access. -## -## -## -## -## Role allowed access. -## -## -## -# -interface(`openhpid_admin',` - gen_require(` - type openhpid_t; - type openhpid_initrc_exec_t; - type openhpid_var_lib_t; - ') - - allow $1 openhpid_t:process { ptrace signal_perms }; - ps_process_pattern($1, openhpid_t) - - openhpid_initrc_domtrans($1) - domain_system_change_exemption($1) - role_transition $2 openhpid_initrc_exec_t system_r; - allow $2 system_r; - - files_search_var_lib($1) - admin_pattern($1, openhpid_var_lib_t) - - - -') - diff --git a/openhpid.te b/openhpid.te deleted file mode 100644 index a0e0eaf..0000000 --- a/openhpid.te +++ /dev/null @@ -1,67 +0,0 @@ -policy_module(openhpid, 1.0.0) - -######################################## -# -# Declarations -# - -type openhpid_t; -type openhpid_exec_t; -init_daemon_domain(openhpid_t, openhpid_exec_t) - -type openhpid_initrc_exec_t; -init_script_file(openhpid_initrc_exec_t) - -type openhpid_log_t; -logging_log_file(openhpid_log_t) - -type openhpid_var_lib_t; -files_type(openhpid_var_lib_t) - -type openhpid_var_run_t; -files_pid_file(openhpid_var_run_t) - -######################################## -# -# openhpid local policy -# - -allow openhpid_t self:capability { kill }; -allow openhpid_t self:process signal_perms; - -allow openhpid_t self:fifo_file rw_fifo_file_perms; -allow openhpid_t self:netlink_route_socket r_netlink_socket_perms; -allow openhpid_t self:unix_stream_socket create_stream_socket_perms; -allow openhpid_t self:tcp_socket create_stream_socket_perms; -allow openhpid_t self:udp_socket create_socket_perms; - - -manage_files_pattern(openhpid_t, openhpid_log_t, openhpid_log_t) -logging_log_filetrans(openhpid_t, openhpid_log_t, file) - -manage_dirs_pattern(openhpid_t, openhpid_var_lib_t, openhpid_var_lib_t) -manage_files_pattern(openhpid_t, openhpid_var_lib_t, openhpid_var_lib_t) -files_var_lib_filetrans(openhpid_t, openhpid_var_lib_t, { dir file }) - -manage_files_pattern(openhpid_t, openhpid_var_run_t, openhpid_var_run_t) -files_pid_filetrans(openhpid_t, openhpid_var_run_t, { file }) - -kernel_read_system_state(openhpid_t) - -corenet_tcp_bind_generic_node(openhpid_t) -corenet_tcp_bind_openhpid_port(openhpid_t) -corenet_tcp_connect_http_port(openhpid_t) - -dev_read_urand(openhpid_t) -dev_rw_watchdog(openhpid_t) - -logging_send_syslog_msg(openhpid_t) - -miscfiles_read_generic_certs(openhpid_t) - -sysnet_read_config(openhpid_t) - -optional_policy(` - snmp_manage_var_lib_files(openhpid_t) - snmp_manage_var_lib_dirs(openhpid_t) -') diff --git a/tests/Regression/bz1201827-hpisettime-exits-prematurely-with-return-code-1/Makefile b/tests/Regression/bz1201827-hpisettime-exits-prematurely-with-return-code-1/Makefile deleted file mode 100644 index 30eae89..0000000 --- a/tests/Regression/bz1201827-hpisettime-exits-prematurely-with-return-code-1/Makefile +++ /dev/null @@ -1,65 +0,0 @@ -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# -# Makefile of /CoreOS/openhpi/Regression/bz1201827-hpisettime-exits-prematurely-with-return-code-1 -# Description: Test for BZ#1201827 (hpisettime exits prematurely with return code 1) -# Author: Jan Scotka -# -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# -# Copyright (c) 2015 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. -# -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -export TEST=/CoreOS/openhpi/Regression/bz1201827-hpisettime-exits-prematurely-with-return-code-1 -export TESTVERSION=1.0 - -BUILT_FILES= - -FILES=$(METADATA) runtest.sh Makefile PURPOSE - -.PHONY: all install download clean - -run: $(FILES) build - ./runtest.sh - -build: $(BUILT_FILES) - test -x runtest.sh || chmod a+x runtest.sh - -clean: - rm -f *~ $(BUILT_FILES) - - -include /usr/share/rhts/lib/rhts-make.include - -$(METADATA): Makefile - @echo "Owner: Jan Scotka " > $(METADATA) - @echo "Name: $(TEST)" >> $(METADATA) - @echo "TestVersion: $(TESTVERSION)" >> $(METADATA) - @echo "Path: $(TEST_DIR)" >> $(METADATA) - @echo "Description: Test for BZ#1201827 (hpisettime exits prematurely with return code 1)" >> $(METADATA) - @echo "Type: Regression" >> $(METADATA) - @echo "TestTime: 10m" >> $(METADATA) - @echo "RunFor: openhpi" >> $(METADATA) - @echo "Requires: openhpi" >> $(METADATA) - @echo "Priority: Normal" >> $(METADATA) - @echo "License: GPLv2" >> $(METADATA) - @echo "Confidential: no" >> $(METADATA) - @echo "Destructive: no" >> $(METADATA) - @echo "Bug: 1201827" >> $(METADATA) - @echo "Releases: -RHEL4 -RHELClient5 -RHELServer5" >> $(METADATA) - - rhts-lint $(METADATA) diff --git a/tests/Regression/bz1201827-hpisettime-exits-prematurely-with-return-code-1/PURPOSE b/tests/Regression/bz1201827-hpisettime-exits-prematurely-with-return-code-1/PURPOSE deleted file mode 100644 index 5419610..0000000 --- a/tests/Regression/bz1201827-hpisettime-exits-prematurely-with-return-code-1/PURPOSE +++ /dev/null @@ -1,5 +0,0 @@ -PURPOSE of /CoreOS/openhpi/Regression/bz1201827-hpisettime-exits-prematurely-with-return-code-1 -Description: Test for BZ#1201827 (hpisettime exits prematurely with return code 1) -Author: Jan Scotka -Bug summary: hpisettime exits prematurely with return code 1 (openhpi) -Bugzilla link: https://bugzilla.redhat.com/show_bug.cgi?id=1201827 diff --git a/tests/Regression/bz1201827-hpisettime-exits-prematurely-with-return-code-1/runtest.sh b/tests/Regression/bz1201827-hpisettime-exits-prematurely-with-return-code-1/runtest.sh deleted file mode 100755 index 87ce981..0000000 --- a/tests/Regression/bz1201827-hpisettime-exits-prematurely-with-return-code-1/runtest.sh +++ /dev/null @@ -1,65 +0,0 @@ -#!/bin/bash -# vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# -# Author: Jan Scotka -# -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# -# Copyright (c) 2015 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. -# -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -# Include Beaker environment -. /usr/bin/rhts-environment.sh || exit 1 -. /usr/share/beakerlib/beakerlib.sh || exit 1 - -PACKAGE="openhpi" -CONFIG=""" -handler libsimulator { - entity_root = \"{SYSTEM_CHASSIS,3}\" - name = \"simulator\" -} - -handler libsimulator { - entity_root = \"{SYSTEM_CHASSIS,4}\" - name = \"simulator2\" -} - -""" - -rlJournalStart - rlPhaseStartSetup - rlAssertRpm $PACKAGE - rlFileBackup /etc/openhpi/openhpi.conf - rlRun "echo '$CONFIG' > /etc/openhpi/openhpi.conf" - rlServiceStart openhpid - rlRun "systemctl status -l openhpid" - sleep 5 - rlPhaseEnd - - rlPhaseStartTest - export G_MESSAGES_DEBUG=all - rlRun "hpisettime -t 12:00:00 -d 03/12/2015 -X" - - rlPhaseEnd - - rlPhaseStartCleanup - rlFileRestore - rlPhaseEnd -rlJournalPrintText -rlJournalEnd diff --git a/tests/Regression/bz1255041-openhpid-g-mutex-clear-called-on/Makefile b/tests/Regression/bz1255041-openhpid-g-mutex-clear-called-on/Makefile deleted file mode 100644 index 49da2b4..0000000 --- a/tests/Regression/bz1255041-openhpid-g-mutex-clear-called-on/Makefile +++ /dev/null @@ -1,64 +0,0 @@ -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# -# Makefile of /CoreOS/openhpi/Regression/bz1255041-openhpid-g-mutex-clear-called-on -# Description: Test for BZ#1255041 (openhpid[...] g_mutex_clear() called on) -# Author: Radka Skvarilova -# -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# -# Copyright (c) 2016 Red Hat, Inc. -# -# This program is free software: you can redistribute it and/or -# modify it under the terms of the GNU General Public License as -# published by the Free Software Foundation, either version 2 of -# the License, or (at your option) any later version. -# -# 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, see http://www.gnu.org/licenses/. -# -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -export TEST=/CoreOS/openhpi/Regression/bz1255041-openhpid-g-mutex-clear-called-on -export TESTVERSION=1.0 - -BUILT_FILES= - -FILES=$(METADATA) runtest.sh Makefile PURPOSE - -.PHONY: all install download clean - -run: $(FILES) build - ./runtest.sh - -build: $(BUILT_FILES) - test -x runtest.sh || chmod a+x runtest.sh - -clean: - rm -f *~ $(BUILT_FILES) - - -include /usr/share/rhts/lib/rhts-make.include - -$(METADATA): Makefile - @echo "Owner: Radka Skvarilova " > $(METADATA) - @echo "Name: $(TEST)" >> $(METADATA) - @echo "TestVersion: $(TESTVERSION)" >> $(METADATA) - @echo "Path: $(TEST_DIR)" >> $(METADATA) - @echo "Description: Test for BZ#1255041 (openhpid[...] g_mutex_clear() called on)" >> $(METADATA) - @echo "Type: Regression" >> $(METADATA) - @echo "TestTime: 5m" >> $(METADATA) - @echo "RunFor: openhpi" >> $(METADATA) - @echo "Requires: openhpi" >> $(METADATA) - @echo "Priority: Normal" >> $(METADATA) - @echo "License: GPLv2+" >> $(METADATA) - @echo "Confidential: no" >> $(METADATA) - @echo "Destructive: no" >> $(METADATA) - @echo "Bug: 1255041" >> $(METADATA) - @echo "Releases: -RHEL4 -RHELClient5 -RHELServer5" >> $(METADATA) - - rhts-lint $(METADATA) diff --git a/tests/Regression/bz1255041-openhpid-g-mutex-clear-called-on/PURPOSE b/tests/Regression/bz1255041-openhpid-g-mutex-clear-called-on/PURPOSE deleted file mode 100644 index 7a34ee8..0000000 --- a/tests/Regression/bz1255041-openhpid-g-mutex-clear-called-on/PURPOSE +++ /dev/null @@ -1,5 +0,0 @@ -PURPOSE of /CoreOS/openhpi/Regression/bz1255041-openhpid-g-mutex-clear-called-on -Description: Test for BZ#1255041 (openhpid[...] g_mutex_clear() called on) -Author: Radka Skvarilova -Bug summary: openhpid[...]: g_mutex_clear() called on uninitialised or locked mutex -Bugzilla link: https://bugzilla.redhat.com/show_bug.cgi?id=1255041 diff --git a/tests/Regression/bz1255041-openhpid-g-mutex-clear-called-on/runtest.sh b/tests/Regression/bz1255041-openhpid-g-mutex-clear-called-on/runtest.sh deleted file mode 100755 index 165e6be..0000000 --- a/tests/Regression/bz1255041-openhpid-g-mutex-clear-called-on/runtest.sh +++ /dev/null @@ -1,60 +0,0 @@ -#!/bin/bash -# vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# -# runtest.sh of /CoreOS/openhpi/Regression/bz1255041-openhpid-g-mutex-clear-called-on -# Description: Test for BZ#1255041 (openhpid[...] g_mutex_clear() called on) -# Author: Radka Skvarilova -# -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# -# Copyright (c) 2016 Red Hat, Inc. -# -# This program is free software: you can redistribute it and/or -# modify it under the terms of the GNU General Public License as -# published by the Free Software Foundation, either version 2 of -# the License, or (at your option) any later version. -# -# 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, see http://www.gnu.org/licenses/. -# -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -# Include Beaker environment -. /usr/bin/rhts-environment.sh || exit 1 -. /usr/share/beakerlib/beakerlib.sh || exit 1 - -PACKAGE="openhpi" - -rlJournalStart - rlPhaseStartSetup - rlAssertRpm $PACKAGE - rlRun "TmpDir=\$(mktemp -d)" 0 "Creating tmp directory" - rlRun "pushd $TmpDir" - rlFileBackup "/etc/openhpi/openhpi.conf" - rlFileBackup --clean "/var/lib/openhpi/uid_map" - rlRun "sed -i 's/OPENHPI_UNCONFIGURED = \"YES\"/OPENHPI_UNCONFIGURED = \"NO\" /' /etc/openhpi/openhpi.conf" - rlPhaseEnd - - rlPhaseStartTest - rlServiceStart openhpid - sleep 3 - rlServiceRestart openhpid - sleep 3 - rlServiceStop openhpid - - rlRun "journalctl |grep openhpi| grep 'g_mutex_clear() called on uninitialised or locked mutex' " 1 "Check the error in logs" - rlPhaseEnd - - rlPhaseStartCleanup - rlFileRestore - rlRun "popd" - rlRun "rm -r $TmpDir" 0 "Removing tmp directory" - rlPhaseEnd -rlJournalPrintText -rlJournalEnd diff --git a/tests/Regression/bz1259719-hpithres-segmentation-fault-in-case-input-closed/Makefile b/tests/Regression/bz1259719-hpithres-segmentation-fault-in-case-input-closed/Makefile deleted file mode 100644 index 10cf8de..0000000 --- a/tests/Regression/bz1259719-hpithres-segmentation-fault-in-case-input-closed/Makefile +++ /dev/null @@ -1,64 +0,0 @@ -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# -# Makefile of /CoreOS/openhpi/Regression/bz1259719-hpithres-segmentation-fault-in-case-input-closed -# Description: Test for BZ#1259719 (hpithres, segmentation fault in case input closed) -# Author: Radka Skvarilova -# -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# -# Copyright (c) 2016 Red Hat, Inc. -# -# This program is free software: you can redistribute it and/or -# modify it under the terms of the GNU General Public License as -# published by the Free Software Foundation, either version 2 of -# the License, or (at your option) any later version. -# -# 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, see http://www.gnu.org/licenses/. -# -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -export TEST=/CoreOS/openhpi/Regression/bz1259719-hpithres-segmentation-fault-in-case-input-closed -export TESTVERSION=1.0 - -BUILT_FILES= - -FILES=$(METADATA) runtest.sh Makefile PURPOSE - -.PHONY: all install download clean - -run: $(FILES) build - ./runtest.sh - -build: $(BUILT_FILES) - test -x runtest.sh || chmod a+x runtest.sh - -clean: - rm -f *~ $(BUILT_FILES) - - -include /usr/share/rhts/lib/rhts-make.include - -$(METADATA): Makefile - @echo "Owner: Radka Skvarilova " > $(METADATA) - @echo "Name: $(TEST)" >> $(METADATA) - @echo "TestVersion: $(TESTVERSION)" >> $(METADATA) - @echo "Path: $(TEST_DIR)" >> $(METADATA) - @echo "Description: Test for BZ#1259719 (hpithres, segmentation fault in case input closed)" >> $(METADATA) - @echo "Type: Regression" >> $(METADATA) - @echo "TestTime: 5m" >> $(METADATA) - @echo "RunFor: openhpi" >> $(METADATA) - @echo "Requires: openhpi" >> $(METADATA) - @echo "Priority: Normal" >> $(METADATA) - @echo "License: GPLv2+" >> $(METADATA) - @echo "Confidential: no" >> $(METADATA) - @echo "Destructive: no" >> $(METADATA) - @echo "Bug: 1259719" >> $(METADATA) - @echo "Releases: -RHEL4 -RHELClient5 -RHELServer5" >> $(METADATA) - - rhts-lint $(METADATA) diff --git a/tests/Regression/bz1259719-hpithres-segmentation-fault-in-case-input-closed/PURPOSE b/tests/Regression/bz1259719-hpithres-segmentation-fault-in-case-input-closed/PURPOSE deleted file mode 100644 index 48eab8c..0000000 --- a/tests/Regression/bz1259719-hpithres-segmentation-fault-in-case-input-closed/PURPOSE +++ /dev/null @@ -1,5 +0,0 @@ -PURPOSE of /CoreOS/openhpi/Regression/bz1259719-hpithres-segmentation-fault-in-case-input-closed -Description: Test for BZ#1259719 (hpithres, segmentation fault in case input closed) -Author: Radka Skvarilova -Bug summary: hpithres, segmentation fault in case input closed -Bugzilla link: https://bugzilla.redhat.com/show_bug.cgi?id=1259719 diff --git a/tests/Regression/bz1259719-hpithres-segmentation-fault-in-case-input-closed/runtest.sh b/tests/Regression/bz1259719-hpithres-segmentation-fault-in-case-input-closed/runtest.sh deleted file mode 100755 index 59e5bb1..0000000 --- a/tests/Regression/bz1259719-hpithres-segmentation-fault-in-case-input-closed/runtest.sh +++ /dev/null @@ -1,66 +0,0 @@ -#!/bin/bash -# vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# -# runtest.sh of /CoreOS/openhpi/Regression/bz1259719-hpithres-segmentation-fault-in-case-input-closed -# Description: Test for BZ#1259719 (hpithres, segmentation fault in case input closed) -# Author: Radka Skvarilova -# -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# -# Copyright (c) 2016 Red Hat, Inc. -# -# This program is free software: you can redistribute it and/or -# modify it under the terms of the GNU General Public License as -# published by the Free Software Foundation, either version 2 of -# the License, or (at your option) any later version. -# -# 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, see http://www.gnu.org/licenses/. -# -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -# Include Beaker environment -. /usr/bin/rhts-environment.sh || exit 1 -. /usr/share/beakerlib/beakerlib.sh || exit 1 - -PACKAGE="openhpi" -CONFIG=""" -handler libsimulator { - entity_root = \"{SYSTEM_CHASSIS,3}\" - name = \"simulator\" -} - -handler libsimulator { - entity_root = \"{SYSTEM_CHASSIS,4}\" - name = \"simulator2\" -} - -""" - -rlJournalStart - rlPhaseStartSetup - rlAssertRpm $PACKAGE - rlFileBackup /etc/openhpi/openhpi.conf - rlFileBackup --clean /var/lib/openhpi/uid_map - rlRun "echo '$CONFIG' > /etc/openhpi/openhpi.conf" - rlServiceStart openhpid - rlRun "systemctl status -l openhpid" - sleep 5 - rlPhaseEnd - - rlPhaseStartTest - rlRun ' echo "rpt" | hpithres ' 0 "Test if there is no segmentation fault" - rlPhaseEnd - - rlPhaseStartCleanup - rlServiceRestore openhpid - rlFileRestore - rlPhaseEnd -rlJournalPrintText -rlJournalEnd diff --git a/tests/Regression/bz1259729-hpi-shell-Attempt-to-unlock-mutex-that-was-not/Makefile b/tests/Regression/bz1259729-hpi-shell-Attempt-to-unlock-mutex-that-was-not/Makefile deleted file mode 100644 index abc4c70..0000000 --- a/tests/Regression/bz1259729-hpi-shell-Attempt-to-unlock-mutex-that-was-not/Makefile +++ /dev/null @@ -1,64 +0,0 @@ -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# -# Makefile of /CoreOS/openhpi/Regression/bz1259729-hpi-shell-Attempt-to-unlock-mutex-that-was-not -# Description: Test for BZ#1259729 (hpi_shell - Attempt to unlock mutex that was not) -# Author: Radka Skvarilova -# -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# -# Copyright (c) 2016 Red Hat, Inc. -# -# This program is free software: you can redistribute it and/or -# modify it under the terms of the GNU General Public License as -# published by the Free Software Foundation, either version 2 of -# the License, or (at your option) any later version. -# -# 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, see http://www.gnu.org/licenses/. -# -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -export TEST=/CoreOS/openhpi/Regression/bz1259729-hpi-shell-Attempt-to-unlock-mutex-that-was-not -export TESTVERSION=1.0 - -BUILT_FILES= - -FILES=$(METADATA) runtest.sh Makefile PURPOSE - -.PHONY: all install download clean - -run: $(FILES) build - ./runtest.sh - -build: $(BUILT_FILES) - test -x runtest.sh || chmod a+x runtest.sh - -clean: - rm -f *~ $(BUILT_FILES) - - -include /usr/share/rhts/lib/rhts-make.include - -$(METADATA): Makefile - @echo "Owner: Radka Skvarilova " > $(METADATA) - @echo "Name: $(TEST)" >> $(METADATA) - @echo "TestVersion: $(TESTVERSION)" >> $(METADATA) - @echo "Path: $(TEST_DIR)" >> $(METADATA) - @echo "Description: Test for BZ#1259729 (hpi_shell - Attempt to unlock mutex that was not)" >> $(METADATA) - @echo "Type: Regression" >> $(METADATA) - @echo "TestTime: 5m" >> $(METADATA) - @echo "RunFor: openhpi" >> $(METADATA) - @echo "Requires: openhpi" >> $(METADATA) - @echo "Priority: Normal" >> $(METADATA) - @echo "License: GPLv2+" >> $(METADATA) - @echo "Confidential: no" >> $(METADATA) - @echo "Destructive: no" >> $(METADATA) - @echo "Bug: 1259729" >> $(METADATA) - @echo "Releases: -RHEL4 -RHEL6 -RHELClient5 -RHELServer5" >> $(METADATA) - - rhts-lint $(METADATA) diff --git a/tests/Regression/bz1259729-hpi-shell-Attempt-to-unlock-mutex-that-was-not/PURPOSE b/tests/Regression/bz1259729-hpi-shell-Attempt-to-unlock-mutex-that-was-not/PURPOSE deleted file mode 100644 index c98d93b..0000000 --- a/tests/Regression/bz1259729-hpi-shell-Attempt-to-unlock-mutex-that-was-not/PURPOSE +++ /dev/null @@ -1,5 +0,0 @@ -PURPOSE of /CoreOS/openhpi/Regression/bz1259729-hpi-shell-Attempt-to-unlock-mutex-that-was-not -Description: Test for BZ#1259729 (hpi_shell - Attempt to unlock mutex that was not) -Author: Radka Skvarilova -Bug summary: hpi_shell - Attempt to unlock mutex that was not locked -Bugzilla link: https://bugzilla.redhat.com/show_bug.cgi?id=1259729 diff --git a/tests/Regression/bz1259729-hpi-shell-Attempt-to-unlock-mutex-that-was-not/runtest.sh b/tests/Regression/bz1259729-hpi-shell-Attempt-to-unlock-mutex-that-was-not/runtest.sh deleted file mode 100755 index 30e33d5..0000000 --- a/tests/Regression/bz1259729-hpi-shell-Attempt-to-unlock-mutex-that-was-not/runtest.sh +++ /dev/null @@ -1,83 +0,0 @@ -#!/bin/bash -# vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# -# runtest.sh of /CoreOS/openhpi/Regression/bz1259729-hpi-shell-Attempt-to-unlock-mutex-that-was-not -# Description: Test for BZ#1259729 (hpi_shell - Attempt to unlock mutex that was not) -# Author: Radka Skvarilova -# -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# -# Copyright (c) 2016 Red Hat, Inc. -# -# This program is free software: you can redistribute it and/or -# modify it under the terms of the GNU General Public License as -# published by the Free Software Foundation, either version 2 of -# the License, or (at your option) any later version. -# -# 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, see http://www.gnu.org/licenses/. -# -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -# Include Beaker environment -. /usr/bin/rhts-environment.sh || exit 1 -. /usr/share/beakerlib/beakerlib.sh || exit 1 - -PACKAGE="openhpi" -CONFIG=""" -handler libsimulator { - entity_root = \"{SYSTEM_CHASSIS,3}\" - name = \"simulator\" -} - -handler libsimulator { - entity_root = \"{SYSTEM_CHASSIS,4}\" - name = \"simulator2\" -} - -""" - -rlJournalStart - rlPhaseStartSetup - rlAssertRpm $PACKAGE - rlFileBackup /etc/openhpi/openhpi.conf - rlFileBackup --clean /var/lib/openhpi/uid_map - rlRun "echo '$CONFIG' > /etc/openhpi/openhpi.conf" - rlServiceStart openhpid - rlRun "systemctl status -l openhpid" - sleep 5 - rlRun "TmpDir=\$(mktemp -d)" 0 "Creating tmp directory" - rlRun "pushd $TmpDir" - rlPhaseEnd - - rlPhaseStartTest - # try some random hpi commands - export G_MESSAGES_DEBUG=all - rlRun "hpisettime -t 12:00:00 -d 03/12/2015 -X" 0 "Just run few hpi commands" - rlRun "hpidomain" 0 "Just run few hpi commands" - rlRun "hpialarms" 0 "Just run few hpi commands" - rlRun "hpiel" 0 "Just run few hpi commands" - - # test for bug 1259729 - rlRun "echo q |hpi_shell " 0,1 "Test if there is not problem with mutex lock (134 return code)" - rlServiceStop openhpid - sleep 5 - rlServiceStart openhpid - sleep 5 - rlRun "echo q |hpi_shell " 0,1 "Test if there is not problem with mutex lock (134 return code)" - rlPhaseEnd - - rlPhaseStartCleanup - rlRun "popd" - rlRun "rm -r $TmpDir" 0 "Removing tmp directory" - rlFileRestore - rlServiceRestore openhpid - rlPhaseEnd -rlJournalPrintText -rlJournalEnd diff --git a/tests/Regression/bz1262220-Error-in-usr-sbin-openhpid-double-free-or/Makefile b/tests/Regression/bz1262220-Error-in-usr-sbin-openhpid-double-free-or/Makefile deleted file mode 100644 index 6125890..0000000 --- a/tests/Regression/bz1262220-Error-in-usr-sbin-openhpid-double-free-or/Makefile +++ /dev/null @@ -1,64 +0,0 @@ -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# -# Makefile of /CoreOS/openhpi/Regression/bz1262220-Error-in-usr-sbin-openhpid-double-free-or -# Description: Test for BZ#1262220 (Error in `/usr/sbin/openhpid' double free or) -# Author: Radka Skvarilova -# -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# -# Copyright (c) 2016 Red Hat, Inc. -# -# This program is free software: you can redistribute it and/or -# modify it under the terms of the GNU General Public License as -# published by the Free Software Foundation, either version 2 of -# the License, or (at your option) any later version. -# -# 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, see http://www.gnu.org/licenses/. -# -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -export TEST=/CoreOS/openhpi/Regression/bz1262220-Error-in-usr-sbin-openhpid-double-free-or -export TESTVERSION=1.0 - -BUILT_FILES= - -FILES=$(METADATA) runtest.sh Makefile PURPOSE - -.PHONY: all install download clean - -run: $(FILES) build - ./runtest.sh - -build: $(BUILT_FILES) - test -x runtest.sh || chmod a+x runtest.sh - -clean: - rm -f *~ $(BUILT_FILES) - - -include /usr/share/rhts/lib/rhts-make.include - -$(METADATA): Makefile - @echo "Owner: Radka Skvarilova " > $(METADATA) - @echo "Name: $(TEST)" >> $(METADATA) - @echo "TestVersion: $(TESTVERSION)" >> $(METADATA) - @echo "Path: $(TEST_DIR)" >> $(METADATA) - @echo "Description: Test for BZ#1262220 (Error in \`/usr/sbin/openhpid' double free or)" >> $(METADATA) - @echo "Type: Regression" >> $(METADATA) - @echo "TestTime: 5m" >> $(METADATA) - @echo "RunFor: openhpi" >> $(METADATA) - @echo "Requires: openhpi" >> $(METADATA) - @echo "Priority: Normal" >> $(METADATA) - @echo "License: GPLv2+" >> $(METADATA) - @echo "Confidential: no" >> $(METADATA) - @echo "Destructive: no" >> $(METADATA) - @echo "Bug: 1262220" >> $(METADATA) - @echo "Releases: -RHEL4 -RHELClient5 -RHELServer5" >> $(METADATA) - - rhts-lint $(METADATA) diff --git a/tests/Regression/bz1262220-Error-in-usr-sbin-openhpid-double-free-or/PURPOSE b/tests/Regression/bz1262220-Error-in-usr-sbin-openhpid-double-free-or/PURPOSE deleted file mode 100644 index b6c717c..0000000 --- a/tests/Regression/bz1262220-Error-in-usr-sbin-openhpid-double-free-or/PURPOSE +++ /dev/null @@ -1,5 +0,0 @@ -PURPOSE of /CoreOS/openhpi/Regression/bz1262220-Error-in-usr-sbin-openhpid-double-free-or -Description: Test for BZ#1262220 (Error in `/usr/sbin/openhpid' double free or) -Author: Radka Skvarilova -Bug summary: Error in `/usr/sbin/openhpid': double free or corruption (!prev) -Bugzilla link: https://bugzilla.redhat.com/show_bug.cgi?id=1262220 diff --git a/tests/Regression/bz1262220-Error-in-usr-sbin-openhpid-double-free-or/runtest.sh b/tests/Regression/bz1262220-Error-in-usr-sbin-openhpid-double-free-or/runtest.sh deleted file mode 100755 index 2f14a91..0000000 --- a/tests/Regression/bz1262220-Error-in-usr-sbin-openhpid-double-free-or/runtest.sh +++ /dev/null @@ -1,64 +0,0 @@ -#!/bin/bash -# vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# -# runtest.sh of /CoreOS/openhpi/Regression/bz1262220-Error-in-usr-sbin-openhpid-double-free-or -# Description: Test for BZ#1262220 (Error in `/usr/sbin/openhpid' double free or) -# Author: Radka Skvarilova -# -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# -# Copyright (c) 2016 Red Hat, Inc. -# -# This program is free software: you can redistribute it and/or -# modify it under the terms of the GNU General Public License as -# published by the Free Software Foundation, either version 2 of -# the License, or (at your option) any later version. -# -# 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, see http://www.gnu.org/licenses/. -# -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -# Include Beaker environment -. /usr/bin/rhts-environment.sh || exit 1 -. /usr/share/beakerlib/beakerlib.sh || exit 1 - -PACKAGE="openhpi" - - -rlJournalStart - rlPhaseStartSetup - rlAssertRpm $PACKAGE - rlRun "TmpDir=\$(mktemp -d)" 0 "Creating tmp directory" - rlRun "pushd $TmpDir" - rlFileBackup "/etc/openhpi/openhpi.conf" - rlFileBackup --clean "/var/lib/openhpi/uid_map" - rlRun "sed -i 's/OPENHPI_UNCONFIGURED = \"YES\"/OPENHPI_UNCONFIGURED = \"NO\" /' /etc/openhpi/openhpi.conf" - rlRun "sed -i -e '/#handler libsysfs2hpi/,+3 s/^#//' /etc/openhpi/openhpi.conf" - - rlPhaseEnd - - rlPhaseStartTest - rlServiceStart openhpid - sleep 5 - rlServiceStop openhpid - rlRun "journalctl |grep 'double free or corruption' " 1 "Check the error in logs" - - - - rlPhaseEnd - - rlPhaseStartCleanup - rlFileRestore - rlServiceRestore openhpid - rlRun "popd" - rlRun "rm -r $TmpDir" 0 "Removing tmp directory" - rlPhaseEnd -rlJournalPrintText -rlJournalEnd diff --git a/tests/Regression/bz1382339-Nokia-openhpi-creates-logs-with-666-permissions/Makefile b/tests/Regression/bz1382339-Nokia-openhpi-creates-logs-with-666-permissions/Makefile deleted file mode 100644 index 0a09642..0000000 --- a/tests/Regression/bz1382339-Nokia-openhpi-creates-logs-with-666-permissions/Makefile +++ /dev/null @@ -1,64 +0,0 @@ -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# -# Makefile of /CoreOS/openhpi/Regression/bz1382339-Nokia-openhpi-creates-logs-with-666-permissions -# Description: Test for BZ#1382339 ([Nokia] openhpi creates logs with 666 permissions) -# Author: Radka Skvarilova -# -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# -# Copyright (c) 2016 Red Hat, Inc. -# -# This program is free software: you can redistribute it and/or -# modify it under the terms of the GNU General Public License as -# published by the Free Software Foundation, either version 2 of -# the License, or (at your option) any later version. -# -# 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, see http://www.gnu.org/licenses/. -# -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -export TEST=/CoreOS/openhpi/Regression/bz1382339-Nokia-openhpi-creates-logs-with-666-permissions -export TESTVERSION=1.0 - -BUILT_FILES= - -FILES=$(METADATA) runtest.sh Makefile PURPOSE - -.PHONY: all install download clean - -run: $(FILES) build - ./runtest.sh - -build: $(BUILT_FILES) - test -x runtest.sh || chmod a+x runtest.sh - -clean: - rm -f *~ $(BUILT_FILES) - - -include /usr/share/rhts/lib/rhts-make.include - -$(METADATA): Makefile - @echo "Owner: Radka Skvarilova " > $(METADATA) - @echo "Name: $(TEST)" >> $(METADATA) - @echo "TestVersion: $(TESTVERSION)" >> $(METADATA) - @echo "Path: $(TEST_DIR)" >> $(METADATA) - @echo "Description: Test for BZ#1382339 ([Nokia] openhpi creates logs with 666 permissions)" >> $(METADATA) - @echo "Type: Regression" >> $(METADATA) - @echo "TestTime: 5m" >> $(METADATA) - @echo "RunFor: openhpi" >> $(METADATA) - @echo "Requires: openhpi" >> $(METADATA) - @echo "Priority: Normal" >> $(METADATA) - @echo "License: GPLv2+" >> $(METADATA) - @echo "Confidential: no" >> $(METADATA) - @echo "Destructive: no" >> $(METADATA) - @echo "Bug: 1382339" >> $(METADATA) - @echo "Releases: -RHEL4 -RHEL6 -RHELClient5 -RHELServer5" >> $(METADATA) - - rhts-lint $(METADATA) diff --git a/tests/Regression/bz1382339-Nokia-openhpi-creates-logs-with-666-permissions/PURPOSE b/tests/Regression/bz1382339-Nokia-openhpi-creates-logs-with-666-permissions/PURPOSE deleted file mode 100644 index 4f977a1..0000000 --- a/tests/Regression/bz1382339-Nokia-openhpi-creates-logs-with-666-permissions/PURPOSE +++ /dev/null @@ -1,5 +0,0 @@ -PURPOSE of /CoreOS/openhpi/Regression/bz1382339-Nokia-openhpi-creates-logs-with-666-permissions -Description: Test for BZ#1382339 ([Nokia] openhpi creates logs with 666 permissions) -Author: Radka Skvarilova -Bug summary: [Nokia] openhpi creates logs with 666 permissions -Bugzilla link: https://bugzilla.redhat.com/show_bug.cgi?id=1382339 diff --git a/tests/Regression/bz1382339-Nokia-openhpi-creates-logs-with-666-permissions/runtest.sh b/tests/Regression/bz1382339-Nokia-openhpi-creates-logs-with-666-permissions/runtest.sh deleted file mode 100755 index 78f3765..0000000 --- a/tests/Regression/bz1382339-Nokia-openhpi-creates-logs-with-666-permissions/runtest.sh +++ /dev/null @@ -1,114 +0,0 @@ -#!/bin/bash -# vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# -# runtest.sh of /CoreOS/openhpi/Regression/bz1382339-Nokia-openhpi-creates-logs-with-666-permissions -# Description: Test for BZ#1382339 ([Nokia] openhpi creates logs with 666 permissions) -# Author: Radka Skvarilova -# -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# -# Copyright (c) 2016 Red Hat, Inc. -# -# This program is free software: you can redistribute it and/or -# modify it under the terms of the GNU General Public License as -# published by the Free Software Foundation, either version 2 of -# the License, or (at your option) any later version. -# -# 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, see http://www.gnu.org/licenses/. -# -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -# Include Beaker environment -. /usr/bin/rhts-environment.sh || exit 1 -. /usr/share/beakerlib/beakerlib.sh || exit 1 - -PACKAGE="openhpi" -CONFIG=""" -handler libdyn_simulator { - entity_root = \"{SYSTEM_CHASSIS,9}\" - logflags = \"file stdout\" - logfile = \"/var/log/dynsim\" - logfile_max = \"5\" -} - -""" -SEL=$(getenforce) - -rlJournalStart - rlPhaseStartSetup - rlRun "setenforce 0" - rlAssertRpm $PACKAGE - rlFileBackup "/usr/lib/systemd/system/openhpid.service" - rlFileBackup "/etc/openhpi/openhpi.conf" - rlFileBackup --clean "/var/lib/openhpi/uid_map" - rlRun "echo '$CONFIG' > /etc/openhpi/openhpi.conf" - rlServiceStart openhpid - cat /etc/openhpi/openhpi.conf - rlRun "systemctl status -l openhpid" #check the setting output - rlServiceStop openhpid - sleep 5 - rlPhaseEnd - - - rlPhaseStartTest "Default" - UMASK=$((10#$(umask))) #umask in decimal number - UMASK="${UMASK/7/6/}" - PERM=$((666-$UMASK)) #count permissions for log file - rlRun "rm -rf /var/log/dyn* " 0 "Removed old logs" - rlRun "systemctl start openhpid" #start service - sleep 5 - stat -c '%a %n' /var/log/dyn* | while read -r line ; do - FILE=$(echo $line| cut -f 2 -d " ") - NUMBER=$(echo $line| cut -f 1 -d " ") - rlAssertEquals "Check the permissons for $FILE" "$NUMBER" "$PERM" - done - rlRun "systemctl stop openhpid" - rlPhaseEnd - - rlPhaseStartTest "Changed 0027" - sed -i '/\[Service\]/a UMask=027' /usr/lib/systemd/system/openhpid.service - rlRun "systemctl daemon-reload" - UMASK=26 #umask in decimal number -7 write as 6 accoring to counting - PERM=$((666-$UMASK)) #count permissions for log file - rlRun "rm -rf /var/log/dyn* " 0 "Removed old logs" - rlRun "systemctl start openhpid" #start service - sleep 5 - stat -c '%a %n' /var/log/dyn* | while read -r line ; do #read permissons and file names - FILE=$(echo $line| cut -f 2 -d " ") #file name - NUMBER=$(echo $line| cut -f 1 -d " ") #permission number - rlAssertEquals "Check the permissons for $FILE" "$NUMBER" "$PERM" - done - rlRun "systemctl stop openhpid" - rlPhaseEnd - - rlPhaseStartTest "Changed 0002" - sed -i 's/UMask=027/UMask=002/' /usr/lib/systemd/system/openhpid.service - rlRun "systemctl daemon-reload" - UMASK=2 #umask in decimal number -7 write as 6 accoring to counting - PERM=$((666-$UMASK)) #count permissions for log file - rlRun "rm -rf /var/log/dyn* " 0 "Removed old logs" - rlRun "systemctl start openhpid" #start service - sleep 5 - stat -c '%a %n' /var/log/dyn* | while read -r line ; do #read permissons and file names - FILE=$(echo $line| cut -f 2 -d " ") #file name - NUMBER=$(echo $line| cut -f 1 -d " ") #permission number - rlAssertEquals "Check the permissons for $FILE" "$NUMBER" "$PERM" - done - rlRun "systemctl stop openhpid" - rlPhaseEnd - - rlPhaseStartCleanup - rlServiceRestore openhpid - rlFileRestore - rlRun "setenforce $SEL" - rlRun "systemctl daemon-reload" - rlPhaseEnd -rlJournalPrintText -rlJournalEnd diff --git a/tests/Sanity/bz1063367-openhpi-creates-world-writeable-directory/Makefile b/tests/Sanity/bz1063367-openhpi-creates-world-writeable-directory/Makefile deleted file mode 100644 index e3fa725..0000000 --- a/tests/Sanity/bz1063367-openhpi-creates-world-writeable-directory/Makefile +++ /dev/null @@ -1,65 +0,0 @@ -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# -# Makefile of /CoreOS/openhpi/Sanity/bz1063367-openhpi-creates-world-writeable-directory -# Description: Test for BZ#1063367 (openhpi creates world writeable directory) -# Author: Jan Scotka -# -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# -# Copyright (c) 2015 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. -# -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -export TEST=/CoreOS/openhpi/Sanity/bz1063367-openhpi-creates-world-writeable-directory -export TESTVERSION=1.0 - -BUILT_FILES= - -FILES=$(METADATA) runtest.sh Makefile PURPOSE - -.PHONY: all install download clean - -run: $(FILES) build - ./runtest.sh - -build: $(BUILT_FILES) - test -x runtest.sh || chmod a+x runtest.sh - -clean: - rm -f *~ $(BUILT_FILES) - - -include /usr/share/rhts/lib/rhts-make.include - -$(METADATA): Makefile - @echo "Owner: Jan Scotka " > $(METADATA) - @echo "Name: $(TEST)" >> $(METADATA) - @echo "TestVersion: $(TESTVERSION)" >> $(METADATA) - @echo "Path: $(TEST_DIR)" >> $(METADATA) - @echo "Description: Test for BZ#1063367 (openhpi creates world writeable directory)" >> $(METADATA) - @echo "Type: Sanity" >> $(METADATA) - @echo "TestTime: 10m" >> $(METADATA) - @echo "RunFor: openhpi" >> $(METADATA) - @echo "Requires: openhpi" >> $(METADATA) - @echo "Priority: Normal" >> $(METADATA) - @echo "License: GPLv2" >> $(METADATA) - @echo "Confidential: no" >> $(METADATA) - @echo "Destructive: no" >> $(METADATA) - @echo "Bug: 1063367" >> $(METADATA) - @echo "Releases: -RHEL4 -RHELClient5 -RHELServer5" >> $(METADATA) - - rhts-lint $(METADATA) diff --git a/tests/Sanity/bz1063367-openhpi-creates-world-writeable-directory/PURPOSE b/tests/Sanity/bz1063367-openhpi-creates-world-writeable-directory/PURPOSE deleted file mode 100644 index abd3a7a..0000000 --- a/tests/Sanity/bz1063367-openhpi-creates-world-writeable-directory/PURPOSE +++ /dev/null @@ -1,5 +0,0 @@ -PURPOSE of /CoreOS/openhpi/Sanity/bz1063367-openhpi-creates-world-writeable-directory -Description: Test for BZ#1063367 (openhpi creates world writeable directory) -Author: Jan Scotka -Bug summary: openhpi creates world writeable directory -Bugzilla link: https://bugzilla.redhat.com/show_bug.cgi?id=1063367 diff --git a/tests/Sanity/bz1063367-openhpi-creates-world-writeable-directory/runtest.sh b/tests/Sanity/bz1063367-openhpi-creates-world-writeable-directory/runtest.sh deleted file mode 100755 index dcdf3e4..0000000 --- a/tests/Sanity/bz1063367-openhpi-creates-world-writeable-directory/runtest.sh +++ /dev/null @@ -1,45 +0,0 @@ -#!/bin/bash -# vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# -# runtest.sh of /CoreOS/openhpi/Sanity/bz1063367-openhpi-creates-world-writeable-directory -# Description: Test for BZ#1063367 (openhpi creates world writeable directory) -# Author: Jan Scotka -# -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# -# Copyright (c) 2015 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. -# -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -# Include Beaker environment -. /usr/bin/rhts-environment.sh || exit 1 -. /usr/share/beakerlib/beakerlib.sh || exit 1 - -PACKAGE="openhpi" - -rlJournalStart - rlPhaseStartSetup - rlAssertRpm $PACKAGE - rlPhaseEnd - - rlPhaseStartTest - rlRun "ls /var/lib/openhpi -alhd | egrep '^drwxr-xr-t\.'" - rlPhaseEnd - -rlJournalPrintText -rlJournalEnd diff --git a/tests/Sanity/initscript/Makefile b/tests/Sanity/initscript/Makefile deleted file mode 100644 index 396689c..0000000 --- a/tests/Sanity/initscript/Makefile +++ /dev/null @@ -1,63 +0,0 @@ -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# -# Makefile of /CoreOS/openhpi/Sanity/initscript -# Description: Init script should meet LSB specifications -# Author: Yulia Kopkova -# -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# -# Copyright (c) 2009 Red Hat, Inc. All rights reserved. -# -# 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. -# -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -export TEST=/CoreOS/openhpi/Sanity/initscript -export TESTVERSION=1.1 - -BUILT_FILES= - -FILES=$(METADATA) runtest.sh Makefile PURPOSE - -.PHONY: all install download clean - -run: $(FILES) build - ./runtest.sh - -build: $(BUILT_FILES) - chmod a+x runtest.sh - -clean: - rm -f *~ $(BUILT_FILES) - - -include /usr/share/rhts/lib/rhts-make.include - -$(METADATA): Makefile - @echo "Owner: Petr Sklenar " > $(METADATA) - @echo "Name: $(TEST)" >> $(METADATA) - @echo "TestVersion: $(TESTVERSION)" >> $(METADATA) - @echo "Path: $(TEST_DIR)" >> $(METADATA) - @echo "Description: Init script should meet LSB specifications" >> $(METADATA) - @echo "Type: Sanity" >> $(METADATA) - @echo "TestTime: 5m" >> $(METADATA) - @echo "RunFor: openhpi" >> $(METADATA) - @echo "Requires: openhpi" >> $(METADATA) - @echo "Priority: Normal" >> $(METADATA) - @echo "License: GPLv2" >> $(METADATA) - @echo "Confidential: no" >> $(METADATA) - @echo "Destructive: no" >> $(METADATA) - @echo "Releases: RHEL6" >> $(METADATA) - rhts-lint $(METADATA) diff --git a/tests/Sanity/initscript/PURPOSE b/tests/Sanity/initscript/PURPOSE deleted file mode 100644 index b3d2062..0000000 --- a/tests/Sanity/initscript/PURPOSE +++ /dev/null @@ -1,3 +0,0 @@ -PURPOSE of /CoreOS/openhpi/Sanity/initscript -Description: Init script should meet LSB specifications -Author: Yulia Kopkova diff --git a/tests/Sanity/initscript/runtest.sh b/tests/Sanity/initscript/runtest.sh deleted file mode 100755 index 4e1b794..0000000 --- a/tests/Sanity/initscript/runtest.sh +++ /dev/null @@ -1,95 +0,0 @@ -#!/bin/bash -# vim: dict=/usr/share/rhts-library/dictionary.vim cpt=.,w,b,u,t,i,k -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# -# runtest.sh of /CoreOS/openhpi/Sanity/initscript -# Description: Init script should meet LSB specifications -# Author: Jan Scotka , Yulia Kopkova -# -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# -# Copyright (c) 2009 Red Hat, Inc. All rights reserved. -# -# 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. -# -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -# Include rhts environment -. /usr/bin/rhts-environment.sh -. /usr/share/rhts-library/rhtslib.sh - -PACKAGE="openhpi" - -SERVICE="openhpid" -SERVICE_CMD=systemctl - -rlJournalStart - - rlPhaseStartSetup - rlAssertRpm $PACKAGE - rlRun "useradd testuserqa" 0 "Add test user" - rlServiceStop $SERVICE - rlPhaseEnd - - rlPhaseStartTest - - rlLog ">>>>>>>>> service start" - rlRun "$SERVICE_CMD start $SERVICE" 0 " Service must start without problem" - rlRun "$SERVICE_CMD status $SERVICE" 0 " Then Status command " - rlRun "$SERVICE_CMD start $SERVICE" 0 " Already started service " - rlRun "$SERVICE_CMD status $SERVICE" 0 " Again status command " - - rlLog ">>>>>>>>> service restart" - rlRun "$SERVICE_CMD restart $SERVICE" 0 " Restarting of service" - rlRun "$SERVICE_CMD status $SERVICE" 0 " Status command " - - rlLog ">>>>>>>>> service stop" - rlRun "$SERVICE_CMD stop $SERVICE" 0 " Stopping service " - rlRun "$SERVICE_CMD status $SERVICE" 3 " Status of stopped service " - rlRun "$SERVICE_CMD stop $SERVICE" 0 " Stopping service again " - rlRun "$SERVICE_CMD status $SERVICE" 3 " Status of stopped service " - - rlLog ">>>>>>>>> pid file" - rlServiceStart $SERVICE - rlAssertExists "/var/run/$SERVICE.pid" "Pid file /var/run/$SERVICE.pid must exist" - rlRun "kill -9 `pidof $SERVICE`" 0 "Kill $SERVICE" - rlRun "$SERVICE_CMD status $SERVICE" 3 " Status of stopped service " - - rlLog ">>>>>>>>> lock file" - rlAssertNotExists "/var/lock/subsys/$SERVICE" "Lock file /var/lock/subsys/$SERVICE should not exist" - rlRun "$SERVICE_CMD status $SERVICE" 3 " Status of stopped service " - rlServiceStop $SERVICE - - rlLog ">>>>>>>>> insufficient rights" - rlRun "$SERVICE_CMD start $SERVICE" 0 " Starting service for restarting under nonpriv user " - rlRun "su testuserqa -c '$SERVICE_CMD restart $SERVICE'" 4 "Insufficient rights, restarting service under nonprivileged user must fail" - - rlLog ">>>>>>>>> operations" - rlRun "$SERVICE_CMD start $SERVICE" 0 " Service have to implement start function " - rlRun "$SERVICE_CMD restart $SERVICE" 0 " Service have to implement restart function " - rlRun "$SERVICE_CMD status $SERVICE" 0 " Service have to implement status function " - rlRun "$SERVICE_CMD condrestart $SERVICE" 0 " Service have to implement condrestart function " - rlRun "$SERVICE_CMD try-restart $SERVICE" 0 " Service have to implement try-restart function " - rlRun "$SERVICE_CMD force-reload $SERVICE" 0 " Service have to implement force-reload function " - - rlPhaseEnd - - rlPhaseStartCleanup - rlServiceRestore $SERVICE - rlRun "userdel -fr testuserqa" 0 "Remove test user" - rlPhaseEnd - -rlJournalPrintText -rlJournalEnd diff --git a/tests/Sanity/sanity-test-simulator-and-dynsimulator/Makefile b/tests/Sanity/sanity-test-simulator-and-dynsimulator/Makefile deleted file mode 100644 index ae68791..0000000 --- a/tests/Sanity/sanity-test-simulator-and-dynsimulator/Makefile +++ /dev/null @@ -1,64 +0,0 @@ -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# -# Makefile of /CoreOS/openhpi/Sanity/sanity-test-simulator-and-dynsimulator -# Description: It use 2 simulators and one dyn simulator config -# Author: Jan Scotka -# -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# -# Copyright (c) 2015 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. -# -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -export TEST=/CoreOS/openhpi/Sanity/sanity-test-simulator-and-dynsimulator -export TESTVERSION=1.0 - -BUILT_FILES= - -FILES=$(METADATA) runtest.sh Makefile PURPOSE - -.PHONY: all install download clean - -run: $(FILES) build - ./runtest.sh - -build: $(BUILT_FILES) - test -x runtest.sh || chmod a+x runtest.sh - -clean: - rm -f *~ $(BUILT_FILES) - - -include /usr/share/rhts/lib/rhts-make.include - -$(METADATA): Makefile - @echo "Owner: Jan Scotka " > $(METADATA) - @echo "Name: $(TEST)" >> $(METADATA) - @echo "TestVersion: $(TESTVERSION)" >> $(METADATA) - @echo "Path: $(TEST_DIR)" >> $(METADATA) - @echo "Description: It use 2 simulators and one dyn simulator config" >> $(METADATA) - @echo "Type: Sanity" >> $(METADATA) - @echo "TestTime: 10m" >> $(METADATA) - @echo "RunFor: openhpi" >> $(METADATA) - @echo "Requires: openhpi openhpi-libs" >> $(METADATA) - @echo "Priority: Normal" >> $(METADATA) - @echo "License: GPLv2" >> $(METADATA) - @echo "Confidential: no" >> $(METADATA) - @echo "Destructive: no" >> $(METADATA) - @echo "Releases: -RHEL4 -RHELClient5 -RHELServer5" >> $(METADATA) - - rhts-lint $(METADATA) diff --git a/tests/Sanity/sanity-test-simulator-and-dynsimulator/PURPOSE b/tests/Sanity/sanity-test-simulator-and-dynsimulator/PURPOSE deleted file mode 100644 index bef72a4..0000000 --- a/tests/Sanity/sanity-test-simulator-and-dynsimulator/PURPOSE +++ /dev/null @@ -1,3 +0,0 @@ -PURPOSE of /CoreOS/openhpi/Sanity/sanity-test-simulator-and-dynsimulator -Description: It use 2 simulators and one dyn simulator config -Author: Jan Scotka diff --git a/tests/Sanity/sanity-test-simulator-and-dynsimulator/runtest.sh b/tests/Sanity/sanity-test-simulator-and-dynsimulator/runtest.sh deleted file mode 100755 index 62fe561..0000000 --- a/tests/Sanity/sanity-test-simulator-and-dynsimulator/runtest.sh +++ /dev/null @@ -1,110 +0,0 @@ -#!/bin/bash -# vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# -# runtest.sh of /CoreOS/openhpi/Sanity/sanity-test-simulator-and-dynsimulator -# Description: It use 2 simulators and one dyn simulator config -# Author: Jan Scotka -# -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# -# Copyright (c) 2015 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. -# -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -# Include Beaker environment -. /usr/bin/rhts-environment.sh || exit 1 -. /usr/share/beakerlib/beakerlib.sh || exit 1 - -PACKAGE="openhpi" -CONFIG=""" -handler libsimulator { - entity_root = \"{SYSTEM_CHASSIS,3}\" - name = \"simulator\" -} - -handler libsimulator { - entity_root = \"{SYSTEM_CHASSIS,4}\" - name = \"simulator2\" -} -handler libdyn_simulator { - entity_root = \"{SYSTEM_CHASSIS,5}\" - file = \"/etc/openhpi/simulation.data\" - logflags = \"file stdout\" - logfile = \"/var/log/dynsim\" - logfile_max = \"5\" -} - -""" - -rlJournalStart - rlPhaseStartSetup - rlAssertRpm $PACKAGE - rlFileBackup /etc/openhpi/openhpi.conf - rlRun "echo '$CONFIG' > /etc/openhpi/openhpi.conf" - rlServiceStart openhpid -if rlIsRHEL 6; then - rlRun "service openhpid status" -else - rlRun "systemctl status -l openhpid" -fi - sleep 5 - rlPhaseEnd - - rlPhaseStartTest - - rlRun "hpialarms |grep Chassis" - rlRun "hpiel |egrep 'EventLogInfo for Chassis 3'" - rlRun "hpiel |egrep 'EventLogInfo for Chassis 4'" - rlRun "hpiinv |egrep -A 1 'SYSTEM_CHASSIS:4' |egrep 'Simulator HS DASD'" - rlRun "hpipower -d -b 3" - rlRun "hpitop | egrep -A 5 '{SYSTEM_CHASSIS,3}' |grep 'Planar CPU area temperature sensor'" - rlRun "hpiwdt | grep -A 3 'Chassis 3 has watchdog capability'" - rlRun "hpievents | egrep 'rptentry\[[0-9]+\] tag: Chassis 4'" - rlRun "hpionIBMblade |grep 'This program came with OpenHPI'" - hpisettime -d 02/02/2015 -t 24:15:50 -# it sometimes fail from some unknow reason - rlRun "timedatectl" #add according to failing ppc64 - rlRun "hpisettime -d 02/02/2015 -t 24:15:50 | egrep '.*2015-02-03 00:1'" - rlRun "echo -e 'rpt\n\nq' | hpithres |grep 'Chassis 4'" - -if rlIsRHEL ">6"; then - rlRun "hpidomain | grep 'Serving Daemon on Host:'" - rlRun "test `hpialarms |grep Chassis |wc -l` -eq 3" - rlRun "hpifan | egrep 'Entity Path.*5'" - rlRun "test `hpifan | egrep 'Entity Path.*[3-5]'|wc -l` -eq 3" - rlRun "hpipower -d -b 3 | grep 'Chassis 3 3 is already powered off'" - rlRun "hpipower -p -b 3 | grep 'Chassis 3 3 has been successfully powered on'" - rlRun "hpisensor | egrep -A 5 '{SYSTEM_CHASSIS,5}{FAN,1}' |grep 'Fan Analog Control'" - rlRun "hpigensimdata |egrep -A 4 'Chassis 4' |egrep 'SENSOR'" - rlRun "test 5000 -lt `hpigensimdata |wc -l`" - rlRun "hpireset -r -D 0 | egrep 'Chassis 4'" - rlRun "hpitree |egrep '{SYSTEM_CHASSIS,5}{FAN,1}' | grep 'Blower fan speed'" - rlRun "hpixml |egrep '{SYSTEM_CHASSIS,5}{FAN,1}' |egrep '.*'" - rlRun "timedatectl" #add according to failing ppc64 - rlRun "hpisettime -d 02/02/2015 -t 24:15:50 | egrep -A 2 'Current event' | egrep 'Read-Back-Check.*2015-02-03 00:15:50'" - -fi - - rlPhaseEnd - - rlPhaseStartCleanup - # rlFileRestore - rlServiceRestore openhpid - rlPhaseEnd -rlJournalPrintText -rlJournalEnd diff --git a/tests/Sanity/testsuite/Makefile b/tests/Sanity/testsuite/Makefile deleted file mode 100644 index 2894b2a..0000000 --- a/tests/Sanity/testsuite/Makefile +++ /dev/null @@ -1,64 +0,0 @@ -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# -# Makefile of /CoreOS/openhpi/Sanity/testsuite -# Description: Running openhpi testsuite -# Author: Radka Skvarilova -# -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# -# Copyright (c) 2017 Red Hat, Inc. -# -# This program is free software: you can redistribute it and/or -# modify it under the terms of the GNU General Public License as -# published by the Free Software Foundation, either version 2 of -# the License, or (at your option) any later version. -# -# 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, see http://www.gnu.org/licenses/. -# -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -export TEST=/CoreOS/openhpi/Sanity/testsuite -export TESTVERSION=1.0 - -BUILT_FILES= - -FILES=$(METADATA) runtest.sh Makefile PURPOSE - -.PHONY: all install download clean - -run: $(FILES) build - ./runtest.sh - -build: $(BUILT_FILES) - test -x runtest.sh || chmod a+x runtest.sh - -clean: - rm -f *~ $(BUILT_FILES) - - -include /usr/share/rhts/lib/rhts-make.include - -$(METADATA): Makefile - @echo "Owner: Radka Skvarilova " > $(METADATA) - @echo "Name: $(TEST)" >> $(METADATA) - @echo "TestVersion: $(TESTVERSION)" >> $(METADATA) - @echo "Path: $(TEST_DIR)" >> $(METADATA) - @echo "Description: Running openhpi testsuite" >> $(METADATA) - @echo "Type: Sanity" >> $(METADATA) - @echo "TestTime: 30m" >> $(METADATA) - @echo "RunFor: openhpi" >> $(METADATA) - @echo "Requires: openhpi audit-libs-devel autoconf automake coreutils gettext-devel libselinux-devel libutempter-devel ncurses-devel pam-devel popt-devel rpm-build systemd-devel texinfo util-linux zlib-devel yum-utils" >> $(METADATA) - @echo "Priority: Normal" >> $(METADATA) - @echo "License: GPLv2+" >> $(METADATA) - @echo "Confidential: no" >> $(METADATA) - @echo "Destructive: no" >> $(METADATA) - @echo "Bug: 1267928" >> $(METADATA) - @echo "Releases: -RHEL4 -RHEL6 -RHELClient5 -RHELServer5" >> $(METADATA) - - rhts-lint $(METADATA) diff --git a/tests/Sanity/testsuite/PURPOSE b/tests/Sanity/testsuite/PURPOSE deleted file mode 100644 index af170e7..0000000 --- a/tests/Sanity/testsuite/PURPOSE +++ /dev/null @@ -1,3 +0,0 @@ -PURPOSE of /CoreOS/openhpi/Sanity/testsuite -Description: Running openhpi testsuite -Author: Radka Skvarilova diff --git a/tests/Sanity/testsuite/runtest.sh b/tests/Sanity/testsuite/runtest.sh deleted file mode 100755 index 05ebbcc..0000000 --- a/tests/Sanity/testsuite/runtest.sh +++ /dev/null @@ -1,65 +0,0 @@ -#!/bin/bash -# vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# -# runtest.sh of /CoreOS/openhpi/Sanity/testsuite -# Description: Running openhpi testsuite -# Author: Radka Skvarilova -# -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# -# Copyright (c) 2017 Red Hat, Inc. -# -# This program is free software: you can redistribute it and/or -# modify it under the terms of the GNU General Public License as -# published by the Free Software Foundation, either version 2 of -# the License, or (at your option) any later version. -# -# 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, see http://www.gnu.org/licenses/. -# -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -# Include Beaker environment -. /usr/bin/rhts-environment.sh || exit 1 -. /usr/share/beakerlib/beakerlib.sh || exit 1 - -PACKAGE="openhpi" -YUM=dnf -if rlIsRHEL '<8' ; then - YUM=yum -fi -if rlIsRHEL 8 ; then - RHEL8_OPTION="--enablerepo rhel-CRB-latest" -fi - -rlJournalStart - rlPhaseStartSetup - rlAssertRpm $PACKAGE - rlRun "TmpDir=\$(mktemp -d)" 0 "Creating tmp directory" - rlRun "pushd $TmpDir" - rlFetchSrcForInstalled $PACKAGE - rlRun "$YUM -y groupinstall 'Development Tools'" - rlRun "yum-builddep $RHEL8_OPTION -y *src.rpm" - rlLogInfo "Sources fetched: `ls *src.rpm`" - rlRun "rpm -q `basename *src.rpm .src.rpm`" 0 "Querying whether the sources fetched match the installed package" - rlRun "rpmbuild --recompile *src.rpm" 0 "Recompiling the sources" - rlPhaseEnd - - rlPhaseStartTest - rlRun "pushd /root/rpmbuild/BUILD/openhpi-*/" - rlRun "make check" 0 "Compile and run the tests" - rlRun "popd" - rlPhaseEnd - - rlPhaseStartCleanup - rlRun "popd" - rlRun "rm -r $TmpDir" 0 "Removing tmp directory" - rlPhaseEnd -rlJournalPrintText -rlJournalEnd diff --git a/tests/hpipower-segfault/Makefile b/tests/hpipower-segfault/Makefile deleted file mode 100644 index b77cf0e..0000000 --- a/tests/hpipower-segfault/Makefile +++ /dev/null @@ -1,67 +0,0 @@ -# Copyright (c) 2006 Red Hat, Inc. All rights reserved. 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 v.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. -# -# Author: Radek Biba - -# The toplevel namespace within which the test lives. -TOPLEVEL_NAMESPACE=/CoreOS - -# The name of the package under test: -PACKAGE_NAME=openhpi - -# The path of the test below the package: -RELATIVE_PATH=hpipower-segfault - -# Version of the Test. Used with make tag. -export TESTVERSION=1.0 - -# The compiled namespace of the test. -export TEST=$(TOPLEVEL_NAMESPACE)/$(PACKAGE_NAME)/$(RELATIVE_PATH) - -.PHONY: all install download clean - -BUILT_FILES=# executables to be built should be added here, they will be generated on the system under test. - - -FILES=$(METADATA) runtest.sh Makefile - - -run: $(FILES) build - ./runtest.sh - -build: $(BUILT_FILES) - chmod a+x ./runtest.sh - -clean: - rm -f *~ $(BUILT_FILES) - -# Include Common Makefile -include /usr/share/rhts/lib/rhts-make.include - -# Generate the testinfo.desc here: -$(METADATA): Makefile - @touch $(METADATA) - @echo "Owner: Radek Biba " > $(METADATA) - @echo "Name: $(TEST)" >> $(METADATA) - @echo "Path: $(TEST_DIR)" >> $(METADATA) - @echo "TestVersion: $(TESTVERSION)" >> $(METADATA) - @echo "Description: Check if hpipower doesn't segfault">> $(METADATA) - @echo "Bug: 247643" >> $(METADATA) - @echo "Confidential: no" >> $(METADATA) - @echo "TestTime: 5m" >> $(METADATA) - @echo "RunFor: $(PACKAGE_NAME) " >> $(METADATA) # add any other packages for which your test ought to run here - @echo "Requires: $(PACKAGE_NAME) " >> $(METADATA) # add any other requirements for the script to run here - @echo "Priority: Normal" >> $(METADATA) - @echo "Type: Regression" >> $(METADATA) - @echo "License: GPLv2" >> $(METADATA) - rhts-lint $(METADATA) diff --git a/tests/hpipower-segfault/PURPOSE b/tests/hpipower-segfault/PURPOSE deleted file mode 100644 index a79f747..0000000 --- a/tests/hpipower-segfault/PURPOSE +++ /dev/null @@ -1,5 +0,0 @@ -A regression test for bug 247643: - openhpi-2.8.1-2.el5.4: segfault in hpipower utility - -Previously, hpipower would segfault if a user specified an invalid -blade index. diff --git a/tests/hpipower-segfault/runtest.sh b/tests/hpipower-segfault/runtest.sh deleted file mode 100755 index 4519e7f..0000000 --- a/tests/hpipower-segfault/runtest.sh +++ /dev/null @@ -1,54 +0,0 @@ -#!/bin/sh - -# Copyright (c) 2006 Red Hat, Inc. All rights reserved. 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 v.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. -# -# Author: Radek Biba - -. /usr/bin/rhts-environment.sh - -exec 5>&1 6>&2 -exec >> ${OUTPUTFILE} 2>&1 - -result=FAIL - -# Check if openhpid is already running -service openhpid status &> /dev/null && hpi_was_on=1 || hpi_was_on=0 - -# If not, start the openhpi daemon and a wait a few seconds -if [ $hpi_was_on -eq 0 ]; then - service openhpid start - sleep 5 -fi - -# Run hpipower with an index that surely doesn't exist, -# there's no apparent way to find the first unused index. -# Number 3 means displaying status. -# The wrong version will segfault here. - -echo 3 | hpipower -b 9 - -if [ $? -eq 255 ]; then - echo - echo 'Success' - result=PASS -fi - - -# Stop the daemon unless it was running before the test -if [ $hpi_was_on -eq 0 ]; then - service openhpid stop -fi - -exec 1>&5 2>&6 -report_result $TEST $result diff --git a/tests/tests.yml b/tests/tests.yml deleted file mode 100644 index f09ae13..0000000 --- a/tests/tests.yml +++ /dev/null @@ -1,14 +0,0 @@ ---- -# Run tests in all contexts -- hosts: localhost - tags: - - classic - roles: - - role: standard-test-beakerlib - tests: - - hpipower-segfault - - Regression - - Sanity - required_packages: - - openhpi - - man-db