From 2b08fa654c6d8785a63157d09f199ff4db7fc893 Mon Sep 17 00:00:00 2001 From: Frantisek Sumsal Date: Fri, 11 Oct 2024 14:35:28 +0200 Subject: [PATCH] Add gating configuration for C10S/RHEL10 STI tests are deprecated and we have all the test cases (and more) in the internal repo, so use that instead. --- .fmf/version | 1 + ci.fmf | 2 + gating.yaml | 4 +- plans.fmf | 12 ++++ tests/awk-assign-syntax-support/Makefile | 62 ------------------ tests/awk-assign-syntax-support/PURPOSE | 3 - tests/awk-assign-syntax-support/runtest.sh | 59 ----------------- .../Makefile | 63 ------------------- .../PURPOSE | 4 -- .../runtest.sh | 60 ------------------ tests/awk-syntax-support/Makefile | 62 ------------------ tests/awk-syntax-support/PURPOSE | 3 - tests/awk-syntax-support/runtest.sh | 59 ----------------- tests/double-free-or-corruption/Makefile | 63 ------------------- tests/double-free-or-corruption/PURPOSE | 4 -- tests/double-free-or-corruption/reproducer.sh | 8 --- tests/double-free-or-corruption/runtest.sh | 55 ---------------- .../Makefile | 63 ------------------- .../PURPOSE | 3 - .../runtest.sh | 53 ---------------- .../Makefile | 63 ------------------- .../PURPOSE | 32 ---------- .../runtest.sh | 49 --------------- tests/tests.yml | 19 ------ 24 files changed, 17 insertions(+), 789 deletions(-) create mode 100644 .fmf/version create mode 100644 ci.fmf create mode 100644 plans.fmf delete mode 100644 tests/awk-assign-syntax-support/Makefile delete mode 100644 tests/awk-assign-syntax-support/PURPOSE delete mode 100755 tests/awk-assign-syntax-support/runtest.sh delete mode 100644 tests/awk-matches-lowercase-when-searching-for-uppercase/Makefile delete mode 100644 tests/awk-matches-lowercase-when-searching-for-uppercase/PURPOSE delete mode 100755 tests/awk-matches-lowercase-when-searching-for-uppercase/runtest.sh delete mode 100644 tests/awk-syntax-support/Makefile delete mode 100644 tests/awk-syntax-support/PURPOSE delete mode 100755 tests/awk-syntax-support/runtest.sh delete mode 100644 tests/double-free-or-corruption/Makefile delete mode 100644 tests/double-free-or-corruption/PURPOSE delete mode 100755 tests/double-free-or-corruption/reproducer.sh delete mode 100755 tests/double-free-or-corruption/runtest.sh delete mode 100644 tests/gawk-3-1-7-modifies-command-line-arguments/Makefile delete mode 100644 tests/gawk-3-1-7-modifies-command-line-arguments/PURPOSE delete mode 100755 tests/gawk-3-1-7-modifies-command-line-arguments/runtest.sh delete mode 100644 tests/printf-format-s-in-gawk-not-working/Makefile delete mode 100644 tests/printf-format-s-in-gawk-not-working/PURPOSE delete mode 100755 tests/printf-format-s-in-gawk-not-working/runtest.sh delete mode 100644 tests/tests.yml 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..da71d9f --- /dev/null +++ b/ci.fmf @@ -0,0 +1,2 @@ +# Docs: https://docs.fedoraproject.org/en-US/ci/tmt/#_multiple_plans +resultsdb-testcase: separate diff --git a/gating.yaml b/gating.yaml index 4ca9235..ea3831d 100644 --- a/gating.yaml +++ b/gating.yaml @@ -1,6 +1,6 @@ --- !Policy product_versions: - - rhel-10 + - rhel-* decision_context: osci_compose_gate rules: - - !PassingTestCaseRule {test_case_name: osci.brew-build.tier0.functional} + - !PassingTestCaseRule {test_case_name: osci.brew-build./plans/tier1-internal.functional} diff --git a/plans.fmf b/plans.fmf new file mode 100644 index 0000000..9d4eae3 --- /dev/null +++ b/plans.fmf @@ -0,0 +1,12 @@ +/tier1-internal: + discover: + how: fmf + url: https://gitlab.com/redhat/rhel/tests/gawk.git + prepare: + how: shell + script: dnf config-manager --set-enabled rhel-CRB + execute: + how: tmt + adjust: + enabled: false + when: distro == centos-stream or distro == fedora diff --git a/tests/awk-assign-syntax-support/Makefile b/tests/awk-assign-syntax-support/Makefile deleted file mode 100644 index 9fc5b0f..0000000 --- a/tests/awk-assign-syntax-support/Makefile +++ /dev/null @@ -1,62 +0,0 @@ -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# -# Makefile of /CoreOS/gawk/Regression/awk-assign-syntax-support -# Description: tests awk assign syntax support -# Author: Michal Nowak -# -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# -# Copyright (c) 2010 Red Hat, Inc. All rights reserved. -# -# 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 3 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/gawk/Regression/awk-assign-syntax-support -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: David Kutalek " > $(METADATA) - @echo "Name: $(TEST)" >> $(METADATA) - @echo "TestVersion: $(TESTVERSION)" >> $(METADATA) - @echo "Path: $(TEST_DIR)" >> $(METADATA) - @echo "Description: tests awk assign syntax support" >> $(METADATA) - @echo "Type: Regression" >> $(METADATA) - @echo "TestTime: 5m" >> $(METADATA) - @echo "RunFor: gawk" >> $(METADATA) - @echo "Requires: gawk" >> $(METADATA) - @echo "Priority: Normal" >> $(METADATA) - @echo "License: GPLv3" >> $(METADATA) - @echo "Confidential: no" >> $(METADATA) - @echo "Destructive: no" >> $(METADATA) - - rhts-lint $(METADATA) diff --git a/tests/awk-assign-syntax-support/PURPOSE b/tests/awk-assign-syntax-support/PURPOSE deleted file mode 100644 index da401b8..0000000 --- a/tests/awk-assign-syntax-support/PURPOSE +++ /dev/null @@ -1,3 +0,0 @@ -PURPOSE of /CoreOS/gawk/Regression/awk-assign-syntax-support -Description: tests awk assign syntax support -Author: Michal Nowak diff --git a/tests/awk-assign-syntax-support/runtest.sh b/tests/awk-assign-syntax-support/runtest.sh deleted file mode 100755 index 04fdd60..0000000 --- a/tests/awk-assign-syntax-support/runtest.sh +++ /dev/null @@ -1,59 +0,0 @@ -#!/bin/bash -# vim: dict=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# -# runtest.sh of /CoreOS/gawk/Regression/awk-assign-syntax-support -# Description: tests awk assign syntax support -# Author: Michal Nowak -# -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# -# Copyright (c) 2010 Red Hat, Inc. All rights reserved. -# -# 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 3 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 rhts environment -. /usr/bin/rhts-environment.sh -. /usr/lib/beakerlib/beakerlib.sh - -PACKAGE="gawk" - -rlJournalStart - rlPhaseStartSetup - rlAssertRpm $PACKAGE - rlRun "TmpDir=\`mktemp -d\`" 0 "Creating tmp directory" - rlRun "pushd $TmpDir" - echo "0 1 2" > file - cat << "EOF" > prog -{ - y = $1 !~ /Get/ ~ /1/ - z = $2 ~ /a/ !~ /[0-9]/ - print y z -} -EOF - rlPhaseEnd - - rlPhaseStartTest - rlRun "awk -f prog file > awk.stdout" 0 "Process data with awk program" - rlAssertEquals "awk processed program according to POSIX" "10" "$(cat awk.stdout)" - rlPhaseEnd - - rlPhaseStartCleanup - rlRun "popd" - rlRun "rm -r $TmpDir" 0 "Removing tmp directory" - rlPhaseEnd -rlJournalPrintText -rlJournalEnd diff --git a/tests/awk-matches-lowercase-when-searching-for-uppercase/Makefile b/tests/awk-matches-lowercase-when-searching-for-uppercase/Makefile deleted file mode 100644 index 61120e2..0000000 --- a/tests/awk-matches-lowercase-when-searching-for-uppercase/Makefile +++ /dev/null @@ -1,63 +0,0 @@ -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# -# Makefile of /CoreOS/gawk/Regression/awk-matches-lowercase-when-searching-for-uppercase -# Description: Test for awk matches lowercase when searching for uppercase -# Author: Filip Holec -# -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# -# Copyright (c) 2015 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/gawk/Regression/awk-matches-lowercase-when-searching-for-uppercase -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: Filip Holec " > $(METADATA) - @echo "Name: $(TEST)" >> $(METADATA) - @echo "TestVersion: $(TESTVERSION)" >> $(METADATA) - @echo "Path: $(TEST_DIR)" >> $(METADATA) - @echo "Description: Test for awk matches lowercase when searching for uppercase" >> $(METADATA) - @echo "Type: Regression" >> $(METADATA) - @echo "TestTime: 5m" >> $(METADATA) - @echo "RunFor: gawk" >> $(METADATA) - @echo "Requires: gawk" >> $(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/awk-matches-lowercase-when-searching-for-uppercase/PURPOSE b/tests/awk-matches-lowercase-when-searching-for-uppercase/PURPOSE deleted file mode 100644 index 4d811cd..0000000 --- a/tests/awk-matches-lowercase-when-searching-for-uppercase/PURPOSE +++ /dev/null @@ -1,4 +0,0 @@ -PURPOSE of awk-matches-lowercase-when-searching-for-uppercase -Description: awk matches lowercase when searching for uppercase -Author: Filip Holec -Summary: awk matches lowercase when searching for uppercase range diff --git a/tests/awk-matches-lowercase-when-searching-for-uppercase/runtest.sh b/tests/awk-matches-lowercase-when-searching-for-uppercase/runtest.sh deleted file mode 100755 index 0e38bf5..0000000 --- a/tests/awk-matches-lowercase-when-searching-for-uppercase/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/gawk/Regression/awk-matches-lowercase-when-searching-for-uppercase -# Description: awk matches lowercase when searching for uppercase -# Author: Filip Holec -# -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# -# Copyright (c) 2015 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="gawk" - -rlJournalStart - rlPhaseStartSetup - rlAssertRpm $PACKAGE - rlRun "TmpDir=\$(mktemp -d)" 0 "Creating tmp directory" - OLDLANG=$LANG - rlRun "pushd $TmpDir" - rlRun "export LANG=en_US.UTF-8" 0 "Export needed LANG variable" - rlPhaseEnd - - rlPhaseStartTest - rlRun "echo test | awk '/[A-Z]/' > output" 0 "Run the reproducer" - cat output - rlAssertNotGrep "test" output - rlRun '[ ! -s output ]' 0 "File output should be empty" - if [ $(echo test | awk --posix '/[A-Z]/' | grep test) ]; then - rlRun "man gawk | col -bx > gawk.txt" 0 "Get man page in plaintext" - rlAssertGrep "[A-Z].*will.*also.*match.*the.*lowercase.*characters.*in.*this.*case\!" gawk.txt - fi - rlPhaseEnd - - rlPhaseStartCleanup - rlRun "popd" - rlRun "rm -r $TmpDir" 0 "Removing tmp directory" - rlRun "export LANG=$OLDLANG" 0 "Restore LANG variable" - rlPhaseEnd -rlJournalPrintText -rlJournalEnd diff --git a/tests/awk-syntax-support/Makefile b/tests/awk-syntax-support/Makefile deleted file mode 100644 index a8a358e..0000000 --- a/tests/awk-syntax-support/Makefile +++ /dev/null @@ -1,62 +0,0 @@ -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# -# Makefile of /CoreOS/gawk/Regression/awk-syntax-support -# Description: tests awk syntax support -# Author: Michal Nowak -# -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# -# Copyright (c) 2010 Red Hat, Inc. All rights reserved. -# -# 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 3 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/gawk/Regression/awk-syntax-support -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: David Kutalek " > $(METADATA) - @echo "Name: $(TEST)" >> $(METADATA) - @echo "TestVersion: $(TESTVERSION)" >> $(METADATA) - @echo "Path: $(TEST_DIR)" >> $(METADATA) - @echo "Description: tests awk syntax support" >> $(METADATA) - @echo "Type: Regression" >> $(METADATA) - @echo "TestTime: 5m" >> $(METADATA) - @echo "RunFor: gawk" >> $(METADATA) - @echo "Requires: gawk" >> $(METADATA) - @echo "Priority: Normal" >> $(METADATA) - @echo "License: GPLv3" >> $(METADATA) - @echo "Confidential: no" >> $(METADATA) - @echo "Destructive: no" >> $(METADATA) - - rhts-lint $(METADATA) diff --git a/tests/awk-syntax-support/PURPOSE b/tests/awk-syntax-support/PURPOSE deleted file mode 100644 index 412b2e3..0000000 --- a/tests/awk-syntax-support/PURPOSE +++ /dev/null @@ -1,3 +0,0 @@ -PURPOSE of /CoreOS/gawk/Regression/awk-syntax-support -Description: tests awk syntax support -Author: Michal Nowak diff --git a/tests/awk-syntax-support/runtest.sh b/tests/awk-syntax-support/runtest.sh deleted file mode 100755 index 477500a..0000000 --- a/tests/awk-syntax-support/runtest.sh +++ /dev/null @@ -1,59 +0,0 @@ -#!/bin/bash -# vim: dict=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# -# runtest.sh of /CoreOS/gawk/Regression/awk-syntax-support -# Description: tests awk syntax support -# Author: Michal Nowak -# -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# -# Copyright (c) 2010 Red Hat, Inc. All rights reserved. -# -# 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 3 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 rhts environment -. /usr/bin/rhts-environment.sh -. /usr/lib/beakerlib/beakerlib.sh - -PACKAGE="gawk" - -rlJournalStart - rlPhaseStartSetup - rlAssertRpm $PACKAGE - rlRun "TmpDir=\`mktemp -d\`" 0 "Creating tmp directory" - rlRun "pushd $TmpDir" - echo "Beth 4.00 0" > file - cat << "EOF" > prog -{ -B["c","a"] = 2 -A[1] = 4 -print ("c","a") in B in A, C in B in A -} -EOF - rlPhaseEnd - - rlPhaseStartTest - rlRun "awk -f prog file > awk.stdout" - rlAssertEquals "Correct output from awk" "1 0" "$(cat awk.stdout)" - rlPhaseEnd - - rlPhaseStartCleanup - rlRun "popd" - rlRun "rm -r $TmpDir" 0 "Removing tmp directory" - rlPhaseEnd -rlJournalPrintText -rlJournalEnd diff --git a/tests/double-free-or-corruption/Makefile b/tests/double-free-or-corruption/Makefile deleted file mode 100644 index 12d6a24..0000000 --- a/tests/double-free-or-corruption/Makefile +++ /dev/null @@ -1,63 +0,0 @@ -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# -# Makefile of /CoreOS/gawk/Regression/double-free-or-corruption -# Description: Test for double-free-or-corruption -# Author: David Kutalek -# -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# -# Copyright (c) 2011 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/gawk/Regression/double-free-or-corruption -export TESTVERSION=1.0 - -BUILT_FILES= - -FILES=$(METADATA) runtest.sh Makefile PURPOSE reproducer.sh - -.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: David Kutalek " > $(METADATA) - @echo "Name: $(TEST)" >> $(METADATA) - @echo "TestVersion: $(TESTVERSION)" >> $(METADATA) - @echo "Path: $(TEST_DIR)" >> $(METADATA) - @echo "Description: Test for double-free-or-corruption" >> $(METADATA) - @echo "Type: Regression" >> $(METADATA) - @echo "TestTime: 5m" >> $(METADATA) - @echo "RunFor: gawk" >> $(METADATA) - @echo "Requires: gawk" >> $(METADATA) - @echo "Priority: Normal" >> $(METADATA) - @echo "License: GPLv2" >> $(METADATA) - @echo "Confidential: no" >> $(METADATA) - @echo "Destructive: no" >> $(METADATA) - - rhts-lint $(METADATA) diff --git a/tests/double-free-or-corruption/PURPOSE b/tests/double-free-or-corruption/PURPOSE deleted file mode 100644 index 7b96538..0000000 --- a/tests/double-free-or-corruption/PURPOSE +++ /dev/null @@ -1,4 +0,0 @@ -PURPOSE of double-free-or-corruption -Description: Test for double-free-or-corruption -Author: David Kutalek -Summary: gawk regression from RHEL3/4 diff --git a/tests/double-free-or-corruption/reproducer.sh b/tests/double-free-or-corruption/reproducer.sh deleted file mode 100755 index 95a3cc6..0000000 --- a/tests/double-free-or-corruption/reproducer.sh +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/bash - -echo " - -jpg: 364592 x -gif: 97148 x" | awk '{ if ('\!'length($3)) $3="-"; print -sprintf("%-10s%8s%10s%s", $1, $2, "", $3); }' - diff --git a/tests/double-free-or-corruption/runtest.sh b/tests/double-free-or-corruption/runtest.sh deleted file mode 100755 index ea150b2..0000000 --- a/tests/double-free-or-corruption/runtest.sh +++ /dev/null @@ -1,55 +0,0 @@ -#!/bin/bash -# vim: dict=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# -# runtest.sh of /CoreOS/gawk/Regression/double-free-or-corruption -# Description: Test for double-free-or-corruption -# Author: David Kutalek -# -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# -# Copyright (c) 2011 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 Beaker environment -. /usr/bin/rhts-environment.sh -. /usr/lib/beakerlib/beakerlib.sh - -PACKAGE="gawk" - -rlJournalStart - rlPhaseStartSetup - rlAssertRpm $PACKAGE - rlRun "TmpDir=\$(mktemp -d)" 0 "Creating tmp directory" - rlRun "cp ./reproducer.sh $TmpDir/" - rlRun "pushd $TmpDir" - rlPhaseEnd - - rlPhaseStartTest - set -o pipefail - export LIBC_FATAL_STDERR_=1 - rlRun "./reproducer.sh 2>&1 | tee ./reproducer.out" - rlRun "grep 'double free or corruption' ./reproducer.out" 1 - rlPhaseEnd - - rlPhaseStartCleanup - rlRun "popd" - rlRun "rm -r $TmpDir" 0 "Removing tmp directory" - rlPhaseEnd -rlJournalPrintText -rlJournalEnd diff --git a/tests/gawk-3-1-7-modifies-command-line-arguments/Makefile b/tests/gawk-3-1-7-modifies-command-line-arguments/Makefile deleted file mode 100644 index 8d0bad7..0000000 --- a/tests/gawk-3-1-7-modifies-command-line-arguments/Makefile +++ /dev/null @@ -1,63 +0,0 @@ -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# -# Makefile of /CoreOS/gawk/Regression/gawk-3-1-7-modifies-command-line-arguments -# Description: Uses the "-v" option in gawk to assign a variable and then inspects the command line in ps. -# Author: Bryan Mason -# -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# -# Copyright (c) 2011 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/gawk/Regression/gawk-3-1-7-modifies-command-line-arguments -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: David Kutalek " > $(METADATA) - @echo "Name: $(TEST)" >> $(METADATA) - @echo "TestVersion: $(TESTVERSION)" >> $(METADATA) - @echo "Path: $(TEST_DIR)" >> $(METADATA) - @echo "Description: Uses the "-v" option in gawk to assign a variable and then inspects the command line in ps." >> $(METADATA) - @echo "Type: Regression" >> $(METADATA) - @echo "TestTime: 5m" >> $(METADATA) - @echo "RunFor: gawk" >> $(METADATA) - @echo "Requires: gawk" >> $(METADATA) - @echo "Priority: Normal" >> $(METADATA) - @echo "License: GPLv2" >> $(METADATA) - @echo "Confidential: no" >> $(METADATA) - @echo "Destructive: no" >> $(METADATA) - - rhts-lint $(METADATA) diff --git a/tests/gawk-3-1-7-modifies-command-line-arguments/PURPOSE b/tests/gawk-3-1-7-modifies-command-line-arguments/PURPOSE deleted file mode 100644 index 79c4303..0000000 --- a/tests/gawk-3-1-7-modifies-command-line-arguments/PURPOSE +++ /dev/null @@ -1,3 +0,0 @@ -PURPOSE of /CoreOS/gawk/Regression/gawk-3-1-7-modifies-command-line-arguments -Description: Uses the "-v" option in gawk to assign a variable and then inspects the command line in ps. -Author: Bryan Mason diff --git a/tests/gawk-3-1-7-modifies-command-line-arguments/runtest.sh b/tests/gawk-3-1-7-modifies-command-line-arguments/runtest.sh deleted file mode 100755 index 857c7e4..0000000 --- a/tests/gawk-3-1-7-modifies-command-line-arguments/runtest.sh +++ /dev/null @@ -1,53 +0,0 @@ -#!/bin/bash -# vim: dict=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# -# runtest.sh of /CoreOS/gawk/Regression/gawk-3-1-7-modifies-command-line-arguments -# Description: Uses the "-v" option in gawk to assign a variable and then inspects the command line in ps. -# Author: Bryan Mason -# -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# -# Copyright (c) 2011 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="gawk" - -rlJournalStart - rlPhaseStartSetup - rlAssertRpm $PACKAGE - rlRun "TmpDir=\`mktemp -d\`" 0 "Creating tmp directory" - rlRun "pushd $TmpDir" - rlPhaseEnd - - rlPhaseStartTest - rlRun "gawk -v myvar=foo 'BEGIN {print myvar; system(\"/bin/sleep 5\")}' &" 0 "Run gawk with \"-v\" option" - rlRun "ps -o pid,args | grep 'gawk' | grep -v grep | tee ps.out" 0 "Found gawk process in ps listing" - rlRun "grep myvar=foo ps.out" 0 "Should find \"myvar=foo\" (not \"myvar foo\") on command line" - rlPhaseEnd - - rlPhaseStartCleanup - rlRun "popd" - rlRun "rm -r $TmpDir" 0 "Removing tmp directory" - rlPhaseEnd -rlJournalPrintText -rlJournalEnd diff --git a/tests/printf-format-s-in-gawk-not-working/Makefile b/tests/printf-format-s-in-gawk-not-working/Makefile deleted file mode 100644 index af1a986..0000000 --- a/tests/printf-format-s-in-gawk-not-working/Makefile +++ /dev/null @@ -1,63 +0,0 @@ -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# -# Makefile of /CoreOS/gawk/Regression/printf-format-s-in-gawk-not-working -# Description: Test for printf format "%.*s" in gawk not working -# Author: David Kutalek -# -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# -# 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/gawk/Regression/printf-format-s-in-gawk-not-working -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: David Kutalek " > $(METADATA) - @echo "Name: $(TEST)" >> $(METADATA) - @echo "TestVersion: $(TESTVERSION)" >> $(METADATA) - @echo "Path: $(TEST_DIR)" >> $(METADATA) - @echo "Description: Test for printf format "%.*s" in gawk not working" >> $(METADATA) - @echo "Type: Regression" >> $(METADATA) - @echo "TestTime: 5m" >> $(METADATA) - @echo "RunFor: gawk" >> $(METADATA) - @echo "Requires: gawk" >> $(METADATA) - @echo "Priority: Normal" >> $(METADATA) - @echo "License: GPLv2" >> $(METADATA) - @echo "Confidential: no" >> $(METADATA) - @echo "Destructive: no" >> $(METADATA) - - rhts-lint $(METADATA) diff --git a/tests/printf-format-s-in-gawk-not-working/PURPOSE b/tests/printf-format-s-in-gawk-not-working/PURPOSE deleted file mode 100644 index 5acf828..0000000 --- a/tests/printf-format-s-in-gawk-not-working/PURPOSE +++ /dev/null @@ -1,32 +0,0 @@ -PURPOSE of /CoreOS/gawk/Regression/printf-format-s-in-gawk-not-working -Description: Test for printf format "%.*s" in gawk not working -Author: David Kutalek -Summary: printf format "%.*s" in gawk not working - -Description: - -Description of problem: -The bug in gawk exists in the Redhat Ent6 gawk package. The patch to fix is checked in the fedora src rpm for gawk-3.1.7-3 and is gawk-3.1.7-prec-utf8.patch. - -Here a repeat of the original bug report. - -The "%.*s" format string in printf no longer works. - -Version-Release number of selected component (if applicable): -gawk-3.1.6-5.fc11.i586 - -How reproducible: -Run example from bash command line. -The example should remove the last character from the string. - -Steps to Reproduce: -# echo ab123dl|gawk '{printf("%.*s\n",length($0)-1,$0)}' - -Actual results: -ab123dl - -Expected results: -ab123d - -Additional info: -works OK with gawk-3.1.5-14.el5 and previously on fc10 diff --git a/tests/printf-format-s-in-gawk-not-working/runtest.sh b/tests/printf-format-s-in-gawk-not-working/runtest.sh deleted file mode 100755 index 4cd3cc8..0000000 --- a/tests/printf-format-s-in-gawk-not-working/runtest.sh +++ /dev/null @@ -1,49 +0,0 @@ -#!/bin/bash -# vim: dict=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# -# runtest.sh of /CoreOS/gawk/Regression/printf-format-s-in-gawk-not-working -# Description: Test for printf format "%.*s" in gawk not working -# Author: David Kutalek -# -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# -# 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="gawk" -REPRODUCER="echo ab123dl|gawk '{printf(\"%.*s\\n\",length(\$0)-1,\$0)}'" -EXPECTED_RESULT="ab123d" - -rlJournalStart - - rlPhaseStartTest - rlAssertRpm $PACKAGE - rlLog "Bug reproducer: $REPRODUCER" - rlRun "$REPRODUCER | tee /tmp/$NAME-result.txt" 0 "Running reproducer" - RESULT="`cat /tmp/$NAME-result.txt`" - rlAssertEquals "Result should be $EXPECTED_RESULT" "_$RESULT" "_$EXPECTED_RESULT" - rm /tmp/$NAME-result.txt - rlPhaseEnd - -rlJournalPrintText -rlJournalEnd diff --git a/tests/tests.yml b/tests/tests.yml deleted file mode 100644 index 050d9a6..0000000 --- a/tests/tests.yml +++ /dev/null @@ -1,19 +0,0 @@ ---- -# This first play always runs on the local staging system -- hosts: localhost - roles: - - role: standard-test-beakerlib - tags: - - classic - - container - - atomic - tests: - - awk-matches-lowercase-when-searching-for-uppercase - - printf-format-s-in-gawk-not-working - - awk-assign-syntax-support - - awk-syntax-support - - double-free-or-corruption - - gawk-3-1-7-modifies-command-line-arguments - required_packages: - - gawk - - procps-ng