diff --git a/.fmf/version b/.fmf/version new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/.fmf/version @@ -0,0 +1 @@ +1 diff --git a/ci.fmf b/ci.fmf new file mode 100644 index 0000000..c5aa0e0 --- /dev/null +++ b/ci.fmf @@ -0,0 +1 @@ +resultsdb-testcase: separate diff --git a/gating.yaml b/gating.yaml index c190bde..4a9e6be 100644 --- a/gating.yaml +++ b/gating.yaml @@ -3,4 +3,5 @@ product_versions: - rhel-9 decision_context: osci_compose_gate rules: - - !PassingTestCaseRule {test_case_name: baseos-ci.brew-build.tier1.functional} + - !PassingTestCaseRule {test_case_name: osci.brew-build./plans/tier1-internal/coreutils-multi.functional} + - !PassingTestCaseRule {test_case_name: osci.brew-build./plans/tier1-internal/coreutils-single.functional} diff --git a/plans/tier1-internal.fmf b/plans/tier1-internal.fmf new file mode 100644 index 0000000..5927075 --- /dev/null +++ b/plans/tier1-internal.fmf @@ -0,0 +1,23 @@ +discover: + how: fmf + filter: 'tag: CI-Tier-1' + url: https://pkgs.devel.redhat.com/git/tests/coreutils +execute: + how: tmt +adjust: + enabled: false + when: distro == centos-stream or distro == fedora + +/coreutils-multi: + summary: Internal Tier1 tests plan - coreutils + prepare: + how: install + exclude: + - coreutils-single + +/coreutils-single: + summary: Internal Tier1 tests plan - coreutils-single + prepare: + how: install + exclude: + - coreutils diff --git a/tests/readlink-cannot-handle-recursive-symlinks/Makefile b/tests/readlink-cannot-handle-recursive-symlinks/Makefile deleted file mode 100644 index 49d37a7..0000000 --- a/tests/readlink-cannot-handle-recursive-symlinks/Makefile +++ /dev/null @@ -1,63 +0,0 @@ -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# -# Makefile of /CoreOS/coreutils/readlink-cannot-handle-recursive-symlink s -# Description: Test for readlink cannot handle recursive symlinks -# Author: Jan Scotka -# -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# -# Copyright (c) 2010 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/coreutils/readlink-cannot-handle-recursive-symlinks -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) - 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 readlink cannot handle recursive symlinks" >> $(METADATA) - @echo "Type: Sanity" >> $(METADATA) - @echo "TestTime: 5m" >> $(METADATA) - @echo "RunFor: coreutils" >> $(METADATA) - @echo "Requires: coreutils" >> $(METADATA) - @echo "Priority: Normal" >> $(METADATA) - @echo "License: GPLv2" >> $(METADATA) - @echo "Confidential: no" >> $(METADATA) - @echo "Destructive: no" >> $(METADATA) - - rhts-lint $(METADATA) diff --git a/tests/readlink-cannot-handle-recursive-symlinks/PURPOSE b/tests/readlink-cannot-handle-recursive-symlinks/PURPOSE deleted file mode 100644 index b9fd740..0000000 --- a/tests/readlink-cannot-handle-recursive-symlinks/PURPOSE +++ /dev/null @@ -1,54 +0,0 @@ -PURPOSE of /CoreOS/coreutils/readlink-cannot-handle-recursive-symlinks -Description: Test for readlink cannot handle recursive symlinks -Author: Jan Scotka -Bug summary: readlink cannot handle recursive symlinks - -Description: - -Description of problem: -The readlink command fails with an error "Too many levels of symbolic links", even if there are only 2 levels. - -The readlink command from RHEL 3 and RHEL 4 and from Fedora 11 all work fine. - -Among other changes between RHEL 4 and RHEL 5, RHEL 5's coreutils added calls to cycle_check() in lib/canonicalize.c, but in upstream canonicalize.c (now in gnulib instead of coreutils), we see the comment: - /* Detect loops. We cannot use the cycle-check module here, - since it's actually possible to encounter the same symlink - more than once in a given traversal. However, encountering - the same symlink,NAME pair twice does indicate a loop. */ - -http://git.savannah.gnu.org/gitweb/?p=gnulib.git;a=blob;f=lib/canonicalize.c;h=4f348398fd69ae516396313d18ac294a4ca3dde3;hb=b653eda3ac4864de205419d9f41eec267cb89eeb#l262 - -The latest canonicalize.c uses seen_triple() instead of cycle_check(). - - -Version-Release number of selected component (if applicable): -coreutils-5.97-19.el5 - -How reproducible: -every time - -Steps to Reproduce: -1. Create a directory with a symlink to itself - mkdir /tmp/dir - cd /tmp/dir - ln -s ../dir dirlink - -2. Run readlink using the 'dirlink' symlink recursively - readlink -v -f dirlink - readlink -v -f dirlink/dirlink - readlink -v -f dirlink/dirlink/dirlink - -Actual results: -The first readlink command on just dirlink succeeds, but the 2nd and 3rd commands fail with - readlink: dirlink/dirlink: Too many levels of symbolic links - -Expected results: -$ readlink -v -f dirlink -/tmp/dir -$ readlink -v -f dirlink/dirlink -/tmp/dir -$ readlink -v -f dirlink/dirlink/dirlink -/tmp/dir - - -Additional info: diff --git a/tests/readlink-cannot-handle-recursive-symlinks/runtest.sh b/tests/readlink-cannot-handle-recursive-symlinks/runtest.sh deleted file mode 100755 index 6ee251f..0000000 --- a/tests/readlink-cannot-handle-recursive-symlinks/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/coreutils/readlink-cannot-handle-recursive-symlinks -# Description: Test for readlink cannot handle recursive symlinks -# Author: Jan Scotka -# -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# -# Copyright (c) 2010 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/lib/beakerlib/beakerlib.sh - -PACKAGE="coreutils" - -rlJournalStart - rlPhaseStartSetup - rlAssertRpm $PACKAGE - rlRun "TmpDir=\`mktemp -d\`" 0 "Creating tmp directory" - rlRun "pushd $TmpDir" - rlRun "mkdir link" 0 "Creating test directory" - rlRun "cd link" 0 "cd to this dir" - rlRun "ln -s ../link link" 0 "creating symlink to ../link -> link" - rlPhaseEnd - - rlPhaseStartTest - rlLog "Test of readlink up to 20 iteration" - export TMPVAR="link" - for foo in `seq 20` - do echo $TMPVAR - rlRun "readlink -v -f $TMPVAR" 0 "readlink of $TMPVAR" - TMPVAR="$TMPVAR/link" - done - rlPhaseEnd - - rlPhaseStartCleanup - rlRun "popd" - rlRun "rm -r $TmpDir" 0 "Removing tmp directory" - rlPhaseEnd -rlJournalPrintText -rlJournalEnd diff --git a/tests/test-basics b/tests/test-basics deleted file mode 100755 index 7324553..0000000 --- a/tests/test-basics +++ /dev/null @@ -1,39 +0,0 @@ -#!/bin/sh - -# Checks that touch ls rm and foo work -# https://www.mankier.com/1/beakerlib#Examples -. /usr/share/beakerlib/beakerlib.sh - -# Set the full test name -TEST="/examples/beakerlib/Sanity/phases" - -# Package being tested -PACKAGE="coreutils" - -rlJournalStart - # Setup phase: Prepare test directory - rlPhaseStartSetup - rlAssertRpm $PACKAGE - rlRun 'TmpDir=$(mktemp -d)' 0 'Creating tmp directory' # no-reboot - rlRun "pushd $TmpDir" - rlPhaseEnd - - # Test phase: Testing touch, ls and rm commands - rlPhaseStartTest - rlRun "touch foo" 0 "Creating the foo test file" - rlAssertExists "foo" - rlRun "ls -l foo" 0 "Listing the foo test file" - rlRun "rm foo" 0 "Removing the foo test file" - rlAssertNotExists "foo" - rlRun "ls -l foo" 2 "Listing foo should now report an error" - rlPhaseEnd - - # Cleanup phase: Remove test directory - rlPhaseStartCleanup - rlRun "popd" - rlRun "rm -r $TmpDir" 0 "Removing tmp directory" - rlPhaseEnd -rlJournalEnd - -# Print the test report -rlJournalPrintText diff --git a/tests/test_basics.yml b/tests/test_basics.yml deleted file mode 100644 index d5727cf..0000000 --- a/tests/test_basics.yml +++ /dev/null @@ -1,9 +0,0 @@ ---- -# This first play always runs on the local staging system -- hosts: localhost - tags: - - atomic - - classic - - container - roles: - - { role: standard-test-beakerlib, tests: [ test-basics, readlink-cannot-handle-recursive-symlinks ] } diff --git a/tests/tests.yml b/tests/tests.yml deleted file mode 100644 index 529263d..0000000 --- a/tests/tests.yml +++ /dev/null @@ -1,2 +0,0 @@ -# Fedora Continuous Integration: https://fedoraproject.org/wiki/CI -- include: test_basics.yml