CI Tests: add fmf test plan
Resolves: RHEL-65327
This commit is contained in:
parent
e7f2c8230d
commit
823c0aee76
1
.fmf/version
Normal file
1
.fmf/version
Normal file
@ -0,0 +1 @@
|
||||
1
|
15
plans/ci.fmf
Normal file
15
plans/ci.fmf
Normal file
@ -0,0 +1,15 @@
|
||||
summary: CI Gating Plan
|
||||
discover:
|
||||
how: fmf
|
||||
directory: tests
|
||||
adjust:
|
||||
- when: distro == rhel
|
||||
prepare+:
|
||||
- how: shell
|
||||
script: dnf config-manager --set-enabled *-CRB
|
||||
- when: distro == centos
|
||||
prepare+:
|
||||
- how: shell
|
||||
script: dnf config-manager --set-enabled crb
|
||||
execute:
|
||||
how: tmt
|
@ -0,0 +1,63 @@
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
#
|
||||
# Makefile of /tools/glibc/Regression/ESTALE-error-message-translation-regression-from-RHEL7
|
||||
# Description: What the test does
|
||||
# Author: Sergey Kolosov <skolosov@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/.
|
||||
#
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
export TEST=/tools/glibc/Regression/ESTALE-error-message-translation-regression-from-RHEL7
|
||||
export TESTVERSION=1.0
|
||||
|
||||
BUILT_FILES=
|
||||
|
||||
FILES=$(METADATA) runtest.sh Makefile PURPOSE estale-test.c refs
|
||||
|
||||
.PHONY: all install download clean
|
||||
|
||||
run: $(FILES) build
|
||||
./runtest.sh
|
||||
|
||||
build: $(BUILT_FILES)
|
||||
test -x runtest.sh || chmod a+x runtest.sh
|
||||
|
||||
clean:
|
||||
rm -f *~ $(BUILT_FILES)
|
||||
|
||||
|
||||
include /usr/share/rhts/lib/rhts-make.include
|
||||
|
||||
$(METADATA): Makefile
|
||||
@echo "Owner: Sergey Kolosov <skolosov@redhat.com>" > $(METADATA)
|
||||
@echo "Name: $(TEST)" >> $(METADATA)
|
||||
@echo "TestVersion: $(TESTVERSION)" >> $(METADATA)
|
||||
@echo "Path: $(TEST_DIR)" >> $(METADATA)
|
||||
@echo "Description: What the test does" >> $(METADATA)
|
||||
@echo "Type: Regression" >> $(METADATA)
|
||||
@echo "TestTime: 10m" >> $(METADATA)
|
||||
@echo "RunFor: glibc" >> $(METADATA)
|
||||
@echo "Requires: gcc glibc-devel glibc-langpack-es glibc-langpack-ja glibc-langpack-fr glibc-langpack-de glibc-langpack-it glibc-langpack-ko glibc-langpack-pt glibc-langpack-ru glibc-langpack-zh" >> $(METADATA)
|
||||
@echo "Priority: Normal" >> $(METADATA)
|
||||
@echo "License: GPLv2+" >> $(METADATA)
|
||||
@echo "Confidential: no" >> $(METADATA)
|
||||
@echo "Destructive: no" >> $(METADATA)
|
||||
@echo "Releases: -RHEL6 -RHEL7" >> $(METADATA)
|
||||
|
||||
rhts-lint $(METADATA)
|
@ -0,0 +1,3 @@
|
||||
PURPOSE of /tools/glibc/Regression/ESTALE-error-message-translation-regression-from-RHEL7
|
||||
Description: What the test does
|
||||
Author: Sergey Kolosov <skolosov@redhat.com>
|
@ -0,0 +1,14 @@
|
||||
#include <stdio.h>
|
||||
#include <locale.h>
|
||||
#include <errno.h>
|
||||
|
||||
int
|
||||
main (void)
|
||||
{
|
||||
setlocale (LC_ALL, "");
|
||||
errno = ESTALE;
|
||||
perror ("ESTALE");
|
||||
errno = EAGAIN;
|
||||
perror ("EAGAIN");
|
||||
return 0;
|
||||
}
|
@ -0,0 +1,25 @@
|
||||
summary: What the test does
|
||||
description: ''
|
||||
contact: Sergey Kolosov <skolosov@redhat.com>
|
||||
component:
|
||||
- glibc
|
||||
adjust:
|
||||
- enabled: false
|
||||
when: distro < rhel-8.9
|
||||
test: ./runtest.sh
|
||||
framework: beakerlib
|
||||
recommend:
|
||||
- gcc
|
||||
- glibc-devel
|
||||
- glibc-langpack-es
|
||||
- glibc-langpack-ja
|
||||
- glibc-langpack-fr
|
||||
- glibc-langpack-de
|
||||
- glibc-langpack-it
|
||||
- glibc-langpack-ko
|
||||
- glibc-langpack-pt
|
||||
- glibc-langpack-ru
|
||||
- glibc-langpack-zh
|
||||
duration: 10m
|
||||
extra-summary: /tools/glibc/Regression/ESTALE-error-message-translation-regression-from-RHEL7
|
||||
extra-task: /tools/glibc/Regression/ESTALE-error-message-translation-regression-from-RHEL7
|
@ -0,0 +1,2 @@
|
||||
ESTALE: Veraltete Dateizugriffsnummer (file handle)
|
||||
EAGAIN: Die Ressource ist zur Zeit nicht verfügbar
|
@ -0,0 +1,2 @@
|
||||
ESTALE: Veraltete Dateizugriffsnummer (file handle)
|
||||
EAGAIN: Die Ressource ist zur Zeit nicht verfügbar
|
@ -0,0 +1,2 @@
|
||||
ESTALE: Stale file handle
|
||||
EAGAIN: Resource temporarily unavailable
|
@ -0,0 +1,2 @@
|
||||
ESTALE: `handle' de fichero en desuso
|
||||
EAGAIN: Recurso no disponible temporalmente
|
@ -0,0 +1,2 @@
|
||||
ESTALE: Panne d'accès au fichier
|
||||
EAGAIN: Ressource temporairement non disponible
|
@ -0,0 +1,2 @@
|
||||
ESTALE: Panne d'accès au fichier
|
||||
EAGAIN: Ressource temporairement non disponible
|
@ -0,0 +1,2 @@
|
||||
ESTALE: Riferimento al file obsoleto
|
||||
EAGAIN: Risorsa temporaneamente non disponibile
|
@ -0,0 +1,2 @@
|
||||
ESTALE: 古いファイルハンドルです
|
||||
EAGAIN: リソースが一時的に利用できません
|
@ -0,0 +1,2 @@
|
||||
ESTALE: 古いファイルハンドルです
|
||||
EAGAIN: リソースが一時的に利用できません
|
@ -0,0 +1,2 @@
|
||||
ESTALE: 끊어진 파일 핸들
|
||||
EAGAIN: 자원이 일시적으로 사용 불가능함
|
@ -0,0 +1,2 @@
|
||||
ESTALE: Manipulador de arquivo corrompido
|
||||
EAGAIN: Recurso temporariamente indisponível
|
@ -0,0 +1,2 @@
|
||||
ESTALE: Устаревший дескриптор файла
|
||||
EAGAIN: Ресурс временно недоступен
|
@ -0,0 +1,2 @@
|
||||
ESTALE: 过旧的文件句柄
|
||||
EAGAIN: 资源暂时不可用
|
@ -0,0 +1,2 @@
|
||||
ESTALE: 过旧的文件控柄
|
||||
EAGAIN: 资源暂时不可用
|
@ -0,0 +1,2 @@
|
||||
ESTALE: 過舊的檔案控柄
|
||||
EAGAIN: 資源暫時無法取得
|
@ -0,0 +1,69 @@
|
||||
#!/bin/bash
|
||||
# vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
#
|
||||
# runtest.sh of /tools/glibc/Regression/ESTALE-error-message-translation-regression-from-RHEL7
|
||||
# Description: What the test does
|
||||
# Author: Sergey Kolosov <skolosov@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"
|
||||
TESTPROG="estale-test"
|
||||
TESTED_LANGS="de_AT de_DE en_US es_ES fr_FR fr_FR.utf8 it_IT ja_JP ja_JP.utf8 ko_KR.utf8 pt_BR.utf8 ru_UA.utf8 zh_CN.utf8 zh_TW.utf8"
|
||||
|
||||
rlJournalStart
|
||||
rlPhaseStartSetup
|
||||
rlAssertRpm $PACKAGE
|
||||
PACKNVR=$(rpm -q ${PACKAGE}.`arch`)
|
||||
rlRun "TESTTMPDIR=$(mktemp -d)"
|
||||
rlRun "cp ${TESTPROG}.c $TESTTMPDIR"
|
||||
rlRun "cp refs/orig_* $TESTTMPDIR"
|
||||
rlRun "pushd $TESTTMPDIR"
|
||||
rlPhaseEnd
|
||||
|
||||
rlPhaseStartTest prepare
|
||||
rlRun -c "gcc ${TESTPROG}.c -o $TESTPROG"
|
||||
rlAssertExists "$TESTPROG"
|
||||
rlPhaseEnd
|
||||
|
||||
for L in $TESTED_LANGS
|
||||
do
|
||||
rlPhaseStartTest estale-test-$L
|
||||
rlRun -c "LANG=$L ./${TESTPROG} 2> out_$L"
|
||||
if { rlIsRHEL "<=9" || rlIsCentOS "<=9"; } && [ -f orig_${L}_rhel ]
|
||||
then
|
||||
rlAssertNotDiffer out_$L orig_${L}_rhel
|
||||
else
|
||||
rlAssertNotDiffer out_$L orig_$L
|
||||
fi
|
||||
rlLogInfo "out_$L:\n$(cat out_$L)"
|
||||
rlPhaseEnd
|
||||
done
|
||||
|
||||
rlPhaseStartCleanup
|
||||
rlRun "popd"
|
||||
rlRun "rm -r $TESTTMPDIR"
|
||||
rlPhaseEnd
|
||||
rlJournalPrintText
|
||||
rlJournalEnd
|
@ -0,0 +1,64 @@
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
#
|
||||
# Makefile of /tools/glibc/Regression/bz1022022-getaddrinfo-behavior-changed-between-RHEL-6-4-and-RHEL-6-5
|
||||
# Description: Calls getaddrinfo and verifies behavior as per BZ
|
||||
# Author: Arjun Shankar <ashankar@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.
|
||||
#
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
export TEST=/tools/glibc/Regression/bz1022022-getaddrinfo-behavior-changed-between-RHEL-6-4-and-RHEL-6-5
|
||||
export TESTVERSION=1.0
|
||||
|
||||
BUILT_FILES=
|
||||
|
||||
FILES=$(METADATA) runtest.sh Makefile PURPOSE tst-getaddrinfo.c
|
||||
|
||||
.PHONY: all install download clean
|
||||
|
||||
run: $(FILES) build
|
||||
./runtest.sh
|
||||
|
||||
build: $(BUILT_FILES)
|
||||
test -x runtest.sh || chmod a+x runtest.sh
|
||||
|
||||
clean:
|
||||
rm -f *~ $(BUILT_FILES)
|
||||
|
||||
|
||||
include /usr/share/rhts/lib/rhts-make.include
|
||||
|
||||
$(METADATA): Makefile
|
||||
@echo "Owner: Arjun Shankar <ashankar@redhat.com>" > $(METADATA)
|
||||
@echo "Name: $(TEST)" >> $(METADATA)
|
||||
@echo "TestVersion: $(TESTVERSION)" >> $(METADATA)
|
||||
@echo "Path: $(TEST_DIR)" >> $(METADATA)
|
||||
@echo "Description: Calls getaddrinfo and verifies behavior as per BZ" >> $(METADATA)
|
||||
@echo "Type: Regression" >> $(METADATA)
|
||||
@echo "TestTime: 15m" >> $(METADATA)
|
||||
@echo "RunFor: glibc" >> $(METADATA)
|
||||
@echo "Requires: gcc glibc glibc-devel glibc-headers" >> $(METADATA)
|
||||
@echo "Priority: Normal" >> $(METADATA)
|
||||
@echo "License: GPLv2" >> $(METADATA)
|
||||
@echo "Confidential: no" >> $(METADATA)
|
||||
@echo "Destructive: no" >> $(METADATA)
|
||||
@echo "Bug: 1022022" >> $(METADATA)
|
||||
|
||||
rhts-lint $(METADATA)
|
@ -0,0 +1,3 @@
|
||||
PURPOSE of /tools/glibc/Regression/bz1022022-getaddrinfo-behavior-changed-between-RHEL-6-4-and-RHEL-6-5
|
||||
Description: Calls getaddrinfo and verifies behavior as per BZ
|
||||
Author: Arjun Shankar <ashankar@redhat.com>
|
@ -0,0 +1,21 @@
|
||||
summary: Calls getaddrinfo and verifies behavior as per BZ
|
||||
description: ''
|
||||
contact: Arjun Shankar <ashankar@redhat.com>
|
||||
component:
|
||||
- glibc
|
||||
test: ./runtest.sh
|
||||
framework: beakerlib
|
||||
recommend:
|
||||
- gcc
|
||||
- glibc
|
||||
- glibc-devel
|
||||
- glibc-headers
|
||||
tag:
|
||||
- simple
|
||||
- glibc-buildroot-ready
|
||||
- CI-Tier-1
|
||||
duration: 15m
|
||||
link:
|
||||
- relates: https://bugzilla.redhat.com/show_bug.cgi?id=1022022
|
||||
extra-summary: /tools/glibc/Regression/bz1022022-getaddrinfo-behavior-changed-between-RHEL-6-4-and-RHEL-6-5
|
||||
extra-task: /tools/glibc/Regression/bz1022022-getaddrinfo-behavior-changed-between-RHEL-6-4-and-RHEL-6-5
|
@ -0,0 +1,90 @@
|
||||
#!/bin/bash
|
||||
# vim: dict=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
#
|
||||
# runtest.sh of /tools/glibc/Regression/bz1022022-getaddrinfo-behavior-changed-between-RHEL-6-4-and-RHEL-6-5
|
||||
# Description: Calls getaddrinfo and verifies behavior as per BZ
|
||||
# Author: Arjun Shankar <ashankar@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
|
||||
REQUIRES=(gcc glibc glibc-devel)
|
||||
|
||||
rlJournalStart
|
||||
rlPhaseStartSetup
|
||||
for p in "${REQUIRES[@]}"; do
|
||||
rlAssertRpm "$p"
|
||||
done; unset p
|
||||
rlRun "TmpDir=\$(mktemp -d)" 0 "Creating tmp directory"
|
||||
rlRun "cp tst-getaddrinfo.c $TmpDir"
|
||||
rlRun "pushd $TmpDir"
|
||||
|
||||
rlRun "gcc -o tst-getaddrinfo tst-getaddrinfo.c"
|
||||
rlAssertExists "tst-getaddrinfo"
|
||||
|
||||
rlRun "ORIG_HOSTNAME=$(hostname)"
|
||||
rlFileBackup --clean "/etc/hostname"
|
||||
rlRun "echo 'www' > /etc/hostname"
|
||||
rlRun "hostname -F /etc/hostname"
|
||||
|
||||
rlFileBackup --clean "/etc/hosts"
|
||||
rlRun "echo '127.0.0.1 www.fubar.redhat www' >> /etc/hosts"
|
||||
rlRun "echo '::1 www.fubar.redhat www' >> /etc/hosts"
|
||||
# Note that the 'canonical name' is always the first name entry in
|
||||
# each tuple ^, i.e. 'www.fubar.redhat' in our case
|
||||
rlPhaseEnd
|
||||
|
||||
rlPhaseStartTest
|
||||
rlRun "./tst-getaddrinfo > tst.out"
|
||||
rlLog "$(cat tst.out)"
|
||||
rlRun "OUT=($(cat tst.out))"
|
||||
rlAssertEquals "Correct number of output lines" "${#OUT[@]}" "4"
|
||||
|
||||
if rlIsRHEL 6; then
|
||||
# The result 'www' for AF_INET is basically incorrect, but we want to
|
||||
# keep it consistent during the life of RHEL 6
|
||||
rlAssertEquals "gethostname" "${OUT[0]}" "www"
|
||||
rlAssertEquals "getaddrinfo, AF_INET" "${OUT[1]}" "www"
|
||||
rlAssertEquals "getaddrinfo, AF_UNSPEC" "${OUT[3]}" "www.fubar.redhat"
|
||||
|
||||
rlLog "We don't check (getaddrinfo, AF_INET6) on RHEL 6"
|
||||
else
|
||||
rlAssertEquals "gethostname" "${OUT[0]}" "www"
|
||||
rlAssertEquals "getaddrinfo, AF_INET" "${OUT[1]}" "www.fubar.redhat"
|
||||
rlAssertEquals "getaddrinfo, AF_INET6" "${OUT[2]}" "www.fubar.redhat"
|
||||
rlAssertEquals "getaddrinfo, AF_UNSPEC" "${OUT[3]}" "www.fubar.redhat"
|
||||
fi
|
||||
rlPhaseEnd
|
||||
|
||||
rlPhaseStartCleanup
|
||||
rlFileRestore "/etc/hosts"
|
||||
rlFileRestore "/etc/hostname"
|
||||
rlRun "hostname $ORIG_HOSTNAME"
|
||||
|
||||
rlRun "popd"
|
||||
rlRun "rm -r $TmpDir" 0 "Removing tmp directory"
|
||||
rlPhaseEnd
|
||||
rlJournalPrintText
|
||||
rlJournalEnd
|
@ -0,0 +1,67 @@
|
||||
#include <sys/socket.h>
|
||||
#include <sys/types.h>
|
||||
#include <unistd.h>
|
||||
#include <stdio.h>
|
||||
#include <netdb.h>
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#define SIZE 4096
|
||||
|
||||
#define exit_code_func_msg(c,f,m) \
|
||||
do \
|
||||
{ \
|
||||
printf ("error %d: %s: %s\n", c, f, m); \
|
||||
exit (1); \
|
||||
} \
|
||||
while (0)
|
||||
|
||||
static void
|
||||
get_canon_name (char *hostname, int af)
|
||||
{
|
||||
struct addrinfo hints, *result, *current;
|
||||
int error;
|
||||
|
||||
memset (&hints, 0, sizeof (hints));
|
||||
hints.ai_family = af;
|
||||
hints.ai_socktype = SOCK_DGRAM;
|
||||
hints.ai_flags = AI_CANONNAME;
|
||||
|
||||
error = getaddrinfo (hostname, NULL, &hints, &result);
|
||||
|
||||
if (error != 0)
|
||||
exit_code_func_msg (error, "getaddrinfo", gai_strerror (error));
|
||||
|
||||
if (result->ai_canonname == NULL)
|
||||
exit_code_func_msg (-1, "getaddrinfo", "No canonical name returned");
|
||||
|
||||
for (current = result;
|
||||
current != NULL && current->ai_canonname != NULL;
|
||||
current = current->ai_next)
|
||||
printf ("%s\n", current->ai_canonname);
|
||||
|
||||
freeaddrinfo (result);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
int
|
||||
main (int argc, char **argv)
|
||||
{
|
||||
|
||||
char hostname[SIZE];
|
||||
int error;
|
||||
|
||||
error = gethostname (hostname, SIZE);
|
||||
|
||||
if (error)
|
||||
exit_code_func_msg (error, "gethostname", "");
|
||||
|
||||
printf ("%s\n", hostname);
|
||||
|
||||
get_canon_name (hostname, AF_INET);
|
||||
get_canon_name (hostname, AF_INET6);
|
||||
get_canon_name (hostname, AF_UNSPEC);
|
||||
|
||||
return 0;
|
||||
}
|
@ -0,0 +1,64 @@
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
#
|
||||
# Makefile of /tools/glibc/Regression/bz1305132-segfault-in-hesiod-getgrouplist
|
||||
# Description: What the test does
|
||||
# Author: Arjun Shankar <ashankar@redhat.com>
|
||||
#
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
#
|
||||
# Copyright (c) 2016 Red Hat, Inc.
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public License as
|
||||
# published by the Free Software Foundation, either version 2 of
|
||||
# the License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be
|
||||
# useful, but WITHOUT ANY WARRANTY; without even the implied
|
||||
# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
# PURPOSE. See the GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see http://www.gnu.org/licenses/.
|
||||
#
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
export TEST=/tools/glibc/Regression/bz1305132-segfault-in-hesiod-getgrouplist
|
||||
export TESTVERSION=1.0
|
||||
|
||||
BUILT_FILES=
|
||||
|
||||
FILES=$(METADATA) runtest.sh Makefile PURPOSE named.hesiod zone-entry hesiod.conf
|
||||
|
||||
.PHONY: all install download clean
|
||||
|
||||
run: $(FILES) build
|
||||
./runtest.sh
|
||||
|
||||
build: $(BUILT_FILES)
|
||||
test -x runtest.sh || chmod a+x runtest.sh
|
||||
|
||||
clean:
|
||||
rm -f *~ $(BUILT_FILES)
|
||||
|
||||
|
||||
include /usr/share/rhts/lib/rhts-make.include
|
||||
|
||||
$(METADATA): Makefile
|
||||
@echo "Owner: Arjun Shankar <ashankar@redhat.com>" > $(METADATA)
|
||||
@echo "Name: $(TEST)" >> $(METADATA)
|
||||
@echo "TestVersion: $(TESTVERSION)" >> $(METADATA)
|
||||
@echo "Path: $(TEST_DIR)" >> $(METADATA)
|
||||
@echo "Description: What the test does" >> $(METADATA)
|
||||
@echo "Type: Regression" >> $(METADATA)
|
||||
@echo "TestTime: 20m" >> $(METADATA)
|
||||
@echo "RunFor: glibc" >> $(METADATA)
|
||||
@echo "Requires: bind bind-utils glibc nss_hesiod" >> $(METADATA)
|
||||
@echo "Priority: Normal" >> $(METADATA)
|
||||
@echo "License: GPLv2+" >> $(METADATA)
|
||||
@echo "Confidential: no" >> $(METADATA)
|
||||
@echo "Destructive: no" >> $(METADATA)
|
||||
@echo "Bug: 1305132" >> $(METADATA)
|
||||
@echo "Releases: -RHEL4 -RHELClient5 -RHELServer5 -RHEL6" >> $(METADATA)
|
||||
|
||||
rhts-lint $(METADATA)
|
@ -0,0 +1,3 @@
|
||||
PURPOSE of /tools/glibc/Regression/bz1305132-segfault-in-hesiod-getgrouplist
|
||||
Description: What the test does
|
||||
Author: Arjun Shankar <ashankar@redhat.com>
|
@ -0,0 +1,2 @@
|
||||
rhs=.bz1305132
|
||||
lhs=.ns
|
@ -0,0 +1,17 @@
|
||||
summary: Test for bz1305132 (Revisit name server list management in libresolv)
|
||||
description: ''
|
||||
link:
|
||||
- relates: https://bugzilla.redhat.com/show_bug.cgi?id=1305132
|
||||
contact: Arjun Shankar <ashankar@redhat.com>
|
||||
component:
|
||||
- glibc
|
||||
test: ./runtest.sh
|
||||
framework: beakerlib
|
||||
recommend:
|
||||
- bind
|
||||
- bind-utils
|
||||
- glibc
|
||||
- nss_hesiod
|
||||
duration: 20m
|
||||
extra-summary: /tools/glibc/Regression/bz1305132-segfault-in-hesiod-getgrouplist
|
||||
extra-task: /tools/glibc/Regression/bz1305132-segfault-in-hesiod-getgrouplist
|
@ -0,0 +1,17 @@
|
||||
; SOA and NS records.
|
||||
@ IN SOA ns.bz1305132. hostmaster.bz1305132. (
|
||||
20160915 ; serial
|
||||
3600 ; refresh every hour
|
||||
1200 ; retry every 20 minutes
|
||||
604800 ; expire after 1 week
|
||||
86400 ) ; minimum TTL 1 day
|
||||
|
||||
IN NS ns.bz1305132.
|
||||
|
||||
ns.bz1305132. A 127.0.0.1
|
||||
|
||||
; Actual Hesiod data.
|
||||
libc.group TXT "libc:*:123:gnu"
|
||||
123.gid CNAME libc.group
|
||||
gnu.passwd TXT "gnu:*:4567:123:GNU:/home/gnu:/bin/bash"
|
||||
4567.uid CNAME gnu.passwd
|
83
tests/Regression/bz1305132-segfault-in-hesiod-getgrouplist/runtest.sh
Executable file
83
tests/Regression/bz1305132-segfault-in-hesiod-getgrouplist/runtest.sh
Executable file
@ -0,0 +1,83 @@
|
||||
#!/bin/bash
|
||||
# vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
#
|
||||
# runtest.sh of /tools/glibc/Regression/bz1305132-segfault-in-hesiod-getgrouplist
|
||||
# Description: What the test does
|
||||
# Author: Arjun Shankar <ashankar@redhat.com>
|
||||
#
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
#
|
||||
# Copyright (c) 2016 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"
|
||||
REQUIRES="glibc bind"
|
||||
|
||||
rlJournalStart
|
||||
rlPhaseStartSetup
|
||||
rlFileBackup /etc/hosts
|
||||
rlAssertRpm --all
|
||||
rlRun "TmpDir=\$(mktemp -d)" 0 "Creating tmp directory"
|
||||
rlRun "cp named.hesiod zone-entry hesiod.conf $TmpDir"
|
||||
rlRun "pushd $TmpDir"
|
||||
|
||||
# set up hesiod as a query source
|
||||
rlFileBackup --clean "/etc/nsswitch.conf"
|
||||
rlRun "sed -i 's/^\(\s*group\s*:.*\)$/# \1/' /etc/nsswitch.conf"
|
||||
rlRun "echo 'group: files hesiod' >> /etc/nsswitch.conf"
|
||||
rlRun "sed -i 's/^\(\s*passwd\s*:.*\)$/# \1/' /etc/nsswitch.conf"
|
||||
rlRun "echo 'passwd: files hesiod' >> /etc/nsswitch.conf"
|
||||
rlFileBackup --clean "/etc/hesiod.conf"
|
||||
rlRun "cp hesiod.conf /etc/"
|
||||
|
||||
# set up a hesiod server
|
||||
rlServiceStop "named"
|
||||
rlRun "sleep 10"
|
||||
rlFileBackup --clean "/etc/named.conf"
|
||||
rlRun "cat zone-entry >> /etc/named.conf"
|
||||
rlFileBackup --clean "/var/named/named.hesiod"
|
||||
rlRun "cp named.hesiod /var/named"
|
||||
rlServiceStart "named"
|
||||
rlRun "sleep 10"
|
||||
rlPhaseEnd
|
||||
|
||||
rlPhaseStartTest
|
||||
# point the resolver at local hesiod server
|
||||
# (we want to do this as late as possible since it disables the default
|
||||
# DNS server from being used)
|
||||
rlRun "cp /etc/resolv.conf /etc/resolv.conf.bz1305132.bak"
|
||||
rlRun "echo 'nameserver 127.0.0.1' > /etc/resolv.conf"
|
||||
rlRun "groups gnu > groups.out"
|
||||
rlAssertGrep "gnu\s*:\s*libc" groups.out
|
||||
rlRun "cp /etc/resolv.conf.bz1305132.bak /etc/resolv.conf"
|
||||
rlPhaseEnd
|
||||
|
||||
rlPhaseStartCleanup
|
||||
rlServiceStop "named"
|
||||
rlRun "sleep 10"
|
||||
rlRun "popd"
|
||||
rlFileRestore
|
||||
rlServiceRestore "named"
|
||||
rlRun "sleep 10"
|
||||
rlRun "rm -r $TmpDir" 0 "Removing tmp directory"
|
||||
rlPhaseEnd
|
||||
rlJournalPrintText
|
||||
rlJournalEnd
|
@ -0,0 +1,6 @@
|
||||
|
||||
zone "ns.bz1305132" {
|
||||
type master;
|
||||
file "named.hesiod";
|
||||
};
|
||||
|
@ -0,0 +1,64 @@
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
#
|
||||
# Makefile of /tools/glibc/Regression/bz1330705-open-and-openat-ignore-mode-with-O-TMPFILE
|
||||
# Description: Test for BZ#1330705 (open() and openat() ignore 'mode' with O_TMPFILE)
|
||||
# Author: Sergey Kolosov <skolosov@redhat.com>
|
||||
#
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
#
|
||||
# Copyright (c) 2017 Red Hat, Inc.
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public License as
|
||||
# published by the Free Software Foundation, either version 2 of
|
||||
# the License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be
|
||||
# useful, but WITHOUT ANY WARRANTY; without even the implied
|
||||
# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
# PURPOSE. See the GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see http://www.gnu.org/licenses/.
|
||||
#
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
export TEST=/tools/glibc/Regression/bz1330705-open-and-openat-ignore-mode-with-O-TMPFILE
|
||||
export TESTVERSION=1.0
|
||||
|
||||
BUILT_FILES=
|
||||
|
||||
FILES=$(METADATA) runtest.sh Makefile PURPOSE o_tmpfile.c
|
||||
|
||||
.PHONY: all install download clean
|
||||
|
||||
run: $(FILES) build
|
||||
./runtest.sh
|
||||
|
||||
build: $(BUILT_FILES)
|
||||
test -x runtest.sh || chmod a+x runtest.sh
|
||||
|
||||
clean:
|
||||
rm -f *~ $(BUILT_FILES)
|
||||
|
||||
|
||||
include /usr/share/rhts/lib/rhts-make.include
|
||||
|
||||
$(METADATA): Makefile
|
||||
@echo "Owner: Sergey Kolosov <skolosov@redhat.com>" > $(METADATA)
|
||||
@echo "Name: $(TEST)" >> $(METADATA)
|
||||
@echo "TestVersion: $(TESTVERSION)" >> $(METADATA)
|
||||
@echo "Path: $(TEST_DIR)" >> $(METADATA)
|
||||
@echo "Description: Test for BZ#1330705 (open() and openat() ignore 'mode' with O_TMPFILE)" >> $(METADATA)
|
||||
@echo "Type: Regression" >> $(METADATA)
|
||||
@echo "TestTime: 2h" >> $(METADATA)
|
||||
@echo "RunFor: glibc" >> $(METADATA)
|
||||
@echo "Requires: glibc gcc" >> $(METADATA)
|
||||
@echo "Priority: Normal" >> $(METADATA)
|
||||
@echo "License: GPLv2+" >> $(METADATA)
|
||||
@echo "Confidential: no" >> $(METADATA)
|
||||
@echo "Destructive: no" >> $(METADATA)
|
||||
@echo "Bug: 1330705" >> $(METADATA)
|
||||
@echo "Releases: -RHEL4 -RHEL5 -RHEL6" >> $(METADATA)
|
||||
|
||||
rhts-lint $(METADATA)
|
@ -0,0 +1,8 @@
|
||||
PURPOSE of /tools/glibc/Regression/bz1330705-open-and-openat-ignore-mode-with-O-TMPFILE
|
||||
Description: Test for BZ#1330705 (open() and openat() ignore 'mode' with O_TMPFILE)
|
||||
Author: Sergey Kolosov <skolosov@redhat.com>
|
||||
Bug summary: open() and openat() ignore 'mode' with O_TMPFILE on newer kernels
|
||||
Bugzilla link: https://bugzilla.redhat.com/show_bug.cgi?id=1330705
|
||||
|
||||
The test program calls openat with __O_TMPFILE(O_TMPFILE) flag and checks if a file was created with right mode(0600).
|
||||
The kernel must support O_TMPFILE(be >= 3.11, or with the backported feature).
|
@ -0,0 +1,20 @@
|
||||
summary: Test for BZ#1330705 (open() and openat() ignore 'mode' with O_TMPFILE)
|
||||
description: |
|
||||
Bug summary: open() and openat() ignore 'mode' with O_TMPFILE on newer kernels
|
||||
Bugzilla link: https://bugzilla.redhat.com/show_bug.cgi?id=1330705
|
||||
|
||||
The test program calls openat with __O_TMPFILE(O_TMPFILE) flag and checks if a file was created with right mode(0600).
|
||||
The kernel must support O_TMPFILE(be >= 3.11, or with the backported feature).
|
||||
link:
|
||||
- relates: https://bugzilla.redhat.com/show_bug.cgi?id=1330705
|
||||
contact: Sergey Kolosov <skolosov@redhat.com>
|
||||
component:
|
||||
- glibc
|
||||
test: ./runtest.sh
|
||||
framework: beakerlib
|
||||
recommend:
|
||||
- glibc
|
||||
- gcc
|
||||
duration: 2h
|
||||
extra-summary: /tools/glibc/Regression/bz1330705-open-and-openat-ignore-mode-with-O-TMPFILE
|
||||
extra-task: /tools/glibc/Regression/bz1330705-open-and-openat-ignore-mode-with-O-TMPFILE
|
@ -0,0 +1,58 @@
|
||||
#define _GNU_SOURCE
|
||||
#include <linux/limits.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include <errno.h>
|
||||
#include <fcntl.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
#include <sys/syscall.h>
|
||||
|
||||
/* from /usr/include/bits/fcntl-linux.h in newer glibc */
|
||||
#ifndef __O_TMPFILE
|
||||
#pragma message "__O_TMPFILE is not defined!"
|
||||
# define __O_TMPFILE (020000000 | __O_DIRECTORY)
|
||||
//# define O_TMPFILE __O_TMPFILE /* Atomically create nameless file. */
|
||||
#endif
|
||||
|
||||
int main()
|
||||
{
|
||||
int fd, kfd;
|
||||
char path[PATH_MAX], tmp[PATH_MAX];
|
||||
struct stat statbuf;
|
||||
|
||||
kfd = syscall(SYS_openat, AT_FDCWD, ".", __O_TMPFILE | O_RDWR, 0600);
|
||||
if (kfd == -1) {
|
||||
if (errno == EISDIR || errno == ENOTSUP) {
|
||||
printf("__O_TMPFILE not supported by kernel, next checks dont make sense!\n");
|
||||
exit(10);
|
||||
}
|
||||
}
|
||||
|
||||
fd = openat(AT_FDCWD, ".", __O_TMPFILE | O_RDWR, 0600);
|
||||
if (fd == -1) {
|
||||
if (errno == EISDIR || errno == ENOTSUP) {
|
||||
printf("__O_TMPFILE not supported by glibc\n");
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
}
|
||||
|
||||
snprintf(path, PATH_MAX, "/proc/self/fd/%d", fd);
|
||||
readlink(path, tmp, PATH_MAX);
|
||||
printf("%s -> %s file created with __O_TMPFILE\n", path, tmp);
|
||||
|
||||
if (stat(path, &statbuf) == -1) {
|
||||
perror("stat");
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
printf("%s has mode 0%o\n", path, statbuf.st_mode & ~S_IFMT);
|
||||
|
||||
if ((statbuf.st_mode & ~S_IFMT) != 0600) {
|
||||
printf("FAIL: mode is not 0600\n");
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
@ -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/bz1330705-open-and-openat-ignore-mode-with-O-TMPFILE
|
||||
# Description: Test for BZ#1330705 (open() and openat() ignore 'mode' with O_TMPFILE)
|
||||
# Author: Sergey Kolosov <skolosov@redhat.com>
|
||||
#
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
#
|
||||
# Copyright (c) 2017 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="o_tmpfile"
|
||||
|
||||
rlJournalStart
|
||||
rlPhaseStartSetup
|
||||
rlAssertRpm $PACKAGE
|
||||
rlShowRunningKernel
|
||||
rlRun "TESTTMPDIR=$(mktemp -d)"
|
||||
rlRun "cp ${TESTPROG}.c $TESTTMPDIR"
|
||||
rlRun "pushd $TESTTMPDIR"
|
||||
rlPhaseEnd
|
||||
|
||||
rlPhaseStartTest
|
||||
rlRun -c "gcc ${TESTPROG}.c -o $TESTPROG &> log"
|
||||
rlAssertNotGrep "__O_TMPFILE is not defined" log
|
||||
rlAssertExists "$TESTPROG"
|
||||
rlRun -l "./${TESTPROG}" 0,10
|
||||
rlPhaseEnd
|
||||
|
||||
rlPhaseStartCleanup
|
||||
rlRun "popd"
|
||||
rlRun "rm -r $TESTTMPDIR"
|
||||
rlPhaseEnd
|
||||
rlJournalPrintText
|
||||
rlJournalEnd
|
@ -0,0 +1,64 @@
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
#
|
||||
# Makefile of /tools/glibc/Regression/bz1430477-glibc-Missing-else-branch-in-libc-calloc
|
||||
# Description: Test for BZ#1430477 (glibc Missing else branch in __libc_calloc)
|
||||
# Author: Sergey Kolosov <skolosov@redhat.com>
|
||||
#
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
#
|
||||
# Copyright (c) 2017 Red Hat, Inc.
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public License as
|
||||
# published by the Free Software Foundation, either version 2 of
|
||||
# the License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be
|
||||
# useful, but WITHOUT ANY WARRANTY; without even the implied
|
||||
# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
# PURPOSE. See the GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see http://www.gnu.org/licenses/.
|
||||
#
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
export TEST=/tools/glibc/Regression/bz1430477-glibc-Missing-else-branch-in-libc-calloc
|
||||
export TESTVERSION=1.0
|
||||
|
||||
BUILT_FILES=
|
||||
|
||||
FILES=$(METADATA) runtest.sh Makefile PURPOSE
|
||||
|
||||
.PHONY: all install download clean
|
||||
|
||||
run: $(FILES) build
|
||||
./runtest.sh
|
||||
|
||||
build: $(BUILT_FILES)
|
||||
test -x runtest.sh || chmod a+x runtest.sh
|
||||
|
||||
clean:
|
||||
rm -f *~ $(BUILT_FILES)
|
||||
|
||||
|
||||
include /usr/share/rhts/lib/rhts-make.include
|
||||
|
||||
$(METADATA): Makefile
|
||||
@echo "Owner: Sergey Kolosov <skolosov@redhat.com>" > $(METADATA)
|
||||
@echo "Name: $(TEST)" >> $(METADATA)
|
||||
@echo "TestVersion: $(TESTVERSION)" >> $(METADATA)
|
||||
@echo "Path: $(TEST_DIR)" >> $(METADATA)
|
||||
@echo "Description: Test for BZ#1430477 (glibc Missing else branch in __libc_calloc)" >> $(METADATA)
|
||||
@echo "Type: Regression" >> $(METADATA)
|
||||
@echo "TestTime: 2h" >> $(METADATA)
|
||||
@echo "RunFor: glibc" >> $(METADATA)
|
||||
@echo "Requires: glibc rpm-build" >> $(METADATA)
|
||||
@echo "Priority: Normal" >> $(METADATA)
|
||||
@echo "License: GPLv2+" >> $(METADATA)
|
||||
@echo "Confidential: no" >> $(METADATA)
|
||||
@echo "Destructive: no" >> $(METADATA)
|
||||
@echo "Bug: 1430477" >> $(METADATA)
|
||||
@echo "Releases: -RHEL4 -RHEL5 -RHEL6" >> $(METADATA)
|
||||
|
||||
rhts-lint $(METADATA)
|
@ -0,0 +1,8 @@
|
||||
PURPOSE of /tools/glibc/Regression/bz1430477-glibc-Missing-else-branch-in-libc-calloc
|
||||
Description: Test for BZ#1430477 (glibc Missing else branch in __libc_calloc)
|
||||
Author: Sergey Kolosov <skolosov@redhat.com>
|
||||
Bug summary: glibc: Missing else branch in __libc_calloc
|
||||
Bugzilla link: https://bugzilla.redhat.com/show_bug.cgi?id=1430477
|
||||
|
||||
The test builds glibc, then does malloc.o recompilation and does checking that
|
||||
there are no missing initializations for oldtop and oldtopsize variables.
|
@ -0,0 +1,23 @@
|
||||
summary: Test for BZ#1430477 (glibc Missing else branch in __libc_calloc)
|
||||
description: |
|
||||
Bug summary: glibc: Missing else branch in __libc_calloc
|
||||
Bugzilla link: https://bugzilla.redhat.com/show_bug.cgi?id=1430477
|
||||
|
||||
The test builds glibc, then does malloc.o recompilation and does checking
|
||||
that there are no missing initializations for oldtop and oldtopsize
|
||||
variables.
|
||||
contact: Sergey Kolosov <skolosov@redhat.com>
|
||||
link:
|
||||
- relates: https://bugzilla.redhat.com/show_bug.cgi?id=1430477
|
||||
component:
|
||||
- glibc
|
||||
test: ./runtest.sh
|
||||
framework: beakerlib
|
||||
recommend:
|
||||
- glibc
|
||||
- rpm-build
|
||||
duration: 2h
|
||||
extra-summary:
|
||||
/tools/glibc/Regression/bz1430477-glibc-Missing-else-branch-in-libc-calloc
|
||||
extra-task:
|
||||
/tools/glibc/Regression/bz1430477-glibc-Missing-else-branch-in-libc-calloc
|
104
tests/Regression/bz1430477-glibc-Missing-else-branch-in-libc-calloc/runtest.sh
Executable file
104
tests/Regression/bz1430477-glibc-Missing-else-branch-in-libc-calloc/runtest.sh
Executable file
@ -0,0 +1,104 @@
|
||||
#!/bin/bash
|
||||
# vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
#
|
||||
# runtest.sh of /tools/glibc/Regression/bz1430477-glibc-Missing-else-branch-in-libc-calloc
|
||||
# Description: Test for BZ#1430477 (glibc Missing else branch in __libc_calloc)
|
||||
# Author: Sergey Kolosov <skolosov@redhat.com>
|
||||
#
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
#
|
||||
# Copyright (c) 2017 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
|
||||
PRARCH="$(rlGetPrimaryArch)"
|
||||
BUILDDIR="$(rpm -E '%{_builddir}')"
|
||||
SPECDIR="$(rpm -E '%{_specdir}')"
|
||||
rlAssertRpm $PACKAGE
|
||||
rlLog "Build directory: $BUILDDIR"
|
||||
rlLog "Spec directory: $SPECDIR"
|
||||
rlLog "Architecture : $PRARCH"
|
||||
|
||||
rlLog "Cleaning build and spec directories of glibc files"
|
||||
rlRun "rm -rf $BUILDDIR/glibc*" 0 "Cleaning $BUILDDIR/glibc*"
|
||||
rlRun "rm -rf $SPECDIR/glibc*.spec" 0 "Cleaning $SPECDIR/glibc*.spec"
|
||||
rlRun "rm -rf glibc*.src.rpm" 0 "Removing any present glibc src.rpm"
|
||||
|
||||
rlLog "Installing glibc srpm"
|
||||
rlFetchSrcForInstalled $PACKAGE
|
||||
rlRun "rpm -Uhv $PACKAGE*.src.rpm"
|
||||
rlAssertExists $SPECDIR/$PACKAGE.spec
|
||||
|
||||
rlRun -l "yum-builddep -y $PACKAGE-*.src.rpm" 0 "Installing dependences"
|
||||
rlPhaseEnd
|
||||
|
||||
rlPhaseStartTest "Building glibc"
|
||||
rlRun "rpmbuild -bc ${SPECDIR}/${PACKAGE}.spec &> glibc_build_log.txt" 0 "Unpacking $PACKAGE"
|
||||
ISSUCCESS=$?
|
||||
if [ $ISSUCCESS -ne 0 ]
|
||||
then
|
||||
rlFileSubmit glibc_build_log.txt
|
||||
rlFail "Glibc compilation error"
|
||||
fi
|
||||
|
||||
if rlIsRHEL "==10"; then
|
||||
BUILDS="$BUILDDIR/glibc-2.39/build*"
|
||||
elif rlIsFedora ">=41"; then
|
||||
BUILDS="$BUILDDIR/glibc*build/glibc*/build*"
|
||||
else
|
||||
BUILDS="$BUILDDIR/glibc*/build*"
|
||||
fi
|
||||
rlLog "Found builds at:"
|
||||
for build in $BUILDS; do
|
||||
rlLog "$build"
|
||||
done; unset build
|
||||
rlPhaseEnd
|
||||
|
||||
rlPhaseStartTest "Check for uninitialized values"
|
||||
for CURBUILD in $BUILDS
|
||||
do
|
||||
rlRun -c "pushd $CURBUILD"
|
||||
rlRun -c "rm malloc/malloc.o"
|
||||
rlRun -c "make -r PARALLELMFLAGS="" -C .. -C malloc objdir=`pwd` subdir=malloc &> malloc_build_log.txt"
|
||||
rlAssertExists malloc_build_log.txt
|
||||
rlAssertNotGrep "‘oldtop’ may be used uninitialized in this function" malloc_build_log.txt
|
||||
rlAssertNotGrep "‘oldtopsize’ may be used uninitialized in this function" malloc_build_log.txt
|
||||
rlFileSubmit malloc_build_log.txt ${CURBUILD}_malloc_build_log
|
||||
rlRun -c "popd"
|
||||
done
|
||||
rlPhaseEnd
|
||||
|
||||
rlPhaseStartCleanup
|
||||
if [ -n "$KEEP_GLIBC_RESULTS" ]; then
|
||||
rlLog "$(pwd) contains:"
|
||||
rlLog "$(ls $(pwd))"
|
||||
rlLog "Build Directory at: $(ls $BUILDDIR)"
|
||||
rlLog "Spec File at: $(ls $SPECDIR/glibc*.spec)"
|
||||
else
|
||||
rlRun "rm glibc*.src.rpm"
|
||||
rlRun "rm -rf $BUILDDIR/glibc* $SPECDIR/glibc*.spec"
|
||||
fi
|
||||
rlPhaseEnd
|
||||
rlJournalPrintText
|
||||
rlJournalEnd
|
@ -0,0 +1,64 @@
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
#
|
||||
# Makefile of /tools/glibc/Regression/bz1561018-glibc-Enable-annobin-annotations
|
||||
# Description: Test for BZ#1561018 (glibc Enable annobin annotations)
|
||||
# Author: Alexandra Hájková <ahajkova@redhat.com>
|
||||
#
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
#
|
||||
# Copyright (c) 2018 Red Hat, Inc.
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public License as
|
||||
# published by the Free Software Foundation, either version 2 of
|
||||
# the License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be
|
||||
# useful, but WITHOUT ANY WARRANTY; without even the implied
|
||||
# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
# PURPOSE. See the GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see http://www.gnu.org/licenses/.
|
||||
#
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
export TEST=/tools/glibc/Regression/bz1561018-glibc-Enable-annobin-annotations
|
||||
export TESTVERSION=1.0
|
||||
|
||||
BUILT_FILES=
|
||||
|
||||
FILES=$(METADATA) runtest.sh Makefile PURPOSE
|
||||
|
||||
.PHONY: all install download clean
|
||||
|
||||
run: $(FILES) build
|
||||
./runtest.sh
|
||||
|
||||
build: $(BUILT_FILES)
|
||||
test -x runtest.sh || chmod a+x runtest.sh
|
||||
|
||||
clean:
|
||||
rm -f *~ $(BUILT_FILES)
|
||||
|
||||
|
||||
include /usr/share/rhts/lib/rhts-make.include
|
||||
|
||||
$(METADATA): Makefile
|
||||
@echo "Owner: Alexandra Hájková <ahajkova@redhat.com>" > $(METADATA)
|
||||
@echo "Name: $(TEST)" >> $(METADATA)
|
||||
@echo "TestVersion: $(TESTVERSION)" >> $(METADATA)
|
||||
@echo "Path: $(TEST_DIR)" >> $(METADATA)
|
||||
@echo "Description: Test for BZ#1561018 (glibc Enable annobin annotations)" >> $(METADATA)
|
||||
@echo "Type: Regression" >> $(METADATA)
|
||||
@echo "TestTime: 1h" >> $(METADATA)
|
||||
@echo "RunFor: glibc" >> $(METADATA)
|
||||
@echo "Requires: glibc" >> $(METADATA)
|
||||
@echo "Priority: Normal" >> $(METADATA)
|
||||
@echo "License: GPLv2+" >> $(METADATA)
|
||||
@echo "Confidential: no" >> $(METADATA)
|
||||
@echo "Destructive: no" >> $(METADATA)
|
||||
@echo "Bug: 1561018" >> $(METADATA)
|
||||
@echo "Releases: -RHEL4 -RHEL5 -RHEL6 -RHEL7" >> $(METADATA)
|
||||
|
||||
rhts-lint $(METADATA)
|
@ -0,0 +1,5 @@
|
||||
PURPOSE of /tools/glibc/Regression/bz1561018-glibc-Enable-annobin-annotations
|
||||
Description: Test for BZ#1561018 (glibc Enable annobin annotations)
|
||||
Author: Alexandra Hájková <ahajkova@redhat.com>
|
||||
Bug summary: glibc: Enable annobin annotations
|
||||
Bugzilla link: https://bugzilla.redhat.com/show_bug.cgi?id=1561018
|
@ -0,0 +1,17 @@
|
||||
summary: Test for BZ#1561018 (glibc Enable annobin annotations)
|
||||
description: |
|
||||
Bug summary: glibc: Enable annobin annotations
|
||||
Bugzilla link: https://bugzilla.redhat.com/show_bug.cgi?id=1561018
|
||||
link:
|
||||
- relates: https://bugzilla.redhat.com/show_bug.cgi?id=1561018
|
||||
contact: Alexandra Hájková <ahajkova@redhat.com>
|
||||
component:
|
||||
- glibc
|
||||
test: ./runtest.sh
|
||||
framework: beakerlib
|
||||
require:
|
||||
- glibc
|
||||
- elfutils
|
||||
duration: 1h
|
||||
extra-summary: /tools/glibc/Regression/bz1561018-glibc-Enable-annobin-annotations
|
||||
extra-task: /tools/glibc/Regression/bz1561018-glibc-Enable-annobin-annotations
|
42
tests/Regression/bz1561018-glibc-Enable-annobin-annotations/runtest.sh
Executable file
42
tests/Regression/bz1561018-glibc-Enable-annobin-annotations/runtest.sh
Executable file
@ -0,0 +1,42 @@
|
||||
#!/bin/bash
|
||||
# vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
#
|
||||
# runtest.sh of /tools/glibc/Regression/bz1561018-glibc-Enable-annobin-annotations
|
||||
# Description: Test for BZ#1561018 (glibc Enable annobin annotations)
|
||||
# Author: Alexandra Hájková <ahajkova@redhat.com>
|
||||
#
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
#
|
||||
# Copyright (c) 2018 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 "eu-readelf -S /usr/lib64/libc.so.6 | grep "gnu.build.attributes""
|
||||
rlPhaseEnd
|
||||
rlJournalPrintText
|
||||
rlJournalEnd
|
@ -0,0 +1,64 @@
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
#
|
||||
# Makefile of /tools/glibc/Regression/bz1563046-getlogin-r-return-early-when-linux-sentinel-value
|
||||
# Description: Test for BZ#1563046 (getlogin_r return early when linux sentinel value)
|
||||
# Author: Sergey Kolosov <skolosov@redhat.com>
|
||||
#
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
#
|
||||
# Copyright (c) 2018 Red Hat, Inc.
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public License as
|
||||
# published by the Free Software Foundation, either version 2 of
|
||||
# the License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be
|
||||
# useful, but WITHOUT ANY WARRANTY; without even the implied
|
||||
# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
# PURPOSE. See the GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see http://www.gnu.org/licenses/.
|
||||
#
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
export TEST=/tools/glibc/Regression/bz1563046-getlogin-r-return-early-when-linux-sentinel-value
|
||||
export TESTVERSION=1.0
|
||||
|
||||
BUILT_FILES=
|
||||
|
||||
FILES=$(METADATA) runtest.sh Makefile PURPOSE tst-getlogin_r.c list.gdb
|
||||
|
||||
.PHONY: all install download clean
|
||||
|
||||
run: $(FILES) build
|
||||
./runtest.sh
|
||||
|
||||
build: $(BUILT_FILES)
|
||||
test -x runtest.sh || chmod a+x runtest.sh
|
||||
|
||||
clean:
|
||||
rm -f *~ $(BUILT_FILES)
|
||||
|
||||
|
||||
include /usr/share/rhts/lib/rhts-make.include
|
||||
|
||||
$(METADATA): Makefile
|
||||
@echo "Owner: Sergey Kolosov <skolosov@redhat.com>" > $(METADATA)
|
||||
@echo "Name: $(TEST)" >> $(METADATA)
|
||||
@echo "TestVersion: $(TESTVERSION)" >> $(METADATA)
|
||||
@echo "Path: $(TEST_DIR)" >> $(METADATA)
|
||||
@echo "Description: Test for BZ#1563046 (getlogin_r return early when linux sentinel value)" >> $(METADATA)
|
||||
@echo "Type: Regression" >> $(METADATA)
|
||||
@echo "TestTime: 30m" >> $(METADATA)
|
||||
@echo "RunFor: glibc" >> $(METADATA)
|
||||
@echo "Requires: glibc-devel glibc-debuginfo gdb" >> $(METADATA)
|
||||
@echo "Priority: Normal" >> $(METADATA)
|
||||
@echo "License: GPLv2+" >> $(METADATA)
|
||||
@echo "Confidential: no" >> $(METADATA)
|
||||
@echo "Destructive: no" >> $(METADATA)
|
||||
@echo "Bug: 1563046" >> $(METADATA)
|
||||
@echo "Releases: -RHEL4 -RHEL5 -RHEL6" >> $(METADATA)
|
||||
|
||||
rhts-lint $(METADATA)
|
@ -0,0 +1,7 @@
|
||||
PURPOSE of /tools/glibc/Regression/bz1563046-getlogin-r-return-early-when-linux-sentinel-value
|
||||
Description: Test for BZ#1563046 (getlogin_r return early when linux sentinel value)
|
||||
Author: Sergey Kolosov <skolosov@redhat.com>
|
||||
Bug summary: getlogin_r: return early when linux sentinel value is set
|
||||
Bugzilla link: https://bugzilla.redhat.com/show_bug.cgi?id=1563046
|
||||
|
||||
TODO: add check with mounting fake /proc/self/loginuid
|
@ -0,0 +1,15 @@
|
||||
set confirm off
|
||||
set breakpoint pending on
|
||||
b __getlogin_r_loginuid
|
||||
run 1
|
||||
b +18
|
||||
continue
|
||||
n
|
||||
n
|
||||
n
|
||||
n
|
||||
n
|
||||
n
|
||||
n
|
||||
n
|
||||
quit
|
@ -0,0 +1,23 @@
|
||||
summary: Test for BZ#1563046 (getlogin_r return early when linux sentinel value)
|
||||
description: |
|
||||
Bug summary: getlogin_r: return early when linux sentinel value is set
|
||||
Bugzilla link: https://bugzilla.redhat.com/show_bug.cgi?id=1563046
|
||||
|
||||
TODO: add check with mounting fake /proc/self/loginuid
|
||||
link:
|
||||
- relates: https://bugzilla.redhat.com/show_bug.cgi?id=1563046
|
||||
contact: Sergey Kolosov <skolosov@redhat.com>
|
||||
component:
|
||||
- glibc
|
||||
test: ./runtest.sh
|
||||
framework: beakerlib
|
||||
require:
|
||||
- glibc-devel
|
||||
- glibc-debuginfo
|
||||
- gdb
|
||||
- gcc
|
||||
duration: 10m
|
||||
extra-summary:
|
||||
/tools/glibc/Regression/bz1563046-getlogin-r-return-early-when-linux-sentinel-value
|
||||
extra-task:
|
||||
/tools/glibc/Regression/bz1563046-getlogin-r-return-early-when-linux-sentinel-value
|
@ -0,0 +1,59 @@
|
||||
#!/bin/bash
|
||||
# vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
#
|
||||
# runtest.sh of /tools/glibc/Regression/bz1563046-getlogin-r-return-early-when-linux-sentinel-value
|
||||
# Description: Test for BZ#1563046 (getlogin_r return early when linux sentinel value)
|
||||
# Author: Sergey Kolosov <skolosov@redhat.com>
|
||||
#
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
#
|
||||
# Copyright (c) 2018 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-getlogin_r"
|
||||
|
||||
rlJournalStart
|
||||
rlPhaseStartSetup
|
||||
rlAssertRpm $PACKAGE
|
||||
rlAssertRpm ${PACKAGE}-debuginfo
|
||||
rlRun -l "gcc --version"
|
||||
rlRun "TESTTMPDIR=$(mktemp -d)"
|
||||
rlRun "cp ${TESTPROG}.c $TESTTMPDIR"
|
||||
rlRun "cp list.gdb $TESTTMPDIR"
|
||||
rlRun "pushd $TESTTMPDIR"
|
||||
rlPhaseEnd
|
||||
|
||||
rlPhaseStartTest "${TESTPROG}"
|
||||
rlRun -c "gcc -g ${TESTPROG}.c -o ${TESTPROG}"
|
||||
rlAssertExists "${TESTPROG}"
|
||||
rlRun -c "./${TESTPROG}"
|
||||
rlRun -l "gdb --batch --command=list.gdb ./${TESTPROG} > gdb_log"
|
||||
rlAssertGrep "if (uid == (uid_t) -1)" gdb_log
|
||||
rlFileSubmit gdb_log
|
||||
rlPhaseEnd
|
||||
|
||||
rlPhaseStartCleanup
|
||||
rlRun "popd"
|
||||
rlRun "rm -r $TESTTMPDIR"
|
||||
rlPhaseEnd
|
||||
rlJournalPrintText
|
||||
rlJournalEnd
|
@ -0,0 +1,35 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
#define BUFSIZE 1024
|
||||
int main(int argc, char *argv[]) {
|
||||
int r=0,i,attempts=0;
|
||||
char *buf=NULL;
|
||||
|
||||
buf = malloc(BUFSIZE);
|
||||
switch (argc) {
|
||||
case 1:
|
||||
printf("Usage: %s count_of_attempts\n", argv[0]);
|
||||
break;
|
||||
case 2:
|
||||
attempts=atoi(argv[1]);
|
||||
printf("Running %s %d\n", argv[0], attempts);
|
||||
break;
|
||||
default:
|
||||
printf("Usage: \n");
|
||||
break;
|
||||
}
|
||||
|
||||
for (i=0; i<attempts;i++) {
|
||||
r = getlogin_r(buf, (size_t)BUFSIZE);
|
||||
if(r!=0) {
|
||||
perror("getlogin_r error: ");
|
||||
printf("\n");
|
||||
exit(1);
|
||||
}
|
||||
// printf("getlogin_r: %s;", buf);
|
||||
}
|
||||
printf("\n");
|
||||
|
||||
return 0;
|
||||
}
|
@ -0,0 +1,64 @@
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
#
|
||||
# Makefile of /tools/glibc/Regression/bz1577212-glibc-Remove-stray-Sun-RPC-exports
|
||||
# Description: Test for BZ#1577212 (glibc Remove stray Sun RPC exports)
|
||||
# Author: Alexandra Hájková <ahajkova@redhat.com>
|
||||
#
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
#
|
||||
# Copyright (c) 2019 Red Hat, Inc.
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public License as
|
||||
# published by the Free Software Foundation, either version 2 of
|
||||
# the License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be
|
||||
# useful, but WITHOUT ANY WARRANTY; without even the implied
|
||||
# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
# PURPOSE. See the GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see http://www.gnu.org/licenses/.
|
||||
#
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
export TEST=/tools/glibc/Regression/bz1577212-glibc-Remove-stray-Sun-RPC-exports
|
||||
export TESTVERSION=1.0
|
||||
|
||||
BUILT_FILES=
|
||||
|
||||
FILES=$(METADATA) runtest.sh Makefile PURPOSE
|
||||
|
||||
.PHONY: all install download clean
|
||||
|
||||
run: $(FILES) build
|
||||
./runtest.sh
|
||||
|
||||
build: $(BUILT_FILES)
|
||||
test -x runtest.sh || chmod a+x runtest.sh
|
||||
|
||||
clean:
|
||||
rm -f *~ $(BUILT_FILES)
|
||||
|
||||
|
||||
include /usr/share/rhts/lib/rhts-make.include
|
||||
|
||||
$(METADATA): Makefile
|
||||
@echo "Owner: Alexandra Hájková <ahajkova@redhat.com>" > $(METADATA)
|
||||
@echo "Name: $(TEST)" >> $(METADATA)
|
||||
@echo "TestVersion: $(TESTVERSION)" >> $(METADATA)
|
||||
@echo "Path: $(TEST_DIR)" >> $(METADATA)
|
||||
@echo "Description: Test for BZ#1577212 (glibc Remove stray Sun RPC exports)" >> $(METADATA)
|
||||
@echo "Type: Regression" >> $(METADATA)
|
||||
@echo "TestTime: 1h" >> $(METADATA)
|
||||
@echo "RunFor: glibc" >> $(METADATA)
|
||||
@echo "Requires: glibc elfutils" >> $(METADATA)
|
||||
@echo "Priority: Normal" >> $(METADATA)
|
||||
@echo "License: GPLv2+" >> $(METADATA)
|
||||
@echo "Confidential: no" >> $(METADATA)
|
||||
@echo "Destructive: no" >> $(METADATA)
|
||||
@echo "Bug: 1577212" >> $(METADATA)
|
||||
@echo "Releases: -RHEL4 -RHEL5 -RHEL6 -RHEL7" >> $(METADATA)
|
||||
|
||||
rhts-lint $(METADATA)
|
@ -0,0 +1,9 @@
|
||||
PURPOSE of /tools/glibc/Regression/bz1577212-glibc-Remove-stray-Sun-RPC-exports
|
||||
Description: Test for BZ#1577212 (glibc Remove stray Sun RPC exports)
|
||||
Author: Alexandra Hájková <ahajkova@redhat.com>
|
||||
Bug summary: glibc: Remove stray Sun RPC exports
|
||||
Bugzilla link: https://bugzilla.redhat.com/show_bug.cgi?id=1577212
|
||||
|
||||
Remove stray Sun RPC exports: In this context, “remove“ means that the default symbol version (the @@ part)
|
||||
is gone, and there is only a compat symbol (with a single @). We cannot remove the compat symbols for
|
||||
backwards compatibility reasons.
|
@ -0,0 +1,24 @@
|
||||
summary: Test for BZ#1577212 (glibc Remove stray Sun RPC exports)
|
||||
description: |
|
||||
Bug summary: glibc: Remove stray Sun RPC exports
|
||||
Bugzilla link: https://bugzilla.redhat.com/show_bug.cgi?id=1577212
|
||||
|
||||
Remove stray Sun RPC exports: In this context, “remove“ means that the
|
||||
default symbol version (the @@ part) is gone, and there is only a compat
|
||||
symbol (with a single @). We cannot remove the compat symbols for backwards
|
||||
compatibility reasons.
|
||||
contact: Alexandra Hájková <ahajkova@redhat.com>
|
||||
link:
|
||||
- relates: https://bugzilla.redhat.com/show_bug.cgi?id=1577212
|
||||
component:
|
||||
- glibc
|
||||
test: ./runtest.sh
|
||||
framework: beakerlib
|
||||
recommend:
|
||||
- glibc
|
||||
- elfutils
|
||||
duration: 1h
|
||||
extra-summary:
|
||||
/tools/glibc/Regression/bz1577212-glibc-Remove-stray-Sun-RPC-exports
|
||||
extra-task:
|
||||
/tools/glibc/Regression/bz1577212-glibc-Remove-stray-Sun-RPC-exports
|
54
tests/Regression/bz1577212-glibc-Remove-stray-Sun-RPC-exports/runtest.sh
Executable file
54
tests/Regression/bz1577212-glibc-Remove-stray-Sun-RPC-exports/runtest.sh
Executable 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/bz1577212-glibc-Remove-stray-Sun-RPC-exports
|
||||
# Description: Test for BZ#1577212 (glibc Remove stray Sun RPC exports)
|
||||
# Author: Alexandra Hájková <ahajkova@redhat.com>
|
||||
#
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
#
|
||||
# Copyright (c) 2019 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 "eu-readelf --symbols=.dynsym /usr/lib64/libc.so.6 > log"
|
||||
rlAssertNotGrep "svcauthdes_stats@@" log
|
||||
rlAssertNotGrep "svc_pollfd@@" log
|
||||
rlAssertNotGrep "rpc_createerr@@" log
|
||||
rlAssertNotGrep "svc_fdset@@" log
|
||||
rlAssertNotGrep "svc_max_pollfd@@" log
|
||||
rlPhaseEnd
|
||||
|
||||
rlPhaseStartCleanup
|
||||
rlRun "popd"
|
||||
rlRun "rm -r $TmpDir" 0 "Removing tmp directory"
|
||||
rlPhaseEnd
|
||||
rlJournalPrintText
|
||||
rlJournalEnd
|
@ -0,0 +1,65 @@
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
#
|
||||
# Makefile of /tools/glibc/Regression/bz1579451-glibc-IP-BIND-ADDRESS-NO-PORT-is-not-defined-in
|
||||
# Description: Test for BZ#1579451 (glibc IP_BIND_ADDRESS_NO_PORT is not defined in)
|
||||
# Author: Sergey Kolosov <skolosov@redhat.com>
|
||||
#
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
#
|
||||
# Copyright (c) 2019 Red Hat, Inc.
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public License as
|
||||
# published by the Free Software Foundation, either version 2 of
|
||||
# the License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be
|
||||
# useful, but WITHOUT ANY WARRANTY; without even the implied
|
||||
# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
# PURPOSE. See the GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see http://www.gnu.org/licenses/.
|
||||
#
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
export TEST=/tools/glibc/Regression/bz1579451-glibc-IP-BIND-ADDRESS-NO-PORT-is-not-defined-in
|
||||
export TESTVERSION=1.0
|
||||
|
||||
BUILT_FILES=
|
||||
|
||||
FILES=$(METADATA) runtest.sh Makefile PURPOSE bug.c
|
||||
|
||||
.PHONY: all install download clean
|
||||
|
||||
run: $(FILES) build
|
||||
./runtest.sh
|
||||
|
||||
build: $(BUILT_FILES)
|
||||
test -x runtest.sh || chmod a+x runtest.sh
|
||||
|
||||
clean:
|
||||
rm -f *~ $(BUILT_FILES)
|
||||
|
||||
|
||||
include /usr/share/rhts/lib/rhts-make.include
|
||||
|
||||
$(METADATA): Makefile
|
||||
@echo "Owner: Sergey Kolosov <skolosov@redhat.com>" > $(METADATA)
|
||||
@echo "Name: $(TEST)" >> $(METADATA)
|
||||
@echo "TestVersion: $(TESTVERSION)" >> $(METADATA)
|
||||
@echo "Path: $(TEST_DIR)" >> $(METADATA)
|
||||
@echo "Description: Test for BZ#1579451 (glibc IP_BIND_ADDRESS_NO_PORT is not defined in)" >> $(METADATA)
|
||||
@echo "Type: Regression" >> $(METADATA)
|
||||
@echo "TestTime: 10m" >> $(METADATA)
|
||||
@echo "RunFor: glibc" >> $(METADATA)
|
||||
@echo "Requires: glibc glibc-devel gcc" >> $(METADATA)
|
||||
@echo "Priority: Normal" >> $(METADATA)
|
||||
@echo "License: GPLv2+" >> $(METADATA)
|
||||
@echo "Confidential: no" >> $(METADATA)
|
||||
@echo "Destructive: no" >> $(METADATA)
|
||||
@echo "Bug: 1579451" >> $(METADATA)
|
||||
@echo "Releases: -RHEL4 -RHEL5 -RHEL6" >> $(METADATA)
|
||||
|
||||
rhts-lint $(METADATA)
|
||||
|
@ -0,0 +1,5 @@
|
||||
PURPOSE of /tools/glibc/Regression/bz1579451-glibc-IP-BIND-ADDRESS-NO-PORT-is-not-defined-in
|
||||
Description: Test for BZ#1579451 (glibc IP_BIND_ADDRESS_NO_PORT is not defined in)
|
||||
Author: Sergey Kolosov <skolosov@redhat.com>
|
||||
Bug summary: glibc: IP_BIND_ADDRESS_NO_PORT is not defined in <netinet/in.h>
|
||||
Bugzilla link: https://bugzilla.redhat.com/show_bug.cgi?id=1579451
|
@ -0,0 +1,9 @@
|
||||
#include <sys/types.h>
|
||||
#include <unistd.h>
|
||||
#include <sys/socket.h>
|
||||
#include <netinet/in.h>
|
||||
|
||||
int main(void) {
|
||||
setsockopt(0, IPPROTO_IP, IP_BIND_ADDRESS_NO_PORT, NULL, 0);
|
||||
return 0;
|
||||
}
|
@ -0,0 +1,18 @@
|
||||
summary: Test for BZ#1579451 (glibc IP_BIND_ADDRESS_NO_PORT is not defined in)
|
||||
description: |
|
||||
Bug summary: glibc: IP_BIND_ADDRESS_NO_PORT is not defined in <netinet/in.h>
|
||||
Bugzilla link: https://bugzilla.redhat.com/show_bug.cgi?id=1579451
|
||||
link:
|
||||
- relates: https://bugzilla.redhat.com/show_bug.cgi?id=1579451
|
||||
contact: Sergey Kolosov <skolosov@redhat.com>
|
||||
component:
|
||||
- glibc
|
||||
test: ./runtest.sh
|
||||
framework: beakerlib
|
||||
recommend:
|
||||
- glibc
|
||||
- glibc-devel
|
||||
- gcc
|
||||
duration: 10m
|
||||
extra-summary: /tools/glibc/Regression/bz1579451-glibc-IP-BIND-ADDRESS-NO-PORT-is-not-defined-in
|
||||
extra-task: /tools/glibc/Regression/bz1579451-glibc-IP-BIND-ADDRESS-NO-PORT-is-not-defined-in
|
@ -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/bz1579451-glibc-IP-BIND-ADDRESS-NO-PORT-is-not-defined-in
|
||||
# Description: Test for BZ#1579451 (glibc IP_BIND_ADDRESS_NO_PORT is not defined in)
|
||||
# Author: Sergey Kolosov <skolosov@redhat.com>
|
||||
#
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
#
|
||||
# Copyright (c) 2019 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="bug"
|
||||
|
||||
rlJournalStart
|
||||
rlPhaseStartSetup
|
||||
rlAssertRpm $PACKAGE
|
||||
PACKNVR=$(rpm -q ${PACKAGE}.`arch`)
|
||||
rlRun "TESTTMPDIR=$(mktemp -d)"
|
||||
rlRun "cp ${TESTPROG}.c $TESTTMPDIR"
|
||||
rlRun "pushd $TESTTMPDIR"
|
||||
rlPhaseEnd
|
||||
|
||||
rlPhaseStartTest
|
||||
rlRun -c "gcc ${TESTPROG}.c -o $TESTPROG"
|
||||
rlAssertExists "$TESTPROG"
|
||||
rlRun -c "./${TESTPROG}"
|
||||
rlPhaseEnd
|
||||
|
||||
rlPhaseStartCleanup
|
||||
rlRun "popd"
|
||||
rlRun "rm -r $TESTTMPDIR"
|
||||
rlPhaseEnd
|
||||
rlJournalPrintText
|
||||
rlJournalEnd
|
@ -0,0 +1,64 @@
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
#
|
||||
# Makefile of /tools/glibc/Regression/bz1591268-glibc-Problem-with-iconv-converting-ISO8859-1-to
|
||||
# Description: Test for BZ#1591268 (glibc Problem with iconv converting ISO8859-1 to)
|
||||
# Author: Sergey Kolosov <skolosov@redhat.com>
|
||||
#
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
#
|
||||
# Copyright (c) 2019 Red Hat, Inc.
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public License as
|
||||
# published by the Free Software Foundation, either version 2 of
|
||||
# the License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be
|
||||
# useful, but WITHOUT ANY WARRANTY; without even the implied
|
||||
# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
# PURPOSE. See the GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see http://www.gnu.org/licenses/.
|
||||
#
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
export TEST=/tools/glibc/Regression/bz1591268-glibc-Problem-with-iconv-converting-ISO8859-1-to
|
||||
export TESTVERSION=1.0
|
||||
|
||||
BUILT_FILES=
|
||||
|
||||
FILES=$(METADATA) runtest.sh Makefile PURPOSE
|
||||
|
||||
.PHONY: all install download clean
|
||||
|
||||
run: $(FILES) build
|
||||
./runtest.sh
|
||||
|
||||
build: $(BUILT_FILES)
|
||||
test -x runtest.sh || chmod a+x runtest.sh
|
||||
|
||||
clean:
|
||||
rm -f *~ $(BUILT_FILES)
|
||||
|
||||
|
||||
include /usr/share/rhts/lib/rhts-make.include
|
||||
|
||||
$(METADATA): Makefile
|
||||
@echo "Owner: Sergey Kolosov <skolosov@redhat.com>" > $(METADATA)
|
||||
@echo "Name: $(TEST)" >> $(METADATA)
|
||||
@echo "TestVersion: $(TESTVERSION)" >> $(METADATA)
|
||||
@echo "Path: $(TEST_DIR)" >> $(METADATA)
|
||||
@echo "Description: Test for BZ#1591268 (glibc Problem with iconv converting ISO8859-1 to)" >> $(METADATA)
|
||||
@echo "Type: Regression" >> $(METADATA)
|
||||
@echo "TestTime: 5m" >> $(METADATA)
|
||||
@echo "RunFor: glibc" >> $(METADATA)
|
||||
@echo "Requires: glibc vim-common" >> $(METADATA)
|
||||
@echo "Priority: Normal" >> $(METADATA)
|
||||
@echo "License: GPLv2+" >> $(METADATA)
|
||||
@echo "Confidential: no" >> $(METADATA)
|
||||
@echo "Destructive: no" >> $(METADATA)
|
||||
@echo "Bug: 1591268" >> $(METADATA)
|
||||
@echo "Releases: -RHEL4 -RHEL5 -RHEL6" >> $(METADATA)
|
||||
|
||||
rhts-lint $(METADATA)
|
@ -0,0 +1,5 @@
|
||||
PURPOSE of /tools/glibc/Regression/bz1591268-glibc-Problem-with-iconv-converting-ISO8859-1-to
|
||||
Description: Test for BZ#1591268 (glibc Problem with iconv converting ISO8859-1 to)
|
||||
Author: Sergey Kolosov <skolosov@redhat.com>
|
||||
Bug summary: glibc: Problem with iconv converting ISO8859-1 to IBM273 [rhel-7]
|
||||
Bugzilla link: https://bugzilla.redhat.com/show_bug.cgi?id=1591268
|
@ -0,0 +1,17 @@
|
||||
summary: Test for BZ#1591268 (glibc Problem with iconv converting ISO8859-1 to)
|
||||
description: |
|
||||
Bug summary: glibc: Problem with iconv converting ISO8859-1 to IBM273 [rhel-7]
|
||||
Bugzilla link: https://bugzilla.redhat.com/show_bug.cgi?id=1591268
|
||||
link:
|
||||
- relates: https://bugzilla.redhat.com/show_bug.cgi?id=1591268
|
||||
contact: Sergey Kolosov <skolosov@redhat.com>
|
||||
component:
|
||||
- glibc
|
||||
test: ./runtest.sh
|
||||
framework: beakerlib
|
||||
recommend:
|
||||
- glibc
|
||||
- vim-common
|
||||
duration: 5m
|
||||
extra-summary: /tools/glibc/Regression/bz1591268-glibc-Problem-with-iconv-converting-ISO8859-1-to
|
||||
extra-task: /tools/glibc/Regression/bz1591268-glibc-Problem-with-iconv-converting-ISO8859-1-to
|
@ -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/bz1591268-glibc-Problem-with-iconv-converting-ISO8859-1-to
|
||||
# Description: Test for BZ#1591268 (glibc Problem with iconv converting ISO8859-1 to)
|
||||
# Author: Sergey Kolosov <skolosov@redhat.com>
|
||||
#
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
#
|
||||
# Copyright (c) 2019 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-common
|
||||
rlAssertRpm vim-common
|
||||
rlRun "TESTTMPDIR=$(mktemp -d)"
|
||||
rlPhaseEnd
|
||||
|
||||
rlPhaseStartTest
|
||||
rlAssertExists "/usr/bin/iconv"
|
||||
rlAssertExists "/usr/bin/xxd"
|
||||
rlRun -c "echo "AF" | xxd -r -p | iconv -f iso8859-1 -t ibm273"
|
||||
rlRun -c "echo "AF" | xxd -r -p | iconv -f iso8859-1 -t ibm1141"
|
||||
rlPhaseEnd
|
||||
|
||||
rlPhaseStartCleanup
|
||||
rlPhaseEnd
|
||||
rlJournalPrintText
|
||||
rlJournalEnd
|
@ -0,0 +1,64 @@
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
#
|
||||
# Makefile of /tools/glibc/Regression/bz1612448-glibc-debuginfo-does-not-have-gdb-index
|
||||
# Description: Test for BZ#1612448 (glibc debuginfo does not have .gdb_index)
|
||||
# Author: Sergey Kolosov <skolosov@redhat.com>
|
||||
#
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
#
|
||||
# Copyright (c) 2019 Red Hat, Inc.
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public License as
|
||||
# published by the Free Software Foundation, either version 2 of
|
||||
# the License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be
|
||||
# useful, but WITHOUT ANY WARRANTY; without even the implied
|
||||
# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
# PURPOSE. See the GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see http://www.gnu.org/licenses/.
|
||||
#
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
export TEST=/tools/glibc/Regression/bz1612448-glibc-debuginfo-does-not-have-gdb-index
|
||||
export TESTVERSION=1.0
|
||||
|
||||
BUILT_FILES=
|
||||
|
||||
FILES=$(METADATA) runtest.sh Makefile PURPOSE
|
||||
|
||||
.PHONY: all install download clean
|
||||
|
||||
run: $(FILES) build
|
||||
./runtest.sh
|
||||
|
||||
build: $(BUILT_FILES)
|
||||
test -x runtest.sh || chmod a+x runtest.sh
|
||||
|
||||
clean:
|
||||
rm -f *~ $(BUILT_FILES)
|
||||
|
||||
|
||||
include /usr/share/rhts/lib/rhts-make.include
|
||||
|
||||
$(METADATA): Makefile
|
||||
@echo "Owner: Sergey Kolosov <skolosov@redhat.com>" > $(METADATA)
|
||||
@echo "Name: $(TEST)" >> $(METADATA)
|
||||
@echo "TestVersion: $(TESTVERSION)" >> $(METADATA)
|
||||
@echo "Path: $(TEST_DIR)" >> $(METADATA)
|
||||
@echo "Description: Test for BZ#1612448 (glibc debuginfo does not have .gdb_index)" >> $(METADATA)
|
||||
@echo "Type: Regression" >> $(METADATA)
|
||||
@echo "TestTime: 20m" >> $(METADATA)
|
||||
@echo "RunFor: glibc" >> $(METADATA)
|
||||
@echo "Requires: glibc glibc-debuginfo glibc-common-debuginfo binutils" >> $(METADATA)
|
||||
@echo "Priority: Normal" >> $(METADATA)
|
||||
@echo "License: GPLv2+" >> $(METADATA)
|
||||
@echo "Confidential: no" >> $(METADATA)
|
||||
@echo "Destructive: no" >> $(METADATA)
|
||||
@echo "Bug: 1612448" >> $(METADATA)
|
||||
@echo "Releases: -RHEL4 -RHEL5 -RHEL6 -RHEL7" >> $(METADATA)
|
||||
|
||||
rhts-lint $(METADATA)
|
@ -0,0 +1,5 @@
|
||||
PURPOSE of /tools/glibc/Regression/bz1612448-glibc-debuginfo-does-not-have-gdb-index
|
||||
Description: Test for BZ#1612448 (glibc debuginfo does not have .gdb_index)
|
||||
Author: Sergey Kolosov <skolosov@redhat.com>
|
||||
Bug summary: glibc: debuginfo does not have .gdb_index (gdb-add-index)
|
||||
Bugzilla link: https://bugzilla.redhat.com/show_bug.cgi?id=1612448
|
@ -0,0 +1,19 @@
|
||||
summary: Test for BZ#1612448 (glibc debuginfo does not have .gdb_index)
|
||||
description: |
|
||||
Bug summary: glibc: debuginfo does not have .gdb_index (gdb-add-index)
|
||||
Bugzilla link: https://bugzilla.redhat.com/show_bug.cgi?id=1612448
|
||||
link:
|
||||
- relates: https://bugzilla.redhat.com/show_bug.cgi?id=1612448
|
||||
contact: Sergey Kolosov <skolosov@redhat.com>
|
||||
component:
|
||||
- glibc
|
||||
test: ./runtest.sh
|
||||
framework: beakerlib
|
||||
require:
|
||||
- glibc
|
||||
- glibc-debuginfo
|
||||
- glibc-common-debuginfo
|
||||
- binutils
|
||||
duration: 20m
|
||||
extra-summary: /tools/glibc/Regression/bz1612448-glibc-debuginfo-does-not-have-gdb-index
|
||||
extra-task: /tools/glibc/Regression/bz1612448-glibc-debuginfo-does-not-have-gdb-index
|
@ -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/bz1612448-glibc-debuginfo-does-not-have-gdb-index
|
||||
# Description: Test for BZ#1612448 (glibc debuginfo does not have .gdb_index)
|
||||
# Author: Sergey Kolosov <skolosov@redhat.com>
|
||||
#
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
#
|
||||
# Copyright (c) 2019 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="put_test_prog_here"
|
||||
|
||||
rlJournalStart
|
||||
rlPhaseStartSetup
|
||||
rlAssertRpm $PACKAGE
|
||||
rlAssertRpm glibc-debuginfo
|
||||
rlAssertRpm binutils
|
||||
rlRun "LIBC_SO_DEBUGS=\"$(find /usr -name 'libc*.so*.debug')\""
|
||||
rlPhaseEnd
|
||||
|
||||
rlPhaseStartTest
|
||||
for LIBC_SO_DEBUG in $LIBC_SO_DEBUGS; do
|
||||
rlAssertExists "$LIBC_SO_DEBUG"
|
||||
rlRun -l "readelf -S $LIBC_SO_DEBUG | grep -w gdb_index"
|
||||
done
|
||||
rlPhaseEnd
|
||||
|
||||
rlPhaseStartCleanup
|
||||
|
||||
rlPhaseEnd
|
||||
rlJournalPrintText
|
||||
rlJournalEnd
|
@ -0,0 +1,64 @@
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
#
|
||||
# Makefile of /tools/glibc/Regression/bz1661244-glibc-Disable-lazy-binding-of-TLS-descriptors-on
|
||||
# Description: Test for BZ#1661244 (glibc Disable lazy binding of TLS descriptors on)
|
||||
# Author: Sergey Kolosov <skolosov@redhat.com>
|
||||
#
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
#
|
||||
# Copyright (c) 2019 Red Hat, Inc.
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public License as
|
||||
# published by the Free Software Foundation, either version 2 of
|
||||
# the License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be
|
||||
# useful, but WITHOUT ANY WARRANTY; without even the implied
|
||||
# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
# PURPOSE. See the GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see http://www.gnu.org/licenses/.
|
||||
#
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
export TEST=/tools/glibc/Regression/bz1661244-glibc-Disable-lazy-binding-of-TLS-descriptors-on
|
||||
export TESTVERSION=1.0
|
||||
|
||||
BUILT_FILES=
|
||||
|
||||
FILES=$(METADATA) runtest.sh Makefile PURPOSE audit.c au-test.c
|
||||
|
||||
.PHONY: all install download clean
|
||||
|
||||
run: $(FILES) build
|
||||
./runtest.sh
|
||||
|
||||
build: $(BUILT_FILES)
|
||||
test -x runtest.sh || chmod a+x runtest.sh
|
||||
|
||||
clean:
|
||||
rm -f *~ $(BUILT_FILES)
|
||||
|
||||
|
||||
include /usr/share/rhts/lib/rhts-make.include
|
||||
|
||||
$(METADATA): Makefile
|
||||
@echo "Owner: Sergey Kolosov <skolosov@redhat.com>" > $(METADATA)
|
||||
@echo "Name: $(TEST)" >> $(METADATA)
|
||||
@echo "TestVersion: $(TESTVERSION)" >> $(METADATA)
|
||||
@echo "Path: $(TEST_DIR)" >> $(METADATA)
|
||||
@echo "Description: Test for BZ#1661244 (glibc Disable lazy binding of TLS descriptors on)" >> $(METADATA)
|
||||
@echo "Type: Regression" >> $(METADATA)
|
||||
@echo "TestTime: 20m" >> $(METADATA)
|
||||
@echo "RunFor: glibc" >> $(METADATA)
|
||||
@echo "Requires: glibc glibc-devel gcc" >> $(METADATA)
|
||||
@echo "Priority: Normal" >> $(METADATA)
|
||||
@echo "License: GPLv2+" >> $(METADATA)
|
||||
@echo "Confidential: no" >> $(METADATA)
|
||||
@echo "Destructive: no" >> $(METADATA)
|
||||
@echo "Bug: 1661244" >> $(METADATA)
|
||||
@echo "Releases: -RHEL4 -RHEL5 -RHEL6" >> $(METADATA)
|
||||
|
||||
rhts-lint $(METADATA)
|
@ -0,0 +1,5 @@
|
||||
PURPOSE of /tools/glibc/Regression/bz1661244-glibc-Disable-lazy-binding-of-TLS-descriptors-on
|
||||
Description: Test for BZ#1661244 (glibc Disable lazy binding of TLS descriptors on)
|
||||
Author: Sergey Kolosov <skolosov@redhat.com>
|
||||
Bug summary: glibc: Disable lazy binding of TLS descriptors on aarch64 [rhel-7.6.z]
|
||||
Bugzilla link: https://bugzilla.redhat.com/show_bug.cgi?id=1661244
|
@ -0,0 +1,11 @@
|
||||
#include <sys/socket.h>
|
||||
#include <netinet/in.h>
|
||||
#include <arpa/inet.h>
|
||||
|
||||
struct in_addr a;
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
inet_ntoa(a);
|
||||
return 0;
|
||||
}
|
@ -0,0 +1,8 @@
|
||||
#define _GNU_SOURCE
|
||||
#include <link.h>
|
||||
|
||||
|
||||
unsigned int la_version(unsigned int ver)
|
||||
{
|
||||
return 1;
|
||||
}
|
@ -0,0 +1,18 @@
|
||||
summary: Test for BZ#1661244 (glibc Disable lazy binding of TLS descriptors on)
|
||||
description: |
|
||||
Bug summary: glibc: Disable lazy binding of TLS descriptors on aarch64 [rhel-7.6.z]
|
||||
Bugzilla link: https://bugzilla.redhat.com/show_bug.cgi?id=1661244
|
||||
link:
|
||||
- relates: https://bugzilla.redhat.com/show_bug.cgi?id=1661244
|
||||
contact: Sergey Kolosov <skolosov@redhat.com>
|
||||
component:
|
||||
- glibc
|
||||
test: ./runtest.sh
|
||||
framework: beakerlib
|
||||
recommend:
|
||||
- glibc
|
||||
- glibc-devel
|
||||
- gcc
|
||||
duration: 20m
|
||||
extra-summary: /tools/glibc/Regression/bz1661244-glibc-Disable-lazy-binding-of-TLS-descriptors-on
|
||||
extra-task: /tools/glibc/Regression/bz1661244-glibc-Disable-lazy-binding-of-TLS-descriptors-on
|
@ -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/bz1661244-glibc-Disable-lazy-binding-of-TLS-descriptors-on
|
||||
# Description: Test for BZ#1661244 (glibc Disable lazy binding of TLS descriptors on)
|
||||
# Author: Sergey Kolosov <skolosov@redhat.com>
|
||||
#
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
#
|
||||
# Copyright (c) 2019 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="au-test"
|
||||
|
||||
rlJournalStart
|
||||
rlPhaseStartSetup
|
||||
rlAssertRpm $PACKAGE
|
||||
rlRun "TESTTMPDIR=$(mktemp -d)"
|
||||
rlRun "cp audit.c $TESTTMPDIR"
|
||||
rlRun "cp ${TESTPROG}.c $TESTTMPDIR"
|
||||
rlRun "pushd $TESTTMPDIR"
|
||||
rlPhaseEnd
|
||||
|
||||
rlPhaseStartTest
|
||||
rlRun "gcc -o libaudit.so audit.c -fPIC -shared"
|
||||
rlRun -c "gcc ${TESTPROG}.c -o $TESTPROG"
|
||||
rlAssertExists "$TESTPROG"
|
||||
rlAssertExists "libaudit.so"
|
||||
rlRun -c "LD_AUDIT=${TESTTMPDIR}/libaudit.so ./${TESTPROG}"
|
||||
rlPhaseEnd
|
||||
|
||||
rlPhaseStartCleanup
|
||||
rlRun "popd"
|
||||
rlRun "rm -r $TESTTMPDIR"
|
||||
rlPhaseEnd
|
||||
rlJournalPrintText
|
||||
rlJournalEnd
|
@ -0,0 +1,64 @@
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
#
|
||||
# Makefile of /tools/glibc/Regression/bz1661513-glibc-Adjust-to-rpms-find-debuginfo-sh-changes-to-keep-stripping-binaries
|
||||
# Description: Test for BZ#1661513 (glibc: Adjust to rpm's find-debuginfo.sh changes, to keep stripping binaries)
|
||||
# Author: Martin Coufal <mcoufal@redhat.com>
|
||||
#
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
#
|
||||
# Copyright (c) 2022 Red Hat, Inc.
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public License as
|
||||
# published by the Free Software Foundation, either version 2 of
|
||||
# the License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be
|
||||
# useful, but WITHOUT ANY WARRANTY; without even the implied
|
||||
# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
# PURPOSE. See the GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see http://www.gnu.org/licenses/.
|
||||
#
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
export TEST=/tools/glibc/Regression/bz1661513-glibc-Adjust-to-rpms-find-debuginfo-sh-changes-to-keep-stripping-binaries
|
||||
export TESTVERSION=1.0
|
||||
|
||||
BUILT_FILES=
|
||||
|
||||
FILES=$(METADATA) runtest.sh Makefile PURPOSE
|
||||
|
||||
.PHONY: all install download clean
|
||||
|
||||
run: $(FILES) build
|
||||
./runtest.sh
|
||||
|
||||
build: $(BUILT_FILES)
|
||||
test -x runtest.sh || chmod a+x runtest.sh
|
||||
|
||||
clean:
|
||||
rm -f *~ $(BUILT_FILES)
|
||||
|
||||
|
||||
include /usr/share/rhts/lib/rhts-make.include
|
||||
|
||||
$(METADATA): Makefile
|
||||
@echo "Owner: Martin Coufal <mcoufal@redhat.com>" > $(METADATA)
|
||||
@echo "Name: $(TEST)" >> $(METADATA)
|
||||
@echo "TestVersion: $(TESTVERSION)" >> $(METADATA)
|
||||
@echo "Path: $(TEST_DIR)" >> $(METADATA)
|
||||
@echo "Description: Test for BZ#1661513 (glibc: Adjust to rpm's find-debuginfo.sh changes, to keep stripping binaries)" >> $(METADATA)
|
||||
@echo "Type: Regression" >> $(METADATA)
|
||||
@echo "TestTime: 15m" >> $(METADATA)
|
||||
@echo "RunFor: glibc" >> $(METADATA)
|
||||
@echo "Requires: glibc gdb" >> $(METADATA)
|
||||
@echo "Priority: Normal" >> $(METADATA)
|
||||
@echo "License: GPLv2+" >> $(METADATA)
|
||||
@echo "Confidential: no" >> $(METADATA)
|
||||
@echo "Destructive: no" >> $(METADATA)
|
||||
@echo "Bug: 1661513" >> $(METADATA)
|
||||
@echo "Releases: -RHEL4 -RHEL5 -RHEL6 -RHEL7" >> $(METADATA)
|
||||
|
||||
rhts-lint $(METADATA)
|
@ -0,0 +1,5 @@
|
||||
PURPOSE of /tools/glibc/Regression/bz1661513-glibc-Adjust-to-rpms-find-debuginfo-sh-changes-to-keep-stripping-binaries
|
||||
Description: Test for BZ#1661513 (glibc: Adjust to rpm's find-debuginfo.sh changes, to keep stripping binaries)
|
||||
Author: Martin Coufal <mcoufal@redhat.com>
|
||||
Bug summary: glibc: Adjust to rpm's find-debuginfo.sh changes, to keep stripping binaries
|
||||
Bugzilla link: https://bugzilla.redhat.com/show_bug.cgi?id=1661513
|
@ -0,0 +1,19 @@
|
||||
summary: "Test for BZ#1661513 (glibc: Adjust to rpm's find-debuginfo.sh changes, to\
|
||||
\ keep stripping binaries)"
|
||||
description: |
|
||||
Bug summary: glibc: Adjust to rpm's find-debuginfo.sh changes, to keep stripping binaries
|
||||
Bugzilla link: https://bugzilla.redhat.com/show_bug.cgi?id=1661513
|
||||
link:
|
||||
- relates: https://bugzilla.redhat.com/show_bug.cgi?id=1661513
|
||||
contact: Martin Coufal <mcoufal@redhat.com>
|
||||
component:
|
||||
- glibc
|
||||
test: ./runtest.sh
|
||||
framework: beakerlib
|
||||
recommend:
|
||||
- glibc
|
||||
- gdb
|
||||
duration: 15m
|
||||
order: 1000
|
||||
extra-summary: /tools/glibc/Regression/bz1661513-glibc-Adjust-to-rpms-find-debuginfo-sh-changes-to-keep-stripping-binaries
|
||||
extra-task: /tools/glibc/Regression/bz1661513-glibc-Adjust-to-rpms-find-debuginfo-sh-changes-to-keep-stripping-binaries
|
@ -0,0 +1,68 @@
|
||||
#!/bin/bash
|
||||
# vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
#
|
||||
# runtest.sh of /tools/glibc/Regression/bz1661513-glibc-Adjust-to-rpms-find-debuginfo-sh-changes-to-keep-stripping-binaries
|
||||
# Description: Test for BZ#1661513 (glibc: Adjust to rpm's find-debuginfo.sh changes, to keep stripping binaries)
|
||||
# Author: Martin Coufal <mcoufal@redhat.com>
|
||||
#
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
#
|
||||
# Copyright (c) 2022 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
|
||||
|
||||
|
||||
rlJournalStart
|
||||
rlPhaseStartSetup
|
||||
|
||||
rlRun "tmpdir=$(mktemp -d)"
|
||||
rlRun "pushd $tmpdir"
|
||||
# make sure glibc-debuginfo is not installed
|
||||
if rlCheckRpm glibc-debuginfo; then
|
||||
rlRun "yum -y remove glibc-debuginfo"
|
||||
fi
|
||||
|
||||
rlPhaseEnd
|
||||
|
||||
rlPhaseStartTest
|
||||
|
||||
# All programs (ldconfig, iconvconfig etc.) should be stripped, the dynamic loader (the target of the /usr/bin/ld.so symbolic link) should be unstripped
|
||||
rlRun "file /sbin/ldconfig /sbin/iconvconfig /usr/bin/localedef $(readlink -f /usr/bin/ld.so) > output.log 2>&1"
|
||||
rlAssertGrep "ldconfig.*, stripped" output.log
|
||||
rlAssertGrep "iconvconfig.*, stripped" output.log
|
||||
rlAssertGrep "localedef.*, stripped" output.log
|
||||
rlAssertGrep "$(readlink -f /usr/bin/ld.so).*, not stripped" output.log
|
||||
rlLogInfo "Content of output.log:\n$(cat output.log)"
|
||||
|
||||
# some debugging info (e.g. pthread struct) should be accessible even without installed debuginfo packages
|
||||
rlRun "gdb --batch -ex 'ptype struct pthread' /usr/bin/ld.so > gdb.log 2>&1"
|
||||
rlAssertGrep "type = struct pthread" gdb.log
|
||||
rlAssertNotGrep "No struct type named pthread" gdb.log
|
||||
|
||||
rlPhaseEnd
|
||||
|
||||
rlPhaseStartCleanup
|
||||
|
||||
rlRun "popd"
|
||||
rlRun "rm -rf $tmpdir"
|
||||
|
||||
rlPhaseEnd
|
||||
rlJournalPrintText
|
||||
rlJournalEnd
|
@ -0,0 +1,64 @@
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
#
|
||||
# Makefile of /tools/glibc/Regression/bz1717438-glibc-libc-freeres-under-valgrind-triggers
|
||||
# Description: Test for BZ#1717438 (glibc __libc_freeres (under valgrind) triggers bad)
|
||||
# Author: Sergey Kolosov <skolosov@redhat.com>
|
||||
#
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
#
|
||||
# Copyright (c) 2019 Red Hat, Inc.
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public License as
|
||||
# published by the Free Software Foundation, either version 2 of
|
||||
# the License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be
|
||||
# useful, but WITHOUT ANY WARRANTY; without even the implied
|
||||
# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
# PURPOSE. See the GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see http://www.gnu.org/licenses/.
|
||||
#
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
export TEST=/tools/glibc/Regression/bz1717438-glibc-libc-freeres-under-valgrind-triggers
|
||||
export TESTVERSION=1.0
|
||||
|
||||
BUILT_FILES=
|
||||
|
||||
FILES=$(METADATA) runtest.sh Makefile PURPOSE tst-libidl.c
|
||||
|
||||
.PHONY: all install download clean
|
||||
|
||||
run: $(FILES) build
|
||||
./runtest.sh
|
||||
|
||||
build: $(BUILT_FILES)
|
||||
test -x runtest.sh || chmod a+x runtest.sh
|
||||
|
||||
clean:
|
||||
rm -f *~ $(BUILT_FILES)
|
||||
|
||||
|
||||
include /usr/share/rhts/lib/rhts-make.include
|
||||
|
||||
$(METADATA): Makefile
|
||||
@echo "Owner: Sergey Kolosov <skolosov@redhat.com>" > $(METADATA)
|
||||
@echo "Name: $(TEST)" >> $(METADATA)
|
||||
@echo "TestVersion: $(TESTVERSION)" >> $(METADATA)
|
||||
@echo "Path: $(TEST_DIR)" >> $(METADATA)
|
||||
@echo "Description: Test for BZ#1717438 (glibc __libc_freeres (under valgrind) triggers bad)" >> $(METADATA)
|
||||
@echo "Type: Regression" >> $(METADATA)
|
||||
@echo "TestTime: 20m" >> $(METADATA)
|
||||
@echo "RunFor: glibc" >> $(METADATA)
|
||||
@echo "Requires: glibc glibc-devel valgrind" >> $(METADATA)
|
||||
@echo "Priority: Normal" >> $(METADATA)
|
||||
@echo "License: GPLv2+" >> $(METADATA)
|
||||
@echo "Confidential: no" >> $(METADATA)
|
||||
@echo "Destructive: no" >> $(METADATA)
|
||||
@echo "Bug: 1717438" >> $(METADATA)
|
||||
@echo "Releases: -RHEL4 -RHEL5 -RHEL6 -RHEL7" >> $(METADATA)
|
||||
|
||||
rhts-lint $(METADATA)
|
@ -0,0 +1,5 @@
|
||||
PURPOSE of /tools/glibc/Regression/bz1717438-glibc-libc-freeres-under-valgrind-triggers
|
||||
Description: Test for BZ#1717438 (glibc __libc_freeres (under valgrind) triggers bad)
|
||||
Author: Sergey Kolosov <skolosov@redhat.com>
|
||||
Bug summary: glibc: __libc_freeres (under valgrind) triggers bad free in libdl if dlerror was not used
|
||||
Bugzilla link: https://bugzilla.redhat.com/show_bug.cgi?id=1717438
|
@ -0,0 +1,18 @@
|
||||
summary: Test for BZ#1717438 (glibc __libc_freeres (under valgrind) triggers bad)
|
||||
description: |
|
||||
Bug summary: glibc: __libc_freeres (under valgrind) triggers bad free in libdl if dlerror was not used
|
||||
Bugzilla link: https://bugzilla.redhat.com/show_bug.cgi?id=1717438
|
||||
link:
|
||||
- relates: https://bugzilla.redhat.com/show_bug.cgi?id=1717438
|
||||
contact: Sergey Kolosov <skolosov@redhat.com>
|
||||
component:
|
||||
- glibc
|
||||
test: ./runtest.sh
|
||||
framework: beakerlib
|
||||
recommend:
|
||||
- glibc
|
||||
- glibc-devel
|
||||
- valgrind
|
||||
duration: 20m
|
||||
extra-summary: /tools/glibc/Regression/bz1717438-glibc-libc-freeres-under-valgrind-triggers
|
||||
extra-task: /tools/glibc/Regression/bz1717438-glibc-libc-freeres-under-valgrind-triggers
|
@ -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/bz1717438-glibc-libc-freeres-under-valgrind-triggers
|
||||
# Description: Test for BZ#1717438 (glibc __libc_freeres (under valgrind) triggers bad)
|
||||
# Author: Sergey Kolosov <skolosov@redhat.com>
|
||||
#
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
#
|
||||
# Copyright (c) 2019 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-libidl"
|
||||
|
||||
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 -ldl -pthread"
|
||||
rlAssertExists "$TESTPROG"
|
||||
rlRun -l "valgrind --error-exitcode=111 -q ./${TESTPROG} no_dlerror"
|
||||
rlPhaseEnd
|
||||
|
||||
rlPhaseStartCleanup
|
||||
rlRun "popd"
|
||||
rlRun "rm -r $TESTTMPDIR"
|
||||
rlPhaseEnd
|
||||
rlJournalPrintText
|
||||
rlJournalEnd
|
@ -0,0 +1,102 @@
|
||||
/*
|
||||
To build:
|
||||
|
||||
With system libc:
|
||||
gcc -o libdl_bug libdl_bug.c -ldl -pthread
|
||||
|
||||
With custom libc
|
||||
libc_dir=/path/to/glibc/install
|
||||
gcc -o libdl_bug libdl_bug.c -L$libc_dir/lib -Wl,--rpath=$libc_dir/lib \
|
||||
-Wl,--dynamic-linker=$libc_dir/lib/ld-linux-x86-64.so.2 -ldl -pthread
|
||||
|
||||
./libdl_bug bad_free is just a sanity check that valgrind will notice if
|
||||
|&do_not_free_this| is accidentally passed to |free|.
|
||||
|
||||
Otherwise, this tool will allocate a |pthread_key_t| (which will likely be zero)
|
||||
and store |&do_not_free_this| in it. The |pthread_key_t| has no destructor, so
|
||||
this is perfectly valid.
|
||||
|
||||
It will then optionally call |dlerror| (pass dlerror vs no_dlerror to the tool),
|
||||
and then return from |main| cleanly. At this point, when running under valgrind,
|
||||
vg_preloaded.c will call |__libc_freeres|.
|
||||
|
||||
In glibc after 2827ab990aefbb0e53374199b875d98f116d6390 (2.28 and later),
|
||||
|__libc_freeres| will call |__libdl_freeres|, which calls |free_key_mem| in
|
||||
dlerror.c. That function cleans up |dlerror|'s thread-local state, but has a
|
||||
bug: if nothing has called |dlerror|, there is no thread-local state and the
|
||||
|pthread_key_t| is uninitialized! It then blindly calls |free| on the zero key,
|
||||
and hits our |&do_not_free_this|. That results in an error in valgrind:
|
||||
|
||||
$ valgrind -q ./libdl_bug dlerror
|
||||
Initializing a pthread_key_t.
|
||||
key = 0
|
||||
Setting thread local to &do_not_free_this.
|
||||
Calling dlerror.
|
||||
Exiting
|
||||
|
||||
$ valgrind -q ./libdl_bug no_dlerror
|
||||
Initializing a pthread_key_t.
|
||||
key = 0
|
||||
Setting thread local to &do_not_free_this.
|
||||
Exiting
|
||||
==139993== Invalid free() / delete / delete[] / realloc()
|
||||
==139993== at 0x4C2FFA8: free (vg_replace_malloc.c:540)
|
||||
==139993== by 0x4E3D6D9: free_key_mem (dlerror.c:223)
|
||||
==139993== by 0x4E3D6D9: __dlerror_main_freeres (dlerror.c:239)
|
||||
==139993== by 0x53BFDC9: __libc_freeres (in /[...]/lib/libc-2.29.9000.so)
|
||||
==139993== by 0x4A296DB: _vgnU_freeres (vg_preloaded.c:77)
|
||||
==139993== by 0x5296381: __run_exit_handlers (exit.c:132)
|
||||
==139993== by 0x52963A9: exit (exit.c:139)
|
||||
==139993== by 0x528105D: (below main) (libc-start.c:342)
|
||||
==139993== Address 0x30a08c is 0 bytes inside data symbol "do_not_free_this"
|
||||
==139993==
|
||||
*/
|
||||
|
||||
#include <dlfcn.h>
|
||||
#include <pthread.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
static void usage(const char *prog_name) {
|
||||
fprintf(stderr, "Usage: %s [bad_free|no_dlerror|dlerror]\n", prog_name);
|
||||
exit(1);
|
||||
}
|
||||
|
||||
static int do_not_free_this;
|
||||
static pthread_key_t key;
|
||||
|
||||
int main(int argc, char **argv) {
|
||||
if (argc != 2) {
|
||||
usage(argv[0]);
|
||||
}
|
||||
|
||||
if (strcmp(argv[1], "bad_free") == 0) {
|
||||
printf("Calling free(&do_not_free_this). Valgrind should notice.\n");
|
||||
free(&do_not_free_this);
|
||||
} else if (strcmp(argv[1], "no_dlerror") == 0 ||
|
||||
strcmp(argv[1], "dlerror") == 0) {
|
||||
printf("Initializing a pthread_key_t.\n");
|
||||
if (pthread_key_create(&key, NULL)) {
|
||||
perror("pthread_key_create");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
printf("key = %d\n", key);
|
||||
|
||||
printf("Setting thread local to &do_not_free_this.\n");
|
||||
if (pthread_setspecific(key, &do_not_free_this) != 0) {
|
||||
perror("pthread_setspecific");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
if (strcmp(argv[1], "dlerror") == 0) {
|
||||
printf("Calling dlerror.\n");
|
||||
dlerror();
|
||||
}
|
||||
} else {
|
||||
usage(argv[0]);
|
||||
}
|
||||
printf("Exiting\n");
|
||||
return 0;
|
||||
}
|
@ -0,0 +1,64 @@
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
#
|
||||
# Makefile of /tools/glibc/Regression/bz1988382-annocheck-reports-pie-pic-test-failures-on
|
||||
# Description: Test for BZ#1988382 (annocheck reports pie/pic test failures on)
|
||||
# Author: Sergey Kolosov <skolosov@redhat.com>
|
||||
#
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
#
|
||||
# Copyright (c) 2021 Red Hat, Inc.
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public License as
|
||||
# published by the Free Software Foundation, either version 2 of
|
||||
# the License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be
|
||||
# useful, but WITHOUT ANY WARRANTY; without even the implied
|
||||
# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
# PURPOSE. See the GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see http://www.gnu.org/licenses/.
|
||||
#
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
export TEST=/tools/glibc/Regression/bz1988382-annocheck-reports-pie-pic-test-failures-on
|
||||
export TESTVERSION=1.0
|
||||
|
||||
BUILT_FILES=
|
||||
|
||||
FILES=$(METADATA) runtest.sh Makefile PURPOSE
|
||||
|
||||
.PHONY: all install download clean
|
||||
|
||||
run: $(FILES) build
|
||||
./runtest.sh
|
||||
|
||||
build: $(BUILT_FILES)
|
||||
test -x runtest.sh || chmod a+x runtest.sh
|
||||
|
||||
clean:
|
||||
rm -f *~ $(BUILT_FILES)
|
||||
|
||||
|
||||
include /usr/share/rhts/lib/rhts-make.include
|
||||
|
||||
$(METADATA): Makefile
|
||||
@echo "Owner: Sergey Kolosov <skolosov@redhat.com>" > $(METADATA)
|
||||
@echo "Name: $(TEST)" >> $(METADATA)
|
||||
@echo "TestVersion: $(TESTVERSION)" >> $(METADATA)
|
||||
@echo "Path: $(TEST_DIR)" >> $(METADATA)
|
||||
@echo "Description: Test for BZ#1988382 (annocheck reports pie/pic test failures on)" >> $(METADATA)
|
||||
@echo "Type: Regression" >> $(METADATA)
|
||||
@echo "TestTime: 1h" >> $(METADATA)
|
||||
@echo "RunFor: glibc" >> $(METADATA)
|
||||
@echo "Requires: annobin-annocheck glibc" >> $(METADATA)
|
||||
@echo "Priority: Normal" >> $(METADATA)
|
||||
@echo "License: GPLv2+" >> $(METADATA)
|
||||
@echo "Confidential: no" >> $(METADATA)
|
||||
@echo "Destructive: no" >> $(METADATA)
|
||||
@echo "Bug: 1988382" >> $(METADATA)
|
||||
@echo "Releases: -RHEL4 -RHEL5 -RHEL6 -RHEL7 -RHEL8" >> $(METADATA)
|
||||
|
||||
rhts-lint $(METADATA)
|
@ -0,0 +1,5 @@
|
||||
PURPOSE of /tools/glibc/Regression/bz1988382-annocheck-reports-pie-pic-test-failures-on
|
||||
Description: Test for BZ#1988382 (annocheck reports pie/pic test failures on)
|
||||
Author: Sergey Kolosov <skolosov@redhat.com>
|
||||
Bug summary: annocheck reports pie/pic test failures on non-x86_64 architectures
|
||||
Bugzilla link: https://bugzilla.redhat.com/show_bug.cgi?id=1988382
|
@ -0,0 +1,20 @@
|
||||
summary: Test for BZ#1988382 (annocheck reports pie/pic test failures on)
|
||||
description: |
|
||||
Bug summary: annocheck reports pie/pic test failures on non-x86_64 architectures
|
||||
Bugzilla link: https://bugzilla.redhat.com/show_bug.cgi?id=1988382
|
||||
link:
|
||||
- relates: https://bugzilla.redhat.com/show_bug.cgi?id=1988382
|
||||
contact: Sergey Kolosov <skolosov@redhat.com>
|
||||
component:
|
||||
- glibc
|
||||
adjust:
|
||||
- enabled: false
|
||||
when: distro < rhel-9
|
||||
test: ./runtest.sh
|
||||
framework: beakerlib
|
||||
recommend:
|
||||
- annobin-annocheck
|
||||
- glibc
|
||||
duration: 1h
|
||||
extra-summary: /tools/glibc/Regression/bz1988382-annocheck-reports-pie-pic-test-failures-on
|
||||
extra-task: /tools/glibc/Regression/bz1988382-annocheck-reports-pie-pic-test-failures-on
|
@ -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/bz1988382-annocheck-reports-pie-pic-test-failures-on
|
||||
# Description: Test for BZ#1988382 (annocheck reports pie/pic test failures on)
|
||||
# Author: Sergey Kolosov <skolosov@redhat.com>
|
||||
#
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
#
|
||||
# Copyright (c) 2021 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
|
||||
PACKNVR=$(rpm -q ${PACKAGE}.`arch`)
|
||||
rlRun "TESTTMPDIR=$(mktemp -d)"
|
||||
rlRun "pushd $TESTTMPDIR"
|
||||
rlPhaseEnd
|
||||
|
||||
rlPhaseStartTest
|
||||
rlRun -l "rpm -qal 'glibc*' | while read f ; do if test -f \"\$f\" -a ! -L \"\$f\" ; then echo \$f ; fi ; done | xargs -L 200 annocheck --verbose --verbose --ignore-gaps --skip-all --test-pic --test-pie 2> /dev/null > log" 0,123
|
||||
rlFileSubmit log
|
||||
rlAssertNotGrep "FAIL" log
|
||||
rlPhaseEnd
|
||||
|
||||
rlPhaseStartCleanup
|
||||
rlRun "popd"
|
||||
rlRun "rm -r $TESTTMPDIR"
|
||||
rlPhaseEnd
|
||||
rlJournalPrintText
|
||||
rlJournalEnd
|
@ -0,0 +1,64 @@
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
#
|
||||
# Makefile of /tools/glibc/Regression/bz2007417-glibc-ldd-segfaults-when-inspecting
|
||||
# Description: Test for BZ#2007417 (glibc ldd segfaults when inspecting vdso/vdso64.so)
|
||||
# Author: Sergey Kolosov <skolosov@redhat.com>
|
||||
#
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
#
|
||||
# Copyright (c) 2021 Red Hat, Inc.
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public License as
|
||||
# published by the Free Software Foundation, either version 2 of
|
||||
# the License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be
|
||||
# useful, but WITHOUT ANY WARRANTY; without even the implied
|
||||
# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
# PURPOSE. See the GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see http://www.gnu.org/licenses/.
|
||||
#
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
export TEST=/tools/glibc/Regression/bz2007417-glibc-ldd-segfaults-when-inspecting
|
||||
export TESTVERSION=1.0
|
||||
|
||||
BUILT_FILES=
|
||||
|
||||
FILES=$(METADATA) runtest.sh Makefile PURPOSE relevancy.json
|
||||
|
||||
.PHONY: all install download clean
|
||||
|
||||
run: $(FILES) build
|
||||
./runtest.sh
|
||||
|
||||
build: $(BUILT_FILES)
|
||||
test -x runtest.sh || chmod a+x runtest.sh
|
||||
|
||||
clean:
|
||||
rm -f *~ $(BUILT_FILES)
|
||||
|
||||
|
||||
include /usr/share/rhts/lib/rhts-make.include
|
||||
|
||||
$(METADATA): Makefile
|
||||
@echo "Owner: Sergey Kolosov <skolosov@redhat.com>" > $(METADATA)
|
||||
@echo "Name: $(TEST)" >> $(METADATA)
|
||||
@echo "TestVersion: $(TESTVERSION)" >> $(METADATA)
|
||||
@echo "Path: $(TEST_DIR)" >> $(METADATA)
|
||||
@echo "Description: Test for BZ#2007417 (glibc ldd segfaults when inspecting vdso/vdso64.so)" >> $(METADATA)
|
||||
@echo "Type: Regression" >> $(METADATA)
|
||||
@echo "TestTime: 20m" >> $(METADATA)
|
||||
@echo "RunFor: glibc" >> $(METADATA)
|
||||
@echo "Requires: glibc glibc-gconv-extra glibc-langpack-en" >> $(METADATA)
|
||||
@echo "Priority: Normal" >> $(METADATA)
|
||||
@echo "License: GPLv2+" >> $(METADATA)
|
||||
@echo "Confidential: no" >> $(METADATA)
|
||||
@echo "Destructive: no" >> $(METADATA)
|
||||
@echo "Bug: 2007417" >> $(METADATA)
|
||||
@echo "Releases: RHEL9" >> $(METADATA)
|
||||
|
||||
rhts-lint $(METADATA)
|
@ -0,0 +1,21 @@
|
||||
summary: Test for BZ#2007417 (glibc ldd segfaults when inspecting vdso/vdso64.so)
|
||||
description: |
|
||||
Bug summary: glibc: ldd segfaults when inspecting vdso/vdso64.so
|
||||
Bugzilla link: https://bugzilla.redhat.com/show_bug.cgi?id=2007417
|
||||
contact: Sergey Kolosov <skolosov@redhat.com>
|
||||
component:
|
||||
- glibc
|
||||
adjust:
|
||||
- enabled: false
|
||||
when: distro < rhel-9
|
||||
test: ./runtest.sh
|
||||
framework: beakerlib
|
||||
recommend:
|
||||
- glibc
|
||||
- glibc-gconv-extra
|
||||
- glibc-langpack-en
|
||||
duration: 20m
|
||||
link:
|
||||
- relates: https://bugzilla.redhat.com/show_bug.cgi?id=2007417
|
||||
extra-summary: /tools/glibc/Regression/bz2007417-glibc-ldd-segfaults-when-inspecting
|
||||
extra-task: /tools/glibc/Regression/bz2007417-glibc-ldd-segfaults-when-inspecting
|
53
tests/Regression/bz2007417-glibc-ldd-segfaults-when-inspecting/runtest.sh
Executable file
53
tests/Regression/bz2007417-glibc-ldd-segfaults-when-inspecting/runtest.sh
Executable 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/bz2007417-glibc-ldd-segfaults-when-inspecting
|
||||
# Description: Test for BZ#2007417 (glibc ldd segfaults when inspecting vdso/vdso64.so)
|
||||
# Author: Sergey Kolosov <skolosov@redhat.com>
|
||||
#
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
#
|
||||
# Copyright (c) 2021 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 "TESTTMPDIR=$(mktemp -d)"
|
||||
rlRun "pushd $TESTTMPDIR"
|
||||
rlRun -c "dmesg -c >& /dev/null"
|
||||
rlPhaseEnd
|
||||
|
||||
rlPhaseStartTest
|
||||
for VDSO in `find /usr -name vdso64.so` ; do
|
||||
rlRun -l "ldd $VDSO"
|
||||
done
|
||||
rlRun -l "dmesg"
|
||||
rlPhaseEnd
|
||||
|
||||
rlPhaseStartCleanup
|
||||
rlRun "popd"
|
||||
rlRun "rm -r $TESTTMPDIR"
|
||||
rlPhaseEnd
|
||||
rlJournalPrintText
|
||||
rlJournalEnd
|
@ -0,0 +1,64 @@
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
#
|
||||
# Makefile of /tools/glibc/Regression/bz2024347-glibc-Optional-sched-getcpu-acceleration-using
|
||||
# Description: Test for BZ#2024347 (glibc Optional sched_getcpu acceleration using)
|
||||
# Author: Sergey Kolosov <skolosov@redhat.com>
|
||||
#
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
#
|
||||
# Copyright (c) 2022 Red Hat, Inc.
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public License as
|
||||
# published by the Free Software Foundation, either version 2 of
|
||||
# the License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be
|
||||
# useful, but WITHOUT ANY WARRANTY; without even the implied
|
||||
# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
# PURPOSE. See the GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see http://www.gnu.org/licenses/.
|
||||
#
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
export TEST=/tools/glibc/Regression/bz2024347-glibc-Optional-sched-getcpu-acceleration-using
|
||||
export TESTVERSION=1.0
|
||||
|
||||
BUILT_FILES=
|
||||
|
||||
FILES=$(METADATA) runtest.sh Makefile PURPOSE tst.c
|
||||
|
||||
.PHONY: all install download clean
|
||||
|
||||
run: $(FILES) build
|
||||
./runtest.sh
|
||||
|
||||
build: $(BUILT_FILES)
|
||||
test -x runtest.sh || chmod a+x runtest.sh
|
||||
|
||||
clean:
|
||||
rm -f *~ $(BUILT_FILES)
|
||||
|
||||
|
||||
include /usr/share/rhts/lib/rhts-make.include
|
||||
|
||||
$(METADATA): Makefile
|
||||
@echo "Owner: Sergey Kolosov <skolosov@redhat.com>" > $(METADATA)
|
||||
@echo "Name: $(TEST)" >> $(METADATA)
|
||||
@echo "TestVersion: $(TESTVERSION)" >> $(METADATA)
|
||||
@echo "Path: $(TEST_DIR)" >> $(METADATA)
|
||||
@echo "Description: Test for BZ#2024347 (glibc Optional sched_getcpu acceleration using)" >> $(METADATA)
|
||||
@echo "Type: Regression" >> $(METADATA)
|
||||
@echo "TestTime: 15m" >> $(METADATA)
|
||||
@echo "RunFor: glibc" >> $(METADATA)
|
||||
@echo "Requires: gcc glibc glibc-devel strace" >> $(METADATA)
|
||||
@echo "Priority: Normal" >> $(METADATA)
|
||||
@echo "License: GPLv2+" >> $(METADATA)
|
||||
@echo "Confidential: no" >> $(METADATA)
|
||||
@echo "Destructive: no" >> $(METADATA)
|
||||
@echo "Bug: 2024347" >> $(METADATA)
|
||||
@echo "Releases: -RHEL4 -RHEL5 -RHEL6 -RHEL7 -RHEL8" >> $(METADATA)
|
||||
|
||||
rhts-lint $(METADATA)
|
@ -0,0 +1,5 @@
|
||||
PURPOSE of /tools/glibc/Regression/bz2024347-glibc-Optional-sched-getcpu-acceleration-using
|
||||
Description: Test for BZ#2024347 (glibc Optional sched_getcpu acceleration using)
|
||||
Author: Sergey Kolosov <skolosov@redhat.com>
|
||||
Bug summary: glibc: Optional sched_getcpu acceleration using rseq
|
||||
Bugzilla link: https://bugzilla.redhat.com/show_bug.cgi?id=2024347
|
@ -0,0 +1,22 @@
|
||||
summary: Test for BZ#2024347 (glibc Optional sched_getcpu acceleration using)
|
||||
description: |
|
||||
Bug summary: glibc: Optional sched_getcpu acceleration using rseq
|
||||
Bugzilla link: https://bugzilla.redhat.com/show_bug.cgi?id=2024347
|
||||
link:
|
||||
- relates: https://bugzilla.redhat.com/show_bug.cgi?id=2024347
|
||||
contact: Sergey Kolosov <skolosov@redhat.com>
|
||||
component:
|
||||
- glibc
|
||||
adjust:
|
||||
- enabled: false
|
||||
when: distro < rhel-9
|
||||
test: ./runtest.sh
|
||||
framework: beakerlib
|
||||
recommend:
|
||||
- gcc
|
||||
- glibc
|
||||
- glibc-devel
|
||||
- strace
|
||||
duration: 15m
|
||||
extra-summary: /tools/glibc/Regression/bz2024347-glibc-Optional-sched-getcpu-acceleration-using
|
||||
extra-task: /tools/glibc/Regression/bz2024347-glibc-Optional-sched-getcpu-acceleration-using
|
@ -0,0 +1,57 @@
|
||||
#!/bin/bash
|
||||
# vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
#
|
||||
# runtest.sh of /tools/glibc/Regression/bz2024347-glibc-Optional-sched-getcpu-acceleration-using
|
||||
# Description: Test for BZ#2024347 (glibc Optional sched_getcpu acceleration using)
|
||||
# Author: Sergey Kolosov <skolosov@redhat.com>
|
||||
#
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
#
|
||||
# Copyright (c) 2022 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"
|
||||
|
||||
rlJournalStart
|
||||
rlPhaseStartSetup
|
||||
rlAssertRpm $PACKAGE
|
||||
PACKNVR=$(rpm -q ${PACKAGE}.`arch`)
|
||||
rlRun "TESTTMPDIR=$(mktemp -d)"
|
||||
rlRun "cp ${TESTPROG}.c $TESTTMPDIR"
|
||||
rlRun "pushd $TESTTMPDIR"
|
||||
rlPhaseEnd
|
||||
|
||||
rlPhaseStartTest
|
||||
rlRun -c "gcc ${TESTPROG}.c -o $TESTPROG"
|
||||
rlAssertExists "$TESTPROG"
|
||||
rlRun -c "strace -E GLIBC_TUNABLES=glibc.pthread.rseq=1 ./${TESTPROG} 2> log"
|
||||
rlAssertGrep rseq log
|
||||
rlAssertNotGrep getcpu log
|
||||
rlFileSubmit log
|
||||
rlPhaseEnd
|
||||
|
||||
rlPhaseStartCleanup
|
||||
rlRun "popd"
|
||||
rlRun "rm -r $TESTTMPDIR"
|
||||
rlPhaseEnd
|
||||
rlJournalPrintText
|
||||
rlJournalEnd
|
@ -0,0 +1,9 @@
|
||||
#define _GNU_SOURCE
|
||||
#include <stdio.h>
|
||||
#include <sched.h>
|
||||
|
||||
int
|
||||
main (void)
|
||||
{
|
||||
printf ("%d\n", sched_getcpu ());
|
||||
}
|
@ -0,0 +1,64 @@
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
#
|
||||
# Makefile of /tools/glibc/Regression/bz2027789-glibc-backtrace-function-crashes-without-vdso-on
|
||||
# Description: Test for BZ#2027789 (glibc backtrace function crashes without vdso on)
|
||||
# Author: Sergey Kolosov <skolosov@redhat.com>
|
||||
#
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
#
|
||||
# Copyright (c) 2021 Red Hat, Inc.
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public License as
|
||||
# published by the Free Software Foundation, either version 2 of
|
||||
# the License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be
|
||||
# useful, but WITHOUT ANY WARRANTY; without even the implied
|
||||
# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
# PURPOSE. See the GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see http://www.gnu.org/licenses/.
|
||||
#
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
export TEST=/tools/glibc/Regression/bz2027789-glibc-backtrace-function-crashes-without-vdso-on
|
||||
export TESTVERSION=1.0
|
||||
|
||||
BUILT_FILES=
|
||||
|
||||
FILES=$(METADATA) runtest.sh Makefile PURPOSE tst.c
|
||||
|
||||
.PHONY: all install download clean
|
||||
|
||||
run: $(FILES) build
|
||||
./runtest.sh
|
||||
|
||||
build: $(BUILT_FILES)
|
||||
test -x runtest.sh || chmod a+x runtest.sh
|
||||
|
||||
clean:
|
||||
rm -f *~ $(BUILT_FILES)
|
||||
|
||||
|
||||
include /usr/share/rhts/lib/rhts-make.include
|
||||
|
||||
$(METADATA): Makefile
|
||||
@echo "Owner: Sergey Kolosov <skolosov@redhat.com>" > $(METADATA)
|
||||
@echo "Name: $(TEST)" >> $(METADATA)
|
||||
@echo "TestVersion: $(TESTVERSION)" >> $(METADATA)
|
||||
@echo "Path: $(TEST_DIR)" >> $(METADATA)
|
||||
@echo "Description: Test for BZ#2027789 (glibc backtrace function crashes without vdso on)" >> $(METADATA)
|
||||
@echo "Type: Regression" >> $(METADATA)
|
||||
@echo "TestTime: 10m" >> $(METADATA)
|
||||
@echo "RunFor: glibc" >> $(METADATA)
|
||||
@echo "Requires: gcc glibc glibc-devel valgrind" >> $(METADATA)
|
||||
@echo "Priority: Normal" >> $(METADATA)
|
||||
@echo "License: GPLv2+" >> $(METADATA)
|
||||
@echo "Confidential: no" >> $(METADATA)
|
||||
@echo "Destructive: no" >> $(METADATA)
|
||||
@echo "Bug: 2027789" >> $(METADATA)
|
||||
@echo "Releases: -RHEL4 -RHEL5 -RHEL6 -RHEL7 -RHEL8" >> $(METADATA)
|
||||
|
||||
rhts-lint $(METADATA)
|
@ -0,0 +1,5 @@
|
||||
PURPOSE of /tools/glibc/Regression/bz2027789-glibc-backtrace-function-crashes-without-vdso-on
|
||||
Description: Test for BZ#2027789 (glibc backtrace function crashes without vdso on)
|
||||
Author: Sergey Kolosov <skolosov@redhat.com>
|
||||
Bug summary: glibc: backtrace function crashes without vdso on ppc64le
|
||||
Bugzilla link: https://bugzilla.redhat.com/show_bug.cgi?id=2027789
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user