tests/Regression: add downstream tests

RPM-Changelog: -
RPM-Skip-Release: yes
This commit is contained in:
Martin Coufal 2026-06-19 10:04:36 +02:00
parent e8574cba8c
commit ff43a7b10c
553 changed files with 24379 additions and 0 deletions

View File

@ -0,0 +1,18 @@
summary: Test for RHEL-12894 (Add /usr/share/doc/glibc/gai.conf to glibc-doc)
description: ''
adjust:
- enabled: false
when: distro < rhel-8.10
- enabled: false
when: distro == rhel-9 and distro < rhel-9.4
contact: Martin Coufal <mcoufal@redhat.com>
component:
- glibc
test: ./runtest.sh
framework: beakerlib
recommend:
- glibc
- glibc-doc
duration: 5m
extra-summary: /tools/glibc/Regression/Add-usr-share-doc-glibc-gai-conf-to-glibc-doc
extra-task: /tools/glibc/Regression/Add-usr-share-doc-glibc-gai-conf-to-glibc-doc

View File

@ -0,0 +1,46 @@
#!/bin/bash
# vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# runtest.sh of /tools/glibc/Regression/Add-usr-share-doc-glibc-gai-conf-to-glibc-doc
# Description: Test for RHEL-12894 (Add /usr/share/doc/glibc/gai.conf to glibc-doc)
# Author: Martin Coufal <mcoufal@redhat.com>
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# Copyright (c) 2023 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/share/beakerlib/beakerlib.sh || exit 1
PACKAGE="glibc"
rlJournalStart
rlPhaseStartSetup
rlAssertRpm ${PACKAGE}
rlAssertRpm ${PACKAGE}-doc
rlPhaseEnd
rlPhaseStartTest
rlAssertExists "/usr/share/doc/glibc/gai.conf"
rlPhaseEnd
rlPhaseStartCleanup
rlPhaseEnd
rlJournalPrintText
rlJournalEnd

View File

@ -0,0 +1,27 @@
summary: |
Test for RHEL-102553 (glibc: glibc-locale-source needs gzip due to compressed charmaps)
description: |
Despite glibc-locale-source package being installed, localedef fails to find
ANSI_X3.4-1968.gz and UTF-8.gz as it looks for the bz2 compressed files.
contact: Martin Coufal <mcoufal@redhat.com>
component:
- glibc
adjust:
- enabled: false
when: distro < rhel-9.8
- enabled: false
when: distro == rhel-10 and distro < rhel-10.2
test: ./runtest.sh
framework: beakerlib
require:
- glibc
- glibc-locale-source
- gzip
duration: 5m
link:
- relates: https://issues.redhat.com/browse/RHEL-102553
extra-summary:
/tools/glibc/Regression/RHEL-102553-glibc-locale-source-needs-gzip-dependency
extra-task:
/tools/glibc/Regression/RHEL-102553-glibc-locale-source-needs-gzip-dependency
id: e102e56c-2187-44de-8243-24c0c9801a58

View File

@ -0,0 +1,62 @@
#!/bin/bash
# vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# runtest.sh of /tools/glibc/Regression/RHEL-102553-glibc-locale-source-needs-gzip-dependency
# Description: Test for RHEL-102553 (glibc: glibc-locale-source needs gzip due to compressed charmaps)
# Author: Martin Coufal <mcoufal@redhat.com>
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# Copyright (c) 2025 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/share/beakerlib/beakerlib.sh || exit 1
PACKAGE="glibc"
rlJournalStart
rlPhaseStartSetup
rlAssertRpm $PACKAGE
rlAssertRpm glibc-locale-source
rlRun "TmpDir=\$(mktemp -d)" 0 "Creating tmp directory"
rlRun "pushd $TmpDir"
rlPhaseEnd
rlPhaseStartTest
# Check if gzip is listed in dependencies
rlRun "rpm -qR glibc-locale-source | tee glibc-locale-source-deps.txt"
rlAssertGrep "gzip" glibc-locale-source-deps.txt
# Check if gzip is available on the system (should be if dependency works)
rlAssertRpm gzip
# Check for the UTF-8 and ANSI_X3.4-1968 charmaps
rlAssertExists "/usr/share/i18n/charmaps/UTF-8.gz"
rlAssertExists "/usr/share/i18n/charmaps/ANSI_X3.4-1968.gz"
rlRun -l "localedef -c -i en_US -f UTF-8 test_en_US.UTF-8" 0 "localedef should work with UTF-8 charmap"
rlPhaseEnd
rlPhaseStartCleanup
rlRun "popd"
rlRun "rm -rf $TmpDir" 0 "Removing tmp directory"
rlPhaseEnd
rlJournalPrintText
rlJournalEnd

View File

@ -0,0 +1,9 @@
Description: glibc Build glibc32 from the main glibc package
Owner: Martin Coufal <mcoufal@redhat.com>
RunFor: glibc
RunTest: ./runtest.sh
Path: /mnt/tests/tests/Regression/RHEL-106470-glibc-build-glibc32-from-the-main-glibc-package
RhtsRequires: library(distribution/RpmSnapshot)
Requires: git
Requires:
TestTime: 5m

View File

@ -0,0 +1,25 @@
summary: glibc Build glibc32 from the main glibc package
description: |
Test for RHEL-106470 (glibc: Build glibc32 from the main glibc package).
contact: Martin Coufal <mcoufal@redhat.com>
adjust:
- enabled: false
when: arch != x86_64
- enabled: false
when: distro < rhel-9.7
component:
- glibc
test: ./runtest.sh
tag:
- buildroot
framework: beakerlib
require:
- library(distribution/RpmSnapshot)
- git
duration: 5m
link:
- relates: https://issues.redhat.com/browse/RHEL-106470
extra-summary:
/tools/glibc/Regression/RHEL-106470-glibc-build-glibc32-from-the-main-glibc-package
extra-task:
/tools/glibc/Regression/RHEL-106470-glibc-build-glibc32-from-the-main-glibc-package

View File

@ -0,0 +1,54 @@
#!/bin/bash
# vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# runtest.sh of /tools/glibc/Regression/RHEL-106470-glibc-build-glibc32-from-the-main-glibc-package
# Description: Test for RHEL-106470 (glibc: Build glibc32 from the main glibc package).
# Author: Martin Coufal <mcoufal@redhat.com>
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# Copyright (c) 2025 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/share/beakerlib/beakerlib.sh || exit 1
PACKAGE="glibc"
rlJournalStart
rlPhaseStartSetup
rlImport distribution/RpmSnapshot || rlFail rlImport
RpmSnapshotCreate
rlAssertRpm "$PACKAGE"
rlRun "TmpDir=$(mktemp -d)" 0 "Creating tmp directory"
rlRun "pushd $TmpDir"
rlPhaseEnd
rlPhaseStartTest
rlRun "dnf -y install glibc32 --allowerasing"
rlAssertRpm "glibc32"
rlPhaseEnd
rlPhaseStartCleanup
rlRun "popd"
rlRun "rm -r $TmpDir" 0 "Removing tmp directory"
RpmSnapshotRevert "$RPM_SNAPSHOT"
RpmSnapshotDiscard "$RPM_SNAPSHOT"
rlPhaseEnd
rlJournalPrintText
rlJournalEnd

View File

@ -0,0 +1,25 @@
summary: enhance ld.so --list-diagnostics on aarch64 similar to x86_64
description: |
Test for RHEL-107540 (enhance ld.so --list-diagnostics on aarch64 similar
to x86_64).
contact: Martin Coufal <mcoufal@redhat.com>
adjust:
- enabled: false
when: distro < rhel-9.5
- enabled: false
when: distro == rhel-10 and distro < rhel-10.1
- enabled: false
when: arch = ppc64le
component:
- glibc
test: ./runtest.sh
framework: beakerlib
duration: 5m
link:
- relates: https://issues.redhat.com/browse/RHEL-107540
- relates: https://issues.redhat.com/browse/RHEL-22165
extra-summary: |
/tools/glibc/Regression/RHEL-107540-enhance-ld-so-list-diagnostics-on-aarch64-similar-to-x86-64
extra-task: |
/tools/glibc/Regression/RHEL-107540-enhance-ld-so-list-diagnostics-on-aarch64-similar-to-x86-64
id: abdf73f3-db27-455f-8317-24357270ddfa

View File

@ -0,0 +1,55 @@
#!/bin/bash
# vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# runtest.sh of /tools/glibc/Regression/RHEL-107540-enhance-ld-so-list-diagnostics-on-aarch64-similar-to-x86-64
# Description: Test for RHEL-107540 (enhance ld.so --list-diagnostics on aarch64 similar to x86_64).
# Author: Martin Coufal <mcoufal@redhat.com>
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# Copyright (c) 2025 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/share/beakerlib/beakerlib.sh || exit 1
PACKAGE="glibc"
rlJournalStart
rlPhaseStartSetup
rlAssertRpm "$PACKAGE"
rlRun "TmpDir=$(mktemp -d)" 0 "Creating tmp directory"
rlRun "pushd $TmpDir"
rlPhaseEnd
rlPhaseStartTest
rlRun "ld.so --list-diagnostics > diagnostics.out"
rlAssertGrep "cpu_features" diagnostics.out
rlLogInfo "cpu_features:\n$(cat diagnostics.out | grep cpu_features)"
if [ "$(uname -m)" = "aarch64" ]
then
rlAssertGrep "aarch64\.cpu_features\.midr_el1=" diagnostics.out
fi
rlPhaseEnd
rlPhaseStartCleanup
rlRun "popd"
rlRun "rm -r $TmpDir" 0 "Removing tmp directory"
rlPhaseEnd
rlJournalPrintText
rlJournalEnd

View File

@ -0,0 +1,24 @@
summary: glibc Add definition of _dl_find_object to libc.a
description: |
Test for RHEL-107564 (glibc: Add definition of _dl_find_object to libc.a).
contact: Martin Coufal <mcoufal@redhat.com>
adjust:
- enabled: false
when: distro < rhel-9.7
component:
- glibc
test: ./runtest.sh
framework: beakerlib
require:
- glibc
- glibc-static
- gcc
- binutils
duration: 5m
link:
- relates: https://issues.redhat.com/browse/RHEL-107564
extra-summary:
/tools/glibc/Regression/RHEL-107564-glibc-add-definition-of-dl-find-object-to-libc-a
extra-task:
/tools/glibc/Regression/RHEL-107564-glibc-add-definition-of-dl-find-object-to-libc-a
id: f7e1a4fa-8b17-43aa-af32-634ac8f2574d

View File

@ -0,0 +1,54 @@
#!/bin/bash
# vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# runtest.sh of /tools/glibc/Regression/RHEL-107564-glibc-add-definition-of-dl-find-object-to-libc-a
# Description: Test for RHEL-107564 (glibc: Add definition of _dl_find_object to libc.a).
# Author: Martin Coufal <mcoufal@redhat.com>
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# Copyright (c) 2025 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/share/beakerlib/beakerlib.sh || exit 1
PACKAGE="glibc"
rlJournalStart
rlPhaseStartSetup
rlAssertRpm "$PACKAGE"
rlAssertRpm "glibc-static"
rlRun "TmpDir=$(mktemp -d)" 0 "Creating tmp directory"
rlRun "pushd $TmpDir"
rlPhaseEnd
rlPhaseStartTest
rlRun "nm $(gcc --print-file-name=libc.a) 2> /dev/null | grep dl_find_object 1> log"
# grep for exact match: 'T _dl_find_object' (symbol in the text section,
# no _init, _update or other suffixes)
rlRun "grep -E '[tT][[:space:]]+_dl_find_object$' log"
rlLogInfo "log:\n$(cat log)"
rlPhaseEnd
rlPhaseStartCleanup
rlRun "popd"
rlRun "rm -r $TmpDir" 0 "Removing tmp directory"
rlPhaseEnd
rlJournalPrintText
rlJournalEnd

View File

@ -0,0 +1,24 @@
summary: Provide GLIBC_ABI_DT_X86_64_PLT symbol version
description: |
Test for RHEL-109621 (Provide GLIBC_ABI_DT_X86_64_PLT symbol version).
contact: Martin Coufal <mcoufal@redhat.com>
adjust:
- enabled: false
when: distro < rhel-9.7
- enabled: false
when: arch != x86_64
component:
- glibc
test: ./runtest.sh
framework: beakerlib
require:
- glibc
- binutils
duration: 5m
link:
- relates: https://issues.redhat.com/browse/RHEL-109621
- relates: https://issues.redhat.com/browse/RHEL-109622
extra-summary: |
/tools/glibc/Regression/RHEL-109621-provide-glibc-abi-dt-x86-64-plt-symbol-version
extra-task: |
/tools/glibc/Regression/RHEL-109621-provide-glibc-abi-dt-x86-64-plt-symbol-version

View File

@ -0,0 +1,51 @@
#!/bin/bash
# vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# runtest.sh of /tools/glibc/Regression/RHEL-109621-provide-glibc-abi-dt-x86-64-plt-symbol-version
# Description: Test for RHEL-109621 (Provide GLIBC_ABI_DT_X86_64_PLT symbol version).
# Author: Martin Coufal <mcoufal@redhat.com>
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# Copyright (c) 2025 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/share/beakerlib/beakerlib.sh || exit 1
PACKAGE="glibc"
rlJournalStart
rlPhaseStartSetup
rlAssertRpm "$PACKAGE"
rlRun "TmpDir=$(mktemp -d)" 0 "Creating tmp directory"
rlRun "pushd $TmpDir"
rlRun "LIBCSO=$(readlink -f /lib64/libc.so.6)"
rlPhaseEnd
rlPhaseStartTest
rlRun "readelf -V -W \"$LIBCSO\" > readelf.out"
rlAssertGrep "GLIBC_ABI_DT_X86_64_PLT" readelf.out
rlPhaseEnd
rlPhaseStartCleanup
rlRun "popd"
rlRun "rm -r $TmpDir" 0 "Removing tmp directory"
rlPhaseEnd
rlJournalPrintText
rlJournalEnd

