develooper Front page | perl.perl5.porters | Postings from October 2003

get/setpriority test failures for BSD-Resource-1.23

Thread Next
From:
=?iso-8859-1?q?Sreeji=20K=20Das?=
Date:
October 15, 2003 06:27
Subject:
get/setpriority test failures for BSD-Resource-1.23
Message ID:
20031015132710.23291.qmail@web10506.mail.yahoo.com
Hi Jarkko,
I was compiling BSD::Resource on Solaris 2.6 (SunOS
5.6) and got these failures. 

% make test
..
Failed 2/6 test scripts, 66.67% okay. 5/31 subtests
failed, 83.87% okay.
Failed Test     Stat Wstat Total Fail  Failed  List of
Failed
-------------------------------------------------------------------------------
t/getpriority.t                3    3 100.00%  1-3
t/setpriority.t                3    2  66.67%  1-2

I did some debugging & found following is the reason:
$ cat tst.c
#include <sys/resource.h>
#include <errno.h>
main(int argc, char *argv[])
{
  int prio;
  id_t process = (id_t) 0;
  errno = 0;
  prio = getpriority(PRIO_PROCESS, process);
  printf("prio = %d, errno = %d\n", prio, errno);
  if (errno)
    perror("error: getpriority() ");
  else
    printf("getpriority() returned %d\n", prio);
}

$ make tst && ./tst
/opt/SUNWspro/bin/cc  -L/usr/lib -L/usr/ccs/lib
-L/opt/SUNWspro/SC4.2/lib -L/usr/local/lib -o tst
tst.c
prio = -1, errno = 3
error: getpriority() : No such process

I compiled the same program on SunOS 5.9 (Solaris 9)
and it worked well there (got prio = 0).

I just wanted to inform you this & also wanted to
know if you or anyone else has seen this problem.
I googled & did not get any information. Before I ask
the admin to check for any patches, I wanted to know
if 
I'm doing something wrong.

thx
Sreeji
(I'm not sure if it's right to post to perl5-porters.
But this is a perl-module related failure & I'm
hoping many ppl. would have seen this).
--------------
For completeness, my perl details:
Summary of my perl5 (revision 5.0 version 8 subversion
1) configuration:
  Platform:
    osname=solaris, osvers=2.6,
archname=sun4-solaris-thread-multi
    uname='sunos ap555sun 5.6 generic_105181-34 sun4u
sparc sunw,ultra-80 '
    config_args='-de -Dcc=/opt/SUNWspro/bin/cc
-Dprefix=/tdev -Dbin=/tdev/bin/ Uinstallusrbinperl
-Dusethreads -Dstartperl=#!/tdev/bin/perl
-Dinc_version_listnone
-Dscriptdir=/tdev/arch/share/bin -Dsitebin=/tdev/bin
-Doptimize=-g -DDEBUGING'
    hint=recommended, useposix=true,
d_sigaction=define
    usethreads=define use5005threads=undef
useithreads=define usemultiplicity=dfine
    useperlio=define d_sfio=undef uselargefiles=define
usesocks=undef
    use64bitint=undef use64bitall=undef
uselongdouble=undef
    usemymalloc=n, bincompat5005=undef
  Compiler:
    cc='/opt/SUNWspro/bin/cc', ccflags ='-D_REENTRANT
-DDEBUGGING -I/usr/local/nclude -D_LARGEFILE_SOURCE
-D_FILE_OFFSET_BITS=64',
    optimize='-g -DDEBUGGING',
    cppflags='-D_REENTRANT -DDEBUGGING
-I/usr/local/include'
    ccversion='WorkShop Compilers 4.2 30 Oct 1996 C
4.2', gccversion='', gccosadvers=''
    intsize=4, longsize=4, ptrsize=4, doublesize=8,
byteorder=4321
    d_longlong=define, longlongsize=8,
d_longdbl=define, longdblsize=16
    ivtype='long', ivsize=4, nvtype='double',
nvsize=8, Off_t='off_t', lseeksiz=8
    alignbytes=8, prototype=define
  Linker and Libraries:
    ld='/opt/SUNWspro/bin/cc', ldflags =' -L/usr/lib
-L/usr/ccs/lib -L/opt/SUNWpro/SC4.2/lib
-L/usr/local/lib '
    libpth=/usr/lib /usr/ccs/lib
/opt/SUNWspro/SC4.2/lib /usr/local/lib
    libs=-lsocket -lnsl -ldl -lm -lpthread -lc
    perllibs=-lsocket -lnsl -ldl -lm -lpthread -lc
    libc=/lib/libc.so, so=so, useshrplib=false,
libperl=libperl.a
    gnulibc_version=''
  Dynamic Linking:
    dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef,
ccdlflags='  -z ignore -z layload -z combreloc'
    cccdlflags='-KPIC', lddlflags=' -G  -z ignore -z
lazyload -z combreloc -L/ur/lib -L/usr/ccs/lib
-L/opt/SUNWspro/SC4.2/lib -L/usr/local/lib'


Characteristics of this binary (from libperl):
  Compile-time options: DEBUGGING MULTIPLICITY
USE_ITHREADS USE_LARGE_FILES PER_IMPLICIT_CONTEXT
  Built under solaris
  Compiled at Oct  2 2003 12:39:49
  @INC:
    /tdev/lib/perl5/5.8.1/sun4-solaris-thread-multi
    /tdev/lib/perl5/5.8.1
   
/tdev/lib/perl5/site_perl/5.8.1/sun4-solaris-thread-multi
    /tdev/lib/perl5/site_perl/5.8.1
    /tdev/lib/perl5/site_perl



________________________________________________________________________
Want to chat instantly with your online friends?  Get the FREE Yahoo!
Messenger http://mail.messenger.yahoo.co.uk

Thread Next


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