develooper Front page | perl.perl5.porters | Postings from April 2000

[ID 20000423.001] fix to 5.6.0's t/op/stat.t

From:
Jeffrey Friedl
Date:
April 23, 2000 21:54
Subject:
[ID 20000423.001] fix to 5.6.0's t/op/stat.t
Message ID:
200004240453.VAA23611@ventrue.yahoo.com

Hiho,
t/op/stat.t fails on test 35 if there happens to be no suid scripts in the
first bin directory it finds. For some reason, FreeBSD likes to keep setuid
scripts out of /bin and /usr/bin, putting them into /sbin and /usr/sbin
instead.

This patch has test 35 give priority to /sbin or /usr/sbin, if they exist.
myconfig output follows the patch.

Thanks for Perl,
	Jeffrey


*** t/op/stat.t-orig    Fri Feb 25 22:34:58 2000
--- t/op/stat.t Sun Apr 23 21:46:40 2000
***************
*** 177,183 ****
  $cnt = $uid = 0;
  
  die "Can't run op/stat.t test 35 without pwd working" unless $cwd;
! ($bin) = grep {-d} ($^O eq 'machten' ? qw(/usr/bin /bin) : qw(/bin /usr/bin))
      or print ("not ok 35\n"), goto tty_test;
  opendir BIN, $bin or die "Can't opendir $bin: $!";
  while (defined($_ = readdir BIN)) {
--- 177,183 ----
  $cnt = $uid = 0;
  
  die "Can't run op/stat.t test 35 without pwd working" unless $cwd;
! ($bin) = grep {-d} ($^O eq 'machten' ? qw(/usr/bin /bin) : qw(/sbin /usr/sbin /bin /usr/bin))
      or print ("not ok 35\n"), goto tty_test;
  opendir BIN, $bin or die "Can't opendir $bin: $!";
  while (defined($_ = readdir BIN)) {



>| Summary of my perl5 (revision 5.0 version 6 subversion 0) configuration:
>|   Platform:
>|     osname=freebsd, osvers=3.4-stable.y-20000103, archname=i386-freebsd
>|     uname='freebsd proc2.finance.yahoo.com 3.4-stable.y-20000103 freebsd 3.4-stable.y-20000103 #0: mon jan 3 19:50:21 pst 2000 root@fb30.yahoo.com:homesrcsyscompileyahoo i386 '
>|     config_args=''
>|     hint=recommended, useposix=true, d_sigaction=define
>|     usethreads=undef use5005threads=undef useithreads=undef usemultiplicity=undef
>|     useperlio=undef d_sfio=undef uselargefiles=define 
>|     use64bitint=undef use64bitall=undef uselongdouble=undef usesocks=undef
>|   Compiler:
>|     cc='cc', optimize='-O2', gccversion=2.7.2.3
>|     cppflags='-I/usr/local/include'
>|     ccflags ='-I/usr/local/include'
>|     stdchar='char', d_stdstdio=undef, usevfork=true
>|     intsize=4, longsize=4, ptrsize=4, doublesize=8
>|     d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12
>|     ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8
>|     alignbytes=4, usemymalloc=n, prototype=define
>|   Linker and Libraries:
>|     ld='cc', ldflags ='-Wl,-E  -L/usr/local/lib'
>|     libpth=/usr/lib /usr/local/lib
>|     libs=-lm -lc -lcrypt
>|     libc=/usr/lib/libc.so, so=so, useshrplib=false, libperl=libperl.a
>|   Dynamic Linking:
>|     dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags=' '
>|     cccdlflags='-DPIC -fpic', lddlflags='-shared  -L/usr/local/lib'



nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About