View File

@ -0,0 +1,23 @@
summary: Provide Add GLIBC_ABI_GNU2_TLS symbol version
description: |
Test for RHEL-109625 (Provide Add GLIBC_ABI_GNU2_TLS symbol version).
contact: Martin Coufal <mcoufal@redhat.com>
adjust:
- enabled: false
when: distro < rhel-10
- enabled: false
when: arch != x86_64
component:
- glibc
test: ./runtest.sh
framework: beakerlib
require:
- glibc
- binutils
duration: 5m
link:
- relates: https://issues.redhat.com/browse/RHEL-109625
extra-summary: |
/tools/glibc/Regression/RHEL-109625-provide-add-glibc-abi-gnu2-tls-symbol-version
extra-task: |
/tools/glibc/Regression/RHEL-109625-provide-add-glibc-abi-gnu2-tls-symbol-version

View File

@ -0,0 +1,51 @@
#!/bin/bash
# vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# runtest.sh of /tools/glibc/Regression/RHEL-109625-provide-add-glibc-abi-gnu2-tls-symbol-version
# Description: Test for RHEL-109625 (Provide Add GLIBC_ABI_GNU2_TLS symbol version).
# Author: Martin Coufal <mcoufal@redhat.com>
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# Copyright (c) 2025 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/share/beakerlib/beakerlib.sh || exit 1
PACKAGE="glibc"
rlJournalStart
rlPhaseStartSetup
rlAssertRpm "$PACKAGE"
rlRun "TmpDir=$(mktemp -d)" 0 "Creating tmp directory"
rlRun "pushd $TmpDir"
rlRun "LIBCSO=$(readlink -f /lib64/libc.so.6)"
rlPhaseEnd
rlPhaseStartTest
rlRun "readelf -V -W \"$LIBCSO\" > readelf.out"
rlAssertGrep "GLIBC_ABI_GNU2_TLS" readelf.out
rlPhaseEnd
rlPhaseStartCleanup
rlRun "popd"
rlRun "rm -r $TmpDir" 0 "Removing tmp directory"
rlPhaseEnd
rlJournalPrintText
rlJournalEnd

View File

@ -0,0 +1,21 @@
summary: Improve the documentation of the Thread APIs included in the safety scope
description: |
Test for RHEL-119437 (Improve the documentation of the Thread APIs included in the safety scope).
contact: Martin Coufal <mcoufal@redhat.com>
component:
- glibc
adjust:
- when: distro < rhel-9
enabled: false
test: ./runtest.sh
framework: beakerlib
require:
- glibc-doc
duration: 10m
link:
- relates: https://issues.redhat.com/browse/RHEL-119437
extra-summary: |
/tools/glibc/Regression/RHEL-119437-improve-the-documentation-of-the-thread-apis-included-in-the-safety-scope
extra-task: |
/tools/glibc/Regression/RHEL-119437-improve-the-documentation-of-the-thread-apis-included-in-the-safety-scope
id: 93dd5060-f23f-4744-937f-254b4807bd27

View File

@ -0,0 +1,77 @@
#!/bin/bash
# vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# runtest.sh of /tools/glibc/Regression/RHEL-119437-improve-the-documentation-of-the-thread-apis-included-in-the-safety-scope
# Description: Test for RHEL-119437 (Improve the documentation of the Thread APIs included in the safety scope).
# Author: Martin Coufal <mcoufal@redhat.com>
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# Copyright (c) 2026 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/share/beakerlib/beakerlib.sh || exit 1
PACKAGE="glibc"
INFO_DIR="/usr/share/info"
# functions/macros to check
FUNCTIONS=(
sched_getcpu sched_setattr sched_getattr
pthread_attr_destroy pthread_attr_getaffinity_np pthread_attr_getdetachstate
pthread_attr_init pthread_attr_setaffinity_np pthread_attr_setdetachstate
pthread_create pthread_detach pthread_equal pthread_getcpuclockid
pthread_join pthread_self pthread_setname_np pthread_once pthread_sigmask
pthread_getaffinity_np pthread_getname_np pthread_setaffinity_np
pthread_mutex_clocklock pthread_mutex_destroy pthread_mutex_init
pthread_mutex_lock pthread_mutex_timedlock pthread_mutex_trylock
pthread_mutex_unlock pthread_mutexattr_destroy pthread_mutexattr_gettype
pthread_mutexattr_init pthread_mutexattr_settype
pthread_barrier_init pthread_barrier_destroy pthread_barrier_wait
pthread_spin_init pthread_spin_destroy pthread_spin_lock
pthread_spin_trylock pthread_spin_unlock
CPU_ZERO CPU_SET CPU_CLR CPU_ISSET CPU_COUNT CPU_AND CPU_OR CPU_XOR CPU_EQUAL CPU_SETSIZE
pthread_clockjoin_np pthread_tryjoin_np pthread_timedjoin_np
sched_yield sched_setaffinity sched_getaffinity
)
rlJournalStart
rlPhaseStartSetup
rlAssertRpm "$PACKAGE"
rlRun "TmpDir=$(mktemp -d)" 0 "Creating tmp directory"
rlRun "pushd $TmpDir"
rlPhaseEnd
rlPhaseStartTest "Check pthread/sched APIs in glibc manual"
# Extract glibc manual (info) to a temp file
rlRun "zcat ${INFO_DIR}/libc.info*.gz > $TmpDir/libc_info.txt" 0 "Extract glibc manual from ${INFO_DIR}"
rlAssertExists "$TmpDir/libc_info.txt"
# Check each pthread/sched API is documented (Function or Macro in info format)
for func in "${FUNCTIONS[@]}"; do
rlRun "grep -qE \"^[[:space:]]*-- (Function|Macro):.*[[:space:]]${func}[[:space:]]?(\(|$)\" $TmpDir/libc_info.txt" 0 "pthread/sched API '$func' is documented in glibc manual"
done
rlPhaseEnd
rlPhaseStartCleanup
rlRun "popd"
rlRun "rm -r $TmpDir" 0 "Removing tmp directory"
rlPhaseEnd
rlJournalPrintText
rlJournalEnd

View File

@ -0,0 +1,25 @@
summary: glibc Locale updates for Bulgaria joining the Euro
description: |
Test for RHEL-137184 (glibc: Locale updates for Bulgaria joining the Euro)
contact: Martin Coufal <mcoufal@redhat.com>
adjust:
- enabled: false
when: distro < rhel-8.10
- enabled: false
when: distro == rhel-9 and distro < rhel-9.8
- enabled: false
when: distro == rhel-10 and distro < rhel-10.2
component:
- glibc
test: ./runtest.sh
framework: beakerlib
require:
- glibc
- glibc-langpack-bg
duration: 5m
link:
- relates: https://issues.redhat.com/browse/RHEL-137184
extra-summary: |
/tools/glibc/Regression/RHEL-137184-glibc-locale-updates-for-bulgaria-joining-the-euro
extra-task: |
/tools/glibc/Regression/RHEL-137184-glibc-locale-updates-for-bulgaria-joining-the-euro

View File

@ -0,0 +1,50 @@
#!/bin/bash
# vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# runtest.sh of /tools/glibc/Regression/RHEL-137184-glibc-locale-updates-for-bulgaria-joining-the-euro
# Description: Test for RHEL-137184 (glibc: Locale updates for Bulgaria joining the Euro)
# Author: Martin Coufal <mcoufal@redhat.com>
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# Copyright (c) 2026 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/share/beakerlib/beakerlib.sh || exit 1
PACKAGE="glibc"
rlJournalStart
rlPhaseStartSetup
rlAssertRpm "$PACKAGE"
rlRun "TmpDir=$(mktemp -d)" 0 "Creating tmp directory"
rlRun "pushd $TmpDir"
rlPhaseEnd
rlPhaseStartTest
rlAssertEquals "Expected 'currency_symbol' is '€'" "$(LANG=bg_BG.UTF-8 locale currency_symbol)" "€"
rlAssertEquals "Expected 'int_curr_symbol' is 'EUR'" "$(LANG=bg_BG.UTF-8 locale int_curr_symbol)" "EUR "
rlPhaseEnd
rlPhaseStartCleanup
rlRun "popd"
rlRun "rm -r $TmpDir" 0 "Removing tmp directory"
rlPhaseEnd
rlJournalPrintText
rlJournalEnd

View File

@ -0,0 +1,19 @@
summary: 'Test for RHEL-13720 (glibc: ldconfig should skip temporary files created
by RPM).'
description: ''
adjust:
- enabled: false
when: distro < rhel-8.10
contact: Martin Coufal <mcoufal@redhat.com>
component:
- glibc
test: ./runtest.sh
framework: beakerlib
recommend:
- glibc
- nftables
duration: 10m
extra-summary:
/tools/glibc/Regression/RHEL-13720-glibc-ldconfig-should-skip-temporary-files-created-by-RPM
extra-task:
/tools/glibc/Regression/RHEL-13720-glibc-ldconfig-should-skip-temporary-files-created-by-RPM

View File

@ -0,0 +1,55 @@
#!/bin/bash
# vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# runtest.sh of /tools/glibc/Regression/RHEL-13720-glibc-ldconfig-should-skip-temporary-files-created-by-RPM
# Description: Test for RHEL-13720 (glibc: ldconfig should skip temporary files created by RPM).
# Author: Martin Coufal <mcoufal@redhat.com>
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# Copyright (c) 2023 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/share/beakerlib/beakerlib.sh || exit 1
PACKAGE="glibc"
SKIPPABLE_DSO_NAMES="libnftables.so.#prelink# libnftables.so.#prelink#.ABC123 libnftables.so;13720 libnftables.so.dpkg-new libnftables.so.dpkg-tmp"
rlJournalStart
rlPhaseStartSetup
rlAssertRpm $PACKAGE
rlRun "TmpDir=\$(mktemp -d)" 0 "Creating tmp directory"
rlRun "pushd $TmpDir"
rlPhaseEnd
rlPhaseStartTest
rlRun "cp /usr/lib64/libnftables.so.*.* $TmpDir"
rlRun "truncate -s 163840 $TmpDir/libnftables.so.*.*"
for name in $SKIPPABLE_DSO_NAMES; do
rlRun "mv $TmpDir/libnftables.so* '$TmpDir/$name'"
rlRun -l "ldconfig -v -n $TmpDir/"
done
rlPhaseEnd
rlPhaseStartCleanup
rlRun "popd"
rlRun "rm -r $TmpDir" 0 "Removing tmp directory"
rlPhaseEnd
rlJournalPrintText
rlJournalEnd

View File

@ -0,0 +1,28 @@
summary: glibc Update locales for Croatia to use EUR as currency symbol
description: |
Test for RHEL-140103 (glibc: Update locales for Croatia to use EUR as currency symbol)
contact: Martin Coufal <mcoufal@redhat.com>
adjust:
# bug fixed in rhel-8.10 z-stream
- enabled: false
when: distro < rhel-8.10
- enabled: false
when: distro == rhel-9 and distro < rhel-9.8
- enabled: false
when: distro == rhel-10 and distro < rhel-10.2
component:
- glibc
test: ./runtest.sh
framework: beakerlib
require:
- glibc
- glibc-langpack-hr
duration: 5m
link:
- relates: https://issues.redhat.com/browse/RHEL-140103
extra-summary: |
/tools/glibc/Regression/RHEL-140103-glibc-update-locales-for-croatia-to-use-eur-as-currency-symbol
extra-task: |
/tools/glibc/Regression/RHEL-140103-glibc-update-locales-for-croatia-to-use-eur-as-currency-symbol

View File

@ -0,0 +1,46 @@
#!/bin/bash
# vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# runtest.sh of /tools/glibc/Regression/RHEL-140103-glibc-update-locales-for-croatia-to-use-eur-as-currency-symbol
# Description: Test for RHEL-140103 (glibc: Update locales for Croatia to use EUR as currency symbol)
# Author: Martin Coufal <mcoufal@redhat.com>
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# Copyright (c) 2026 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/share/beakerlib/beakerlib.sh || exit 1
PACKAGE="glibc"
rlJournalStart
rlPhaseStartSetup
rlAssertRpm "$PACKAGE"
rlPhaseEnd
rlPhaseStartTest
rlAssertEquals "Expected 'currency_symbol' is '€'" "$(LANG=hr_HR.UTF-8 locale currency_symbol)" "€"
rlAssertEquals "Expected 'int_curr_symbol' is 'EUR'" "$(LANG=hr_HR.UTF-8 locale int_curr_symbol)" "EUR "
rlPhaseEnd
rlPhaseStartCleanup
rlPhaseEnd
rlJournalPrintText
rlJournalEnd

View File

