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 new file mode 100644 index 0000000..09591e1 --- /dev/null +++ b/gating.yaml @@ -0,0 +1,7 @@ +--- !Policy +product_versions: + - rhel-10 +decision_context: osci_compose_gate +rules: + - !PassingTestCaseRule {test_case_name: osci.brew-build./plans/ci/fips-disabled-buildroot-disabled.functional} + - !PassingTestCaseRule {test_case_name: osci.brew-build./plans/ci/fips-disabled-buildroot-enabled.functional} diff --git a/plans/ci.fmf b/plans/ci.fmf new file mode 100644 index 0000000..6c44e95 --- /dev/null +++ b/plans/ci.fmf @@ -0,0 +1,26 @@ +/fips-disabled-buildroot-disabled: + plan: + import: + url: https://pkgs.devel.redhat.com/git/tests/cracklib + name: /plans/ci/fips-disabled-buildroot-disabled + + +/fips-disabled-buildroot-enabled: + plan: + import: + url: https://pkgs.devel.redhat.com/git/tests/cracklib + name: /plans/ci/fips-disabled-buildroot-enabled + + +/fips-enabled-buildroot-disabled: + plan: + import: + url: https://pkgs.devel.redhat.com/git/tests/cracklib + name: /plans/ci/fips-enabled-buildroot-disabled + + +/fips-enabled-buildroot-enabled: + plan: + import: + url: https://pkgs.devel.redhat.com/git/tests/cracklib + name: /plans/ci/fips-enabled-buildroot-enabled diff --git a/tests/ABI-compatibility/Makefile b/tests/ABI-compatibility/Makefile deleted file mode 100644 index 964c3e5..0000000 --- a/tests/ABI-compatibility/Makefile +++ /dev/null @@ -1,64 +0,0 @@ -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# -# Makefile of /CoreOS/cracklib/Sanity/ABI-compatibility -# Description: Test if the ABI hasn't changed -# Author: Hubert Kario -# -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# -# Copyright (c) 2013 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/cracklib/Sanity/ABI-compatibility -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: Hubert Kario " > $(METADATA) - @echo "Name: $(TEST)" >> $(METADATA) - @echo "TestVersion: $(TESTVERSION)" >> $(METADATA) - @echo "Path: $(TEST_DIR)" >> $(METADATA) - @echo "Description: Test if the ABI hasn't changed" >> $(METADATA) - @echo "Type: Sanity" >> $(METADATA) - @echo "TestTime: 5m" >> $(METADATA) - @echo "RunFor: cracklib" >> $(METADATA) - @echo "Requires: cracklib cracklib-devel gcc words ltrace" >> $(METADATA) - @echo "Priority: Normal" >> $(METADATA) - @echo "License: GPLv2" >> $(METADATA) - @echo "Confidential: no" >> $(METADATA) - @echo "Destructive: no" >> $(METADATA) - @echo "Releases: -RHEL3 -RHEL4" >> $(METADATA) - - rhts-lint $(METADATA) diff --git a/tests/ABI-compatibility/PURPOSE b/tests/ABI-compatibility/PURPOSE deleted file mode 100644 index f256265..0000000 --- a/tests/ABI-compatibility/PURPOSE +++ /dev/null @@ -1,3 +0,0 @@ -PURPOSE of /CoreOS/cracklib/Sanity/ABI-compatibility -Description: Test if the ABI hasn't changed -Author: Hubert Kario diff --git a/tests/ABI-compatibility/runtest.sh b/tests/ABI-compatibility/runtest.sh deleted file mode 100755 index 58f6400..0000000 --- a/tests/ABI-compatibility/runtest.sh +++ /dev/null @@ -1,81 +0,0 @@ -#!/bin/bash -# vim: dict=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# -# runtest.sh of /CoreOS/cracklib/Sanity/ABI-compatibility -# Description: Test if the ABI hasn't changed -# Author: Hubert Kario -# -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# -# Copyright (c) 2013 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 || exit 1 -. /usr/share/beakerlib/beakerlib.sh || exit 1 - -PACKAGE="cracklib" - -if rlIsRHEL 5; then -PACKAGES="cracklib gcc words ltrace" -else -PACKAGES="cracklib cracklib-devel gcc words ltrace" -fi - -rlJournalStart - rlPhaseStartSetup - for PKG in $PACKAGES; do - rlAssertRpm $PKG - done - rlRun "TmpDir=\$(mktemp -d)" 0 "Creating tmp directory" - rlRun "if [ ! -e /usr/share/cracklib/pw_dict.pwi ]; then create-cracklib-dict /usr/share/dict/words; fi" 0 "Create a cracklib dictionary if not already present" - rlRun "pushd $TmpDir" - rlRun "cat > test.c <<_EOF_ -#include -#include - -int main(int argc, char **argv) -{ - char const *dict = \"/usr/share/cracklib/pw_dict\"; - char const *msg = NULL; - msg = FascistCheck(\"AAAAAAAA\", dict); - if (msg == 0) - return 1; - else - { - printf(\"%s\\n\", msg); - return 0; - } -} -_EOF_" 0 "Create test application" - rlPhaseEnd - - rlPhaseStartTest - rlRun "gcc -O0 test.c -lcrack -Wall -o test" 0 "Compile the program" - rlRun "./test" 0 "Run the program" - rlRun "ltrace -o ltrace.out ./test" 0 "Run the program with ltrace" - rlRun "grep FascistCheck ltrace.out" 0 "Check if it actually uses the library function" - rlPhaseEnd - - rlPhaseStartCleanup - rlRun "popd" - rlRun "rm -r $TmpDir" 0 "Removing tmp directory" - rlPhaseEnd -rlJournalPrintText -rlJournalEnd diff --git a/tests/Localization/Makefile b/tests/Localization/Makefile deleted file mode 100644 index 37c4135..0000000 --- a/tests/Localization/Makefile +++ /dev/null @@ -1,63 +0,0 @@ -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# -# Makefile of /CoreOS/cracklib/Sanity/Localization -# Description: Check if package localization is correct -# Author: Hubert Kario -# -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# -# Copyright (c) 2014 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/cracklib/Sanity/Localization -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: Hubert Kario " > $(METADATA) - @echo "Name: $(TEST)" >> $(METADATA) - @echo "TestVersion: $(TESTVERSION)" >> $(METADATA) - @echo "Path: $(TEST_DIR)" >> $(METADATA) - @echo "Description: Check if package localization is correct" >> $(METADATA) - @echo "Type: Sanity" >> $(METADATA) - @echo "TestTime: 5m" >> $(METADATA) - @echo "RunFor: cracklib" >> $(METADATA) - @echo "Requires: cracklib" >> $(METADATA) - @echo "Priority: Normal" >> $(METADATA) - @echo "License: GPLv2" >> $(METADATA) - @echo "Confidential: no" >> $(METADATA) - @echo "Destructive: no" >> $(METADATA) - - rhts-lint $(METADATA) diff --git a/tests/Localization/PURPOSE b/tests/Localization/PURPOSE deleted file mode 100644 index 83d8e81..0000000 --- a/tests/Localization/PURPOSE +++ /dev/null @@ -1,3 +0,0 @@ -PURPOSE of /CoreOS/cracklib/Sanity/Localization -Description: Check if package localization is correct -Author: Hubert Kario diff --git a/tests/Localization/runtest.sh b/tests/Localization/runtest.sh deleted file mode 100755 index 6afb4ab..0000000 --- a/tests/Localization/runtest.sh +++ /dev/null @@ -1,125 +0,0 @@ -#!/bin/bash -# vim: dict=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# -# runtest.sh of /CoreOS/cracklib/Sanity/Localization -# Description: Check if package localization is correct -# Author: Hubert Kario -# -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# -# Copyright (c) 2014 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="cracklib" - -rlJournalStart - rlPhaseStartSetup - rlAssertRpm $PACKAGE - rlAssertRpm grep - rlRun "TmpDir=\$(mktemp -d)" 0 "Creating tmp directory" - rlRun "pushd $TmpDir" - rlPhaseEnd - - - rlPhaseStartTest "Sanity" - rlRun "echo 'aVk(|vDTRz$xVE-W6(Z2' | LANG=C cracklib-check | grep ': OK'" 0 "Check if cracklib-check accepts complex passwords" - rlRun "echo AAAAAAAAAAAA | LANG=C cracklib-check | grep ': OK'" 1 "Verify that cracklib-check rejects simple passwords" - rlRun "echo AAAAAAAAAAAA | LANG=C cracklib-check | grep 'DIFFERENT'" 0 "Verify that rejection message contains string 'DIFFERENT'" - rlPhaseEnd - -NAME[0]="Assamese" -CODE[0]="as_IN.utf8" - -NAME[1]="Bengali" -CODE[1]="bn_IN.utf8" - -NAME[2]="German" -CODE[2]="de_DE.utf8" - -NAME[3]="Spanish" -CODE[3]="es_ES.utf8" - -NAME[4]="French" -CODE[4]="fr_FR.utf8" - -NAME[5]="Gujarati" -CODE[5]="gu_IN.utf8" - -NAME[6]="Hindi" -CODE[6]="hi_IN.utf8" - -NAME[7]="Italian" -CODE[7]="it_IT.utf8" - -NAME[8]="Japanese" -CODE[8]="ja_JP.utf8" - -NAME[9]="Kannada" -CODE[9]="kn_IN.utf8" - -NAME[10]="Korean" -CODE[10]="ko_KR.utf8" - -NAME[11]="Malayalam" -CODE[11]="ml_IN.utf8" - -NAME[12]="Marathi" -CODE[12]="mr_IN.utf8" - -NAME[13]="Oriya" -CODE[13]="or_IN.utf8" - -NAME[14]="Punjabi" -CODE[14]="pa_IN.utf8" - -NAME[15]="Brazil Portugese" -CODE[15]="pt_BR.utf8" - -NAME[16]="Russian" -CODE[16]="ru_RU.utf8" - -NAME[17]="Tamil" -CODE[17]="ta_IN.utf8" - -NAME[18]="Telugu" -CODE[18]="te_IN.utf8" - -NAME[19]="Chinese" -CODE[19]="zh_CN.utf8" - -NAME[20]="Taiwanese Chinese" -CODE[20]="zh_TW.utf8" - -for i in ${!NAME[@]}; do - rlPhaseStartTest "${NAME[$i]}" - rlRun "echo AAAAAAAAAAAA | LANG=${CODE[$i]} cracklib-check | grep -Ev DIFFERENT\>" 0 "Check if fallback message isn't used" - rlRun "echo AAAAAAAAAAAA | LANG=${CODE[$i]} cracklib-check | grep '???????'" 1 "Check if message isn't clobbered" - rlPhaseEnd -done - - rlPhaseStartCleanup - rlRun "popd" - rlRun "rm -r $TmpDir" 0 "Removing tmp directory" - rlPhaseEnd -rlJournalPrintText -rlJournalEnd diff --git a/tests/inventory b/tests/inventory deleted file mode 100755 index 6238138..0000000 --- a/tests/inventory +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash -export TEST_DOCKER_EXTRA_ARGS="--security-opt seccomp:unconfined" -exec merge-standard-inventory "$@" diff --git a/tests/tests.yml b/tests/tests.yml deleted file mode 100644 index ac40fef..0000000 --- a/tests/tests.yml +++ /dev/null @@ -1,25 +0,0 @@ ---- -# Tests for Docker and Classic Context -- hosts: localhost - roles: - - role: standard-test-beakerlib - tags: - - classic - - container - tests: - - ABI-compatibility - - Localization - required_packages: - - words # required for ABI-compatibility - - cracklib-devel # required for ABI-compatibility - - ltrace # required for ABI-compatibility - - gcc # required for ABI-compatibility - -# Tests for Atomic -- hosts: localhost - roles: - - role: standard-test-beakerlib - tags: - - atomic - tests: - - Localization