forked from rpms/glibc
		
	introduce Fedora CI
This commit is contained in:
		
							parent
							
								
									e4ca95809b
								
							
						
					
					
						commit
						8d488dc38e
					
				
							
								
								
									
										1
									
								
								.fmf/version
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								.fmf/version
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1 @@ | |||||||
|  | 1 | ||||||
| @ -7,6 +7,7 @@ decision_contexts: | |||||||
|   - bodhi_update_push_stable_critpath |   - bodhi_update_push_stable_critpath | ||||||
| subject_type: koji_build | subject_type: koji_build | ||||||
| rules: | rules: | ||||||
|  |   - !PassingTestCaseRule {test_case_name: fedora-ci.koji-build.tier0.functional} | ||||||
|   - !PassingTestCaseRule {test_case_name: baseos-qe.koji-build.scratch-build.validation} |   - !PassingTestCaseRule {test_case_name: baseos-qe.koji-build.scratch-build.validation} | ||||||
| --- !Policy | --- !Policy | ||||||
| product_versions: | product_versions: | ||||||
|  | |||||||
							
								
								
									
										6
									
								
								plans/ci.fmf
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										6
									
								
								plans/ci.fmf
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,6 @@ | |||||||
|  | summary: CI Gating Plan | ||||||
|  | discover: | ||||||
|  |     how: fmf | ||||||
|  |     directory: tests | ||||||
|  | execute: | ||||||
|  |     how: beakerlib | ||||||
| @ -0,0 +1,64 @@ | |||||||
|  | # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 | ||||||
|  | #
 | ||||||
|  | #   Makefile of /tools/glibc/Regression/bz1882466-RHEL8-2-LD-PRELOAD-of-some-lib-that-has
 | ||||||
|  | #   Description: Test for BZ#1882466 (RHEL8.2 - LD_PRELOAD of <some lib that has)
 | ||||||
|  | #   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/bz1882466-RHEL8-2-LD-PRELOAD-of-some-lib-that-has | ||||||
|  | export TESTVERSION=1.0 | ||||||
|  | 
 | ||||||
|  | BUILT_FILES= | ||||||
|  | 
 | ||||||
|  | FILES=$(METADATA) runtest.sh Makefile PURPOSE testlib.cc | ||||||
|  | 
 | ||||||
|  | .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#1882466 (RHEL8.2 - LD_PRELOAD of <some lib that has)" >> $(METADATA) | ||||||
|  | 	@echo "Type:            Regression" >> $(METADATA) | ||||||
|  | 	@echo "TestTime:        20m" >> $(METADATA) | ||||||
|  | 	@echo "RunFor:          glibc" >> $(METADATA) | ||||||
|  | 	@echo "Requires:        gcc-c++ glibc glibc-devel libstdc++ glibc.i686 glibc-devel.i686 libstdc++.i686 libgcc.i686" >> $(METADATA) | ||||||
|  | 	@echo "Priority:        Normal" >> $(METADATA) | ||||||
|  | 	@echo "License:         GPLv2+" >> $(METADATA) | ||||||
|  | 	@echo "Confidential:    no" >> $(METADATA) | ||||||
|  | 	@echo "Destructive:     no" >> $(METADATA) | ||||||
|  | 	@echo "Bug:             1882466" >> $(METADATA) | ||||||
|  | 	@echo "Releases:        RHEL8 RHEL9" >> $(METADATA) | ||||||
|  | 
 | ||||||