@ -0,0 +1,25 @@
summary: RHEL-141922 glibc Remove trailing tabs from changelog lines
description: |
Test for RHEL-141922 (glibc: Remove trailing tabs from changelog lines)
adjust:
- enabled: false
when: distro < rhel-9.8
continue: true
- enabled: false
when: distro == rhel-10 and distro < rhel-10.1
continue: true
contact: Martin Coufal <mcoufal@redhat.com>
component:
- glibc
test: ./runtest.sh
framework: beakerlib
require:
- glibc
duration: 5m
link:
- relates: https://issues.redhat.com/browse/RHEL-141922
- relates: https://redhat.atlassian.net/browse/RHEL-140226
extra-summary: |
/tools/glibc/Regression/RHEL-141922-glibc-remove-trailing-tabs-from-changelog-lines
extra-task: |
/tools/glibc/Regression/RHEL-141922-glibc-remove-trailing-tabs-from-changelog-lines

View File

@ -0,0 +1,46 @@
#!/bin/bash
# vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# runtest.sh of /tools/glibc/Regression/RHEL-141922-glibc-remove-trailing-tabs-from-changelog-lines
# Description: Test for RHEL-141922 (glibc: Remove trailing tabs from changelog lines)
# Author: Martin Coufal <mcoufal@redhat.com>
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# Copyright (c) 2026 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/share/beakerlib/beakerlib.sh || exit 1
PACKAGE="glibc"
rlJournalStart
rlPhaseStartSetup
rlAssertRpm "$PACKAGE"
rlPhaseEnd
rlPhaseStartTest
# no tabs should be present in RPM changelog
rlRun "rpm -q --changelog glibc | grep -P '\t'" 1
rlPhaseEnd
rlPhaseStartCleanup
rlPhaseEnd
rlJournalPrintText
rlJournalEnd

View File

@ -0,0 +1,17 @@
summary: glibc Remove default value for LD_PROFILE_OUTPUT
description: |
Test for RHEL-142197 (glibc: Remove default value for LD_PROFILE_OUTPUT)
contact: Martin Coufal <mcoufal@redhat.com>
component:
- glibc
test: ./runtest.sh
framework: beakerlib
require:
- glibc
duration: 5m
link:
- relates: https://issues.redhat.com/browse/RHEL-142197
extra-summary: |
/tools/glibc/Regression/RHEL-142197-glibc-remove-default-value-for-ld-profile-output
extra-task: |
/tools/glibc/Regression/RHEL-142197-glibc-remove-default-value-for-ld-profile-output

View File

@ -0,0 +1,49 @@
#!/bin/bash
# vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# runtest.sh of /tools/glibc/Regression/RHEL-142197-glibc-remove-default-value-for-ld-profile-output
# Description: Test for RHEL-142197 (glibc: Remove default value for LD_PROFILE_OUTPUT)
# Author: Martin Coufal <mcoufal@redhat.com>
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# Copyright (c) 2026 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/share/beakerlib/beakerlib.sh || exit 1
PACKAGE="glibc"
rlJournalStart
rlPhaseStartSetup
rlAssertRpm "$PACKAGE"
rlPhaseEnd
rlPhaseStartTest
rlRun "LD_PROFILE=libc.so.6 /bin/true"
rlAssertNotExists "/var/tmp/libc.so.6.profile"
rlPhaseEnd
rlPhaseStartCleanup
if [ -f /var/tmp/libc.so.6.profile ]; then
rlRun "rm -rf /var/tmp/libc.so.6.profile"
fi
rlPhaseEnd
rlJournalPrintText
rlJournalEnd

View File

@ -0,0 +1,16 @@
summary: 'Test for RHEL-15867 (glibc: <sys/cdefs.h> is no longer compatible with C90
compilers).'
description: ''
contact: Martin Coufal <mcoufal@redhat.com>
component:
- glibc
test: ./runtest.sh
framework: beakerlib
recommend:
- glibc
- gcc
duration: 5m
extra-summary:
/tools/glibc/Regression/RHEL-15867-glibc-sys-cdefs-h-is-no-longer-compatible-with-C90-compilers
extra-task:
/tools/glibc/Regression/RHEL-15867-glibc-sys-cdefs-h-is-no-longer-compatible-with-C90-compilers

View File

@ -0,0 +1,53 @@
#!/bin/bash
# vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# runtest.sh of /tools/glibc/Regression/RHEL-15867-glibc-sys-cdefs-h-is-no-longer-compatible-with-C90-compilers
# Description: Test for RHEL-15867 (glibc: <sys/cdefs.h> is no longer compatible with C90 compilers).
# Author: Martin Coufal <mcoufal@redhat.com>
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# Copyright (c) 2023 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/share/beakerlib/beakerlib.sh || exit 1
PACKAGE="glibc"
TEST_NAME="tst-RHEL-15867"
rlJournalStart
rlPhaseStartSetup
rlAssertRpm $PACKAGE
rlRun "TmpDir=\$(mktemp -d)" 0 "Creating tmp directory"
rlRun "cp *.c $TmpDir"
rlRun "pushd $TmpDir"
rlRun "gcc -D_FORTIFY_SOURCE=0 -O ${TEST_NAME}.c -o $TEST_NAME"
rlPhaseEnd
rlPhaseStartTest
rlAssertExists "$TEST_NAME"
rlRun -l "./$TEST_NAME"
rlPhaseEnd
rlPhaseStartCleanup
rlRun "popd"
rlRun "rm -r $TmpDir" 0 "Removing tmp directory"
rlPhaseEnd
rlJournalPrintText
rlJournalEnd

View File

@ -0,0 +1,11 @@
#include <stdio.h>
int main(int argc, char** argv) {
#ifdef __glibc_fortify
printf("ERROR: __glibc_fortify is defined! Possible regression (RHEL-15867)\n");
return(1);
#endif
return(0);
}

View File

@ -0,0 +1,24 @@
summary: 'Test for RHEL-19445 (glibc: Report __resolv_context_get memory allocation
failure in getaddrinfo).'
description: ''
adjust:
- enabled: false
when: distro < rhel-8.10
- enabled: false
when: distro == rhel-9 and distro < rhel-9.4
contact: Martin Coufal <mcoufal@redhat.com>
component:
- glibc
test: ./runtest.sh
framework: beakerlib
recommend:
- glibc
- gcc
- gdb
- glibc-debuginfo
- glibc-debugsource
duration: 10m
extra-summary:
/tools/glibc/Regression/RHEL-19445-glibc-Report-__resolv_context_get-memory-allocation-failure-in-getaddrinfo
extra-task:
/tools/glibc/Regression/RHEL-19445-glibc-Report-__resolv_context_get-memory-allocation-failure-in-getaddrinfo

View File

@ -0,0 +1,60 @@
#!/bin/bash
# vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# runtest.sh of /tools/glibc/Regression/RHEL-19445-glibc-Report-__resolv_context_get-memory-allocation-failure-in-getaddrinfo
# Description: Test for RHEL-19444, RHEL-19445, RHEL-21239, RHEL-21240 (glibc: Report __resolv_context_get memory allocation failure in getaddrinfo).
# Author: Martin Coufal <mcoufal@redhat.com>
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# Copyright (c) 2024 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/share/beakerlib/beakerlib.sh || exit 1
PACKAGE="glibc"
TESTNAME="test"
rlJournalStart
rlPhaseStartSetup
rlAssertRpm $PACKAGE
rlRun "TmpDir=\$(mktemp -d)" 0 "Creating tmp directory"
rlRun "cp src/* $TmpDir"
rlRun "pushd $TmpDir"
rlPhaseEnd
rlPhaseStartTest
rlRun "gcc -g -pthread ${TESTNAME}.c -o $TESTNAME"
rlAssertExists $TESTNAME
if rlIsRHEL ">=9" || rlIsCentOS ">=9" || rlIsFedora
then
rlRun "gdb --batch -x gdb-rhel9.script ./$TESTNAME &> gdb.out"
else
rlRun "gdb --batch -x gdb-$(uname -m).script ./$TESTNAME &> gdb.out"
fi
rlAssertGrep "RHEL-19445:PASS" gdb.out
rlFileSubmit gdb.out
rlPhaseEnd
rlPhaseStartCleanup
rlRun "popd"
rlRun "rm -r $TmpDir" 0 "Removing tmp directory"
rlPhaseEnd
rlJournalPrintText
rlJournalEnd

View File

@ -0,0 +1,17 @@
set confirm off
set breakpoint pending on
b gaih_inet
r
b __resolv_context_get
c
s
return
n
n
n
n
n
set variable res_ctx=0
set variable errno=12
c
q

View File

@ -0,0 +1,13 @@
set confirm off
set breakpoint pending on
b gaih_inet
r
b __resolv_context_get
c
s
return
n
set variable res_ctx=0
set variable errno=12
c
q

View File

@ -0,0 +1,10 @@
set confirm off
set breakpoint pending on
b gaih_inet
b __resolv_context_get
r
set variable errno=12
return 0
c
q

View File

@ -0,0 +1,18 @@
set confirm off
set breakpoint pending on
b gaih_inet
r
b __resolv_context_get
c
s
return
n
n
n
n
n
n
set variable res_ctx = 0
set variable errno=12
c
q

View File

@ -0,0 +1,10 @@
set confirm off
set breakpoint pending on
b gaih_inet
r
b __resolv_context_get
c
return 0
set variable errno=12
c
q

View File

@ -0,0 +1,26 @@
#include <stdio.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <netdb.h>
#include <string.h>
int main(int argc, char *argv[] ) {
struct addrinfo ai;
struct addrinfo *ailist = NULL;
int ret=0;
memset(&ai, 0, sizeof(ai));
ai.ai_family = AF_UNSPEC;
ai.ai_flags = AI_ADDRCONFIG;
ret=getaddrinfo("12.34.56.78.abcd", "0", &ai, &ailist);
if (ret == EAI_MEMORY) {
printf("RHEL-19445:PASS\n");
}
else {
printf("FAIL: Unexpected: res=%d\nExpected EAI_MEMORY: %d\n", ret, EAI_MEMORY);
}
freeaddrinfo(ailist);
return 0;
}

View File

@ -0,0 +1,24 @@
summary: Test for RHEL-19824 (Slow wide-character stream flush in rhel8 when compared
rhel7)
description: ''
adjust:
- enabled: false
when: distro < rhel-8
- enabled: false
when: distro == rhel-8 and distro < rhel-8.9
- enabled: false
when: distro == rhel-9 and distro < rhel-9.4
contact: Martin Coufal <mcoufal@redhat.com>
component:
- glibc
test: ./runtest.sh
framework: beakerlib
recommend:
- glibc
- strace
- gcc
duration: 5m
extra-summary:
/tools/glibc/Regression/RHEL-19824-Slow-wide-character-stream-flush-in-rhel8-when-compared-rhel7
extra-task:
/tools/glibc/Regression/RHEL-19824-Slow-wide-character-stream-flush-in-rhel8-when-compared-rhel7

View File

@ -0,0 +1,13 @@
#include <stdio.h>
#include <locale.h>
#include <wchar.h>
void main(void)
{
FILE *f;
int i;
setlocale (LC_ALL, "en_US.UTF-8");
f = fopen("test.txt", "w");
for (i = 0; i < 1024; i++)
fputws(L"test", f);
fclose(f);
}

View File

@ -0,0 +1,55 @@
#!/bin/bash
# vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# runtest.sh of /tools/glibc/Regression/RHEL-19824-Slow-wide-character-stream-flush-in-rhel8-when-compared-rhel7
# Description: Test for RHEL-19824 (Slow wide-character stream flush in rhel8 when compared rhel7)
# Author: Martin Coufal <mcoufal@redhat.com>
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# Copyright (c) 2024 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/share/beakerlib/beakerlib.sh || exit 1
PACKAGE="glibc"
TEST_NAME="rhel-19824"
rlJournalStart
rlPhaseStartSetup
rlAssertRpm $PACKAGE
rlRun "TmpDir=\$(mktemp -d)" 0 "Creating tmp directory"
rlRun "cp $TEST_NAME.c $TmpDir"
rlRun "pushd $TmpDir"
rlRun "gcc -o $TEST_NAME $TEST_NAME.c"
rlAssertExists $TEST_NAME
rlPhaseEnd
rlPhaseStartTest
rlRun "strace -o $TEST_NAME.trace ./$TEST_NAME"
rlAssertExists "$TEST_NAME.trace"
rlAssertEquals "Only one write() syscall is expected" $(cat $TEST_NAME.trace | grep 'write' | wc -l) "1"
rlPhaseEnd
rlPhaseStartCleanup
rlRun "popd"
rlRun "rm -r $TmpDir" 0 "Removing tmp directory"
rlPhaseEnd
rlJournalPrintText
rlJournalEnd

View File

@ -0,0 +1,19 @@
summary: What the test does
description: ''
adjust:
- enabled: false
when: distro < rhel-9.5
contact: Sergey Kolosov <skolosov@redhat.com>
component:
- glibc
test: ./runtest.sh
framework: beakerlib
recommend:
- glibc
- python
- strace
duration: 10m
extra-summary:
/tools/glibc/Regression/RHEL-21884-malloc-backport-Do-not-use-MAP_NORESERVE-to-allocate-heap-segments
extra-task:
/tools/glibc/Regression/RHEL-21884-malloc-backport-Do-not-use-MAP_NORESERVE-to-allocate-heap-segments

View File

