CI Tests: test coverage improvement
This commit is contained in:
parent
6fd5c5a43b
commit
642430bf83
@ -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/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,16 @@
|
||||
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
|
||||
recommend:
|
||||
- glibc
|
||||
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,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 "RhtsRequires: library(glibc/chrft)" >> $(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,20 @@
|
||||
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
|
||||
require:
|
||||
- library(glibc/chrft)
|
||||
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-debuginfo-common 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,20 @@
|
||||
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
|
||||
recommend:
|
||||
- glibc
|
||||
- glibc-debuginfo
|
||||
- glibc-debuginfo-common
|
||||
- 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,18 @@
|
||||
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
|
||||
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 "ld-.*, 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,65 @@
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
#
|
||||
# Makefile of /tools/glibc/Regression/bz1746933-glibc-Backport-malloc-tcache-enhancements
|
||||
# Description: Test for BZ#1746933 (glibc Backport malloc tcache enhancements )
|
||||
# Author: Sergey Kolosov <skolosov@redhat.com>
|
||||
#
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
#
|
||||
# Copyright (c) 2020 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/bz1746933-glibc-Backport-malloc-tcache-enhancements
|
||||
export TESTVERSION=1.0
|
||||
|
||||
BUILT_FILES=
|
||||
|
||||
FILES=$(METADATA) runtest.sh Makefile PURPOSE m1.stp m1_p9.stp t.c trigger.sh
|
||||
|
||||
.PHONY: all install download clean
|
||||
|
||||
run: $(FILES) build
|
||||
./runtest.sh
|
||||
|
||||
build: $(BUILT_FILES)
|
||||
test -x runtest.sh || chmod a+x runtest.sh
|
||||
|
||||
clean:
|
||||
rm -f *~ $(BUILT_FILES)
|
||||
|
||||
|
||||
include /usr/share/rhts/lib/rhts-make.include
|
||||
|
||||
$(METADATA): Makefile
|
||||
@echo "Owner: Sergey Kolosov <skolosov@redhat.com>" > $(METADATA)
|
||||
@echo "Name: $(TEST)" >> $(METADATA)
|
||||
@echo "TestVersion: $(TESTVERSION)" >> $(METADATA)
|
||||
@echo "Path: $(TEST_DIR)" >> $(METADATA)
|
||||
@echo "Description: Test for BZ#1746933 (glibc Backport malloc tcache enhancements)" >> $(METADATA)
|
||||
@echo "Type: Regression" >> $(METADATA)
|
||||
@echo "TestTime: 10m" >> $(METADATA)
|
||||
@echo "RunFor: glibc" >> $(METADATA)
|
||||
@echo "Requires: gcc glibc glibc-devel systemtap" >> $(METADATA)
|
||||
@echo "RhtsRequires: library(glibc/chrft)" >> $(METADATA)
|
||||
@echo "Priority: Normal" >> $(METADATA)
|
||||
@echo "License: GPLv2+" >> $(METADATA)
|
||||
@echo "Confidential: no" >> $(METADATA)
|
||||
@echo "Destructive: no" >> $(METADATA)
|
||||
@echo "Bug: 1746933" >> $(METADATA)
|
||||
@echo "Releases: -RHEL4 -RHEL5 -RHEL6 -RHEL7" >> $(METADATA)
|
||||
|
||||
rhts-lint $(METADATA)
|
@ -0,0 +1,8 @@
|
||||
PURPOSE of /tools/glibc/Regression/bz1746933-glibc-Backport-malloc-tcache-enhancements
|
||||
Description: Test for BZ#1746933 (glibc Backport malloc tcache enhancements )
|
||||
Author: Sergey Kolosov <skolosov@redhat.com>
|
||||
Bug summary: glibc: Backport malloc tcache enhancements (swbz#24531)
|
||||
Bugzilla link: https://bugzilla.redhat.com/show_bug.cgi?id=1746933
|
||||
|
||||
TODO
|
||||
Use correct path to libc in case of power9/power8
|
@ -0,0 +1,4 @@
|
||||
probe process("/lib64/libc.so.6").mark("memory_tunable_tcache_count")
|
||||
{
|
||||
printf("PID=%d New tcache_count:%ld, old tcache_count:%ld\n",pid(), $arg1, $arg2)
|
||||
}
|
@ -0,0 +1,4 @@
|
||||
probe process("/lib64/glibc-hwcaps/power9/libc.so.6").mark("memory_tunable_tcache_count")
|
||||
{
|
||||
printf("PID=%d New tcache_count:%ld, old tcache_count:%ld\n",pid(), $arg1, $arg2)
|
||||
}
|
@ -0,0 +1,24 @@
|
||||
summary: Test for BZ#1746933 (glibc Backport malloc tcache enhancements)
|
||||
description: |
|
||||
Bug summary: glibc: Backport malloc tcache enhancements (swbz#24531)
|
||||
Bugzilla link: https://bugzilla.redhat.com/show_bug.cgi?id=1746933
|
||||
|
||||
TODO
|
||||
Use correct path to libc in case of power9/power8
|
||||
link:
|
||||
- relates: https://bugzilla.redhat.com/show_bug.cgi?id=1746933
|
||||
contact: Sergey Kolosov <skolosov@redhat.com>
|
||||
component:
|
||||
- glibc
|
||||
test: ./runtest.sh
|
||||
framework: beakerlib
|
||||
require:
|
||||
- library(glibc/chrft)
|
||||
recommend:
|
||||
- gcc
|
||||
- glibc
|
||||
- glibc-devel
|
||||
- systemtap
|
||||
duration: 10m
|
||||
extra-summary: /tools/glibc/Regression/bz1746933-glibc-Backport-malloc-tcache-enhancements
|
||||
extra-task: /tools/glibc/Regression/bz1746933-glibc-Backport-malloc-tcache-enhancements
|
@ -0,0 +1,70 @@
|
||||
#!/bin/bash
|
||||
# vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
#
|
||||
# runtest.sh of /tools/glibc/Regression/bz1746933-glibc-Backport-malloc-tcache-enhancements
|
||||
# Description: Test for BZ#1746933 (glibc Backport malloc tcache enhancements )
|
||||
# Author: Sergey Kolosov <skolosov@redhat.com>
|
||||
#
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
#
|
||||
# Copyright (c) 2020 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="t"
|
||||
TRIG="trigger.sh"
|
||||
SSCRIPT="m1.stp"
|
||||
SSCRIPTP9="m1_p9.stp"
|
||||
SREPORT="report.txt"
|
||||
|
||||
rlJournalStart
|
||||
rlPhaseStartSetup
|
||||
rlAssertRpm $PACKAGE
|
||||
PACKNVR=$(rpm -q ${PACKAGE}.`arch`)
|
||||
rlRun "TESTTMPDIR=$(mktemp -d)"
|
||||
rlRun "cp ${TESTPROG}.c $TRIG $SSCRIPT $SSCRIPTP9 $TESTTMPDIR"
|
||||
rlRun "pushd $TESTTMPDIR"
|
||||
rlPhaseEnd
|
||||
|
||||
rlPhaseStartTest
|
||||
rlRun -c "gcc ${TESTPROG}.c -o $TESTPROG"
|
||||
rlAssertExists "$TESTPROG"
|
||||
if [ `arch` = "ppc64le" ] && rlIsRHEL 8; then
|
||||
rlRun -l "stap -v $SSCRIPTP9 -c ./${TRIG} > $SREPORT"
|
||||
else
|
||||
rlRun -l "stap -v $SSCRIPT -c ./${TRIG} > $SREPORT"
|
||||
fi
|
||||
rlAssertGrep "tcache_count:11111" $SREPORT
|
||||
rlAssertGrep "tcache_count:65" $SREPORT
|
||||
rlAssertGrep "tcache_count:0" $SREPORT
|
||||
rlAssertGrep "tcache_count:65535" $SREPORT
|
||||
rlAssertNotGrep "tcache_count:65536" $SREPORT
|
||||
rlAssertNotGrep "tcache_count:5555555" $SREPORT
|
||||
rlAssertNotGrep "tcache_count:-20" $SREPORT
|
||||
rlFileSubmit $SREPORT
|
||||
rlPhaseEnd
|
||||
|
||||
rlPhaseStartCleanup
|
||||
rlRun "popd"
|
||||
rlRun "rm -r $TESTTMPDIR"
|
||||
rlPhaseEnd
|
||||
rlJournalPrintText
|
||||
rlJournalEnd
|
@ -0,0 +1,12 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
int main() {
|
||||
void *m;
|
||||
printf("Malloc test\n");
|
||||
if(!malloc(100)) {
|
||||
perror("malloc");
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
}
|
@ -0,0 +1,16 @@
|
||||
#!/bin/bash
|
||||
export "GLIBC_TUNABLES=glibc.malloc.tcache_count=11111"
|
||||
./t
|
||||
export "GLIBC_TUNABLES=glibc.malloc.tcache_count=65"
|
||||
./t
|
||||
export "GLIBC_TUNABLES=glibc.malloc.tcache_count=0"
|
||||
./t
|
||||
export "GLIBC_TUNABLES=glibc.malloc.tcache_count=65535"
|
||||
./t
|
||||
export "GLIBC_TUNABLES=glibc.malloc.tcache_count=65536"
|
||||
./t
|
||||
export "GLIBC_TUNABLES=glibc.malloc.tcache_count=-20"
|
||||
./t
|
||||
export "GLIBC_TUNABLES=glibc.malloc.tcache_count=5555555"
|
||||
./t
|
||||
|
@ -0,0 +1,65 @@
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
#
|
||||
# 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 "RhtsRequires: library(glibc/chrft)" >> $(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,19 @@
|
||||
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
|
||||
test: ./runtest.sh
|
||||
framework: beakerlib
|
||||
require:
|
||||
- library(glibc/chrft)
|
||||
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,54 @@
|
||||
#!/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`)
|
||||
rlImport glibc/chrft
|
||||
checkRelevancyAndExit $PACKNVR $(rlGetDistroRelease)
|
||||
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,65 @@
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
#
|
||||
# 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 "RhtsRequires: library(glibc/chrft)" >> $(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,21 @@
|
||||
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
|
||||
test: ./runtest.sh
|
||||
framework: beakerlib
|
||||
require:
|
||||
- library(glibc/chrft)
|
||||
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,65 @@
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
#
|
||||
# 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 "RhtsRequires: library(glibc/chrft)" >> $(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
|
@ -0,0 +1,21 @@
|
||||
summary: Test for BZ#2027789 (glibc backtrace function crashes without vdso on)
|
||||
description: |
|
||||
Bug summary: glibc: backtrace function crashes without vdso on ppc64le
|
||||
Bugzilla link: https://bugzilla.redhat.com/show_bug.cgi?id=2027789
|
||||
link:
|
||||
- relates: https://bugzilla.redhat.com/show_bug.cgi?id=2027789
|
||||
contact: Sergey Kolosov <skolosov@redhat.com>
|
||||
component:
|
||||
- glibc
|
||||
test: ./runtest.sh
|
||||
framework: beakerlib
|
||||
require:
|
||||
- library(glibc/chrft)
|
||||
recommend:
|
||||
- gcc
|
||||
- glibc
|
||||
- glibc-devel
|
||||
- valgrind
|
||||
duration: 10m
|
||||
extra-summary: /tools/glibc/Regression/bz2027789-glibc-backtrace-function-crashes-without-vdso-on
|
||||
extra-task: /tools/glibc/Regression/bz2027789-glibc-backtrace-function-crashes-without-vdso-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/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/.
|
||||
#
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
# Include Beaker environment
|
||||
. /usr/share/beakerlib/beakerlib.sh || exit 1
|
||||
|
||||
PACKAGE="glibc"
|
||||
TESTPROG="tst"
|
||||
VALLOG="vallog"
|
||||
|
||||
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 -g -o $TESTPROG"
|
||||
rlAssertExists "$TESTPROG"
|
||||
rlRun -l "valgrind --error-exitcode=111 ./${TESTPROG} 2>$VALLOG"
|
||||
rlFileSubmit $VALLOG
|
||||
rlPhaseEnd
|
||||
|
||||
rlPhaseStartCleanup
|
||||
rlRun "popd"
|
||||
rlRun "rm -r $TESTTMPDIR"
|
||||
rlPhaseEnd
|
||||
rlJournalPrintText
|
||||
rlJournalEnd
|
@ -0,0 +1,12 @@
|
||||
#include <stdio.h>
|
||||
#include <execinfo.h>
|
||||
|
||||
void call_backtrace(){
|
||||
void * callstack[128];
|
||||
backtrace(callstack, 128);
|
||||
}
|
||||
|
||||
int main(){
|
||||
call_backtrace();
|
||||
return 0;
|
||||
}
|
@ -0,0 +1,64 @@
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
#
|
||||
# Makefile of /tools/glibc/Sanity/bz1476120-glibc-headers-don-t-include-linux-falloc-h-and
|
||||
# Description: Test for BZ#1476120 (glibc headers don't include linux/falloc.h, and)
|
||||
# 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/Sanity/bz1476120-glibc-headers-don-t-include-linux-falloc-h-and
|
||||
export TESTVERSION=1.0
|
||||
|
||||
BUILT_FILES=
|
||||
|
||||
FILES=$(METADATA) runtest.sh Makefile PURPOSE tst-falloc.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#1476120 (glibc headers don't include linux/falloc.h, and)" >> $(METADATA)
|
||||
@echo "Type: Sanity" >> $(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: 1476120" >> $(METADATA)
|
||||
@echo "Releases: -RHEL4 -RHEL5 -RHEL6" >> $(METADATA)
|
||||
|
||||
rhts-lint $(METADATA)
|
@ -0,0 +1,5 @@
|
||||
PURPOSE of /tools/glibc/Sanity/bz1476120-glibc-headers-don-t-include-linux-falloc-h-and
|
||||
Description: Test for BZ#1476120 (glibc headers don't include linux/falloc.h, and)
|
||||
Author: Sergey Kolosov <skolosov@redhat.com>
|
||||
Bug summary: glibc headers don't include linux/falloc.h, and therefore doesn't include fallocate() flags
|
||||
Bugzilla link: https://bugzilla.redhat.com/show_bug.cgi?id=1476120
|
@ -0,0 +1,18 @@
|
||||
summary: Test for BZ#1476120 (glibc headers don't include linux/falloc.h, and)
|
||||
description: |
|
||||
Bug summary: glibc headers don't include linux/falloc.h, and therefore doesn't include fallocate() flags
|
||||
Bugzilla link: https://bugzilla.redhat.com/show_bug.cgi?id=1476120
|
||||
link:
|
||||
- relates: https://bugzilla.redhat.com/show_bug.cgi?id=1476120
|
||||
contact: Sergey Kolosov <skolosov@redhat.com>
|
||||
component:
|
||||
- glibc
|
||||
test: ./runtest.sh
|
||||
framework: beakerlib
|
||||
recommend:
|
||||
- glibc
|
||||
- glibc-devel
|
||||
- gcc
|
||||
duration: 20m
|
||||
extra-summary: /tools/glibc/Sanity/bz1476120-glibc-headers-don-t-include-linux-falloc-h-and
|
||||
extra-task: /tools/glibc/Sanity/bz1476120-glibc-headers-don-t-include-linux-falloc-h-and
|
@ -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/Sanity/bz1476120-glibc-headers-don-t-include-linux-falloc-h-and
|
||||
# Description: Test for BZ#1476120 (glibc headers don't include linux/falloc.h, and)
|
||||
# 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-falloc"
|
||||
|
||||
rlJournalStart
|
||||
rlPhaseStartSetup
|
||||
rlAssertRpm $PACKAGE
|
||||
rlRun "TESTTMPDIR=$(mktemp -d)"
|
||||
rlRun "cp ${TESTPROG}.c $TESTTMPDIR"
|
||||
rlRun "pushd $TESTTMPDIR"
|
||||
rlPhaseEnd
|
||||
|
||||
rlPhaseStartTest
|
||||
rlRun -c "gcc -c ${TESTPROG}.c"
|
||||
rlAssertExists "${TESTPROG}.o"
|
||||
rlPhaseEnd
|
||||
|
||||
rlPhaseStartCleanup
|
||||
rlRun "popd"
|
||||
rlRun "rm -r $TESTTMPDIR"
|
||||
rlPhaseEnd
|
||||
rlJournalPrintText
|
||||
rlJournalEnd
|
@ -0,0 +1,7 @@
|
||||
#define _GNU_SOURCE
|
||||
#include <fcntl.h>
|
||||
int test(int fd)
|
||||
{
|
||||
return fallocate(fd, FALLOC_FL_PUNCH_HOLE | FALLOC_FL_KEEP_SIZE,
|
||||
0, 1024 * 1024);
|
||||
}
|
@ -0,0 +1,65 @@
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
#
|
||||
# Makefile of /tools/glibc/Sanity/bz1915330-glibc-Implement-find-debuginfo-sh-changes-to
|
||||
# Description: Test for BZ#1915330 (glibc Implement find-debuginfo.sh changes to avoid)
|
||||
# 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/Sanity/bz1915330-glibc-Implement-find-debuginfo-sh-changes-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#1915330 (glibc Implement find-debuginfo.sh changes to avoid)" >> $(METADATA)
|
||||
@echo "Type: Sanity" >> $(METADATA)
|
||||
@echo "TestTime: 10m" >> $(METADATA)
|
||||
@echo "RunFor: glibc" >> $(METADATA)
|
||||
@echo "Requires: glibc glibc-debuginfo glibc-debuginfo.i686 glibc-debuginfo.x86_64" >> $(METADATA)
|
||||
@echo "RhtsRequires: library(glibc/chrft)" >> $(METADATA)
|
||||
@echo "Priority: Normal" >> $(METADATA)
|
||||
@echo "License: GPLv2+" >> $(METADATA)
|
||||
@echo "Confidential: no" >> $(METADATA)
|
||||
@echo "Destructive: no" >> $(METADATA)
|
||||
@echo "Bug: 1915330" >> $(METADATA)
|
||||
@echo "Releases: -RHEL4 -RHEL5 -RHEL6 -RHEL7 -RHEL8" >> $(METADATA)
|
||||
|
||||
rhts-lint $(METADATA)
|
@ -0,0 +1,5 @@
|
||||
PURPOSE of /tools/glibc/Sanity/bz1915330-glibc-Implement-find-debuginfo-sh-changes-to
|
||||
Description: Test for BZ#1915330 (glibc Implement find-debuginfo.sh changes to avoid)
|
||||
Author: Sergey Kolosov <skolosov@redhat.com>
|
||||
Bug summary: glibc: Implement find-debuginfo.sh changes to avoid file conflicts
|
||||
Bugzilla link: https://bugzilla.redhat.com/show_bug.cgi?id=1915330
|
@ -0,0 +1,21 @@
|
||||
summary: Test for BZ#1915330 (glibc Implement find-debuginfo.sh changes to avoid)
|
||||
description: |
|
||||
Bug summary: glibc: Implement find-debuginfo.sh changes to avoid file conflicts
|
||||
Bugzilla link: https://bugzilla.redhat.com/show_bug.cgi?id=1915330
|
||||
link:
|
||||
- relates: https://bugzilla.redhat.com/show_bug.cgi?id=1915330
|
||||
contact: Sergey Kolosov <skolosov@redhat.com>
|
||||
component:
|
||||
- glibc
|
||||
test: ./runtest.sh
|
||||
framework: beakerlib
|
||||
require:
|
||||
- library(glibc/chrft)
|
||||
recommend:
|
||||
- glibc
|
||||
- glibc-debuginfo
|
||||
- glibc-debuginfo.i686
|
||||
- glibc-debuginfo.x86_64
|
||||
duration: 10m
|
||||
extra-summary: /tools/glibc/Sanity/bz1915330-glibc-Implement-find-debuginfo-sh-changes-to
|
||||
extra-task: /tools/glibc/Sanity/bz1915330-glibc-Implement-find-debuginfo-sh-changes-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/Sanity/bz1915330-glibc-Implement-find-debuginfo-sh-changes-to
|
||||
# Description: Test for BZ#1915330 (glibc Implement find-debuginfo.sh changes to avoid)
|
||||
# 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"
|
||||
DEBUGPACKAGE="glibc-debuginfo"
|
||||
|
||||
rlJournalStart
|
||||
rlPhaseStartSetup
|
||||
rlAssertRpm $PACKAGE
|
||||
PACKNVR=$(rpm -q ${PACKAGE}.`arch`)
|
||||
rlPhaseEnd
|
||||
|
||||
rlPhaseStartTest
|
||||
rlAssertRpm ${DEBUGPACKAGE}.$(rlGetPrimaryArch)
|
||||
if [[ $(rlGetSecondaryArch) ]]
|
||||
then
|
||||
rlAssertRpm ${DEBUGPACKAGE}.$(rlGetSecondaryArch)
|
||||
fi
|
||||
rlPhaseEnd
|
||||
|
||||
rlPhaseStartCleanup
|
||||
rlPhaseEnd
|
||||
rlJournalPrintText
|
||||
rlJournalEnd
|
@ -0,0 +1,63 @@
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
#
|
||||
# Makefile of /tools/glibc/Sanity/bz2023420-glibc-Backport-ld-so-list-diagnostics
|
||||
# Description: Test for BZ#2023420 (glibc: Backport ld.so --list-diagnostics)
|
||||
# Author: Martin Coufal <mcoufal@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/Sanity/bz2023420-glibc-Backport-ld-so-list-diagnostics
|
||||
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#2023420 (glibc: Backport ld.so --list-diagnostics)" >> $(METADATA)
|
||||
@echo "Type: Sanity" >> $(METADATA)
|
||||
@echo "TestTime: 10m" >> $(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: 2023420" >> $(METADATA)
|
||||
|
||||
rhts-lint $(METADATA)
|
@ -0,0 +1,5 @@
|
||||
PURPOSE of /tools/glibc/Sanity/bz2023420-glibc-Backport-ld-so-list-diagnostics
|
||||
Description: Test for BZ#2023420 (glibc: Backport ld.so --list-diagnostics)
|
||||
Author: Martin Coufal <mcoufal@redhat.com>
|
||||
Bug summary: glibc: Backport ld.so --list-diagnostics [rhel-8.6]
|
||||
Bugzilla link: https://bugzilla.redhat.com/show_bug.cgi?id=2023420
|
@ -0,0 +1,16 @@
|
||||
summary: 'Test for BZ#2023420 (glibc: Backport ld.so --list-diagnostics)'
|
||||
description: |
|
||||
Bug summary: glibc: Backport ld.so --list-diagnostics [rhel-8.6]
|
||||
Bugzilla link: https://bugzilla.redhat.com/show_bug.cgi?id=2023420
|
||||
link:
|
||||
- relates: https://bugzilla.redhat.com/show_bug.cgi?id=2023420
|
||||
contact: Martin Coufal <mcoufal@redhat.com>
|
||||
component:
|
||||
- glibc
|
||||
test: ./runtest.sh
|
||||
framework: beakerlib
|
||||
recommend:
|
||||
- glibc
|
||||
duration: 10m
|
||||
extra-summary: /tools/glibc/Sanity/bz2023420-glibc-Backport-ld-so-list-diagnostics
|
||||
extra-task: /tools/glibc/Sanity/bz2023420-glibc-Backport-ld-so-list-diagnostics
|
64
tests/Sanity/bz2023420-glibc-Backport-ld-so-list-diagnostics/runtest.sh
Executable file
64
tests/Sanity/bz2023420-glibc-Backport-ld-so-list-diagnostics/runtest.sh
Executable file
@ -0,0 +1,64 @@
|
||||
#!/bin/bash
|
||||
# vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
#
|
||||
# runtest.sh of /tools/glibc/Sanity/bz2023420-glibc-Backport-ld-so-list-diagnostics
|
||||
# Description: Test for BZ#2023420 (glibc: Backport ld.so --list-diagnostics)
|
||||
# Author: Martin Coufal <mcoufal@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
|
||||
rlAssertRpm $PACKAGE
|
||||
rlRun "LDSO_PATH=$(rpm -ql ${PACKAGE}-common | grep ld.so)"
|
||||
rlRun "tmpdir=$(mktemp -d)"
|
||||
rlRun "pushd $tmpdir"
|
||||
rlPhaseEnd
|
||||
|
||||
rlPhaseStartTest
|
||||
if [[ -z "$LDSO_PATH" ]]; then
|
||||
rlFail "Shared library 'ld.so' not found!"
|
||||
elif [[ ! -L "$LDSO_PATH" ]]; then
|
||||
rlFail "$LDSO_PATH should be a symbolic link!"
|
||||
else
|
||||
rlRun "$LDSO_PATH --help >> help.log"
|
||||
rlAssertGrep "Usage:.*ld\.so" help.log
|
||||
rlAssertGrep "--list-diagnostics" help.log
|
||||
rlRun "$LDSO_PATH --list-diagnostics >> list-diagnostics.log"
|
||||
rlAssertGreaterOrEqual "Basic sanity line count check" $(cat list-diagnostics.log | wc -l) 10
|
||||
rlAssertGrep "dso" list-diagnostics.log
|
||||
rlAssertGrep "env_filtered" list-diagnostics.log
|
||||
rlAssertGrep "auxv" list-diagnostics.log
|
||||
rlAssertGrep "uname" list-diagnostics.log
|
||||
fi
|
||||
rlPhaseEnd
|
||||
|
||||
rlPhaseStartCleanup
|
||||
rlRun "popd"
|
||||
rlRun "rm -rf $tmpdir"
|
||||
rlPhaseEnd
|
||||
rlJournalPrintText
|
||||
rlJournalEnd
|
Loading…
Reference in New Issue
Block a user