diff --git a/.fmf/version b/.fmf/version deleted file mode 100644 index d00491f..0000000 --- a/.fmf/version +++ /dev/null @@ -1 +0,0 @@ -1 diff --git a/kmod.spec b/kmod.spec index 8d0b67b..ce3b8be 100644 --- a/kmod.spec +++ b/kmod.spec @@ -16,7 +16,7 @@ Name: kmod Version: 34.2 -Release: 3%{?dist} +Release: 2%{?dist} Summary: Linux kernel module management utilities # https://docs.fedoraproject.org/en-US/legal/license-field/#_no_effective_license_analysis @@ -199,10 +199,6 @@ install -m 0644 %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/depmod.d/dist.conf %{_libdir}/libkmod.so %changelog -* Wed Aug 13 2025 Zamir SUN - 34.2-3 -- Rebuild to switch gating to TMT. -- Resolves: rhbz#2382934 - * Thu Jul 24 2025 Fedora Release Engineering - 34.2-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild diff --git a/tests/libkmod/Makefile b/tests/libkmod/Makefile new file mode 100644 index 0000000..cc53a81 --- /dev/null +++ b/tests/libkmod/Makefile @@ -0,0 +1,46 @@ +# SPDX-License-Identifier: LGPL-2.1+ +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# +# Makefile of /CoreOS/libkmod +# Description: Test if libkmod working ok +# Author: Susant Sahani +# +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +export TEST=/CoreOS/libkmod +export TESTVERSION=1.0 + +OBJS = test-libkmod.c +CFLAG = -Wall -g3 +CC = gcc +LIBS = -lkmod -lcmocka + +test-libkmod:${OBJ} + ${CC} ${CFLAGS} ${INCLUDES} -o $@ ${OBJS} ${LIBS} + +run: test-libkmod + ./runtest.sh +clean: + -rm -f test-libkmod + +.c.o: + ${CC} ${CFLAGS} ${INCLUDES} -c $< + +CC = gcc + +include /usr/share/rhts/lib/rhts-make.include +$(METADATA): Makefile + @echo "Owner: Susant Sahani" > $(METADATA) + @echo "Name: $(TEST)" >> $(METADATA) + @echo "TestVersion: $(TESTVERSION)" >> $(METADATA) + @echo "Path: $(TEST_DIR)" >> $(METADATA) + @echo "Description: Test libkmod works ok" >> $(METADATA) + @echo "Type: Sanity" >> $(METADATA) + @echo "TestTime: 5m" >> $(METADATA) + @echo "RunFor: libkmod" >> $(METADATA) + @echo "Requires: libkmod libkmod-devel" >> $(METADATA) + @echo "Priority: Normal" >> $(METADATA) + @echo "License: GPLv2" >> $(METADATA) + @echo "Confidential: no" >> $(METADATA) + @echo "Destructive: no" >> $(METADATA) + @echo "Releases: -Fedora 29" >> $(METADATA) + rhts-lint $(METADATA) diff --git a/tests/libkmod/libkmod.fmf b/tests/libkmod/libkmod.fmf deleted file mode 100644 index 8733518..0000000 --- a/tests/libkmod/libkmod.fmf +++ /dev/null @@ -1,3 +0,0 @@ -test: bash ./runtest.sh -framework: beakerlib -duration: 15m diff --git a/tests/libkmod/metadata b/tests/libkmod/metadata deleted file mode 100644 index 455987a..0000000 --- a/tests/libkmod/metadata +++ /dev/null @@ -1,14 +0,0 @@ -[General] -name=libkmod gating test -owner=Susant Sahani -description=libkmod gating test -license=GPLv2 -confidential=no -destructive=no - -[restraint] -entry_point=./runtest.sh -max_time=15m -use_pty=false -dependencies=gcc,make,libcmocka-devel,kmod-devel - diff --git a/tests/libkmod/runtest.sh b/tests/libkmod/runtest.sh index d86b2e2..1ef013c 100755 --- a/tests/libkmod/runtest.sh +++ b/tests/libkmod/runtest.sh @@ -18,7 +18,6 @@ rlJournalStart rlPhaseStartSetup rlAssertRpm $PACKAGE rlAssertExists "$IPIP" - rlRun "gcc -o test-libkmod test-libkmod.c -lkmod -lcmocka" rlRun "cp test-libkmod /usr/bin/" rlPhaseEnd diff --git a/tests/plan.fmf b/tests/plan.fmf deleted file mode 100644 index 160239c..0000000 --- a/tests/plan.fmf +++ /dev/null @@ -1,10 +0,0 @@ -prepare: - how: install - package: - - libcmocka-devel - - make - - gcc -discover: - how: fmf -execute: - how: tmt diff --git a/tests/sanity/Makefile b/tests/sanity/Makefile new file mode 100644 index 0000000..e422f7f --- /dev/null +++ b/tests/sanity/Makefile @@ -0,0 +1,79 @@ +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# +# Makefile of general/kmod/sanity +# Description: kmod test +# +# 2016-07-31 +# Author: Chunyu Hu +# +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# +# Copyright (c) 2016 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) _env runtest.sh Makefile PURPOSE lib.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: Chunyu Hu " > $(METADATA) + @echo "Name: $(TEST)" >> $(METADATA) + @echo "TestVersion: $(TESTVERSION)" >> $(METADATA) + @echo "Path: $(TEST_DIR)" >> $(METADATA) + @echo "Description: kmod kernel module check from kernel modules tools">> $(METADATA) + @echo "Type: Regression" >> $(METADATA) + @echo "TestTime: 1h" >> $(METADATA) + @echo "RunFor: kernel" >> $(METADATA) + @echo "Requires: kernel" >> $(METADATA) + @echo "Requires: sysstat perf trace-cmd" >> $(METADATA) + @echo "Requires: $(PACKAGE_NAME) python rpm wget" >> $(METADATA) + @echo "Priority: Normal" >> $(METADATA) + @echo "License: GPLv2" >> $(METADATA) + @echo "Confidential: no" >> $(METADATA) + @echo "Destructive: no" >> $(METADATA) + rhts-lint $(METADATA) diff --git a/tests/sanity/metadata b/tests/sanity/metadata deleted file mode 100644 index 6c68b4b..0000000 --- a/tests/sanity/metadata +++ /dev/null @@ -1,12 +0,0 @@ -[General] -name=kmod gating test -owner=Ziqian SUN -description=kmod gating test -license=GPLv2 -confidential=no -destructive=no - -[restraint] -entry_point=./runtest.sh -max_time=15m -use_pty=false diff --git a/tests/sanity/sanity.fmf b/tests/sanity/sanity.fmf deleted file mode 100644 index 8733518..0000000 --- a/tests/sanity/sanity.fmf +++ /dev/null @@ -1,3 +0,0 @@ -test: bash ./runtest.sh -framework: beakerlib -duration: 15m diff --git a/tests/tests.yml b/tests/tests.yml new file mode 100644 index 0000000..828a27a --- /dev/null +++ b/tests/tests.yml @@ -0,0 +1,18 @@ +- hosts: localhost + tags: + - classic + roles: + - role: standard-test-beakerlib + tests: + - sanity + - libkmod + required_packages: + - kernel + - perf + - sysstat + - trace-cmd + - kmod + - kmod-devel + - gcc + - libcmocka + - libcmocka-devel