@ -0,0 +1,53 @@
#!/bin/bash
# vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# runtest.sh of /tools/glibc/Regression/RHEL-21884-malloc-backport-Do-not-use-MAP_NORESERVE-to-allocate-heap-segments
# Description: What the test does
# Author: Sergey Kolosov <skolosov@redhat.com>
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# Copyright (c) 2024 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/share/beakerlib/beakerlib.sh || exit 1
PACKAGE="glibc"
MMAPLOG="log"
rlJournalStart
rlPhaseStartSetup
rlAssertRpm $PACKAGE
rlRun "TESTTMPDIR=$(mktemp -d)"
rlRun "pushd $TESTTMPDIR"
rlPhaseEnd
rlPhaseStartTest
rlRun -l "strace -f -emmap python -c 'import threading; threading.Thread(None, lambda: 0).start()' 2>&1 |grep mmap >$MMAPLOG"
rlAssertGrep mmap $MMAPLOG
rlAssertNotGrep MAP_NORESERVE $MMAPLOG
rlFileSubmit $MMAPLOG
rlPhaseEnd
rlPhaseStartCleanup
rlRun "popd"
rlRun "rm -r $TESTTMPDIR"
rlPhaseEnd
rlJournalPrintText
rlJournalEnd

View File

@ -0,0 +1,20 @@
summary: 'Test for RHEL-21997 (glibc: ld.so --list-diagnostics output does not print
correct cache sizes, thresholds on x86-64).'
description: ''
adjust:
- enabled: false
when: arch != x86_64
- enabled: false
when: distro < rhel-8.10
contact: Martin Coufal <mcoufal@redhat.com>
component:
- glibc
test: ./runtest.sh
framework: beakerlib
recommend:
- glibc
duration: 5m
extra-summary:
/tools/glibc/Regression/RHEL-21997-glibc-ld-so-list-diagnostics-output-does-not-print-correct-cache-sizes-thresholds-on-x86-64
extra-task:
/tools/glibc/Regression/RHEL-21997-glibc-ld-so-list-diagnostics-output-does-not-print-correct-cache-sizes-thresholds-on-x86-64

View File

@ -0,0 +1,55 @@
#!/bin/bash
# vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# runtest.sh of /tools/glibc/Regression/RHEL-21997-glibc-ld-so-list-diagnostics-output-does-not-print-correct-cache-sizes-thresholds-on-x86-64
# Description: Test for RHEL-21997 (glibc: ld.so --list-diagnostics output does not print correct cache sizes, thresholds on x86-64).
# Author: Martin Coufal <mcoufal@redhat.com>
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# Copyright (c) 2024 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/share/beakerlib/beakerlib.sh || exit 1
PACKAGE="glibc"
rlJournalStart
rlPhaseStartSetup
rlAssertRpm $PACKAGE
rlRun "TmpDir=\$(mktemp -d)" 0 "Creating tmp directory"
rlRun "pushd $TmpDir"
rlPhaseEnd
rlPhaseStartTest
rlRun "ld.so --list-diagnostics > diagnostics.out"
rlLogInfo "diagnostics.out:\n$(cat diagnostics.out)"
rlAssertNotEquals "'x86.cpu_features.data_cache_size' should not be zero" "$(cat diagnostics.out | grep 'x86.cpu_features.data_cache_size' | cut -d "=" -f2)" "0x0"
rlAssertNotEquals "'x86.cpu_features.shared_cache_size' should not be zero" "$(cat diagnostics.out | grep 'x86.cpu_features.shared_cache_size' | cut -d "=" -f2)" "0x0"
rlAssertNotEquals "'x86.cpu_features.non_temporal_threshold' should not be zero" "$(cat diagnostics.out | grep 'x86.cpu_features.non_temporal_threshold' | cut -d "=" -f2)" "0x0"
rlAssertNotEquals "'x86.cpu_features.rep_movsb_threshold' should not be zero" "$(cat diagnostics.out | grep 'x86.cpu_features.rep_movsb_threshold' | cut -d "=" -f2)" "0x0"
rlAssertNotEquals "'x86.cpu_features.rep_stosb_threshold' should not be zero" "$(cat diagnostics.out | grep 'x86.cpu_features.rep_stosb_threshold' | cut -d "=" -f2)" "0x0"
rlPhaseEnd
rlPhaseStartCleanup
rlRun "popd"
rlRun "rm -r $TmpDir" 0 "Removing tmp directory"
rlPhaseEnd
rlJournalPrintText
rlJournalEnd

View File

@ -0,0 +1,24 @@
summary: RHEL-23472 Binaries linked against libcap and libasan crash due to stack
smashing on ppc64le due prctl change in glibc
description: ''
adjust:
- enabled: false
when: distro < rhel-8
- enabled: false
when: distro == rhel-9 and distro < rhel-9.5
contact: Sergey Kolosov <skolosov@redhat.com>
component:
- glibc
test: ./runtest.sh
framework: beakerlib
require:
- glibc
- glibc-devel
- gcc
- libasan
- libcap-devel
duration: 20m
extra-summary:
/tools/glibc/Regression/RHEL-23472-Binaries-linked-against-libcap-and-libasan-crash-due-to-stack-smashing-on-ppc64le
extra-task:
/tools/glibc/Regression/RHEL-23472-Binaries-linked-against-libcap-and-libasan-crash-due-to-stack-smashing-on-ppc64le

View File

@ -0,0 +1,58 @@
#!/bin/bash
# vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# runtest.sh of /tools/glibc/Regression/RHEL-23472-Binaries-linked-against-libcap-and-libasan-crash-due-to-stack-smashing-on-ppc64le
# Description: RHEL-23472 Binaries linked against libcap and libasan crash due to stack smashing on ppc64le due prctl change in glibc
# Author: Sergey Kolosov <skolosov@redhat.com>
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# Copyright (c) 2024 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/share/beakerlib/beakerlib.sh || exit 1
PACKAGE="glibc"
TESTPROG="test"
rlJournalStart
rlPhaseStartSetup
rlAssertRpm $PACKAGE
rlRun "TESTTMPDIR=$(mktemp -d)"
rlRun "cp ${TESTPROG}.c $TESTTMPDIR"
rlRun "pushd $TESTTMPDIR"
rlPhaseEnd
rlPhaseStartTest
rlRun -c "gcc ${TESTPROG}.c -o $TESTPROG -lcap"
rlAssertExists "$TESTPROG"
rlRun -c "./${TESTPROG}"
rlRun -l "gcc ${TESTPROG}.c -o $TESTPROG -lcap -fsanitize=address"
rlRun -l "ulimit -a"
rlRun -l "ulimit -c unlimited"
rlRun -l "ulimit -a"
rlRun -l "ASAN_OPTIONS=madv_dontdump=1:disable_coredump=0 ./test"
rlPhaseEnd
rlPhaseStartCleanup
rlRun "popd"
rlRun "rm -r $TESTTMPDIR"
rlPhaseEnd
rlJournalPrintText
rlJournalEnd

View File

@ -0,0 +1,6 @@
#include <stdio.h>
int main(void) {
puts("Hello world");
return 0;
}

View File

@ -0,0 +1,20 @@
summary: 'Test for RHEL-24761 (GLIBC: Base enablement support for Power11 platform)'
description: ''
adjust:
- enabled: false
when: arch != ppc64le
- enabled: false
when: distro < rhel-10
contact: Martin Coufal <mcoufal@redhat.com>
component:
- glibc
test: ./runtest.sh
framework: beakerlib
recommend:
- glibc
- gcc
duration: 5m
extra-summary:
/tools/glibc/Regression/RHEL-24761-GLIBC-Base-enablement-support-for-Power11-platform
extra-task:
/tools/glibc/Regression/RHEL-24761-GLIBC-Base-enablement-support-for-Power11-platform

View File

@ -0,0 +1,54 @@
#!/bin/bash
# vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# runtest.sh of /tools/glibc/Regression/RHEL-24761-GLIBC-Base-enablement-support-for-Power11-platform
# Description: Test for RHEL-24761 (GLIBC: Base enablement support for Power11 platform)
# Author: Martin Coufal <mcoufal@redhat.com>
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# Copyright (c) 2024 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/share/beakerlib/beakerlib.sh || exit 1
PACKAGE="glibc"
TESTPROG="tst-getauxval"
rlJournalStart
rlPhaseStartSetup
rlAssertRpm $PACKAGE
rlRun "TESTTMPDIR=$(mktemp -d)"
rlRun "cp ${TESTPROG}.c $TESTTMPDIR"
rlRun "pushd $TESTTMPDIR"
rlPhaseEnd
rlPhaseStartTest
rlRun -c "gcc ${TESTPROG}.c -o $TESTPROG"
rlAssertExists "$TESTPROG"
rlRun -l "./${TESTPROG}"
rlPhaseEnd
rlPhaseStartCleanup
rlRun "popd"
rlRun "rm -r $TESTTMPDIR"
rlPhaseEnd
rlJournalPrintText
rlJournalEnd

View File

@ -0,0 +1,27 @@
#include <errno.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/auxv.h>
int getauxval_wrap (unsigned long type, char* name) {
unsigned long ret;
errno=0;
ret = getauxval (type);
printf ("%s ret: %lx\n", name, ret);
printf ("%s errno: %d (%s)\n", name, errno, strerror(errno));
/* This test requires POWER11 and kernel support that is not yet implemented.
* As of now, we expect the return value to be 0 and errno set to ENOENT.
* */
if (ret != 0 || errno != ENOENT)
return -1;
return 0;
}
int main (void) {
unsigned long res;
res = getauxval_wrap (AT_HWCAP3, "AT_HWCAP3,");
res &= getauxval_wrap (AT_HWCAP4, "AT_HWCAP4,");
return res;
}

View File

@ -0,0 +1,22 @@
summary:
'Test for RHEL-31523 (glibc: Forward port POWER10 multilib support to RHEL10)'
description: ''
tag:
- power10
adjust:
- enabled: false
when: distro != rhel-10
- enabled: false
when: arch != ppc64le
contact: Martin Coufal <mcoufal@redhat.com>
component:
- glibc
test: ./runtest.sh
framework: beakerlib
recommend:
- glibc
duration: 5m
extra-summary:
/tools/glibc/Regression/RHEL-31523-glibc-Forward-port-POWER10-multilib-support-to-RHEL10
extra-task:
/tools/glibc/Regression/RHEL-31523-glibc-Forward-port-POWER10-multilib-support-to-RHEL10

View File

@ -0,0 +1,46 @@
#!/bin/bash
# vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# runtest.sh of /tools/glibc/Regression/RHEL-31523-glibc-Forward-port-POWER10-multilib-support-to-RHEL10
# Description: Test for RHEL-31523 (glibc: Forward port POWER10 multilib support to RHEL10)
# Author: Martin Coufal <mcoufal@redhat.com>
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# Copyright (c) 2024 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/share/beakerlib/beakerlib.sh || exit 1
PACKAGE="glibc"
rlJournalStart
rlPhaseStartSetup
rlAssertRpm $PACKAGE
rlPhaseEnd
rlPhaseStartTest
rlAssertExists "/lib64/glibc-hwcaps/power10/libc.so.6"
rlAssertExists "/lib64/glibc-hwcaps/power10/libm.so.6"
rlPhaseEnd
rlPhaseStartCleanup
rlPhaseEnd
rlJournalPrintText
rlJournalEnd

View File

@ -0,0 +1,21 @@
summary:
'Test for RHEL-2283 (glibc: Do not install libc_malloc_debug.so.0 by default)'
enabled: true
description: ''
adjust:
- enabled: false
when: distro < rhel-10
contact: Martin Coufal <mcoufal@redhat.com>
component:
- glibc
test: ./runtest.sh
framework: beakerlib
recommend:
- glibc
- glibc-utils
duration: 5m
extra-summary:
/tools/glibc/Regression/RHEL-35602-glibc-Do-not-install-libc_malloc_debug-so-0-by-default
extra-task:
/tools/glibc/Regression/RHEL-35602-glibc-Do-not-install-libc_malloc_debug-so-0-by-default
id: 64212a72-c9c9-42cb-9a55-fc1338fa80db

View File

@ -0,0 +1,56 @@
#!/bin/bash
# vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# runtest.sh of /tools/glibc/Regression/RHEL-35602-glibc-Do-not-install-libc_malloc_debug-so-0-by-default
# Description: Test for RHEL-2283 (glibc: Do not install libc_malloc_debug.so.0 by default)
# Author: Martin Coufal <mcoufal@redhat.com>
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# Copyright (c) 2024 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/share/beakerlib/beakerlib.sh || exit 1
PACKAGE="glibc"
LIB_MEMUSAGE=$(find /usr/lib64/ -type f -name libmemusage.so)
LIB_MALLOC_DEBUG=$(find /lib64/ -type f -name libc_malloc_debug.so.0)
rlJournalStart
rlPhaseStartSetup
rlAssertRpm $PACKAGE
rlRun "TmpDir=\$(mktemp -d)" 0 "Creating tmp directory"
rlRun "pushd $TmpDir"
[ -z "$LIB_MEMUSAGE" ] && rlFail "libmemusage.so not found in /usr/lib64/"
[ -z "$LIB_MALLOC_DEBUG" ] && rlFail "libc_malloc_debug.so.0 not found in /lib64/"
rlPhaseEnd
rlPhaseStartTest
rlRun "rpm -qf $LIB_MEMUSAGE > log"
rlAssertGrep "glibc-utils" log
rlRun "rpm -qf $LIB_MALLOC_DEBUG > log"
rlAssertGrep "glibc-utils" log
rlPhaseEnd
rlPhaseStartCleanup
rlRun "popd"
rlRun "rm -r $TmpDir" 0 "Removing tmp directory"
rlPhaseEnd
rlJournalPrintText
rlJournalEnd