|  | 	rhts-lint $(METADATA) | ||||||
| @ -0,0 +1,5 @@ | |||||||
|  | PURPOSE of /tools/glibc/Regression/bz1882466-RHEL8-2-LD-PRELOAD-of-some-lib-that-has | ||||||
|  | Description: Test for BZ#1882466 (RHEL8.2 - LD_PRELOAD of <some lib that has) | ||||||
|  | Author: Sergey Kolosov <skolosov@redhat.com> | ||||||
|  | Bug summary: RHEL8.2 - LD_PRELOAD of <some lib that has libstdc++ and libgnu_s linked in> /lib64/libc.so.6 will segfault (glibc) | ||||||
|  | Bugzilla link: https://bugzilla.redhat.com/show_bug.cgi?id=1882466 | ||||||
| @ -0,0 +1,22 @@ | |||||||
|  | summary: Test for BZ#1882466 (RHEL8.2 - LD_PRELOAD of <some lib that has) | ||||||
|  | description: | | ||||||
|  |     Bug summary: RHEL8.2 - LD_PRELOAD of <some lib that has libstdc++ and libgnu_s linked in> /lib64/libc.so.6 will segfault (glibc) | ||||||
|  |     Bugzilla link: https://bugzilla.redhat.com/show_bug.cgi?id=1882466 | ||||||
|  | contact: | ||||||
|  | - Sergey Kolosov <skolosov@redhat.com> | ||||||
|  | component: | ||||||
|  | - glibc | ||||||
|  | test: ./runtest.sh | ||||||
|  | framework: beakerlib | ||||||
|  | recommend: | ||||||
|  | - gcc-c++ | ||||||
|  | - glibc | ||||||
|  | - glibc-devel | ||||||
|  | - libstdc++ | ||||||
|  | - glibc.i686 | ||||||
|  | - glibc-devel.i686 | ||||||
|  | - libstdc++.i686 | ||||||
|  | - libgcc.i686 | ||||||
|  | duration: 20m | ||||||
|  | extra-summary: /tools/glibc/Regression/bz1882466-RHEL8-2-LD-PRELOAD-of-some-lib-that-has | ||||||
|  | extra-task: /tools/glibc/Regression/bz1882466-RHEL8-2-LD-PRELOAD-of-some-lib-that-has | ||||||
| @ -0,0 +1,67 @@ | |||||||
|  | #!/bin/bash | ||||||
|  | # vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k | ||||||
|  | # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||||||
|  | # | ||||||
|  | #   runtest.sh of /tools/glibc/Regression/bz1882466-RHEL8-2-LD-PRELOAD-of-some-lib-that-has | ||||||
|  | #   Description: Test for BZ#1882466 (RHEL8.2 - LD_PRELOAD of <some lib that has) | ||||||
|  | #   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="testlib" | ||||||
|  | TESTPRELOADLIBS="libpthread.so.0 libstdc++.so.6 libresolv.so.2" | ||||||
|  | 
 | ||||||
|  | rlJournalStart | ||||||
|  |     rlPhaseStartSetup | ||||||
|  |         rlAssertRpm $PACKAGE | ||||||
|  |         PACKNVR=$(rpm -q ${PACKAGE}.`arch`) | ||||||
|  |         rlRun "TESTTMPDIR=$(mktemp -d)" | ||||||
|  |         rlRun "cp ${TESTPROG}.cc $TESTTMPDIR" | ||||||
|  |         rlRun "pushd $TESTTMPDIR" | ||||||
|  |     rlPhaseEnd | ||||||
|  | 
 | ||||||
|  |     rlPhaseStartTest "basic" | ||||||
|  |         rlRun -c "g++ -c  -Wall -pedantic -fPIC -fno-exceptions -fno-rtti -fno-builtin ${TESTPROG}.cc -o ${TESTPROG}.o" | ||||||
|  |         rlRun -c "g++ -shared -dynamiclib  ${TESTPROG}.o -o lib${TESTPROG}.so.1.0" | ||||||
|  |         rlAssertExists "lib${TESTPROG}.so.1.0" | ||||||
|  |         rlRun -c "LD_PRELOAD=${TESTTMPDIR}/lib${TESTPROG}.so.1.0 /lib64/libc.so.6" | ||||||
|  |     rlPhaseEnd | ||||||
|  | 
 | ||||||
|  |     rlPhaseStartTest "additional libs" | ||||||
|  |         rlRun -c "LD_PRELOAD=${TESTTMPDIR}/lib${TESTPROG}.so.1.0 /lib64/libc.so.6" | ||||||
|  |         for L in $TESTPRELOADLIBS | ||||||
|  |         do | ||||||
|  |             rlRun -c "LD_PRELOAD=/usr/lib64/$L /lib64/libc.so.6" | ||||||
|  |             [[ $(rlGetArch) == "x86_64" ]] &&  rlRun -c "LD_PRELOAD=/usr/lib/$L /usr/lib/libc.so.6" | ||||||
|  |         done | ||||||
|  |    rlPhaseEnd | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
|  |     rlPhaseStartCleanup | ||||||
|  |         rlRun "popd" | ||||||
|  |         rlRun "rm -r $TESTTMPDIR" | ||||||
|  |     rlPhaseEnd | ||||||
|  | rlJournalPrintText | ||||||
|  | rlJournalEnd | ||||||
| @ -0,0 +1,17 @@ | |||||||
|  | #include <stdio.h> | ||||||
|  | #include <stdlib.h> | ||||||
|  | #include <stdint.h> | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
|  | static int* internal_lock = NULL; | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
|  | static void cuda_hook_init () | ||||||
|  | { | ||||||
|  | printf("%s:%d\n",__func__,__LINE__); | ||||||
|  |   if(internal_lock == NULL) | ||||||
|  |   { | ||||||
|  | printf("%s:%d\n",__func__,__LINE__); | ||||||
|  |   } | ||||||
|  | } | ||||||
|  | 
 | ||||||
		Loading…
	
		Reference in New Issue
	
	Block a user