Call for testing: OpenSSH-5.9

Kevin Brott kevin.brott at gmail.com
Tue Aug 30 09:54:45 EST 2011


On Mon, Aug 29, 2011 at 01:31, Darren Tucker <dtucker at zip.com.au> wrote:

> On Mon, Aug 29, 2011 at 2:48 PM, Darren Tucker <dtucker at zip.com.au> wrote:
> [...]
> > confirmed: it's poll.
>
> Actually now I'm not sure about that.  Or rather I still think it's
> poll, but maybe not in the place I originally thought.
>
> While trying to convert the testcase into a configure test, I found
> that my testcase also fails on Linux where the sandbox (appears to)
> work and now I'm confused.
>
> Here's what I'm currently using:
>
> $ cat polltest.c
> #include <sys/time.h>
> #include <sys/resource.h>
> #include <stdio.h>
> #include <poll.h>
> #include <errno.h>
> #include <fcntl.h>
>
> int main(int argc, char **argv)
> {
>        struct rlimit rl_zero;
>        struct pollfd pfd;
>         int r, enforce_limit = 0;
>
>        if (argc == 2 && strcmp(argv[1], "limit") == 0)
>                enforce_limit = 1;
>
>         pfd.fd = open("/dev/null", O_RDONLY);
>        pfd.events = POLLIN;
>
>        if (enforce_limit) {
>                rl_zero.rlim_cur = rl_zero.rlim_max = 0;
>                setrlimit(RLIMIT_FSIZE, &rl_zero);
>                setrlimit(RLIMIT_NOFILE, &rl_zero);
>        }
>
>         r = poll(&pfd, 1, -1);
>        printf("poll = %d, error: %s\n", r, strerror(errno));
> }
>
> $ gcc polltest.c && ./a.out ; ./a.out limit
> poll = 1, error: Success
> poll = -1, error: Invalid argument
>
>
On  AIX 5.3-7.1 for this test I get these results - and 'make tests' seemed
to work fine
$ xlc polltest.c && ./a.out ; ./a.out limit
poll = 1, error: Error 0
poll = 1, error: Error 0

HP-UX 11.31 + HP Ansi C/C++
$ cc polltest.c && ./a.out ;  ./a.out limit
"polltest.c", line 27: warning #2181-D: argument is incompatible with
          corresponding format string conversion
         printf("poll = %d, error: %s\n", r, strerror(errno));
                                             ^

poll = 1, error: Error 0
poll = 1, error: Invalid argument

HP-UX 11.11-11.31 + gcc
$ gcc polltest.c && ./a.out ;  ./a.out limit
poll = 1, error: Error 0
poll = 1, error: Invalid argument


-- 
# include <stddisclaimer.h>
/* Kevin  Brott <Kevin.Brott at gmail.com> */


More information about the openssh-unix-dev mailing list