View File

@ -0,0 +1,19 @@
summary: 'Test for RHEL-41206.'
description: 'glibc: Remove ANSI_X3.110-1983 support from main package'
contact: Martin Coufal <mcoufal@redhat.com>
component:
- glibc
adjust:
- enabled: false
when: distro < rhel-9
test: ./runtest.sh
framework: beakerlib
require:
- glibc
- glibc-gconv-extra
duration: 5m
extra-summary:
/tools/glibc/Regression/RHEL-41206-glibc-Remove-ANSI_X3-110-1983-support-from-main-package
extra-task:
/tools/glibc/Regression/RHEL-41206-glibc-Remove-ANSI_X3-110-1983-support-from-main-package
id: 07796b0f-a593-41f3-8675-c9a27c5141b8

View File

@ -0,0 +1,48 @@
#!/bin/bash
# vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# runtest.sh of /tools/glibc/Regression/RHEL-41206-glibc-Remove-ANSI_X3-110-1983-support-from-main-package
# Description: Test for RHEL-41206 (glibc: Remove ANSI_X3.110-1983 support from main package).
# Author: Martin Coufal <mcoufal@redhat.com>
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# Copyright (c) 2024 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/share/beakerlib/beakerlib.sh || exit 1
PACKAGES="glibc glibc-gconv-extra"
rlJournalStart
rlPhaseStartSetup
for PACKAGE in $PACKAGES
do
rlAssertRpm $PACKAGE
done
rlPhaseEnd
rlPhaseStartTest
rlRun "rpm -qf /usr/lib64/gconv/ANSI_X3.110.so | grep glibc-gconv-extra" 0 "Check ANSI_X3.110-1983 support is in correct package."
rlPhaseEnd
rlPhaseStartCleanup
rlPhaseEnd
rlJournalPrintText
rlJournalEnd

View File

@ -0,0 +1,16 @@
summary: 'Test for RHEL-61392 (glibc: ldconfig auxcache format change without file
magic update).'
description: ''
contact: Martin Coufal <mcoufal@redhat.com>
component:
- glibc
test: ./runtest.sh
framework: beakerlib
require:
- glibc
duration: 5m
extra-summary:
/tools/glibc/Regression/RHEL-61392-glibc-ldconfig-auxcache-format-change-without-file-magic-update
extra-task:
/tools/glibc/Regression/RHEL-61392-glibc-ldconfig-auxcache-format-change-without-file-magic-update
id: d60ab820-ebf2-4d64-9a3e-77551bcfe616

View File

@ -0,0 +1,50 @@
#!/bin/bash
# vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# runtest.sh of /tools/glibc/Regression/RHEL-61392-glibc-ldconfig-auxcache-format-change-without-file-magic-update
# Description: Test for RHEL-61392 (glibc: ldconfig auxcache format change without file magic update).
# Author: Martin Coufal <mcoufal@redhat.com>
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# Copyright (c) 2024 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/share/beakerlib/beakerlib.sh || exit 1
PACKAGE="glibc"
rlJournalStart
rlPhaseStartSetup
rlAssertRpm $PACKAGE
rlRun "TmpDir=\$(mktemp -d)" 0 "Creating tmp directory"
rlRun "pushd $TmpDir"
rlPhaseEnd
rlPhaseStartTest
rlRun "ldconfig &> log" 0
rlAssertEquals "No output is expected." "$(cat log | wc -l)" "0"
rlPhaseEnd
rlPhaseStartCleanup
rlRun "popd"
rlRun "rm -r $TmpDir" 0 "Removing tmp directory"
rlPhaseEnd
rlJournalPrintText
rlJournalEnd

View File

@ -0,0 +1,26 @@
summary: glibc Add the RWF_ATOMIC flag
description: |
Test for RHEL-87645 (glibc: Add the RWF_ATOMIC flag)
contact: Martin Coufal <mcoufal@redhat.com>
adjust:
- enabled: false
when: distro >= rhel-10.0 and distro < rhel-10.2
continue: false
- enabled: false
when: distro < rhel-9.8
continue: false
component:
- glibc
test: ./runtest.sh
framework: beakerlib
require:
- glibc
- gcc
duration: 5m
link:
- relates: https://issues.redhat.com/browse/RHEL-87645
extra-summary: |
/tools/glibc/Regression/RHEL-87645-glibc-add-the-rwf-atomic-flag
extra-task: |
/tools/glibc/Regression/RHEL-87645-glibc-add-the-rwf-atomic-flag
id: f57b2dc5-9f7c-4a6e-b5f6-e2530636be48

View File

@ -0,0 +1,52 @@
#!/bin/bash
# vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# runtest.sh of /tools/glibc/Regression/RHEL-87645-glibc-add-the-rwf-atomic-flag
# Description: Test for RHEL-87645 (glibc: Add the RWF_ATOMIC flag)
# Author: Martin Coufal <mcoufal@redhat.com>
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# Copyright (c) 2026 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/share/beakerlib/beakerlib.sh || exit 1
PACKAGE="glibc"
rlJournalStart
rlPhaseStartSetup
rlAssertRpm "$PACKAGE"
rlRun "TmpDir=$(mktemp -d)" 0 "Creating tmp directory"
rlRun "cp test.c $TmpDir"
rlRun "pushd $TmpDir"
rlPhaseEnd
rlPhaseStartTest
rlRun "gcc test.c -o test" 0 "Compile test program"
rlAssertExists test
rlRun -l "./test" 0
rlPhaseEnd
rlPhaseStartCleanup
rlRun "popd"
rlRun "rm -r $TmpDir" 0 "Removing tmp directory"
rlPhaseEnd
rlJournalPrintText
rlJournalEnd

View File

@ -0,0 +1,15 @@
#define _GNU_SOURCE
#include <stdio.h>
#include <sys/uio.h>
int main(void)
{
#ifdef RWF_ATOMIC
printf("RWF_ATOMIC: 0x%x\n", RWF_ATOMIC);
return 0;
#else
printf("RWF_ATOMIC: not defined\n");
return 1;
#endif
}

View File

@ -0,0 +1,17 @@
summary: Tests that first day of week in Catalan is Monday
description: ''
contact: Arjun Shankar <ashankar@redhat.com>
link:
- relates: https://bugzilla.redhat.com/show_bug.cgi?id=1011900
component:
- glibc
test: ./runtest.sh
framework: beakerlib
recommend:
- glibc
- util-linux
- util-linux-ng
- glibc-langpack-ca
duration: 5m
extra-summary: /tools/glibc/Regression/bz1011900-locales-for-Catalan-are-incorrect
extra-task: /tools/glibc/Regression/bz1011900-locales-for-Catalan-are-incorrect

View File

@ -0,0 +1,62 @@
#!/bin/bash
# vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# runtest.sh of /tools/glibc/Regression/bz1011900-locales-for-Catalan-are-incorrect
# Description: Tests that first day of week in Catalan is Monday
# Author: Arjun Shankar <ashankar@redhat.com>
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# 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.
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# Include Beaker environment
. /usr/share/beakerlib/beakerlib.sh || exit 1
PACKAGE="glibc"
REQUIRES="glibc util-linux-ng util-linux"
rlJournalStart
rlPhaseStartSetup
rlAssertRpm $PACKAGE
if rlIsRHEL 8
then
rlAssertRpm glibc-langpack-ca
fi
rlRun "rpm -qa | grep util-linux" 0 "Checking for the presence of util-linux-ng or util-linux rpm"
rlRun "TmpDir=\$(mktemp -d)" 0 "Creating tmp directory"
rlRun "pushd $TmpDir"
rlPhaseEnd
rlPhaseStartTest
rlRun "LC_ALL=ca_ES cal > cal.out"
rlRun "cat cal.out | head -n 2 > cal-header.out"
rlRun "cat cal-header.out | tail -n 1 > cal-weekdays.out"
# In Catalan, the first day of the week should be Monday (dl)
rlAssertGrep "^dl" cal-weekdays.out
# Just to be sure, really. Check that it's NOT Sunday (dg)
rlAssertNotGrep "^dg" cal-weekdays.out
rlPhaseEnd
rlPhaseStartCleanup
rlRun "popd"
rlRun "rm -r $TmpDir" 0 "Removing tmp directory"
rlPhaseEnd
rlJournalPrintText
rlJournalEnd

View File

@ -0,0 +1,112 @@
$ORIGIN 125.126.127.in-addr.arpa.
$TTL 86400
@ IN SOA ns.foobar.redhat. hostmaster.foobar.redhat. (
2014042211 ; Serial Number
86400 ; Refresh
7200 ; Retry
3600000 ; Expire
86400 ; Minimum
)
;
IN NS ns.foobar.redhat.
;
1 IN PTR some-longish-hostname-1.foobar.redhat.
1 IN PTR some-longish-hostname-2.foobar.redhat.
1 IN PTR some-longish-hostname-3.foobar.redhat.
1 IN PTR some-longish-hostname-4.foobar.redhat.
1 IN PTR some-longish-hostname-5.foobar.redhat.
1 IN PTR some-longish-hostname-6.foobar.redhat.
1 IN PTR some-longish-hostname-7.foobar.redhat.
1 IN PTR some-longish-hostname-8.foobar.redhat.
1 IN PTR some-longish-hostname-9.foobar.redhat.
1 IN PTR some-longish-hostname-10.foobar.redhat.
1 IN PTR some-longish-hostname-11.foobar.redhat.
1 IN PTR some-longish-hostname-12.foobar.redhat.
1 IN PTR some-longish-hostname-13.foobar.redhat.
1 IN PTR some-longish-hostname-14.foobar.redhat.
1 IN PTR some-longish-hostname-15.foobar.redhat.
1 IN PTR some-longish-hostname-16.foobar.redhat.
1 IN PTR some-longish-hostname-17.foobar.redhat.
1 IN PTR some-longish-hostname-18.foobar.redhat.
1 IN PTR some-longish-hostname-19.foobar.redhat.
1 IN PTR some-longish-hostname-20.foobar.redhat.
1 IN PTR some-longish-hostname-21.foobar.redhat.
1 IN PTR some-longish-hostname-22.foobar.redhat.
1 IN PTR some-longish-hostname-23.foobar.redhat.
1 IN PTR some-longish-hostname-24.foobar.redhat.
1 IN PTR some-longish-hostname-25.foobar.redhat.
1 IN PTR some-longish-hostname-26.foobar.redhat.
1 IN PTR some-longish-hostname-27.foobar.redhat.
1 IN PTR some-longish-hostname-28.foobar.redhat.
1 IN PTR some-longish-hostname-29.foobar.redhat.
1 IN PTR some-longish-hostname-30.foobar.redhat.
1 IN PTR some-longish-hostname-31.foobar.redhat.
1 IN PTR some-longish-hostname-32.foobar.redhat.
1 IN PTR some-longish-hostname-33.foobar.redhat.
1 IN PTR some-longish-hostname-34.foobar.redhat.
1 IN PTR some-longish-hostname-35.foobar.redhat.
1 IN PTR some-longish-hostname-36.foobar.redhat.
1 IN PTR some-longish-hostname-37.foobar.redhat.
1 IN PTR some-longish-hostname-38.foobar.redhat.
1 IN PTR some-longish-hostname-39.foobar.redhat.
1 IN PTR some-longish-hostname-40.foobar.redhat.
1 IN PTR some-longish-hostname-41.foobar.redhat.
1 IN PTR some-longish-hostname-42.foobar.redhat.
1 IN PTR some-longish-hostname-43.foobar.redhat.
1 IN PTR some-longish-hostname-44.foobar.redhat.
1 IN PTR some-longish-hostname-45.foobar.redhat.
1 IN PTR some-longish-hostname-46.foobar.redhat.
1 IN PTR some-longish-hostname-47.foobar.redhat.
1 IN PTR some-longish-hostname-48.foobar.redhat.
1 IN PTR some-longish-hostname-49.foobar.redhat.
1 IN PTR some-longish-hostname-50.foobar.redhat.
1 IN PTR some-longish-hostname-51.foobar.redhat.
1 IN PTR some-longish-hostname-52.foobar.redhat.
1 IN PTR some-longish-hostname-53.foobar.redhat.
1 IN PTR some-longish-hostname-54.foobar.redhat.
1 IN PTR some-longish-hostname-55.foobar.redhat.
1 IN PTR some-longish-hostname-56.foobar.redhat.
1 IN PTR some-longish-hostname-57.foobar.redhat.
1 IN PTR some-longish-hostname-58.foobar.redhat.
1 IN PTR some-longish-hostname-59.foobar.redhat.
1 IN PTR some-longish-hostname-60.foobar.redhat.
1 IN PTR some-longish-hostname-61.foobar.redhat.
1 IN PTR some-longish-hostname-62.foobar.redhat.
1 IN PTR some-longish-hostname-63.foobar.redhat.
1 IN PTR some-longish-hostname-64.foobar.redhat.
1 IN PTR some-longish-hostname-65.foobar.redhat.
1 IN PTR some-longish-hostname-66.foobar.redhat.
1 IN PTR some-longish-hostname-67.foobar.redhat.
1 IN PTR some-longish-hostname-68.foobar.redhat.
1 IN PTR some-longish-hostname-69.foobar.redhat.
1 IN PTR some-longish-hostname-70.foobar.redhat.
1 IN PTR some-longish-hostname-71.foobar.redhat.
1 IN PTR some-longish-hostname-72.foobar.redhat.
1 IN PTR some-longish-hostname-73.foobar.redhat.
1 IN PTR some-longish-hostname-74.foobar.redhat.
1 IN PTR some-longish-hostname-75.foobar.redhat.
1 IN PTR some-longish-hostname-76.foobar.redhat.
1 IN PTR some-longish-hostname-77.foobar.redhat.
1 IN PTR some-longish-hostname-78.foobar.redhat.
1 IN PTR some-longish-hostname-79.foobar.redhat.
1 IN PTR some-longish-hostname-80.foobar.redhat.
1 IN PTR some-longish-hostname-81.foobar.redhat.
1 IN PTR some-longish-hostname-82.foobar.redhat.
1 IN PTR some-longish-hostname-83.foobar.redhat.
1 IN PTR some-longish-hostname-84.foobar.redhat.
1 IN PTR some-longish-hostname-85.foobar.redhat.
1 IN PTR some-longish-hostname-86.foobar.redhat.
1 IN PTR some-longish-hostname-87.foobar.redhat.
1 IN PTR some-longish-hostname-88.foobar.redhat.
1 IN PTR some-longish-hostname-89.foobar.redhat.
1 IN PTR some-longish-hostname-90.foobar.redhat.
1 IN PTR some-longish-hostname-91.foobar.redhat.
1 IN PTR some-longish-hostname-92.foobar.redhat.
1 IN PTR some-longish-hostname-93.foobar.redhat.
1 IN PTR some-longish-hostname-94.foobar.redhat.
1 IN PTR some-longish-hostname-95.foobar.redhat.
1 IN PTR some-longish-hostname-96.foobar.redhat.
1 IN PTR some-longish-hostname-97.foobar.redhat.
1 IN PTR some-longish-hostname-98.foobar.redhat.
1 IN PTR some-longish-hostname-99.foobar.redhat.
1 IN PTR some-longish-hostname-100.foobar.redhat.

