Closed p5pRT closed 19 years ago
Running Debian woody.
When running as root (I know I shouldn't) op/groups.t fails\, everything else passes. When run as a non-root user it passes.
(apparently this is why it fails) # gr = gdm gdm gdm admins utmp shadow audio cdrom uucp bin
However\, root only appears to be in group gdm once.
gdm:x:65534:root
entire test output:
# ./op/groups.t
# groups = uid=0(root) gid=0(root)
# groups=0(root)\,2(bin)\,10(uucp)\,24(cdrom)\,29(audio)\,42(shadow)\,43(utmp)\,1000(admins)\,65534(gdm)\,65534(gdm)\,65534(gdm)
# groups=0(root)\,2(bin)\,10(uucp)\,24(cdrom)\,29(audio)\,42(shadow)\,43(utmp)\,1000(admins)\,65534(gdm)\,65534(gdm)\,65534(gdm)
# g0 = 0(root) 2(bin) 10(uucp) 24(cdrom) 29(audio) 42(shadow) 43(utmp)
# 1000(admins) 65534(gdm) 65534(gdm) 65534(gdm)
# g1 = root bin uucp cdrom audio shadow utmp admins gdm gdm gdm
1..2
# pwgid = 0\, pwgnam = root
# gr = gdm gdm gdm admins utmp shadow audio cdrom uucp bin
#gr1 is \
The regression test fails with:
t/op/grep............................ok t/op/groups..........................FAILED at test 1 t/op/gv..............................ok
Here is more detailed output from t/op/groups:
# ./perl op/groups.t
# groups = uid=0(root) gid=0(root) groups=0(root)\,1(bin)\,2(daemon)\,3(sys)\,4(adm)\,6(disk)\,10(wheel)\,2015(releases)\,1(bin)
# groups=0(root)\,1(bin)\,2(daemon)\,3(sys)\,4(adm)\,6(disk)\,10(wheel)\,2015(releases)\,1(bin)
# g0 = 0(root) 1(bin) 2(daemon) 3(sys) 4(adm) 6(disk) 10(wheel) 2015(releases) 1(bin)
# g1 = root bin daemon sys adm disk wheel releases bin
1..2
# pwgid = 0\, pwgnam = root
# gr = bin releases wheel disk adm sys daemon bin
#gr1 is \
I think the problem may be due to a duplicate entry in our NIS /etc/group map. We have two groups with ID 1\, but with different names. One of the names is "bin".
Hi\,
I'm trying to compile Perl 5.8.3 on AIX 4.3.3. I've getting a test failed. I've some doubt that it's because we're running we DCE but I wasn't getting this test failed in Perl 5.8.2. I've tried to make install but it doesn't either word.
Here is what I've done:
yaberge2@info1 ==> ./configure.gnu -Dprefix=/dfs/system/prod/aix/rs_aix433/bin/perl/5.8.3/
yaberge2@info1 ==> make
yaberge2@info1 ==> make test
t/op/groups..........................FAILED at test 1
Failed 1 test script out of 792\, 99.87% okay.
yaberge2@info1 ==> ./perl t/op/groups.t # groups = bromont yaberge2 users/ya projects projects projects projects projects acct-adm subsys/d subsys/d subsys/d subsys/d subsys/d subsys/d 1..2 # pwgid = 0\, pwgnam = system # gr = subsys/d subsys/d subsys/d subsys/d subsys/d subsys/d acct-adm projects projects projects projects projects users/ya yaberge2 bromont #gr1 is \<acct-adm bromont projects projects projects projects projects subsys/d subsys/d subsys/d subsys/d subsys/d subsys/d users/ya yaberge2> #gr2 is \<acct-adm bromont projects subsys/d users/ya yaberge2> not ok 1 ok 2
yaberge2@info1 ==> make install
Couldn't copy Debug.pm to /dfs/system/prod/aix/rs_aix433/bin/perl/5.8.3/lib/5.8.3/aix/B/Debug.pm: A file or directory in the path name does not exist. Couldn't chmod 444 /dfs/system/prod/aix/rs_aix433/bin/perl/5.8.3/lib/5.8.3/aix/B/Debug.pm: A file or directory in the path name does not exist. Can't locate Carp/Heavy.pm in @INC (@INC contains: lib) at lib/Carp.pm line 178. make: 1254-004 The error code from the last command is 2.
Stop. make: 1254-004 The error code from the last command is 2.
Stop.
yaberge2@info1 ==> myconfig Summary of my perl5 (revision 5.0 version 8 subversion 3) configuration: Platform: osname=aix\, osvers=4.3.3.0\, archname=aix uname='aix info1 3 4 00058b8f4c00 ' config_args='-ds -e -Dprefix=/dfs/system/prod/aix/rs_aix433/bin/perl/5.8.3/' hint=recommended\, useposix=true\, d_sigaction=define usethreads=undef use5005threads=undef useithreads=undef usemultiplicity=undef useperlio=define d_sfio=undef uselargefiles=define usesocks=undef use64bitint=undef use64bitall=undef uselongdouble=undef usemymalloc=n\, bincompat5005=undef Compiler: cc='cc'\, ccflags ='-D_ALL_SOURCE -D_ANSI_C_SOURCE -D_POSIX_SOURCE -qmaxmem=16384 -qnoansialias -DUSE_NATIVE_DLOPEN -q32 -D_LARGE_FILES -qlonglong'\, optimize=' '\, cppflags='-D_ALL_SOURCE -D_ANSI_C_SOURCE -D_POSIX_SOURCE -qmaxmem=16384 -qnoansialias -DUSE_NATIVE_DLOPEN' ccversion='3.6.6.0'\, gccversion=''\, gccosandvers='' intsize=4\, longsize=4\, ptrsize=4\, doublesize=8\, byteorder=4321 d_longlong=define\, longlongsize=8\, d_longdbl=define\, longdblsize=8 ivtype='long'\, ivsize=4\, nvtype='double'\, nvsize=8\, Off_t='off_t'\, lseeksize=8 alignbytes=8\, prototype=define Linker and Libraries: ld='ld'\, ldflags =' -brtl -L/usr/local/lib -b32' libpth=/usr/local/lib /lib /usr/lib /usr/ccs/lib libs=-lbind -lnsl -ldbm -ldl -lld -lm -lcrypt -lc -lbsd perllibs=-lbind -lnsl -ldl -lld -lm -lcrypt -lc -lbsd libc=/lib/libc.a\, so=a\, useshrplib=false\, libperl=libperl.a gnulibc_version='' Dynamic Linking: dlsrc=dl_aix.xs\, dlext=so\, d_dlsymun=undef\, ccdlflags=' -bE:/dfs/system/prod/aix/rs_aix433/bin/perl/5.8.3/lib/5.8.3/aix/CORE/perl.exp' cccdlflags=' '\, lddlflags=' -bhalt:4 -bM:SRE -bI:$(PERL_INC)/perl.exp -bE:$(BASEEXT).exp -bnoentry -lc -L/usr/local/lib'
Yannick Bergeron yaberger@ca.ibm.com Poste 7711
[jhpb@hekimian.com - Fri Mar 07 11:03:22 2003]:
This is a bug report for perl from jhpb@hekimian.com\, generated with the help of perlbug 1.34 running under perl v5.8.0.
----------------------------------------------------------------- [Please enter your report here]
The regression test fails with:
t/op/grep\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.ok t/op/groups\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.FAILED at test 1 t/op/gv\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.ok
Here is more detailed output from t/op/groups:
\# \./perl op/groups\.t \# groups = uid=0\(root\) gid=0\(root\)
groups=0(root)\,1(bin)\,2(daemon)\,3(sys)\,4(adm)\,6(disk)\,10(wheel)\,2015(releases)\,1(bin) #
groups=0(root)\,1(bin)\,2(daemon)\,3(sys)\,4(adm)\,6(disk)\,10(wheel)\,2015(releases)\,1(bin) # g0 = 0(root) 1(bin) 2(daemon) 3(sys) 4(adm) 6(disk) 10(wheel) 2015(releases) 1(bin) # g1 = root bin daemon sys adm disk wheel releases bin 1..2 # pwgid = 0\, pwgnam = root # gr = bin releases wheel disk adm sys daemon bin #gr1 is \
#gr2 is \ not ok 1 ok 2 I think the problem may be due to a duplicate entry in our NIS /etc/group map. We have two groups with ID 1\, but with different names. One of the names is "bin".
I was able to reproduce this bug\, although\, only while root. Anyways\, the test does make poor assumptions about the correctness of the data in /etc/group. Patch forthcoming.
The RT System itself - Status changed from 'new' to 'open'
[stmpeters - Tue Jul 05 13:19:42 2005]:
[jhpb@hekimian.com - Fri Mar 07 11:03:22 2003]:
This is a bug report for perl from jhpb@hekimian.com\, generated with the help of perlbug 1.34 running under perl v5.8.0.
----------------------------------------------------------------- [Please enter your report here]
The regression test fails with:
t/op/grep\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.ok t/op/groups\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.FAILED at test 1 t/op/gv\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.ok
Here is more detailed output from t/op/groups:
\# \./perl op/groups\.t \# groups = uid=0\(root\) gid=0\(root\)
groups=0(root)\,1(bin)\,2(daemon)\,3(sys)\,4(adm)\,6(disk)\,10(wheel)\,2015(releases)\,1(bin)
\#
groups=0(root)\,1(bin)\,2(daemon)\,3(sys)\,4(adm)\,6(disk)\,10(wheel)\,2015(releases)\,1(bin)
\# g0 = 0\(root\) 1\(bin\) 2\(daemon\) 3\(sys\) 4\(adm\) 6\(disk\) 10\(wheel\)
2015(releases) 1(bin) # g1 = root bin daemon sys adm disk wheel releases bin 1..2 # pwgid = 0\, pwgnam = root # gr = bin releases wheel disk adm sys daemon bin #gr1 is \
#gr2 is \ not ok 1 ok 2 I think the problem may be due to a duplicate entry in our NIS /etc/group map. We have two groups with ID 1\, but with different names. One of the names is "bin".
I was able to reproduce this bug\, although\, only while root. Anyways\, the test does make poor assumptions about the correctness of the data in /etc/group. Patch forthcoming.
The problem here is that users can have duplicate group numbers or names in /etc/group. The attached patch will uniquely sort the group names for comparisons.
@gr)))); } else { - $gr1 = join(' '\, sort @gr); + # Don't assume that there aren't duplicate groups + my %seen; + $gr1 = join(' '\, sort grep defined $_ && !$seen{$_}++\, @gr); }
On Wed\, 13 Jul 2005 06:51:45 -0700\, "Steve Peters via RT" \perlbug\-followup@​perl\.org wrote:
The problem here is that users can have duplicate group numbers or names in /etc/group. The attached patch will uniquely sort the group names for comparisons.
I applied the patch with small changes\, in patch #25140
%seen was already used for another purpose %did was used in the line above\, but it was not declared I also changed some whitespace issues (stripped from patch below)
Change 25140 by merijn@merijn-pc09 on 2005/07/13 17:22:07
Subject: [perl #9565] [PATCH] /op/groups.t bug From: "Steve Peters via RT" \perlbug\-followup@​perl\.org Date: Wed\, 13 Jul 2005 06:51:45 -0700 Message-ID: \rt\-3\.0\.11\-9565\-117185\.14\.6331240065229@​perl\.org
Affected files ...
... //depot/perl/t/op/groups.t#31 edit
Differences ...
==== //depot/perl/t/op/groups.t#31 (xtext) ==== @@ -129\,15 +129\,17 @@ print "# gr = @gr\n";
+my %did; if ($^O =~ /^(?:uwin|cygwin|interix|solaris)$/) { # Or anybody else who can have spaces in group names. $gr1 = join(' '\, grep(!$did{$_}++\, sort split(' '\, join(' '\, @gr)))); } else { - $gr1 = join(' '\, sort @gr); + # Don't assume that there aren't duplicate groups + $gr1 = join(' '\, sort grep defined $_ && !$did{$_}++\, @gr); }
if ($Config{myuname} =~ /^cygwin_nt/i) { # basegroup on CYGWIN_NT has id = 0. -->8---
-- H.Merijn Brand Amsterdam Perl Mongers (http://amsterdam.pm.org/) using Perl 5.6.2\, 5.8.0\, 5.8.5\, & 5.9.2 on HP-UX 10.20\, 11.00 & 11.11\, AIX 4.3 & 5.2\, SuSE 9.2 & 9.3\, and Cygwin. http://www.cmve.net/~merijn Smoking perl: http://www.test-smoke.org\, perl QA: http://qa.perl.org reports to: smokers-reports@perl.org\, perl-qa@perl.org
@smpeters - Status changed from 'open' to 'resolved'
Migrated from rt.perl.org#9565 (status was 'resolved')
Searchable as RT9565$