mirror of
https://github.com/envmodules/modules.git
synced 2026-05-30 00:12:31 +08:00
ts: remove libtestutil-getgrgid
Now getgrgid failure is handled in a regular test case, there is no more need for a specific testutil getgrgid library. Signed-off-by: Xavier Delaruelle <xavier.delaruelle@cea.fr>
This commit is contained in:
9
Makefile
9
Makefile
@@ -72,7 +72,6 @@ TEST_PREREQ += lib/libtestutil-closedir$(SHLIB_SUFFIX) \
|
||||
lib/libtestutil-getgroups$(SHLIB_SUFFIX) \
|
||||
lib/libtestutil-0getgroups$(SHLIB_SUFFIX) \
|
||||
lib/libtestutil-dupgetgroups$(SHLIB_SUFFIX) \
|
||||
lib/libtestutil-getgrgid$(SHLIB_SUFFIX) \
|
||||
lib/libtestutil-time$(SHLIB_SUFFIX) \
|
||||
lib/libtestutil-mktime$(SHLIB_SUFFIX)
|
||||
endif
|
||||
@@ -620,9 +619,6 @@ lib/libtestutil-0getgroups$(SHLIB_SUFFIX):
|
||||
lib/libtestutil-dupgetgroups$(SHLIB_SUFFIX):
|
||||
$(MAKE) --no-print-directory -C lib $(@F)
|
||||
|
||||
lib/libtestutil-getgrgid$(SHLIB_SUFFIX):
|
||||
$(MAKE) --no-print-directory -C lib $(@F)
|
||||
|
||||
lib/libtestutil-time$(SHLIB_SUFFIX):
|
||||
$(MAKE) --no-print-directory -C lib $(@F)
|
||||
|
||||
@@ -1138,9 +1134,8 @@ $(V).SILENT: initdir pkgdoc doc version.inc share/rpm/environment-modules.spec \
|
||||
script/gitlog2changelog.py script/modulecmd \
|
||||
lib/libtclenvmodules$(SHLIB_SUFFIX) lib/libtestutil-closedir$(SHLIB_SUFFIX) \
|
||||
lib/libtestutil-getpwuid$(SHLIB_SUFFIX) lib/libtestutil-getgroups$(SHLIB_SUFFIX) \
|
||||
lib/libtestutil-0getgroups$(SHLIB_SUFFIX) \
|
||||
lib/libtestutil-dupgetgroups$(SHLIB_SUFFIX) lib/libtestutil-getgrgid$(SHLIB_SUFFIX) \
|
||||
lib/libtestutil-time$(SHLIB_SUFFIX) lib/libtestutil-mktime$(SHLIB_SUFFIX) \
|
||||
lib/libtestutil-0getgroups$(SHLIB_SUFFIX) lib/libtestutil-mktime$(SHLIB_SUFFIX) \
|
||||
lib/libtestutil-dupgetgroups$(SHLIB_SUFFIX) lib/libtestutil-time$(SHLIB_SUFFIX) \
|
||||
testsuite/example/.modulespath testsuite/example/modulespath-wild \
|
||||
testsuite/example/modulerc testsuite/example/initrc-1 testsuite/example/initrc \
|
||||
dist-tar dist-gzip dist-bzip2 dist-win $(MODULECMDTEST) $(MODULECMDTEST)_i
|
||||
|
||||
1
lib/.gitignore
vendored
1
lib/.gitignore
vendored
@@ -14,7 +14,6 @@
|
||||
/libtestutil-getgroups.so
|
||||
/libtestutil-0getgroups.so
|
||||
/libtestutil-dupgetgroups.so
|
||||
/libtestutil-getgrgid.so
|
||||
/libtestutil-time.so
|
||||
/libtestutil-mktime.so
|
||||
/envmodules.c.gcov
|
||||
|
||||
@@ -52,10 +52,6 @@ libtestutil-dupgetgroups@SHLIB_SUFFIX@: testutil-dupgetgroups.c
|
||||
$(ECHO_CC)
|
||||
$(LDCC) $< -o $@
|
||||
|
||||
libtestutil-getgrgid@SHLIB_SUFFIX@: testutil-getgrgid.c
|
||||
$(ECHO_CC)
|
||||
$(LDCC) $< -o $@
|
||||
|
||||
libtestutil-time@SHLIB_SUFFIX@: testutil-time.c
|
||||
$(ECHO_CC)
|
||||
$(LDCC) $< -o $@
|
||||
@@ -72,7 +68,6 @@ clean:
|
||||
rm -f libtestutil-getgroups@SHLIB_SUFFIX@
|
||||
rm -f libtestutil-0getgroups@SHLIB_SUFFIX@
|
||||
rm -f libtestutil-dupgetgroups@SHLIB_SUFFIX@
|
||||
rm -f libtestutil-getgrgid@SHLIB_SUFFIX@
|
||||
rm -f libtestutil-time@SHLIB_SUFFIX@
|
||||
rm -f libtestutil-mktime@SHLIB_SUFFIX@
|
||||
rm -f envmodules.c.gcov envmodules.gcda envmodules.gcno
|
||||
@@ -99,5 +94,5 @@ endif
|
||||
$(V).SILENT: envmodules.o libtclenvmodules@TCL_SHLIB_SUFFIX@ \
|
||||
libtestutil-closedir@SHLIB_SUFFIX@ libtestutil-getpwuid@SHLIB_SUFFIX@ \
|
||||
libtestutil-getgroups@SHLIB_SUFFIX@ libtestutil-0getgroups@SHLIB_SUFFIX@ \
|
||||
libtestutil-dupgetgroups@SHLIB_SUFFIX@ libtestutil-getgrgid@SHLIB_SUFFIX@ \
|
||||
libtestutil-time@SHLIB_SUFFIX@ libtestutil-mktime@SHLIB_SUFFIX@
|
||||
libtestutil-dupgetgroups@SHLIB_SUFFIX@ libtestutil-time@SHLIB_SUFFIX@ \
|
||||
libtestutil-mktime@SHLIB_SUFFIX@
|
||||
|
||||
@@ -1,29 +0,0 @@
|
||||
/*************************************************************************
|
||||
*
|
||||
* TESTUTIL-GETGRGID.C, Superseded getgrgid function for test purpose
|
||||
* Copyright (C) 2020-2021 Xavier Delaruelle
|
||||
*
|
||||
* 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 <stddef.h>
|
||||
#include <grp.h>
|
||||
|
||||
struct group *getgrgid(gid_t gid)
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/* vim:set tabstop=3 shiftwidth=3 expandtab autoindent: */
|
||||
@@ -168,13 +168,6 @@ if {[info exists env(TESTSUITE_ENABLE_SITECONFIG_TCLEXTLIBDUPGETGROUPS)]} {
|
||||
report [initStateUsergroups]
|
||||
}
|
||||
|
||||
# test tcl ext lib procedures against a failed getgrgid call
|
||||
if {[info exists env(TESTSUITE_ENABLE_SITECONFIG_TCLEXTLIBFAILEDGETGRGID)]} {
|
||||
if {[catch {[initStateUsergroups]} errMsg]} {
|
||||
reportError $errMsg
|
||||
}
|
||||
}
|
||||
|
||||
# test tcl ext lib procedures against a failed time call
|
||||
if {[info exists env(TESTSUITE_ENABLE_SITECONFIG_TCLEXTLIBFAILEDTIME)]} {
|
||||
if {[catch {[initStateClockSeconds]} errMsg]} {
|
||||
|
||||
@@ -166,7 +166,6 @@ if {$install_libtclenvmodules eq {y}} {
|
||||
set getgroupslib_file lib/libtestutil-getgroups$install_shlib_suffix
|
||||
set 0getgroupslib_file lib/libtestutil-0getgroups$install_shlib_suffix
|
||||
set dupgetgroupslib_file lib/libtestutil-dupgetgroups$install_shlib_suffix
|
||||
set getgrgidlib_file lib/libtestutil-getgrgid$install_shlib_suffix
|
||||
set timelib_file lib/libtestutil-time$install_shlib_suffix
|
||||
set mktimelib_file lib/libtestutil-mktime$install_shlib_suffix
|
||||
}
|
||||
|
||||
@@ -473,21 +473,6 @@ if {[info exists dupgetgroupslib_file] && [file exists $dupgetgroupslib_file]} {
|
||||
send_user "\tSkip tcl ext lib erroneous procedure calls as dupgetgroups test lib is not available\n"
|
||||
}
|
||||
|
||||
# test tcl ext lib procedures against a failed getgrgid call
|
||||
if {[info exists getgrgidlib_file] && [file exists $getgrgidlib_file]} {
|
||||
setenv_var TESTSUITE_ENABLE_SITECONFIG_TCLEXTLIBFAILEDGETGRGID 1
|
||||
setenv_var LD_PRELOAD $getgrgidlib_file
|
||||
set ans [list]
|
||||
lappend ans "$error_msgs: couldn't find name for group id \".*\": .*"
|
||||
lappend ans $vers_reportre
|
||||
testouterr_cmd_re sh -V OK [join $ans \n]
|
||||
|
||||
unsetenv_var TESTSUITE_ENABLE_SITECONFIG_TCLEXTLIBFAILEDGETGRGID
|
||||
unsetenv_var LD_PRELOAD
|
||||
} elseif {$verbose} {
|
||||
send_user "\tSkip tcl ext lib erroneous procedure calls as getgrgid test lib is not available\n"
|
||||
}
|
||||
|
||||
# test tcl ext lib procedures against a failed time call
|
||||
if {[info exists timelib_file] && [file exists $timelib_file]} {
|
||||
setenv_var TESTSUITE_ENABLE_SITECONFIG_TCLEXTLIBFAILEDTIME 1
|
||||
|
||||
Reference in New Issue
Block a user