View File

@ -0,0 +1,114 @@
$ORIGIN foobar.redhat.
$TTL 86400
@ IN SOA ns.foobar.redhat. hostmaster.foobar.redhat. (
2014042211 ; Serial Number
86400 ; Refresh
7200 ; Retry
3600000 ; Expire
86400 ; Minimum
)
;
IN NS ns.foobar.redhat.
ns IN A 127.0.0.1
;
some-longish-hostname-1 IN A 127.126.125.1
some-longish-hostname-2 IN A 127.126.125.1
some-longish-hostname-3 IN A 127.126.125.1
some-longish-hostname-4 IN A 127.126.125.1
some-longish-hostname-5 IN A 127.126.125.1
some-longish-hostname-6 IN A 127.126.125.1
some-longish-hostname-7 IN A 127.126.125.1
some-longish-hostname-8 IN A 127.126.125.1
some-longish-hostname-9 IN A 127.126.125.1
some-longish-hostname-10 IN A 127.126.125.1
some-longish-hostname-11 IN A 127.126.125.1
some-longish-hostname-12 IN A 127.126.125.1
some-longish-hostname-13 IN A 127.126.125.1
some-longish-hostname-14 IN A 127.126.125.1
some-longish-hostname-15 IN A 127.126.125.1
some-longish-hostname-16 IN A 127.126.125.1
some-longish-hostname-17 IN A 127.126.125.1
some-longish-hostname-18 IN A 127.126.125.1
some-longish-hostname-19 IN A 127.126.125.1
some-longish-hostname-20 IN A 127.126.125.1
some-longish-hostname-21 IN A 127.126.125.1
some-longish-hostname-22 IN A 127.126.125.1
some-longish-hostname-23 IN A 127.126.125.1
some-longish-hostname-24 IN A 127.126.125.1
some-longish-hostname-25 IN A 127.126.125.1
some-longish-hostname-26 IN A 127.126.125.1
some-longish-hostname-27 IN A 127.126.125.1
some-longish-hostname-28 IN A 127.126.125.1
some-longish-hostname-29 IN A 127.126.125.1
some-longish-hostname-30 IN A 127.126.125.1
some-longish-hostname-31 IN A 127.126.125.1
some-longish-hostname-32 IN A 127.126.125.1
some-longish-hostname-33 IN A 127.126.125.1
some-longish-hostname-34 IN A 127.126.125.1
some-longish-hostname-35 IN A 127.126.125.1
some-longish-hostname-36 IN A 127.126.125.1
some-longish-hostname-37 IN A 127.126.125.1
some-longish-hostname-38 IN A 127.126.125.1
some-longish-hostname-39 IN A 127.126.125.1
some-longish-hostname-40 IN A 127.126.125.1
some-longish-hostname-41 IN A 127.126.125.1
some-longish-hostname-42 IN A 127.126.125.1
some-longish-hostname-43 IN A 127.126.125.1
some-longish-hostname-44 IN A 127.126.125.1
some-longish-hostname-45 IN A 127.126.125.1
some-longish-hostname-46 IN A 127.126.125.1
some-longish-hostname-47 IN A 127.126.125.1
some-longish-hostname-48 IN A 127.126.125.1
some-longish-hostname-49 IN A 127.126.125.1
some-longish-hostname-50 IN A 127.126.125.1
some-longish-hostname-51 IN A 127.126.125.1
some-longish-hostname-52 IN A 127.126.125.1
some-longish-hostname-53 IN A 127.126.125.1
some-longish-hostname-54 IN A 127.126.125.1
some-longish-hostname-55 IN A 127.126.125.1
some-longish-hostname-56 IN A 127.126.125.1
some-longish-hostname-57 IN A 127.126.125.1
some-longish-hostname-58 IN A 127.126.125.1
some-longish-hostname-59 IN A 127.126.125.1
some-longish-hostname-60 IN A 127.126.125.1
some-longish-hostname-61 IN A 127.126.125.1
some-longish-hostname-62 IN A 127.126.125.1
some-longish-hostname-63 IN A 127.126.125.1
some-longish-hostname-64 IN A 127.126.125.1
some-longish-hostname-65 IN A 127.126.125.1
some-longish-hostname-66 IN A 127.126.125.1
some-longish-hostname-67 IN A 127.126.125.1
some-longish-hostname-68 IN A 127.126.125.1
some-longish-hostname-69 IN A 127.126.125.1
some-longish-hostname-70 IN A 127.126.125.1
some-longish-hostname-71 IN A 127.126.125.1
some-longish-hostname-72 IN A 127.126.125.1
some-longish-hostname-73 IN A 127.126.125.1
some-longish-hostname-74 IN A 127.126.125.1
some-longish-hostname-75 IN A 127.126.125.1
some-longish-hostname-76 IN A 127.126.125.1
some-longish-hostname-77 IN A 127.126.125.1
some-longish-hostname-78 IN A 127.126.125.1
some-longish-hostname-79 IN A 127.126.125.1
some-longish-hostname-80 IN A 127.126.125.1
some-longish-hostname-81 IN A 127.126.125.1
some-longish-hostname-82 IN A 127.126.125.1
some-longish-hostname-83 IN A 127.126.125.1
some-longish-hostname-84 IN A 127.126.125.1
some-longish-hostname-85 IN A 127.126.125.1
some-longish-hostname-86 IN A 127.126.125.1
some-longish-hostname-87 IN A 127.126.125.1
some-longish-hostname-88 IN A 127.126.125.1
some-longish-hostname-89 IN A 127.126.125.1
some-longish-hostname-90 IN A 127.126.125.1
some-longish-hostname-91 IN A 127.126.125.1
some-longish-hostname-92 IN A 127.126.125.1
some-longish-hostname-93 IN A 127.126.125.1
some-longish-hostname-94 IN A 127.126.125.1
some-longish-hostname-95 IN A 127.126.125.1
some-longish-hostname-96 IN A 127.126.125.1
some-longish-hostname-97 IN A 127.126.125.1
some-longish-hostname-98 IN A 127.126.125.1
some-longish-hostname-99 IN A 127.126.125.1
some-longish-hostname-100 IN A 127.126.125.1

View File

@ -0,0 +1,19 @@
summary: Sets up bind to serve many PTR records, then queries.
description: ''
contact: Arjun Shankar <ashankar@redhat.com>
link:
- relates: https://bugzilla.redhat.com/show_bug.cgi?id=1020486
component:
- glibc
test: ./runtest.sh
framework: beakerlib
recommend:
- gcc
- glibc
- glibc-devel
- bind
- bind-utils
- caching-nameserver
duration: 5m
extra-summary: /tools/glibc/Regression/bz1020486-getnameinfo-fails-for-many-ptr-records-per-ip
extra-task: /tools/glibc/Regression/bz1020486-getnameinfo-fails-for-many-ptr-records-per-ip

View File

@ -0,0 +1,16 @@
options {
directory "/var/named";
allow-query { localhost; };
};
zone "125.126.127.in-addr.arpa" IN {
type master;
file "foobar.redhat.rdns.zone";
allow-update { none; };
};
zone "foobar.redhat" {
type master;
file "foobar.redhat.zone";
allow-update { none; };
};

View File

@ -0,0 +1,86 @@
#!/bin/bash
# vim: dict=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# runtest.sh of /tools/glibc/Regression/bz1020486-getnameinfo-fails-for-many-ptr-records-per-ip
# Description: Sets up bind to serve many PTR records, then queries.
# Author: Arjun Shankar <ashankar@redhat.com>
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# 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/share/beakerlib/beakerlib.sh || exit 1
PACKAGE="glibc"
REQUIRES=(gcc glibc glibc-devel bind)
rlJournalStart
rlPhaseStartSetup
rlFileBackup /etc/hosts
for p in ${REQUIRES[@]}; do
rlAssertRpm $p
done
# reconfigure bind
rlServiceStop "named"
rlRun "sleep 10"
rlFileBackup --clean "/etc/named.conf"
rlRun "cp named.conf /etc/"
rlRun "cp foobar.redhat*zone /var/named/"
rlRun "chown -R named:named /var/named/*"
rlRun "restorecon -F /etc/named.conf"
rlRun "restorecon -RF /var/named"
rlRun "restorecon -RF /var/run/named"
rlServiceStart "named"
rlRun "sleep 10"
# reconfigure resolver
rlFileBackup "/etc/resolv.conf"
rlRun "echo 'nameserver 127.0.0.1' > /etc/resolv.conf"
rlRun "TmpDir=\$(mktemp -d)"
rlRun "cp tst-getnameinfo.c $TmpDir"
rlRun "pushd $TmpDir"
rlRun "gcc -o tst-getnameinfo tst-getnameinfo.c"
rlAssertExists "tst-getnameinfo"
rlPhaseEnd
rlPhaseStartTest
rlRun "./tst-getnameinfo 127.126.125.1 > out"
rlLog "$(cat out)"
rlAssertGrep "Hostname:\s*some-longish-hostname" "out"
rlAssertGrep "Address:\s*127.126.125.1" "out"
rlPhaseEnd
rlPhaseStartCleanup
rlRun "popd"
rlRun "rm -r $TmpDir" 0 "Removing tmp directory"
rlRun "rm -f /var/named/foobar.redhat*zone"
rlFileRestore
rlServiceRestore "named"
rlPhaseEnd
rlJournalPrintText
rlJournalEnd

View File

@ -0,0 +1,86 @@
/*
* getnameinfo(3) (address->name lookup) tester.
*
* Compile with:
*
* cc -o getnameinfo getnameinfo.c (BSD, Linux)
*
* cc -o getnameinfo getnameinfo.c -lsocket -lnsl (SunOS 5.x)
*
* Run as: getnameinfo address
*
* Author: Wietse Venema, Eindhoven University of Technology, The Netherlands.
*
* Author: Wietse Venema, IBM T.J. Watson Research, USA.
*/
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <netdb.h>
#include <stdio.h>
#include <unistd.h>
#include <string.h>
#include <stdlib.h>
int
main (int argc, char **argv)
{
char hostbuf[NI_MAXHOST]; /* XXX */
struct addrinfo hints;
struct addrinfo *res0;
struct addrinfo *res;
const char *host;
const char *addr;
int err;
#define NO_SERVICE ((char *) 0)
if (argc != 2)
{
fprintf (stderr, "usage: %s ipaddres\n", argv[0]);
exit (1);
}
/*
* Convert address to internal form.
*/
host = argv[1];
memset ((char *) &hints, 0, sizeof (hints));
hints.ai_family = (strchr (host, ':') ? AF_INET6 : AF_INET);
hints.ai_socktype = SOCK_STREAM;
hints.ai_flags |= AI_NUMERICHOST;
if ((err = getaddrinfo (host, NO_SERVICE, &hints, &res0)) != 0)
{
fprintf (stderr, "getaddrinfo %s: %s\n", host, gai_strerror (err));
exit (1);
}
/*
* Convert host address to name.
*/
for (res = res0; res != 0; res = res->ai_next)
{
err = getnameinfo (res->ai_addr, res->ai_addrlen,
hostbuf, sizeof (hostbuf),
NO_SERVICE, 0, NI_NAMEREQD);
if (err)
{
fprintf (stderr, "getnameinfo %s: %s\n", host, gai_strerror (err));
exit (1);
}
printf ("Hostname:\t%s\n", hostbuf);
addr = (res->ai_family == AF_INET ?
(char *) &((struct sockaddr_in *) res->ai_addr)->sin_addr :
(char *) &((struct sockaddr_in6 *) res->ai_addr)->sin6_addr);
if (inet_ntop (res->ai_family, addr, hostbuf, sizeof (hostbuf)) == 0)
{
perror ("inet_ntop:");
exit (1);
}
printf ("Address:\t%s\n", hostbuf);
}
freeaddrinfo (res0);
exit (0);
}

