Compare commits
33 commits
request-bo
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1d1d0fd2d5 | ||
|
|
0e498dbd8a | ||
|
|
3e260a599e | ||
|
|
a8e29def37 | ||
|
|
9b92ad2f33 | ||
|
|
244f7a98ef | ||
|
|
6acb3b42bd | ||
|
|
915769aea7 | ||
|
|
4cb7228fb7 | ||
|
|
b8ffdae65c | ||
|
|
6b235279e3 | ||
|
|
cc0818fdab | ||
|
|
3dce72e8c6 | ||
|
|
b9967f828f | ||
|
|
d872e9b635 | ||
|
|
0d0837075c | ||
|
|
d0885adef7 | ||
|
|
6843d3f686 | ||
|
|
be87f4ca1d | ||
|
|
366b760d8b | ||
|
|
b039bd3254 | ||
|
|
ba80602fc0 | ||
|
|
b761235346 | ||
|
|
3d9e1dca35 | ||
|
|
adc4d2b81b | ||
|
|
bad20108ff | ||
|
|
a7dda53401 | ||
|
|
3174ec2189 | ||
|
|
7763fe2d6c | ||
|
|
a961bfc6db | ||
|
|
2fac9fa853 | ||
|
|
e4186c9e21 | ||
|
|
da64e69b57 |
24 changed files with 703 additions and 27 deletions
45
Sanity/got-audit/Makefile
Normal file
45
Sanity/got-audit/Makefile
Normal file
|
|
@ -0,0 +1,45 @@
|
|||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
#
|
||||
# Makefile of /CoreOS/httpd/Sanity/got-audit
|
||||
# Description: Ensure pointers in the server process GOT match expected values
|
||||
# Author: Gordon Messmer <gordon.messmer@gmail.com>
|
||||
#
|
||||
|
||||
export TEST=/CoreOS/httpd/Sanity/got-audit
|
||||
export TESTVERSION=1.0
|
||||
|
||||
BUILT_FILES=
|
||||
|
||||
FILES=$(METADATA) runtest.sh Makefile got-audit.gdb
|
||||
|
||||
.PHONY: all install download clean
|
||||
|
||||
run: $(FILES) build
|
||||
./runtest.sh
|
||||
|
||||
build: $(BUILT_FILES)
|
||||
test -x runtest.sh || chmod a+x runtest.sh
|
||||
|
||||
clean:
|
||||
rm -f *~ $(BUILT_FILES)
|
||||
|
||||
|
||||
-include /usr/share/rhts/lib/rhts-make.include
|
||||
|
||||
$(METADATA): Makefile
|
||||
@echo "Owner: Gordon Messmer <gordon.messmer@gmail.com>" > $(METADATA)
|
||||
@echo "Name: $(TEST)" >> $(METADATA)
|
||||
@echo "TestVersion: $(TESTVERSION)" >> $(METADATA)
|
||||
@echo "Path: $(TEST_DIR)" >> $(METADATA)
|
||||
@echo "Description: Ensure pointers in the server process GOT match expected values" >> $(METADATA)
|
||||
@echo "Type: Sanity" >> $(METADATA)
|
||||
@echo "TestTime: 5m" >> $(METADATA)
|
||||
@echo "RunFor: httpd" >> $(METADATA)
|
||||
@echo "Requires: httpd gdb-gef" >> $(METADATA)
|
||||
@echo "Priority: Normal" >> $(METADATA)
|
||||
@echo "License: GPLv2+" >> $(METADATA)
|
||||
@echo "Confidential: yes" >> $(METADATA)
|
||||
@echo "Destructive: no" >> $(METADATA)
|
||||
@echo "Releases: " >> $(METADATA)
|
||||
|
||||
rhts-lint $(METADATA)
|
||||
2
Sanity/got-audit/got-audit.gdb
Normal file
2
Sanity/got-audit/got-audit.gdb
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
gef config gef.disable_color True
|
||||
got-audit --all
|
||||
12
Sanity/got-audit/main.fmf
Normal file
12
Sanity/got-audit/main.fmf
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
summary: Audit the GOT for signs of tampering
|
||||
description: |
|
||||
Pointers in the server process GOT will be checked to ensure that
|
||||
each function pointer's value is within a shared object file
|
||||
that exports a symbol of that name, and that no shared object
|
||||
files export conflicting symbols.
|
||||
contact: Gordon Messmer <gordon.messmer@gmail.com>
|
||||
require+:
|
||||
- gdb-gef # needed to test got-audit
|
||||
test: ./runtest.sh
|
||||
framework: beakerlib
|
||||
|
||||
41
Sanity/got-audit/runtest.sh
Executable file
41
Sanity/got-audit/runtest.sh
Executable file
|
|
@ -0,0 +1,41 @@
|
|||
#!/bin/bash
|
||||
# vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
#
|
||||
# runtest.sh of /CoreOS/httpd/Sanity/got-audit
|
||||
# Description: Check pointers in the server process GOT for signs of tampering
|
||||
# Author: Gordon Messmer <gordon.messmer@gmail.com>
|
||||
#
|
||||
|
||||
# Include Beaker environment
|
||||
. /usr/share/beakerlib/beakerlib.sh || exit 1
|
||||
|
||||
rlJournalStart
|
||||
rlPhaseStartSetup
|
||||
rlServiceStart httpd
|
||||
rlRun "TestDir=\$(pwd)"
|
||||
rlRun "TmpDir=\$(mktemp -d)" 0 "Creating tmp directory"
|
||||
rlRun "pushd $TmpDir"
|
||||
rlRun "auditfile=\$(mktemp --tmpdir=${TmpDir})"
|
||||
rlPhaseEnd
|
||||
|
||||
rlPhaseStartTest "Run GEF got-audit"
|
||||
rlRun "SERVICE_PID=\$( systemctl show --property=MainPID httpd.service | cut -f2 -d= )"
|
||||
rlRun "echo SERVICE_PID is '$SERVICE_PID'"
|
||||
[ -n "$SERVICE_PID" ] || rlFail "No service pid was found"
|
||||
rlRun "gdb-gef --pid '$SERVICE_PID' --command='$TestDir'/got-audit.gdb --batch > '$auditfile'"
|
||||
# Basic test: ensure that at least one symbol is found in libc.so,
|
||||
# to verify that the report looks plausible.
|
||||
rlAssertGrep " : /.*/libc.so" "$auditfile"
|
||||
# Ensure the got-audit did not report any errors
|
||||
rlAssertNotGrep " :: ERROR" "$auditfile"
|
||||
rlRun "cp '$auditfile' '$TMT_TEST_DATA'/got-audit.txt"
|
||||
rlPhaseEnd
|
||||
|
||||
rlPhaseStartCleanup
|
||||
rlServiceRestore httpd
|
||||
rlRun "popd"
|
||||
rlRun "rm -r $TmpDir" 0 "Removing tmp directory"
|
||||
rlPhaseEnd
|
||||
rlJournalPrintText
|
||||
rlJournalEnd
|
||||
7
core/logging-to-journald/httpd.conf
Normal file
7
core/logging-to-journald/httpd.conf
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
CustomLog journald:notice combined
|
||||
|
||||
<VirtualHost 127.0.0.2:80>
|
||||
ServerName vhost.localdomain:80
|
||||
LogFormat "foo@@%v@@%U@@bar" rhjournal
|
||||
CustomLog journald:error rhjournal
|
||||
</VirtualHost>
|
||||
33
core/logging-to-journald/main.fmf
Normal file
33
core/logging-to-journald/main.fmf
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
summary: RFE-logging-to-journald
|
||||
description: |
|
||||
Bug summary: RFE: CustomLog should be able to use syslog as ErrorLog does
|
||||
Bugzilla link: https://bugzilla.redhat.com/show_bug.cgi?id=1209162
|
||||
component:
|
||||
- httpd
|
||||
test: ./runtest.sh
|
||||
framework: beakerlib
|
||||
require:
|
||||
- library(httpd/http)
|
||||
recommend:
|
||||
- httpd
|
||||
- curl
|
||||
duration: 5m
|
||||
enabled: true
|
||||
tag:
|
||||
- HttpdSclDone
|
||||
- NoRHEL4
|
||||
- NoRHEL5
|
||||
- TIPfail
|
||||
- Tier1
|
||||
tier: '1'
|
||||
adjust:
|
||||
- because: fixed in rhel-8.3
|
||||
enabled: false
|
||||
when: distro < rhel-8
|
||||
continue: false
|
||||
- enabled: false
|
||||
when: distro ~< rhel-8.3
|
||||
continue: false
|
||||
extra-nitrate: TC#0607562
|
||||
extra-summary: /CoreOS/httpd/Regression/bz1209162-RFE-logging-to-journald
|
||||
extra-task: /CoreOS/httpd/Regression/bz1209162-RFE-logging-to-journald
|
||||
79
core/logging-to-journald/runtest.sh
Executable file
79
core/logging-to-journald/runtest.sh
Executable file
|
|
@ -0,0 +1,79 @@
|
|||
#!/bin/bash
|
||||
# vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
#
|
||||
# runtest.sh of /CoreOS/httpd/Regression/bz1209162-RFE-logging-to-journald
|
||||
# Description: RFE-logging-to-journald
|
||||
# Author: Joe Orton <jorton@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
|
||||
|
||||
PACKAGES=${PACKAGES:-"httpd"}
|
||||
|
||||
rlJournalStart
|
||||
rlPhaseStartSetup
|
||||
rlAssertRpm --all
|
||||
rlImport httpd/http || rlDie
|
||||
rlRun "CONF=$httpCONFDIR/conf.d/bz1209162.conf"
|
||||
rlRun "cp httpd.conf $CONF"
|
||||
rlRun "rlFileBackup /etc/hosts"
|
||||
rlRun "echo 127.0.0.2 vhost.localdomain >> /etc/hosts"
|
||||
rlRun "TmpDir=\$(mktemp -d)" 0 "Creating tmp directory"
|
||||
rlRun "pushd $TmpDir"
|
||||
rlRun "httpStart"
|
||||
rlPhaseEnd
|
||||
|
||||
rlPhaseStartTest
|
||||
# Do all testing with a unique prefix so multiple runs aren't confused
|
||||
rlRun "PFX=bz1209162_${RANDOM}_${RANDOM}"
|
||||
# Check that something is logged
|
||||
rlRun "curl http://localhost/${PFX}-test-alpha > /dev/null" 0
|
||||
rlRun "journalctl -u httpd -g ${PFX}-test-alpha > journal.alpha"
|
||||
rlAssertGrep "GET /${PFX}-test-alpha" journal.alpha
|
||||
|
||||
# Test that requests are only logged at the configured level
|
||||
rlRun "curl http://localhost/${PFX}-test-beta > /dev/null" 0
|
||||
# journalctl: return a non-zero EC when --grep returns no matches
|
||||
# https://github.com/systemd/systemd/commit/6cda6774bdd90f8496d38dcd75d9be8a12660577
|
||||
rlRun "journalctl -q -u httpd -g ${PFX}-test-beta -p crit > journal.crit" 0,1
|
||||
rlRun "journalctl -q -u httpd -g ${PFX}-test-beta -p emerg > journal.emerg" 0,1
|
||||
rlRun "journalctl -q -u httpd -g ${PFX}-test-beta -p notice > journal.notice"
|
||||
rlAssertNotDiffer journal.crit /dev/null
|
||||
rlAssertNotDiffer journal.emerg /dev/null
|
||||
rlAssertGrep "GET /${PFX}-test-beta" journal.notice
|
||||
|
||||
# Test for a different vhost config
|
||||
rlRun "curl http://vhost.localdomain/${PFX}-test-gamma > /dev/null" 0
|
||||
rlRun "journalctl -u httpd -g ${PFX}-test-gamma -p err > journal.vhost"
|
||||
rlAssertGrep "foo@@vhost.localdomain@@/${PFX}-test-gamma@@bar" journal.vhost
|
||||
rlPhaseEnd
|
||||
|
||||
rlPhaseStartCleanup
|
||||
rlRun "popd"
|
||||
httpStop
|
||||
rlFileRestore
|
||||
rlRun "rm -r $TmpDir" 0 "Removing tmp directory"
|
||||
rlRun "rm -f $CONF"
|
||||
rlPhaseEnd
|
||||
rlJournalPrintText
|
||||
rlJournalEnd
|
||||
21
core/selinux-context/main.fmf
Normal file
21
core/selinux-context/main.fmf
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
summary: check if httpd run with correct selinux context
|
||||
description: ''
|
||||
component:
|
||||
- httpd
|
||||
test: ./runtest.sh
|
||||
framework: beakerlib
|
||||
require:
|
||||
- library(httpd/http)
|
||||
recommend:
|
||||
- httpd
|
||||
duration: 5m
|
||||
enabled: true
|
||||
tier: '1'
|
||||
tag:
|
||||
- HttpdSclDone
|
||||
- TIPpass_FIPS
|
||||
- TestParametrized
|
||||
- Tier1
|
||||
extra-nitrate: TC#0336063
|
||||
extra-summary: /CoreOS/httpd/Regression/bz1052933-selinux-context
|
||||
extra-task: /CoreOS/httpd/Regression/bz1052933-selinux-context
|
||||
67
core/selinux-context/runtest.sh
Executable file
67
core/selinux-context/runtest.sh
Executable file
|
|
@ -0,0 +1,67 @@
|
|||
#!/bin/bash
|
||||
# vim: dict=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
#
|
||||
# runtest.sh of /CoreOS/httpd/Regression/bz1052933-selinux-context
|
||||
# Description: check if httpd run with correct selinux context
|
||||
# Author: Ondrej Ptak <optak@redhat.com>
|
||||
#
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
#
|
||||
# Copyright (c) 2014 Red Hat, Inc.
|
||||
#
|
||||
# This copyrighted material is made available to anyone wishing
|
||||
# to use, modify, copy, or redistribute it subject to the terms
|
||||
# and conditions of the GNU General Public License version 2.
|
||||
#
|
||||
# This program is distributed in the hope that it will be
|
||||
# useful, but WITHOUT ANY WARRANTY; without even the implied
|
||||
# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
# PURPOSE. See the GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public
|
||||
# License along with this program; if not, write to the Free
|
||||
# Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||
# Boston, MA 02110-1301, USA.
|
||||
#
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
# Include Beaker environment
|
||||
. /usr/share/beakerlib/beakerlib.sh || exit 1
|
||||
|
||||
PACKAGES=${PACKAGES:-"httpd"}
|
||||
|
||||
rlJournalStart
|
||||
rlPhaseStartSetup
|
||||
rlAssertRpm --all
|
||||
rlRun "rlImport httpd/http" 0 "Importing httpd library" || rlDie
|
||||
rlRun "TmpDir=\$(mktemp -d)" 0 "Creating tmp directory"
|
||||
rlRun "pushd $TmpDir"
|
||||
rlPhaseEnd
|
||||
|
||||
rlPhaseStartTest
|
||||
# https://src.fedoraproject.org/rpms/httpd/pull-request/25
|
||||
if rpm -q httpd-core >& /dev/null; then
|
||||
rlRun "ls -d -Z \$(rpm -ql httpd-core) > files_context.log"\
|
||||
0 "getting selinux context of rpm's files (httpd-core)"
|
||||
else
|
||||
rlRun "ls -d -Z \$(rpm -ql $httpHTTPD) > files_context.log"\
|
||||
0 "getting selinux context of rpm's files ($httpHTTPD)"
|
||||
fi
|
||||
rlFileSubmit files_context.log
|
||||
# handle sbin merge by checking if /usr/sbin is a symlink
|
||||
if test -L /usr/sbin; then
|
||||
rlAssertGrep "httpd_exec_t.*/usr/bin/httpd" files_context.log
|
||||
else
|
||||
rlAssertGrep "httpd_exec_t.*/usr/sbin/httpd" files_context.log
|
||||
fi
|
||||
rlAssertGrep "httpd_config_t.*/etc/httpd" files_context.log
|
||||
rlAssertGrep "httpd_log_t.*/var/log/httpd" files_context.log
|
||||
rlPhaseEnd
|
||||
|
||||
rlPhaseStartCleanup
|
||||
rlRun "popd"
|
||||
rlRun "rm -r $TmpDir" 0 "Removing tmp directory"
|
||||
rlPhaseEnd
|
||||
rlJournalPrintText
|
||||
rlJournalEnd
|
||||
31
core/server-tokens/main.fmf
Normal file
31
core/server-tokens/main.fmf
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
summary: httpd ServerTokens Full-Release
|
||||
description: |
|
||||
Bug summary: [RFE] Apache does not report patch level when scanned
|
||||
Bugzilla link: https://bugzilla.redhat.com/show_bug.cgi?id=240857
|
||||
|
||||
Test for BZ#240857 (httpd ServerTokens Full-Release)
|
||||
component:
|
||||
- httpd
|
||||
test: ./runtest.sh
|
||||
framework: beakerlib
|
||||
require:
|
||||
- library(httpd/http)
|
||||
recommend:
|
||||
- httpd
|
||||
- curl
|
||||
- grep
|
||||
- pyOpenSSL
|
||||
duration: 5m
|
||||
enabled: true
|
||||
tag:
|
||||
- HttpdSclDone
|
||||
- Tier1
|
||||
tier: '1'
|
||||
link:
|
||||
- relates: https://bugzilla.redhat.com/show_bug.cgi?id=240857
|
||||
- relates: https://bugzilla.redhat.com/show_bug.cgi?id=811714
|
||||
- relates: https://bugzilla.redhat.com/show_bug.cgi?id=1932442
|
||||
- relates: https://bugzilla.redhat.com/show_bug.cgi?id=2029071
|
||||
extra-nitrate: TC#0078363
|
||||
extra-summary: /CoreOS/httpd/misc/bug240857
|
||||
extra-task: /CoreOS/httpd/misc/bug240857
|
||||
87
core/server-tokens/runtest.sh
Executable file
87
core/server-tokens/runtest.sh
Executable file
|
|
@ -0,0 +1,87 @@
|
|||
#!/bin/bash
|
||||
# vim: dict=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
#
|
||||
# runtest.sh of /CoreOS/httpd/misc/bug240857
|
||||
# Description: Test for BZ#240857 (httpd ServerTokens Full-Release)
|
||||
# Author: Joe Orton <jorton@redhat.com>
|
||||
#
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
#
|
||||
# Copyright (c) 2007 Red Hat, Inc. All rights reserved.
|
||||
#
|
||||
# This copyrighted material is made available to anyone wishing
|
||||
# to use, modify, copy, or redistribute it subject to the terms
|
||||
# and conditions of the GNU General Public License version 2.
|
||||
#
|
||||
# This program is distributed in the hope that it will be
|
||||
# useful, but WITHOUT ANY WARRANTY; without even the implied
|
||||
# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
# PURPOSE. See the GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public
|
||||
# License along with this program; if not, write to the Free
|
||||
# Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||
# Boston, MA 02110-1301, USA.
|
||||
#
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
# Include Beaker environment
|
||||
. /usr/share/beakerlib/beakerlib.sh || exit 1
|
||||
|
||||
PACKAGES="${PACKAGES:-httpd}"
|
||||
REQUIRES="${REQUIRES:-curl}"
|
||||
|
||||
rlJournalStart
|
||||
rlPhaseStartSetup "Setup Full-Release"
|
||||
rlRun "rlImport httpd/http" 0 "Import httpd library"
|
||||
rlAssertRpm --all
|
||||
CONF="${httpCONFDIR}/conf/httpd.conf"
|
||||
rlRun "rlFileBackup $CONF"
|
||||
VERSION=`rpm -q --qf '%{VERSION}' $httpHTTPD`
|
||||
RELEASE=`rpm -q --qf '%{RELEASE}' $httpHTTPD`
|
||||
OS=$(source /etc/os-release; echo ${NAME})
|
||||
rlIsRHEL 7 && OS="Red Hat Enterprise Linux"
|
||||
|
||||
# Full-Release not present in Fedora
|
||||
if ! rlIsFedora; then
|
||||
grep ServerTokens $CONF || rlRun "echo 'ServerTokens Full-Release' >> $CONF"
|
||||
else
|
||||
rlRun "sed -i 's/^ServerTokens.*/ServerTokens Full-Release/' $CONF"
|
||||
fi
|
||||
|
||||
rlRun "TmpDir=\$(mktemp -d)" 0 "Creating tmp directory"
|
||||
rlRun "pushd $TmpDir"
|
||||
rlRun "httpStart" 0 "Start httpd"
|
||||
rlPhaseEnd
|
||||
|
||||
# don't run Full-Release test on Fedora
|
||||
if ! rlIsFedora; then
|
||||
rlPhaseStartTest "Test Full-Release"
|
||||
rlRun "curl -s -D output http://localhost/" 0 "Getting Full Release Tokens"
|
||||
cat output
|
||||
|
||||
rlAssertGrep "^Server: Apache/$VERSION ($OS) (Release $RELEASE)" output
|
||||
rlRun "httpStop" 0 "Stop httpd"
|
||||
rlPhaseEnd
|
||||
fi
|
||||
|
||||
rlPhaseStartSetup "Setup OS"
|
||||
rlRun "sed -i 's/^ServerTokens.*/ServerTokens OS/' $CONF"
|
||||
rlRun "httpStart" 0 "Start httpd"
|
||||
rlPhaseEnd
|
||||
|
||||
rlPhaseStartTest "Test OS"
|
||||
rlRun "curl -s -D output http://localhost/" 0 "Getting default headers"
|
||||
cat output
|
||||
rlRun "tr -d '\r' < output | grep \"^Server: Apache/$VERSION ($OS)\$\""
|
||||
rlPhaseEnd
|
||||
|
||||
rlPhaseStartCleanup
|
||||
rlRun "popd"
|
||||
rlRun "rm -r $TmpDir" 0 "Removing tmp directory"
|
||||
rlRun "httpStop" 0 "Stop httpd"
|
||||
rlRun "rlFileRestore"
|
||||
rlPhaseEnd
|
||||
rlJournalPrintText
|
||||
rlJournalEnd
|
||||
18
core/smoke-htcacheclean/main.fmf
Normal file
18
core/smoke-htcacheclean/main.fmf
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
summary: Smoke test for htcacheclean service
|
||||
description: ''
|
||||
component:
|
||||
- httpd
|
||||
test: ./runtest.sh
|
||||
framework: beakerlib
|
||||
require:
|
||||
- library(httpd/http)
|
||||
- httpd
|
||||
duration: 1m
|
||||
enabled: true
|
||||
tag:
|
||||
- Tier1
|
||||
tier: '1'
|
||||
adjust:
|
||||
- enabled: false
|
||||
when: distro < rhel-10, centos-stream-10
|
||||
continue: false
|
||||
64
core/smoke-htcacheclean/runtest.sh
Executable file
64
core/smoke-htcacheclean/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 htcacheclean test
|
||||
# Description: Smoke test of htcacheclean
|
||||
# Author: Joe Orton <jorton@redhat.com>
|
||||
#
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
#
|
||||
# Copyright (c) 2022 Red Hat, Inc.
|
||||
#
|
||||
# This copyrighted material is made available to anyone wishing
|
||||
# to use, modify, copy, or redistribute it subject to the terms
|
||||
# and conditions of the GNU General Public License version 2.
|
||||
#
|
||||
# This program is distributed in the hope that it will be
|
||||
# useful, but WITHOUT ANY WARRANTY; without even the implied
|
||||
# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
# PURPOSE. See the GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public
|
||||
# License along with this program; if not, write to the Free
|
||||
# Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||
# Boston, MA 02110-1301, USA.
|
||||
#
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
# Include rhts environment
|
||||
. /usr/share/beakerlib/beakerlib.sh || exit 1
|
||||
|
||||
PACKAGES="${PACKAGES:-httpd}"
|
||||
REQUIRES=${REQUIRES:-}
|
||||
|
||||
rlJournalStart
|
||||
rlPhaseStartSetup
|
||||
rlRun "rlImport --all" 0 "Importing Beaker libraries" || rlDie
|
||||
rlRun "TmpDir=\$(mktemp -d)" 0 "Creating tmp directory"
|
||||
rlRun "pushd $TmpDir"
|
||||
rlPhaseEnd
|
||||
|
||||
rlPhaseStartTest
|
||||
rlRun -l "systemctl preset htcacheclean"
|
||||
rlRun -s -l "systemctl is-enabled htcacheclean" 1
|
||||
rlAssertGrep disabled $rlRun_LOG
|
||||
|
||||
# Check for warning for missing [Install]
|
||||
rlRun -s -l "systemctl enable htcacheclean" 0 "Enable htcacheclean service"
|
||||
rlAssertNotGrep 'The unit files have no installation config' $rlRun_LOG
|
||||
|
||||
rlRun -s -l "systemctl is-enabled htcacheclean"
|
||||
rlAssertGrep enabled $rlRun_LOG
|
||||
|
||||
rlRun "systemctl start htcacheclean" 0 "Start htcacheclean service"
|
||||
rlRun "sleep 5"
|
||||
rlRun "systemctl stop htcacheclean" 0 "Stop htcacheclean service"
|
||||
rlPhaseEnd
|
||||
|
||||
rlPhaseStartCleanup
|
||||
rlRun "popd"
|
||||
rlRun "rm -r $TmpDir" 0 "Removing tmp directory"
|
||||
rlPhaseEnd
|
||||
rlJournalEnd
|
||||
rlJournalPrintText
|
||||
|
|
@ -1,20 +1,18 @@
|
|||
summary: Simple check of httpd test page
|
||||
description: ''
|
||||
contact: Branislav Náter <bnater@redhat.com>
|
||||
component:
|
||||
- httpd
|
||||
test: ./runtest.sh
|
||||
framework: beakerlib
|
||||
require:
|
||||
- library(httpd/http)
|
||||
- wget
|
||||
recommend:
|
||||
- httpd
|
||||
- mod_ssl
|
||||
duration: 5m
|
||||
enabled: true
|
||||
tag:
|
||||
- NoRHEL4
|
||||
- NoRHEL5
|
||||
- Tier1
|
||||
tier: '1'
|
||||
adjust:
|
||||
|
|
@ -1,16 +0,0 @@
|
|||
contact: Branislav Náter <bnater@redhat.com>
|
||||
component:
|
||||
- httpd
|
||||
enabled: true
|
||||
tag:
|
||||
- HttpdSclDone
|
||||
- TIPpass
|
||||
- TIPpass_FIPS
|
||||
- Tier1
|
||||
adjust:
|
||||
- because: BZ#1577237
|
||||
enabled: false
|
||||
when: product == rhscl and distro <= rhel-6
|
||||
continue: false
|
||||
extra-nitrate: TC#0296715
|
||||
extra-summary: /CoreOS/httpd/Sanity/httpd-php-mysql-sanity-test
|
||||
|
|
@ -1,22 +1,23 @@
|
|||
summary: test fetching data from mysqldb/mariadb through php
|
||||
description: ''
|
||||
contact: Branislav Náter <bnater@redhat.com>
|
||||
component:
|
||||
- httpd
|
||||
test: ./runtest.sh
|
||||
framework: beakerlib
|
||||
require:
|
||||
- library(httpd/http)
|
||||
- library(database/mysql)
|
||||
- library(database/mariadb)
|
||||
- library(php/utils)
|
||||
recommend:
|
||||
- httpd
|
||||
- php
|
||||
- php-zts
|
||||
- php-mysqlnd
|
||||
- mariadb-server
|
||||
recommend:
|
||||
- php-zts
|
||||
duration: 5m
|
||||
enabled: true
|
||||
tag:
|
||||
- Tier1
|
||||
tier: '1'
|
||||
extra-summary: /CoreOS/httpd/Sanity/httpd-php-mysql-sanity-test
|
||||
extra-task: /CoreOS/httpd/Sanity/httpd-php-mysql-sanity-test
|
||||
|
|
|
|||
|
|
@ -50,10 +50,7 @@ rlJournalStart
|
|||
else
|
||||
DB="mariadb-server"
|
||||
# upstream beaker library on GitHub has different name
|
||||
if ! rlIsFedora; then
|
||||
rlRun "rlImport mariadb55/basic" 0 "Import mariadb library"
|
||||
else
|
||||
rlRun "rlImport database/mariadb" 0 "Import mariadb library"
|
||||
rlRun "rlImport database/mariadb" 0 "Import mariadb library"
|
||||
SERVICE=${mariadbServiceName}
|
||||
fi
|
||||
# install also php-mysql on rhel-6 (instead of php-mysqlnd on rhel-7)
|
||||
|
|
|
|||
2
main.fmf
Normal file
2
main.fmf
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
# QE owner
|
||||
contact: Branislav Náter <bnater@redhat.com>
|
||||
21
mod_autoindex/directory-named-core-gets-bomb-icon/main.fmf
Normal file
21
mod_autoindex/directory-named-core-gets-bomb-icon/main.fmf
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
summary: httpd.conf uses icon bomb.gif for core dir
|
||||
description: |-
|
||||
When mod_autoindex is active with FancyIndexing enabled, core dump files (and
|
||||
no other) should be displayed with a bomb icon. Only binary files whose format
|
||||
is application/x-coredump should be treated as core dumps.
|
||||
component:
|
||||
- httpd
|
||||
test: ./runtest.sh
|
||||
framework: beakerlib
|
||||
require:
|
||||
- library(httpd/http)
|
||||
recommend:
|
||||
- httpd
|
||||
- gcc
|
||||
duration: 5m
|
||||
enabled: true
|
||||
link:
|
||||
- relates: https://bugzilla.redhat.com/show_bug.cgi?id=2017144
|
||||
extra-nitrate: TC#0613209
|
||||
extra-summary: /CoreOS/httpd/Regression/bz2017144-directory-named-core-gets-bomb-icon
|
||||
extra-task: /CoreOS/httpd/Regression/bz2017144-directory-named-core-gets-bomb-icon
|
||||
91
mod_autoindex/directory-named-core-gets-bomb-icon/runtest.sh
Executable file
91
mod_autoindex/directory-named-core-gets-bomb-icon/runtest.sh
Executable file
|
|
@ -0,0 +1,91 @@
|
|||
#!/bin/bash
|
||||
# vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
#
|
||||
# runtest.sh of /CoreOS/httpd/Regression/bz2017144-directory-named-core-gets-bomb-icon
|
||||
# Description: When mod_autoindex is active with FancyIndexing enabled, core dump files
|
||||
# Author: Lubos Uhliarik <luhliari@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
|
||||
|
||||
PACKAGES=${PACKAGES:-httpd}
|
||||
REQUIRES=${REQUIRES:-}
|
||||
|
||||
rlJournalStart
|
||||
rlPhaseStartSetup
|
||||
rlAssertRpm --all
|
||||
rlRun "rlImport httpd/http" 0 "import httpd/http library" || rlDie
|
||||
|
||||
CONF="${httpCONFDIR}/conf.d/autoindex.conf"
|
||||
|
||||
rlRun "rlFileBackup --clean ${httpROOTDIR}"
|
||||
TESTDIR="${httpROOTDIR}/mod_autoindex_test"
|
||||
rlRun "mkdir ${TESTDIR}" 0 "Creating test directory"
|
||||
rlLogInfo "Creating core files in test directory"
|
||||
|
||||
rlRun "gcc segfault.c -o a.out"
|
||||
rlRun "ulimit -c unlimited"
|
||||
rlRun "./a.out" 139
|
||||
rlRun "coredumpctl dump -1 -o core"
|
||||
|
||||
rlRun "cp core ${TESTDIR}/core"
|
||||
rlRun "cp core ${TESTDIR}/secret"
|
||||
|
||||
for FILE in score core. score. core.123 score.123 \
|
||||
coredump scoredump; do
|
||||
rlRun "dd if=/dev/urandom of=${TESTDIR}/${FILE} bs=1k count=1" 0 \
|
||||
"Creating binary file ${TESTDIR}/${FILE}"
|
||||
done
|
||||
rlRun "mkdir -p ${TESTDIR}/coredir/core"
|
||||
rlPhaseEnd
|
||||
|
||||
rlPhaseStartTest "Verify that bomb icon is used correctly"
|
||||
rlRun "httpStart" 0 "Starting httpd"
|
||||
rlRun -s "curl http://localhost/mod_autoindex_test/" 0 \
|
||||
"Downloading test directory index"
|
||||
rlLogInfo "Files core and secret should have a bomb icon"
|
||||
rlAssertGrep '/icons/bomb\.gif.*>core<' ${rlRun_LOG}
|
||||
rlAssertGrep '/icons/bomb\.gif.*>secret<' ${rlRun_LOG}
|
||||
|
||||
rlLogInfo "No other files should have a bomb icon"
|
||||
rlAssertNotGrep '/icons/bomb\.gif.*>score<' ${rlRun_LOG}
|
||||
rlAssertNotGrep '/icons/bomb\.gif.*>score\.<' ${rlRun_LOG}
|
||||
rlAssertNotGrep '/icons/bomb\.gif.*>score\.123<' ${rlRun_LOG}
|
||||
rlAssertNotGrep '/icons/bomb\.gif.*>coredump<' ${rlRun_LOG}
|
||||
rlAssertNotGrep '/icons/bomb\.gif.*>scoredump<' ${rlRun_LOG}
|
||||
rlAssertNotGrep '/icons/bomb\.gif.*>coredir/<' ${rlRun_LOG}
|
||||
|
||||
rlLogInfo "Directories should not have bomb icon"
|
||||
rlRun -s "curl http://localhost/mod_autoindex_test/coredir/" 0 \
|
||||
"Downloading test directory index"
|
||||
rlLogInfo "Directory core should not have a bomb icon"
|
||||
rlAssertNotGrep '/icons/bomb\.gif.*>core/<' ${rlRun_LOG}
|
||||
|
||||
rlRun "httpStop" 0 "Stopping httpd"
|
||||
rlPhaseEnd
|
||||
|
||||
rlPhaseStartCleanup
|
||||
rlRun "rlFileRestore"
|
||||
rlPhaseEnd
|
||||
rlJournalPrintText
|
||||
rlJournalEnd
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
|
||||
int main(){
|
||||
int *segfault = NULL;
|
||||
printf("Hello %d", *segfault);
|
||||
return 0;
|
||||
}
|
||||
15
mod_ssl/check-httpd-init/main.fmf
Normal file
15
mod_ssl/check-httpd-init/main.fmf
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
summary: Smoke test for httpd-init service
|
||||
description: ''
|
||||
component:
|
||||
- httpd
|
||||
test: ./runtest.sh
|
||||
framework: beakerlib
|
||||
require:
|
||||
- library(httpd/http)
|
||||
- httpd
|
||||
- mod_ssl
|
||||
duration: 1m
|
||||
enabled: true
|
||||
tag:
|
||||
- Tier1
|
||||
tier: '1'
|
||||
52
mod_ssl/check-httpd-init/runtest.sh
Executable file
52
mod_ssl/check-httpd-init/runtest.sh
Executable file
|
|
@ -0,0 +1,52 @@
|
|||
#!/bin/bash
|
||||
# vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
#
|
||||
# runtest.sh htcacheclean test
|
||||
# Description: Smoke test of htcacheclean
|
||||
# Author: Joe Orton <jorton@redhat.com>
|
||||
#
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
#
|
||||
# Copyright (c) 2022 Red Hat, Inc.
|
||||
#
|
||||
# This copyrighted material is made available to anyone wishing
|
||||
# to use, modify, copy, or redistribute it subject to the terms
|
||||
# and conditions of the GNU General Public License version 2.
|
||||
#
|
||||
# This program is distributed in the hope that it will be
|
||||
# useful, but WITHOUT ANY WARRANTY; without even the implied
|
||||
# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
# PURPOSE. See the GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public
|
||||
# License along with this program; if not, write to the Free
|
||||
# Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||
# Boston, MA 02110-1301, USA.
|
||||
#
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
# Include rhts environment
|
||||
. /usr/share/beakerlib/beakerlib.sh || exit 1
|
||||
|
||||
PACKAGES="${PACKAGES:-httpd mod_ssl}"
|
||||
REQUIRES=${REQUIRES:-}
|
||||
|
||||
rlJournalStart
|
||||
rlPhaseStartSetup
|
||||
rlRun "rlImport --all" 0 "Importing Beaker libraries" || rlDie
|
||||
rlRun "rm -vf /dhparams.pem /etc/pki/tls/certs/localhost.crt /etc/pki/tls/private/localhost.key"
|
||||
rlPhaseEnd
|
||||
|
||||
rlPhaseStartTest
|
||||
rlRun "systemctl start httpd"
|
||||
rlAssertNotExists /dhparams.pem
|
||||
rlAssertExists /etc/pki/tls/certs/localhost.crt
|
||||
rlAssertExists /etc/pki/tls/private/localhost.key
|
||||
rlPhaseEnd
|
||||
|
||||
rlPhaseStartCleanup
|
||||
rlRun "systemctl stop httpd"
|
||||
rlPhaseEnd
|
||||
rlJournalEnd
|
||||
rlJournalPrintText
|
||||
Loading…
Add table
Add a link
Reference in a new issue