Re: [mp2] make test errors

[prev] [thread] [next] [Date index for 2005/02/16]

From: William McKee
Subject: Re: [mp2] make test errors
Date: 15:44 on 16 Feb 2005
--mPOSj6iWmtyhwOMz
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

I didn't get very far with debugging the test (basically the test server
got started and I lost control of the debugger). At any rate, I found
some more information about sockets inside of jailed environments[1].
Section 4.2.2 seems to indicate that the type of socket we are creating
in the following code from A::TestRequest is OK:

  require IO::Socket;
  return IO::Socket::INET->new(%args);

As an alternate approach, I've created a test script that opens a socket
to the test webserver and prints the same strings from the test. First,
I start the test servers via t/TEST -start. Then I run my attached
script. The output is as expected. I think this is a good thing but
probably means there is a problem somewhere in the test scripts. Any
ideas for tracking this one down?

As for determing whether we are running inside of a jail, there are
several techniques. The simplest seems to be checking the output of 'df
/' to see if it reports being mounted on a different filesystem (e.g.,
/local/jails in my case). Other solutions require C code or additional
packages[2].


William

[1] http://www.freebsd.org/doc/en_US.ISO8859-1/books/arch-handbook/jail-restrictions.html
[2] http://memberwebs.com/nielsen/freebsd/jails/jailutils/

        -- 
        Knowmad Services Inc.
http://www.knowmad.com

--mPOSj6iWmtyhwOMz
Content-Type: text/x-perl; charset=us-ascii
Content-Disposition: attachment; filename="socket.pl"

#!/usr/bin/perl -w

use IO::Socket;

my $host = 'localhost';
my $port = '8529';
my $socket = IO::Socket::INET->new(PeerAddr => $host, PeerPort => $port) or die "Unable to create listener socket: $!";

my @test_strings = qw(MODPERL 2.0 RULES);
for my $str (@test_strings) {
    print $socket "$str\n";
    chomp(my $reply = <$socket>||'');
    $str = lc $str;
    $str =~ s/modperl/mod_perl/;
    print ("Reply = $reply\nExpected = $str\n");
}

--mPOSj6iWmtyhwOMz--

(message missing)

[mp2] make test errors
William McKee 19:37 on 13 Feb 2005

Re: [mp2] make test errors
Stas Bekman 23:41 on 15 Feb 2005

Re: [mp2] make test errors
William McKee 13:32 on 16 Feb 2005

Re: [mp2] make test errors
William McKee 14:33 on 16 Feb 2005

Re: [mp2] make test errors
William McKee 15:44 on 16 Feb 2005

Re: [mp2] make test errors
Stas Bekman 21:12 on 16 Feb 2005

Re: [mp2] make test errors
William McKee 22:21 on 16 Feb 2005

Re: [mp2] make test errors
Stas Bekman 21:06 on 16 Feb 2005

Re: [mp2] make test errors
William McKee 22:46 on 16 Feb 2005

Re: [mp2] make test errors
Stas Bekman 00:14 on 17 Feb 2005

Re: [mp2] make test errors
William McKee 14:05 on 17 Feb 2005

Re: [mp2] make test errors
Stas Bekman 23:21 on 17 Feb 2005

Re: [mp2] make test errors
Stas Bekman 21:08 on 16 Feb 2005

Re: [mp2] make test errors
William McKee 22:26 on 16 Feb 2005

Re: [mp2] make test errors
Stas Bekman 00:12 on 17 Feb 2005

Re: [mp2] make test errors
Joe Orton 10:39 on 17 Feb 2005

Re: [mp2] make test errors
William McKee 14:18 on 17 Feb 2005

Re: [mp2] make test errors
William McKee 14:16 on 17 Feb 2005

Re: [mp2] make test errors
Joe Orton 16:53 on 17 Feb 2005

Re: [mp2] make test errors
William McKee 20:05 on 17 Feb 2005

Re: [mp2] make test errors
Stas Bekman 23:27 on 17 Feb 2005

Re: [mp2] make test errors
William McKee 17:11 on 18 Feb 2005

Re: [mp2] make test errors
Stas Bekman 22:32 on 18 Feb 2005

Re: [mp2] make test errors
Jie Gao 22:37 on 18 Feb 2005

Re: [mp2] make test errors
William McKee 10:39 on 02 Jun 2005

Re: [mp2] make test errors
Joe Orton 13:40 on 18 Feb 2005

Re: [mp2] make test errors
William McKee 15:15 on 18 Feb 2005

Re: [mp2] make test errors
William McKee 20:07 on 18 Feb 2005

Re: [mp2] make test errors
Stas Bekman 22:35 on 18 Feb 2005

Re: [mp2] make test errors
Stas Bekman 23:08 on 18 Feb 2005

Re: [mp2] make test errors
Joe Orton 09:54 on 24 Feb 2005

Re: [mp2] make test errors
Stas Bekman 05:09 on 25 Feb 2005

Generated at 20:12 on 05 Jun 2005 by mariachi v0.52