View File

@ -0,0 +1,19 @@
#include <stdio.h>
#include <stdlib.h>
#include <sys/time.h>
int
func_1026533 (void)
{
struct timeval now;
int ret;
ret = gettimeofday (&now, NULL);
if (ret == -1)
{
perror ("gettimeofday");
fprintf (stderr, "FAIL: gettimeofday returned -1.\n");
exit (1);
}
fprintf (stdout, "Time is %ld.%06ld.\n", now.tv_sec, now.tv_usec);
return 0xdeadbeef;
}

View File

@ -0,0 +1,21 @@
summary: Test for BZ#1026533 (Calls to gettimeofday could crash with a segfault)
description: |
Bug summary: Calls to gettimeofday could crash with a segfault in __glink_PLTresolve.
Bugzilla link: https://bugzilla.redhat.com/show_bug.cgi?id=1026533
adjust:
- enabled: false
when: arch != ppc64le
contact: Martin Cermak <mcermak@redhat.com>
component:
- glibc
test: ./runtest.sh
framework: beakerlib
recommend:
- glibc
- gcc
- rpm-python
duration: 45m
link:
- relates: https://bugzilla.redhat.com/show_bug.cgi?id=1026533
extra-summary: /tools/glibc/Regression/bz1026533-gettimeofday-segfault
extra-task: /tools/glibc/Regression/bz1026533-gettimeofday-segfault

View File

@ -0,0 +1,64 @@
#!/bin/bash
# vim: dict=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# runtest.sh of /tools/glibc/Regression/bz1026533-gettimeofday-segfault
# Description: Test for BZ#1026533 (Calls to gettimeofday could crash with a segfault)
# Author: Martin Cermak <mcermak@redhat.com>
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# 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/share/beakerlib/beakerlib.sh || exit 1
PACKAGE="glibc"
rlJournalStart
rlPhaseStartSetup
rlAssertRpm $PACKAGE
rlAssertRpm binutils
rlRun "TMPDIR=$(mktemp -d)"
rlRun "cp test-1026533.c lib-1026533.c $TMPDIR/"
rlRun "pushd $TMPDIR"
ld --plt-thread-safe 2> test_ld
grep -q "unrecognized option" test_ld
if [ $? -eq 0 ]; then
rlFail "ld does not support --plt-thread-safe option so the test will not be relevant."
rlPhaseEnd; rlJournalPrintText; rlJournalEnd
exit 0
else
rlLog "ld does support --plt-thread-safe option so we can continue."
fi
rlPhaseEnd
rlPhaseStartTest
rlRun "gcc -Wl,--plt-thread-safe -g3 -O0 -Wall -pedantic -m64 -shared -fPIC -Wl,--soname,lib-1026533.so -o lib-1026533.so lib-1026533.c"
rlRun "gcc -Wl,--plt-thread-safe -ldl -g3 -O0 -Wall -pedantic -m64 -o test-1026533 test-1026533.c"
rlRun "./test-1026533 2>&1 | tee output.txt"
rlRun "grep '^PASS' output.txt"
rlPhaseEnd
rlPhaseStartCleanup
rlRun "popd"
rlRun "rm -r $TMPDIR"
rlPhaseEnd
rlJournalPrintText
rlJournalEnd

View File

@ -0,0 +1,40 @@
#include <stdio.h>
#include <stdlib.h>
#include <dlfcn.h>
union fptr {
int (*func)(void);
void *vfunc;
};
int
main (void)
{
void *handle;
union fptr myfptr;
char *error;
int ret;
handle = dlopen ("./lib-1026533.so", RTLD_NOW);
if (handle == NULL)
{
fprintf (stderr, "FAIL: dlopen failed (%s)\n", dlerror ());
exit (1);
}
dlerror ();
myfptr.vfunc = dlsym (handle, "func_1026533");
if ((error = dlerror ()) != NULL)
{
fprintf (stderr, "FAIL: dlsym failed (%s)\n", dlerror ());
exit (1);
}
ret = myfptr.func ();
if (ret != 0xdeadbeef)
{
fprintf (stderr, "FAIL: dlopen'd library function failed to "
"return expected value.\n");
exit (1);
}
dlclose (handle);
fprintf (stderr, "PASS: dlopen'd library function did not crash.\n");
exit (0);
}

View File

@ -0,0 +1,19 @@
summary: What the test does
description: ''
contact: Arjun Shankar <ashankar@redhat.com>
link:
- relates: https://bugzilla.redhat.com/show_bug.cgi?id=1053178
component:
- glibc
test: ./runtest.sh
framework: beakerlib
recommend:
- gcc
- glibc
- glibc-devel
- kernel-headers
duration: 5m
extra-summary:
/tools/glibc/Regression/bz1053178-coordinate-IPv6-definitions-for-Linux-and-glibc
extra-task:
/tools/glibc/Regression/bz1053178-coordinate-IPv6-definitions-for-Linux-and-glibc

View File

@ -0,0 +1,6 @@
#include <linux/if_bridge.h>
int main(void)
{
return 0;
}

View File

@ -0,0 +1,7 @@
#include <linux/in6.h>
#include <linux/if_bridge.h>
int main(void)
{
return 0;
}

View File

@ -0,0 +1,8 @@
#include <linux/in6.h>
#include <linux/if_bridge.h>
#include <netinet/in.h>
int main(void)
{
return 0;
}

View File

@ -0,0 +1,7 @@
#include <netinet/in.h>
#include <linux/if_bridge.h>
int main(void)
{
return 0;
}

View File

@ -0,0 +1,8 @@
#include <linux/in6.h>
#include <netinet/in.h>
#include <linux/if_bridge.h>
int main(void)
{
return 0;
}

View File

@ -0,0 +1,8 @@
#include <netinet/in.h>
#include <linux/in6.h>
#include <linux/if_bridge.h>
int main(void)
{
return 0;
}

View File

@ -0,0 +1,54 @@
#!/bin/bash
# vim: dict=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# runtest.sh of /tools/glibc/Regression/bz1053178-coordinate-IPv6-definitions-for-Linux-and-glibc
# Description: What the test does
# Author: Arjun Shankar <ashankar@redhat.com>
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# 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/share/beakerlib/beakerlib.sh || exit 1
PACKAGE="glibc"
rlJournalStart
rlPhaseStartSetup
rlAssertRpm $PACKAGE
rlRun "TmpDir=\$(mktemp -d)" 0 "Creating tmp directory"
rlRun "cp *.c $TmpDir"
rlRun "pushd $TmpDir"
rlPhaseEnd
rlPhaseStartTest
for i in {1..6}; do
rlRun -l "gcc -W -Wall -o prg$i prg$i.c"
rlAssertExists "prg$i"
done
rlPhaseEnd
rlPhaseStartCleanup
rlRun "popd"
rlRun "rm -r $TmpDir" 0 "Removing tmp directory"
rlPhaseEnd
rlJournalPrintText
rlJournalEnd

View File

@ -0,0 +1,17 @@
summary: Tests availability of _mcount
description: ''
contact: Arjun Shankar <ashankar@redhat.com>
link:
- relates: https://bugzilla.redhat.com/show_bug.cgi?id=1070458
component:
- glibc
test: ./runtest.sh
framework: beakerlib
recommend:
- binutils
- gcc
- glibc
- glibc-devel
duration: 5m
extra-summary: /tools/glibc/Regression/bz1070458-mcount-symbol-missing
extra-task: /tools/glibc/Regression/bz1070458-mcount-symbol-missing

View File

@ -0,0 +1,62 @@
#!/bin/bash
# vim: dict=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# runtest.sh of /tools/glibc/Regression/bz1070458-mcount-symbol-missing
# Description: Tests availability of _mcount
# Author: Arjun Shankar <ashankar@redhat.com>
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# 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/share/beakerlib/beakerlib.sh || exit 1
PACKAGE="glibc"
rlJournalStart
rlPhaseStartSetup
rlAssertRpm $PACKAGE
rlRun "TmpDir=\$(mktemp -d)" 0 "Creating tmp directory"
rlRun "cp *.c $TmpDir"
rlRun "pushd $TmpDir"
rlPhaseEnd
rlPhaseStartTest
rlRun -l "gcc -Wall -pedantic -g -O0 -pg tst-_mcount.c -o tst-_mcount &> gcc.err"
rlAssertExists "tst-_mcount"
rlAssertExists "gcc.err"
rlAssertNotGrep "mcount" gcc.err # if mcount doesn't exist, it shows up as error
rlRun -l "./tst-_mcount"
rlAssertExists "gmon.out"
rlRun -l "gprof -b tst-_mcount &> gprof.out"
rlAssertExists "gprof.out"
rlAssertGrep "10\s\+\.\?do_lots_of_work_with" gprof.out
rlAssertGrep "10240\s\+\.\?do_something_with" gprof.out
rlPhaseEnd
rlPhaseStartCleanup
rlRun "popd"
rlRun "rm -r $TmpDir" 0 "Removing tmp directory"
rlPhaseEnd
rlJournalPrintText
rlJournalEnd

View File

@ -0,0 +1,38 @@
#include <stdio.h>
#include <stdlib.h>
#define ASIZE 1024
volatile unsigned v = 1;
unsigned do_something_with (unsigned);
unsigned do_lots_of_work_with (volatile unsigned *, unsigned);
int
main (void)
{
unsigned i;
unsigned *a = calloc (ASIZE, sizeof (unsigned));
for (i = 0; i < 10; i++)
printf ("%u\n", do_lots_of_work_with (a, ASIZE));
return 0;
}
unsigned
do_something_with (unsigned i)
{
return i + v;
}
unsigned
do_lots_of_work_with (volatile unsigned *a, unsigned size)
{
unsigned i;
unsigned c = 0;
for (i = 0; i < size; i++)
{
c += do_something_with (a[i]);
}
return c;
}

View File

@ -0,0 +1,26 @@
summary: Tests the value and type of WCHAR_* definitions
description: ''
contact: Arjun Shankar <ashankar@redhat.com>
link:
- relates: https://bugzilla.redhat.com/show_bug.cgi?id=1070471
component:
- glibc
test: ./runtest.sh
framework: beakerlib
recommend:
- gcc
- glibc
- glibc-devel
- libgcc
- glibc.i686
- glibc-devel.i686
- libgcc.i686
- glibc.s390
- glibc-devel.s390
- libgcc.s390
- glibc.ppc
- glibc-devel.ppc
- libgcc.ppc
duration: 5m
extra-summary: /tools/glibc/Regression/bz1070471-WCHAR_MIN-and-WCHAR_MAX-value-and-type
extra-task: /tools/glibc/Regression/bz1070471-WCHAR_MIN-and-WCHAR_MAX-value-and-type

View File

@ -0,0 +1,72 @@
#!/bin/bash
# vim: dict=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# runtest.sh of /tools/glibc/Regression/bz1070471-WCHAR_MIN-and-WCHAR_MAX-value-and-type
# Description: Tests the value and type of WCHAR_* definitions
# Author: Arjun Shankar <ashankar@redhat.com>
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# 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/share/beakerlib/beakerlib.sh || exit 1
PACKAGE="glibc"
rlJournalStart
rlPhaseStartSetup
rlAssertRpm $PACKAGE
rlRun "TmpDir=\$(mktemp -d)" 0 "Creating tmp directory"
rlRun "cp tst-WCHAR_limits.c $TmpDir"
rlRun "pushd $TmpDir"
rlRun -l "gcc -Wall -pedantic -std=gnu99 tst-WCHAR_limits.c -o tst-WCHAR_limits"
rlAssertExists "tst-WCHAR_limits"
if [ "$(uname -m)" == "s390x" ]; then
cflag="-m31"
else
cflag="-m32"
fi
if rlGetSecondaryArch && rlIsRHEL "<10"; then
rlRun -l "gcc $cflag -Wall -pedantic -std=gnu99 tst-WCHAR_limits.c -o tst-WCHAR_limits${cflag}"
rlAssertExists "tst-WCHAR_limits${cflag}"
fi
rlPhaseEnd
rlPhaseStartTest
rlRun -l "./tst-WCHAR_limits > tst.out"
rlLog "$(cat tst.out)"
if rlGetSecondaryArch && rlIsRHEL "<10"; then
rlRun -l "./tst-WCHAR_limits${cflag} > tst${cflag}.out"
rlLog "$(cat tst${cflag}.out)"
fi
rlPhaseEnd
rlPhaseStartCleanup
rlRun "popd"
rlRun "rm -r $TmpDir" 0 "Removing tmp directory"
rlPhaseEnd
rlJournalPrintText
rlJournalEnd

View File

