forked from rpms/glibc
CI Tests: removes bz699724-Memory-leak-within-NSSLOW-Init-as-called-by as not relevant
This commit is contained in:
parent
565f0c3026
commit
4538b5ade8
@ -1,65 +0,0 @@
|
|||||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
||||||
#
|
|
||||||
# Makefile of /tools/glibc/Regression/bz699724-Memory-leak-within-NSSLOW-Init-as-called-by
|
|
||||||
# Description: Test for bz699724 (Memory leak within NSSLOW_Init, as called by)
|
|
||||||
# Author: Miroslav Franc <mfranc@redhat.com>
|
|
||||||
#
|
|
||||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
||||||
#
|
|
||||||
# Copyright (c) 2011 Red Hat, Inc. All rights reserved.
|
|
||||||
#
|
|
||||||
# This copyrighted material is made available to anyone wishing
|
|
||||||
# to use, modify, copy, or redistribute it subject to the terms
|
|
||||||
# and conditions of the GNU General Public License version 2.
|
|
||||||
#
|
|
||||||
# This program is distributed in the hope that it will be
|
|
||||||
# useful, but WITHOUT ANY WARRANTY; without even the implied
|
|
||||||
# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
|
||||||
# PURPOSE. See the GNU General Public License for more details.
|
|
||||||
#
|
|
||||||
# You should have received a copy of the GNU General Public
|
|
||||||
# License along with this program; if not, write to the Free
|
|
||||||
# Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
|
||||||
# Boston, MA 02110-1301, USA.
|
|
||||||
#
|
|
||||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
||||||
|
|
||||||
export TEST=/tools/glibc/Regression/bz699724-Memory-leak-within-NSSLOW-Init-as-called-by
|
|
||||||
export TESTVERSION=1.0
|
|
||||||
|
|
||||||
BUILT_FILES=
|
|
||||||
|
|
||||||
FILES=$(METADATA) runtest.sh Makefile PURPOSE test_crypt.py
|
|
||||||
|
|
||||||
.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: Miroslav Franc <mfranc@redhat.com>" > $(METADATA)
|
|
||||||
@echo "Name: $(TEST)" >> $(METADATA)
|
|
||||||
@echo "TestVersion: $(TESTVERSION)" >> $(METADATA)
|
|
||||||
@echo "Path: $(TEST_DIR)" >> $(METADATA)
|
|
||||||
@echo "Description: Test for bz699724 (Memory leak within NSSLOW_Init, as called by)" >> $(METADATA)
|
|
||||||
@echo "Type: Regression" >> $(METADATA)
|
|
||||||
@echo "TestTime: 60m" >> $(METADATA)
|
|
||||||
@echo "RunFor: glibc" >> $(METADATA)
|
|
||||||
@echo "Requires: glibc python python-test python3 python3-test valgrind" >> $(METADATA)
|
|
||||||
@echo "Priority: Normal" >> $(METADATA)
|
|
||||||
@echo "License: GPLv2" >> $(METADATA)
|
|
||||||
@echo "Confidential: no" >> $(METADATA)
|
|
||||||
@echo "Destructive: no" >> $(METADATA)
|
|
||||||
@echo "Bug: 699724" >> $(METADATA)
|
|
||||||
@echo "Releases: -RHEL4 -RHELClient5 -RHELServer5" >> $(METADATA)
|
|
||||||
|
|
||||||
rhts-lint $(METADATA)
|
|
@ -1,5 +0,0 @@
|
|||||||
PURPOSE of /tools/glibc/Regression/bz699724-Memory-leak-within-NSSLOW-Init-as-called-by
|
|
||||||
Description: Test for bz699724 (Memory leak within NSSLOW_Init, as called by)
|
|
||||||
Author: Miroslav Franc <mfranc@redhat.com>
|
|
||||||
Bug summary: Memory leak within NSSLOW_Init, as called by glibc's crypt, when using stronger salts
|
|
||||||
Bugzilla link: https://bugzilla.redhat.com/show_bug.cgi?id=699724
|
|
@ -1,28 +0,0 @@
|
|||||||
summary: Test for bz699724 (Memory leak within NSSLOW_Init, as called by)
|
|
||||||
description: |
|
|
||||||
Bug summary: Memory leak within NSSLOW_Init, as called by glibc's crypt, when using stronger salts
|
|
||||||
Bugzilla link: https://bugzilla.redhat.com/show_bug.cgi?id=699724
|
|
||||||
contact: Miroslav Franc <mfranc@redhat.com>
|
|
||||||
component:
|
|
||||||
- glibc
|
|
||||||
test: ./runtest.sh
|
|
||||||
framework: beakerlib
|
|
||||||
recommend:
|
|
||||||
- glibc
|
|
||||||
- python
|
|
||||||
- python-test
|
|
||||||
- python3
|
|
||||||
- python3-test
|
|
||||||
- valgrind
|
|
||||||
tag:
|
|
||||||
- simple
|
|
||||||
- noEWA
|
|
||||||
- not-er15271
|
|
||||||
- NoRHEL4
|
|
||||||
- glibc-buildroot-ready
|
|
||||||
- NoRHEL5
|
|
||||||
duration: 60m
|
|
||||||
link:
|
|
||||||
- relates: https://bugzilla.redhat.com/show_bug.cgi?id=699724
|
|
||||||
extra-summary: /tools/glibc/Regression/bz699724-Memory-leak-within-NSSLOW-Init-as-called-by
|
|
||||||
extra-task: /tools/glibc/Regression/bz699724-Memory-leak-within-NSSLOW-Init-as-called-by
|
|
@ -1,98 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
# vim: dict=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k
|
|
||||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
||||||
#
|
|
||||||
# runtest.sh of /tools/glibc/Regression/bz699724-Memory-leak-within-NSSLOW-Init-as-called-by
|
|
||||||
# Description: Test for bz699724 (Memory leak within NSSLOW_Init, as called by)
|
|
||||||
# Author: Miroslav Franc <mfranc@redhat.com>
|
|
||||||
#
|
|
||||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
||||||
#
|
|
||||||
# Copyright (c) 2011 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=(glibc valgrind)
|
|
||||||
|
|
||||||
rlJournalStart
|
|
||||||
rlPhaseStartSetup
|
|
||||||
for p in "${PACKAGES[@]}"; do
|
|
||||||
rlAssertRpm "$p"
|
|
||||||
done; unset p
|
|
||||||
rlRun "TmpDir=\`mktemp -d\`" 0 "Creating tmp directory"
|
|
||||||
rlRun "cp test_crypt.py $TmpDir"
|
|
||||||
rlRun "pushd $TmpDir"
|
|
||||||
if rlIsRHEL 9
|
|
||||||
then
|
|
||||||
CURPYTHON="python3"
|
|
||||||
CURPYTEST="/usr/lib64/python3.9/test/test_crypt.py"
|
|
||||||
elif rlIsRHEL 8
|
|
||||||
then
|
|
||||||
CURPYTHON="python3"
|
|
||||||
CURPYTEST="/usr/lib64/python3.6/test/test_crypt.py"
|
|
||||||
elif rlIsRHEL 7
|
|
||||||
then
|
|
||||||
CURPYTHON="python"
|
|
||||||
CURPYTEST="/usr/lib64/python2.7/test/test_crypt.py"
|
|
||||||
elif rlIsRHEL 6
|
|
||||||
then
|
|
||||||
CURPYTHON="python"
|
|
||||||
if [ "$(rlGetPrimaryArch)" == "i686" ]
|
|
||||||
then
|
|
||||||
CURPYTEST="/usr/lib/python2.6/test/test_crypt.py"
|
|
||||||
else
|
|
||||||
CURPYTEST="/usr/lib64/python2.6/test/test_crypt.py"
|
|
||||||
fi
|
|
||||||
else
|
|
||||||
# guess it's Fedora
|
|
||||||
CURPYTHON="python3"
|
|
||||||
CURPYPRETEST=$(python3 -m site |grep -o -E /usr/lib64/python3\\.[0-9]+|head -n 1)
|
|
||||||
CURPYTEST="${CURPYPRETEST}/test/test_crypt.py"
|
|
||||||
fi
|
|
||||||
|
|
||||||
rlPhaseEnd
|
|
||||||
|
|
||||||
rlPhaseStartTest "python-test package"
|
|
||||||
#rlRun "valgrind python /usr/lib64/python2.6/test/test_crypt.py 2>&1| grep -A2 'LEAK SUMMARY' > log 2>&1"
|
|
||||||
rlAssertExists $CURPYTEST
|
|
||||||
rlRun "valgrind $CURPYTHON $CURPYTEST > valgrind1.out 2>&1"
|
|
||||||
rlRun "grep -A2 'LEAK SUMMARY' valgrind1.out > log 2>&1"
|
|
||||||
rlRun "grep -q 'definitely lost: 0' log"
|
|
||||||
rlRun "grep -q 'indirectly lost: 0' log"
|
|
||||||
rlFileSubmit valgrind1.out
|
|
||||||
rlFileSubmit log
|
|
||||||
rlPhaseEnd
|
|
||||||
|
|
||||||
rlPhaseStartTest "test_crypt.py bundled with the test case (50 x)"
|
|
||||||
#rlRun "valgrind --num-callers=50 --leak-check=full python test_crypt.py 50 2>&1| grep -A2 'LEAK SUMMARY' > log2 2>&1"
|
|
||||||
rlRun "valgrind --num-callers=50 --leak-check=full $CURPYTHON test_crypt.py 50 > valgrind2.out 2>&1" 0,1
|
|
||||||
rlRun "grep -A2 'LEAK SUMMARY' valgrind2.out > log2 2>&1"
|
|
||||||
rlRun "grep -q 'definitely lost: 0' log2"
|
|
||||||
rlRun "grep -q 'indirectly lost: 0' log2"
|
|
||||||
rlFileSubmit valgrind2.out
|
|
||||||
rlFileSubmit log2
|
|
||||||
rlPhaseEnd
|
|
||||||
|
|
||||||
rlPhaseStartCleanup
|
|
||||||
rlRun "popd"
|
|
||||||
rlRun "rm -r $TmpDir" 0 "Removing tmp directory"
|
|
||||||
rlPhaseEnd
|
|
||||||
rlJournalPrintText
|
|
||||||
rlJournalEnd
|
|
@ -1,37 +0,0 @@
|
|||||||
from test import test_support
|
|
||||||
import unittest
|
|
||||||
import crypt
|
|
||||||
import sys
|
|
||||||
|
|
||||||
class CryptTestCase(unittest.TestCase):
|
|
||||||
|
|
||||||
def test_crypt(self):
|
|
||||||
c = crypt.crypt('mypassword', 'ab')
|
|
||||||
if test_support.verbose:
|
|
||||||
print ('Test encryption: ', c)
|
|
||||||
|
|
||||||
def test_salt(self):
|
|
||||||
self.assertEqual(len(crypt._saltchars), 64)
|
|
||||||
for method in crypt.methods:
|
|
||||||
salt = crypt.mksalt(method)
|
|
||||||
self.assertEqual(len(salt),
|
|
||||||
method.salt_chars + (3 if method.ident else 0))
|
|
||||||
|
|
||||||
def test_saltedcrypt(self):
|
|
||||||
for method in crypt.methods:
|
|
||||||
pw = crypt.crypt('assword', method)
|
|
||||||
self.assertEqual(len(pw), method.total_size)
|
|
||||||
pw = crypt.crypt('assword', crypt.mksalt(method))
|
|
||||||
self.assertEqual(len(pw), method.total_size)
|
|
||||||
|
|
||||||
def test_methods(self):
|
|
||||||
# Gurantee that METHOD_CRYPT is the last method in crypt.methods.
|
|
||||||
self.assertTrue(len(crypt.methods) >= 1)
|
|
||||||
self.assertEqual(crypt.METHOD_CRYPT, crypt.methods[-1])
|
|
||||||
|
|
||||||
def test_main():
|
|
||||||
test_support.run_unittest(CryptTestCase)
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
|
||||||
for i in xrange(int(sys.argv[1])):
|
|
||||||
test_main()
|
|
Loading…
Reference in New Issue
Block a user