@ -0,0 +1,86 @@
#include <wchar.h>
#include <inttypes.h>
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#define BUF_SIZE 100
#define FAIL(fmt, ...) \
do { printf ("FAIL: " fmt "\n", __VA_ARGS__); exit (1); } while (0)
union number
{
int16_t i16;
int32_t i32;
int64_t i64;
};
#ifdef __aarch64__ /* wchar_t is unsigned */
# define WCHAR_MIN_STRING "0"
# define WCHAR_MAX_STRING "4294967295"
#else
# define WCHAR_MIN_STRING "-2147483648"
# define WCHAR_MAX_STRING "2147483647"
#endif
void
test_limits (void)
{
union number *n;
wchar_t min, max;
char buf[BUF_SIZE];
min = WCHAR_MIN;
max = WCHAR_MAX;
if (sizeof (wchar_t) == 4)
{
n = (void *) &min;
#ifdef __aarch64__
snprintf (buf, BUF_SIZE, "%" PRIu32, n->i32);
#else
snprintf (buf, BUF_SIZE, "%" PRId32, n->i32);
#endif
printf ("WCHAR_MIN is %s\n", buf);
if (strcmp (buf, WCHAR_MIN_STRING))
FAIL ("Expected %s", WCHAR_MIN_STRING);
n = (void *) &max;
#ifdef __aarch64__
snprintf (buf, BUF_SIZE, "%" PRIu32, n->i32);
#else
snprintf (buf, BUF_SIZE, "%" PRId32, n->i32);
#endif
printf ("WCHAR_MAX is %s\n", buf);
if (strcmp (buf, WCHAR_MAX_STRING))
FAIL ("Expected %s", WCHAR_MAX_STRING);
}
else
{
FAIL ("sizeof (wchar_t) is %zu", sizeof (wchar_t));
}
}
void
test_types (void)
{
if (__builtin_types_compatible_p (int, long))
FAIL ("%s is not sane", "__builtin_types_compatible_p");
if (!__builtin_types_compatible_p (wchar_t, typeof (WCHAR_MIN)))
FAIL ("%s is not of the same type as %s", "WCHAR_MIN", "wchar_t");
if (!__builtin_types_compatible_p (wchar_t, typeof (WCHAR_MAX)))
FAIL ("%s is not of the same type as %s", "WCHAR_MAX", "wchar_t");
}
int
main (void)
{
test_limits ();
test_types ();
return 0;
}

View File

@ -0,0 +1,18 @@
summary: What the test does
description: ''
contact: Arjun Shankar <ashankar@redhat.com>
link:
- relates: https://bugzilla.redhat.com/show_bug.cgi?id=1077389
component:
- glibc
test: ./runtest.sh
framework: beakerlib
recommend:
- gcc
- glibc
- glibc-devel
duration: 10m
extra-summary:
/tools/glibc/Regression/bz1077389-crash-in-constructor-of-dlopened-library-with-LD_LIBRARY_PATH-set
extra-task:
/tools/glibc/Regression/bz1077389-crash-in-constructor-of-dlopened-library-with-LD_LIBRARY_PATH-set

View File

@ -0,0 +1,67 @@
#!/bin/bash
# vim: dict=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# runtest.sh of /tools/glibc/Regression/bz1077389-crash-in-constructor-of-dlopened-library-with-LD_LIBRARY_PATH-set
# Description: What the test does
# Author: Arjun Shankar <ashankar@redhat.com>
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# 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/share/beakerlib/beakerlib.sh || exit 1
PACKAGE="glibc"
REQUIRES="gcc glibc glibc-devel"
rlJournalStart
rlPhaseStartSetup
rlAssertRpm --all
rlRun "TmpDir=\$(mktemp -d)" 0 "Creating tmp directory"
rlRun "cp *.c $TmpDir"
rlRun "pushd $TmpDir"
rlRun "gcc -Wall -pedantic -g3 -O0 -o tst-dlopen tst-dlopen.c -ldl"
rlAssertExists "tst-dlopen"
rlRun "gcc -Wall -pedantic -g3 -O0 -shared -fPIC -Wl,-soname=libtst-dlopen.so -o libtst-dlopen.so tst-dlopen-lib.c"
rlAssertExists "libtst-dlopen.so"
rlRun "chmod 755 $TmpDir"
rlRun "chmod 755 tst-dlopen"
rlRun "chmod 755 libtst-dlopen.so"
rlRun "chmod a+s tst-dlopen"
rlRun "useradd bz1077389"
rlRun "sed -i 's/^.*requiretty/#&/' /etc/sudoers"
rlPhaseEnd
rlPhaseStartTest
rlRun "sudo -u bz1077389 -i sh -c 'cd $TmpDir; export LD_LIBRARY_PATH=$TmpDir; ./tst-dlopen'"
rlPhaseEnd
rlPhaseStartCleanup
rlRun "popd"
rlRun "rm -r $TmpDir" 0 "Removing tmp directory"
rlRun "userdel -f bz1077389"
rlPhaseEnd
rlJournalPrintText
rlJournalEnd

View File

@ -0,0 +1,26 @@
#include <stdio.h>
#include <stdlib.h>
#include <sys/time.h>
#include <time.h>
void __attribute__ ((constructor))
setup (void)
{
char tmbuf[1024];
char buf[1024];
int ret;
struct timeval tv;
time_t nowtime;
struct tm *nowtm;
ret = gettimeofday (&tv, NULL);
if (ret == -1)
{
perror ("gettimeofday");
abort ();
}
nowtime = tv.tv_sec;
nowtm = localtime (&nowtime);
strftime(tmbuf, sizeof tmbuf, "%Y-%m-%d %H:%M:%S", nowtm);
snprintf(buf, sizeof buf, "%s.%06ld", tmbuf, tv.tv_usec);
printf ("%s\n", buf);
}

View File

@ -0,0 +1,23 @@
#include <stdio.h>
#include <stdlib.h>
#include <dlfcn.h>
#include <unistd.h>
#define DSO "./libtst-dlopen.so"
int
main(int argc, char **argv)
{
void *dl;
printf ("dlopen (\"%s\", RTLD_NOW);\n", DSO);
/* Use dlopen to trigger constructors to run. */
dl = dlopen(DSO, RTLD_NOW);
if (dl == NULL)
{
fprintf (stderr, "dlopen failure: %s\n", dlerror ());
return 1;
}
dlerror ();
dlclose(dl);
return 0;
}

View File

@ -0,0 +1,18 @@
summary: Runs a gdb backtrace in the clone wrapper
description: ''
contact: Arjun Shankar <ashankar@redhat.com>
link:
- relates: https://bugzilla.redhat.com/show_bug.cgi?id=1078225
component:
- glibc
test: ./runtest.sh
framework: beakerlib
recommend:
- gcc
- gdb
- glibc
- glibc-debuginfo
- glibc-devel
duration: 10m
extra-summary: /tools/glibc/Regression/bz1078225-clone-S-missing-CFI-markup
extra-task: /tools/glibc/Regression/bz1078225-clone-S-missing-CFI-markup

View File

@ -0,0 +1,66 @@
#!/bin/bash
# vim: dict=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# runtest.sh of /tools/glibc/Regression/bz1078225-clone-S-missing-CFI-markup
# Description: Runs a gdb backtrace in the clone wrapper
# Author: Arjun Shankar <ashankar@redhat.com>
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# 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/share/beakerlib/beakerlib.sh || exit 1
PACKAGE="glibc"
rlJournalStart
rlPhaseStartSetup
rlAssertRpm $PACKAGE
rlRun "TmpDir=\$(mktemp -d)" 0 "Creating tmp directory"
rlRun "cp *.c $TmpDir"
rlRun "pushd $TmpDir"
rlRun -l "gcc -Wall -pedantic -g -lpthread tst-clone-cfi.c -o tst-clone-cfi"
rlAssertExists "tst-clone-cfi"
rlRun -c "echo -e 'b foo\nrun\nbt\nc' > gdb.script"
rlPhaseEnd
rlPhaseStartTest
rlLog -l "gdb -batch -x gdb.script ./tst-clone-cfi &> gdb.out &"
gdb -batch -x gdb.script ./tst-clone-cfi &> gdb.out &
PID=$!
rlLog "PID=$PID"
rlRun "sleep 10"
if kill -0 $PID; then
rlFail "gdb is hung printing a backtrace"
rlRun "kill -9 $PID"
fi
rlLog "$(cat gdb.out)"
rlAssertGrep "clone" gdb.out
rlAssertGrep "foo" gdb.out
rlAssertGrep "Hello, World!" gdb.out
rlPhaseEnd
rlPhaseStartCleanup
rlRun "popd"
rlRun "rm -r $TmpDir" 0 "Removing tmp directory"
rlPhaseEnd
rlJournalPrintText
rlJournalEnd

View File

@ -0,0 +1,24 @@
#include <pthread.h>
#include <stdio.h>
int r;
static void *
foo (void *p)
{
char *m = (char *) p;
printf ("%s\n", m);
r = 0;
return &r;
}
int
main (void)
{
void *tr;
pthread_t t;
pthread_create (&t, NULL, foo, "Hello, World!");
pthread_join (t, &tr);
return *((int *) tr);
}

View File

@ -0,0 +1,21 @@
summary: Tests gethostbyXX for spurious logs for DNSSEC responses
description: ''
contact: Arjun Shankar <ashankar@redhat.com>
link:
- relates: https://bugzilla.redhat.com/show_bug.cgi?id=1088301
component:
- glibc
test: ./runtest.sh
framework: beakerlib
recommend:
- bind-utils
- gcc
- glibc
- glibc-devel
- python3
- python3-pip
duration: 5m
extra-summary:
/tools/glibc/Regression/bz1088301-gethostby-functions-log-errors-in-non-error-conditions
extra-task:
/tools/glibc/Regression/bz1088301-gethostby-functions-log-errors-in-non-error-conditions

View File

@ -0,0 +1,25 @@
#!/usr/bin/env python3
from dnslib import DNSRecord, QTYPE
from dnslib.server import DNSServer, DNSLogger
from dnslib.dns import RR
import time
class TestResolver:
def resolve(self, request, handler):
for question in request.questions:
if (question.get_qname() == "bz1088301.red.hat." and question.qtype == QTYPE.A):
reply = request.reply()
# Authoritative response
reply.add_answer(*RR.fromZone("bz1088301.red.hat 0 IN A 127.126.125.124"))
# an incorrect but sufficient RR
reply.add_answer(*RR.fromZone("bz1088301.red.hat 0 IN RRSIG A 8 4 60 20150323201003 20150309201003 4019 red.hat. foo/849/bar/baz/zoo/beep/mug="))
return reply
resolver = TestResolver()
logger = DNSLogger(prefix=False)
server = DNSServer(resolver, port=53, address="localhost", logger=logger, tcp=False)
server.start_thread()
while True:
time.sleep(1)

View File

@ -0,0 +1,78 @@
#!/bin/bash
# vim: dict=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# runtest.sh of /tools/glibc/Regression/bz1088301-gethostby-functions-log-errors-in-non-error-conditions
# Description: Tests gethostbyXX for spurious logs for DNSSEC responses
# Author: Arjun Shankar <ashankar@redhat.com>
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# 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/share/beakerlib/beakerlib.sh || exit 1
PACKAGE="glibc"
REQUIRES="gcc glibc glibc-devel"
RCONF=/etc/resolv.conf
rlJournalStart
rlPhaseStartSetup
rlFileBackup /etc/hosts
rlAssertRpm --all $REQUIRES
rlRun "python3 -m pip install dnslib"
rlRun "TmpDir=\$(mktemp -d)" 0 "Creating tmp directory"
rlRun "cp *.c *.py $TmpDir"
rlRun "pushd $TmpDir"
rlRun "gcc -o tst-gethostbyX tst-gethostbyX.c"
rlAssertExists "tst-gethostbyX"
# Start local NS
rlRun "./ns.py &"
rlRun "NS_PID=$!"
rlRun "sleep 5"
rlRun "kill -0 $NS_PID"
# resolver=localhost
rlFileBackup "$RCONF"
rlRun "echo 'nameserver 127.0.0.1' > $RCONF"
rlPhaseEnd
rlPhaseStartTest
rlRun "./tst-gethostbyX bz1088301.red.hat"
rlRun "sync"
rlRun "sleep 5"
rlAssertNotGrep "bz1088301.red.hat" /var/log/messages
rlPhaseEnd
rlPhaseStartCleanup
rlFileRestore
rlRun "kill $NS_PID"
rlRun "sleep 5"
rlRun "kill -0 $NS_PID" 1 && (kill -9 $NS_PID &> /dev/null)
rlRun "popd"
rlRun "rm -r $TmpDir" 0 "Removing tmp directory"
rlPhaseEnd
rlJournalPrintText
rlJournalEnd

View File

@ -0,0 +1,14 @@
#include <stdio.h>
#include <netdb.h>
#include <netinet/in.h>
#include <arpa/nameser.h>
#include <resolv.h>
int
main (int argc, char *argv[])
{
res_init ();
_res.options |= RES_USE_DNSSEC;
gethostbyname2 (argv[1], AF_INET);
return 0;
}

View File

@ -0,0 +1,20 @@
summary: Test for BZ#1101858 (glibc Add el_GR@euro, ur_IN, and wal_ET locales)
description: |
Bug summary: glibc: Add el_GR@euro, ur_IN, and wal_ET locales
Bugzilla link: https://bugzilla.redhat.com/show_bug.cgi?id=1101858
contact: Sergey Kolosov <skolosov@redhat.com>
link:
- relates: https://bugzilla.redhat.com/show_bug.cgi?id=1101858
component:
- glibc
test: ./runtest.sh
framework: beakerlib
recommend:
- glibc
- glibc-common
- glibc-langpack-el
- glibc-langpack-ur
- glibc-langpack-wal
duration: 20m
extra-summary: /tools/glibc/Regression/bz1101858-glibc-Add-el-GR-euro-ur-IN-and-wal-ET-locales
extra-task: /tools/glibc/Regression/bz1101858-glibc-Add-el-GR-euro-ur-IN-and-wal-ET-locales

Some files were not shown because too many files have changed in this diff Show More