cvs commit: apachen/src/test time-sem.c

1997-11-10 Thread dgaudet
dgaudet 97/11/09 17:47:50

  Modified:src/test time-sem.c
  Log:
  Yet more updates.  It now works on linux again (I lost the old version which
  runs under linux).  It includes the correct flock() code.  It attempts to
  yield its slice up to other processes ...
  
  Revision  ChangesPath
  1.4   +141 -24   apachen/src/test/time-sem.c
  
  Index: time-sem.c
  ===
  RCS file: /export/home/cvs/apachen/src/test/time-sem.c,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- time-sem.c1997/11/04 08:33:13 1.3
  +++ time-sem.c1997/11/10 01:47:49 1.4
  @@ -15,7 +15,11 @@
We're not sure what the tunable is, so there's a define
NO_SEM_UNDO which can be used to simulate us trapping/blocking
signals to be able to properly release the semaphore on a clean
  - child death.
  + child death.  You'll also need to define NEED_UNION_SEMUN
  + under solaris.
  +
  +You'll need to define HAVE_SHMGET if anonymous shared mmap() doesn't
  +work on your system (i.e. linux).
   
   argv[1] is the #children, argv[2] is the #iterations per child
   
  @@ -55,6 +59,9 @@
   
   static int fcntl_fd=-1;
   
  +#define accept_mutex_child_init()
  +#define accept_mutex_cleanup()
  +
   /*
* Initialize mutex lock.
* Must be safe to call this on a restart.
  @@ -113,23 +120,37 @@
   
   static int flock_fd=-1;
   
  +#define FNAME test-lock-thing
  +
   /*
* Initialize mutex lock.
* Must be safe to call this on a restart.
*/
  -void
  -accept_mutex_init(void)
  +void accept_mutex_init(void)
   {
   
  -printf(opening test-lock-thing in current directory\n);
  -flock_fd = open(test-lock-thing, O_CREAT | O_WRONLY | O_EXCL, 0644);
  +printf(opening  FNAME  in current directory\n);
  +flock_fd = open(FNAME, O_CREAT | O_WRONLY | O_EXCL, 0644);
   if (flock_fd == -1)
   {
perror (open);
fprintf (stderr, Cannot open lock file: %s\n, test-lock-thing);
exit (1);
   }
  -unlink(test-lock-thing);
  +}
  +
  +void accept_mutex_child_init(void)
  +{
  +flock_fd = open(FNAME, O_WRONLY, 0600);
  +if (flock_fd == -1) {
  + perror(open);
  + exit(1);
  +}
  +}
  +
  +void accept_mutex_cleanup(void)
  +{
  +unlink(FNAME);
   }
   
   void accept_mutex_on(void)
  @@ -166,13 +187,19 @@
   static sigset_t accept_previous_mask;
   #endif
   
  +#define accept_mutex_child_init()
  +#define accept_mutex_cleanup()
  +
   void accept_mutex_init(void)
   {
  -  union semun {
  -   int val;
  -   struct semid_ds *buf;
  -   ushort *array;
  -  };
  +#ifdef NEED_UNION_SEMUN
  +/* believe it or not, you need to define this under solaris */
  +union semun {
  + int val;
  + struct semid_ds *buf;
  + ushort *array;
  +};
  +#endif
   
   union semun ick;
   
  @@ -251,6 +278,9 @@
   static sigset_t accept_block_mask;
   static sigset_t accept_previous_mask;
   
  +#define accept_mutex_child_init()
  +#define accept_mutex_cleanup()
  +
   void accept_mutex_init(void)
   {
   pthread_mutexattr_t mattr;
  @@ -311,9 +341,15 @@
   }
   
   #elif defined (USE_USLOCK_SERIALIZED_ACCEPT)
  +
   #include ulocks.h
  +
   static usptr_t *us = NULL;
   static ulock_t uslock = NULL;
  +
  +#define accept_mutex_child_init()
  +#define accept_mutex_cleanup()
  +
   void accept_mutex_init(void)
   {
   ptrdiff_t old;
  @@ -364,6 +400,94 @@
   #endif
   
   
  +#ifndef HAVE_SHMGET
  +static void *get_shared_mem(size_t size)
  +{
  +int fd;
  +void *result;
  +
  +/* allocate shared memory for the shared_counter */
  +fd = open (/dev/zero, O_RDWR);
  +if (fd == -1) {
  + perror (open);
  + exit (1);
  +}
  +result = (unsigned long *)mmap ((caddr_t)0, size,
  + PROT_READ|PROT_WRITE, MAP_SHARED, fd, 0);
  +if (result == (void *)(caddr_t)-1) {
  + perror (mmap);
  + exit (1);
  +}
  +close (fd);
  +return result;
  +}
  +#else
  +#include sys/types.h
  +#include sys/ipc.h
  +#include sys/shm.h
  +
  +static void *get_shared_mem(size_t size)
  +{
  +key_t shmkey = IPC_PRIVATE;
  +int shmid = -1;
  +void *result;
  +#ifdef MOVEBREAK
  +char *obrk;
  +#endif
  +
  +if ((shmid = shmget(shmkey, size, IPC_CREAT | SHM_R | SHM_W)) == -1) {
  + perror(shmget);
  + exit(1);
  +}
  +
  +#ifdef MOVEBREAK
  +/*
  + * Some SysV systems place the shared segment WAY too close
  + * to the dynamic memory break point (sbrk(0)). This severely
  + * limits the use of malloc/sbrk in the program since sbrk will
  + * refuse to move past that point.
  + *
  + * To get around this, we move the break point way up there,
  + * attach the segment and then move break back down. Ugly
  + */
  +if ((obrk = sbrk(MOVEBREAK)) == 

cvs commit: apachen/src/test zb.c

1997-11-10 Thread dgaudet
dgaudet 97/11/09 17:55:48

  Added:   src/test zb.c
  Log:
  Add zeusbench since the zeus folks seem to have removed it from their
  pages.  It's freely distributable provided we leave the copyright intact
  at the top of the code.
  
  Revision  ChangesPath
  1.1  apachen/src/test/zb.c
  
  Index: zb.c
  ===
  
  /*  ZeusBench V1.0
==
  
  This program is Copyright (C) Zeus Technology Limited 1996.
  
  This program may be used and copied freely providing this copyright notice
  is not removed.
  
  This software is provided as is and any express or implied waranties, 
  including but not limited to, the implied warranties of merchantability and
  fitness for a particular purpose are disclaimed.  In no event shall 
  Zeus Technology Ltd. be liable for any direct, indirect, incidental, special, 
  exemplary, or consequential damaged (including, but not limited to, 
  procurement of substitute good or services; loss of use, data, or profits;
  or business interruption) however caused and on theory of liability.  Whether
  in contract, strict liability or tort (including negligence or otherwise) 
  arising in any way out of the use of this software, even if advised of the
  possibility of such damage 
  
   Written by Adam Twiss ([EMAIL PROTECTED]).  February 1996
  
  */
  
  #ifdef SUNOS
  /* for some reason my SunOS headers did not have these defined */
  extern char *optarg;
  extern int optind, opterr, optopt;
  #endif
  
  /* #include sys/filio.h*/
  
  #include sys/time.h 
  #include unistd.h
  #include stdlib.h
  #include stdio.h
  #include fcntl.h
  #include sys/socket.h
  #include netinet/in.h
  #include netdb.h 
  #include errno.h
  #include sys/ioctl.h
  #include string.h
  
  /* --- DEFINITIONS -- */
  
  /* good old state machine */
  #define STATE_UNCONNECTED 0
  #define STATE_CONNECTING  1
  #define STATE_READ2
  
  #define CBUFFSIZE   512
  
  struct connection 
  {
int fd;
int state;
int read;   /* amount of bytes read */
int bread;  /* amount of body read */
int length; /* Content-Length value used for keep-alive */
char cbuff[CBUFFSIZE];  /* a buffer to store server response header */
int cbx;/* offset in cbuffer */
int keepalive;  /* non-zero if a keep-alive request */
int gotheader;  /* non-zero if we have the entire header in cbuff */
struct timeval start, connect, done; 
  };
  
  struct data 
  {
int read;  /* number of bytes read */
int ctime; /* time in ms to connect */
int time;  /* time in ms for connection */
  };
  
  #define min(a,b) ((a)(b))?(a):(b)
  #define max(a,b) ((a)(b))?(a):(b)
  
  /* - GLOBALS  */
  
  int requests = 1;  /* Number of requests to make */
  int concurrency = 1;   /* Number of multiple requests to make */
  int tlimit = 0;/* time limit in cs */
  int keepalive = 0; /* try and do keepalive connections */
  char *machine; /* Machine name */
  char *file;/* file name to use */
  char server_name[80];  /* name that server reports */
  int port = 80; /* port to use */
  
  int doclen = 0;/* the length the document should be */
  int totalread = 0; /* total number of bytes read */
  int totalbread = 0;/* totoal amount of entity body read */
  int done=0;/* number of requests we have done */
  int doneka=0;  /* number of keep alive connections done */
  int good=0, bad=0; /* number of good and bad requests */
  
  /* store error cases */
  int err_length = 0, err_conn = 0, err_except = 0;
  
  struct timeval start, end;
  
  /* global request (and its length) */
  char request[512];
  int reqlen;
  
  /* one global throw-away buffer to read stuff into */
  char buffer[4096];
  
  struct connection *con;  /* connection array */
  struct data *stats;  /* date for each request */
  
  fd_set readbits, writebits;  /* bits for select */
  struct sockaddr_in server;   /* server addr structure */
  
  /* - */
  
  /* simple little function to perror and exit */
  
  static void err(char *s) 
  {
perror(s);
exit(errno);
  }
  
  /* - */
  
  /* write out request to a connection - assumes we can write 
 (small) request out in one go into our new socket buffer  */
  
  void write_request(struct connection *c)
  {
gettimeofday(c-connect,0);
write(c-fd,request, reqlen);  
c-state = STATE_READ;
FD_SET(c-fd, readbits);
FD_CLR(c-fd, writebits);
  }
  
  /* - */
  
  /* make an fd non blocking */
  
  void nonblock(int fd) 

cvs commit: apachen/src/test test-writev.c

1997-11-10 Thread dgaudet
dgaudet 97/11/09 18:03:40

  Added:   src/test test-writev.c
  Log:
  Another little ditty from my box of test programs.
  
  Revision  ChangesPath
  1.1  apachen/src/test/test-writev.c
  
  Index: test-writev.c
  ===
  /*
  test-writev: use this to figure out if your writev() does intelligent
  things on the network.  Some writev()s when given multiple buffers
  will break them up into multiple packets, which is a waste.
  
  Linux prior to 2.0.31 has this problem.
  
  Solaris 2.5, 2.5.1 doesn't appear to, 2.6 hasn't been tested.
  
  IRIX 5.3 doesn't have this problem.
  
  To use this you want to snoop the wire with tcpdump, and then run
  test-writev a.b.c.d port# ... against some TCP service on another
  box.  For example you can run it against port 80 on another server.
  You want to look to see how many data packets are sent, you're hoping
  only one of size 300 is sent.
  */
  
  #include stdio.h
  #include sys/types.h
  #include sys/socket.h
  #include netinet/in.h
  #include stdlib.h
  #include unistd.h
  #include arpa/inet.h
  #include sys/uio.h
  #include errno.h
  
  #ifndef INADDR_NONE
  #define INADDR_NONE (-1ul)
  #endif
  
  void main( int argc, char **argv )
  {
  struct sockaddr_in server_addr;
  int s;
  struct iovec vector[3];
  char buf[100];
  int i;
  const int just_say_no = 1;
  
  if( argc != 3 ) {
  usage:
fprintf( stderr, usage: test-writev a.b.c.d port#\n );
exit( 1 );
  }
  server_addr.sin_family = AF_INET;
  server_addr.sin_addr.s_addr = inet_addr( argv[1] );
  if( server_addr.sin_addr.s_addr == INADDR_NONE ) {
fprintf( stderr, bogus address\n );
goto usage;
  }
  server_addr.sin_port = htons( atoi( argv[2] ) );
  
  s = socket( AF_INET, SOCK_STREAM, 0 );
  if( s  0 ) {
perror(socket);
exit(1);
  }
  if( connect( s, (struct sockaddr *)server_addr, sizeof( server_addr ) )
!= 0 ) {
perror(connect);
exit(1);
  }
  
  if( setsockopt(s, IPPROTO_TCP, TCP_NODELAY, (char*)just_say_no,
sizeof(just_say_no)) != 0 ) {
perror( TCP_NODELAY );
exit(1);
  }
  /* now build up a two part writev and write it out */
  for( i = 0; i  sizeof( buf ); ++i ) {
buf[i] = 'x';
  }
  vector[0].iov_base = buf;
  vector[0].iov_len = sizeof(buf);
  vector[1].iov_base = buf;
  vector[1].iov_len = sizeof(buf);
  vector[2].iov_base = buf;
  vector[2].iov_len = sizeof(buf);
  
  i = writev( s, vector[0], 3 );
  fprintf( stdout, i=%d, errno=%d\n, i, errno );
  exit(0);
  }
  
  
  


cvs commit: apachen/src/test zb.c

1997-11-10 Thread dgaudet
dgaudet 97/11/09 18:06:03

  Modified:src/test zb.c
  Log:
  Update to v1.01.
  
  Obtained from:http://www.zeus.co.uk/misc/zb.c
  
  Revision  ChangesPath
  1.2   +74 -33apachen/src/test/zb.c
  
  Index: zb.c
  ===
  RCS file: /export/home/cvs/apachen/src/test/zb.c,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- zb.c  1997/11/10 01:55:47 1.1
  +++ zb.c  1997/11/10 02:06:02 1.2
  @@ -1,6 +1,6 @@
   
  -/*  ZeusBench V1.0
  - ==
  +/*  ZeusBench V1.01
  + ===
   
   This program is Copyright (C) Zeus Technology Limited 1996.
   
  @@ -16,21 +16,38 @@
   or business interruption) however caused and on theory of liability.  Whether
   in contract, strict liability or tort (including negligence or otherwise) 
   arising in any way out of the use of this software, even if advised of the
  -possibility of such damage 
  +possibility of such damage.
   
  - Written by Adam Twiss ([EMAIL PROTECTED]).  February 1996
  + Written by Adam Twiss ([EMAIL PROTECTED]).  March 1996
  +
  +Thanks to the following people for their input:
  +  Mike Belshe ([EMAIL PROTECTED]) 
  +  Michael Campanella ([EMAIL PROTECTED])
   
   */
   
  -#ifdef SUNOS
  -/* for some reason my SunOS headers did not have these defined */
  -extern char *optarg;
  -extern int optind, opterr, optopt;
  +/*  Notes on compiling --
  +
  +This should compile unmodified using gcc on HP-UX, FreeBSD, Linux,
  +IRIX, Solaris, AIX and Digital Unix (OSF).  On Solaris 2.x you will
  +need to compile with -lnsl -lsocket options.  If you have any
  +difficulties compiling then let me know.
  +
  +On SunOS 4.x.x you may need to compile with -DSUNOS4 to add the following 
  +two lines of code which appear not to exist in my SunOS headers */
  +
  +#ifdef SUNOS4
  +extern char *optarg; 
  +extern int optind, opterr, optopt;   
   #endif
   
  -/* #include sys/filio.h*/
  +/*   */
  +
  +/* affects include files on Solaris */
  +#define BSD_COMP
   
   #include sys/time.h 
  +#include sys/ioctl.h
   #include unistd.h
   #include stdlib.h
   #include stdio.h
  @@ -44,6 +61,9 @@
   
   /* --- DEFINITIONS -- */
   
  +/* maximum number of requests on a time limited test */
  +#define MAX_REQUESTS 5 
  +
   /* good old state machine */
   #define STATE_UNCONNECTED 0
   #define STATE_CONNECTING  1
  @@ -96,7 +116,7 @@
   /* store error cases */
   int err_length = 0, err_conn = 0, err_except = 0;
   
  -struct timeval start, end;
  +struct timeval start, endtime;
   
   /* global request (and its length) */
   char request[512];
  @@ -168,12 +188,12 @@
   {
 int timetaken;
 
  -  gettimeofday(end,0);
  -  timetaken = timedif(end, start);
  +  gettimeofday(endtime,0);
  +  timetaken = timedif(endtime, start);
 
 printf(\n---\n);
 printf(Server: %s\n, server_name);
  -  printf(Doucment Length:%d\n, doclen);  
  +  printf(Document Length:%d\n, doclen);  
 printf(Concurency Level:   %d\n, concurrency);
 printf(Time taken for tests:   %d.%03d seconds\n, 
 timetaken/1000, timetaken%1000);
  @@ -229,10 +249,13 @@
 c-keepalive = 0;
 c-cbx = 0; 
 c-gotheader = 0;
  +
 c-fd = socket(AF_INET, SOCK_STREAM, 0);
 if(c-fd0) err(socket);
  +
 nonblock(c-fd);
 gettimeofday(c-start,0);
  +
 if(connect(c-fd, (struct sockaddr *) server, sizeof(server))0) {
   if(errno==EINPROGRESS) {
 c-state = STATE_CONNECTING;
  @@ -260,19 +283,28 @@
   
   void close_connection(struct connection *c)
   {
  -  if(good==1) {
  -/* first time here */
  -doclen = c-bread;
  -  } else if(c-bread!=doclen) { bad++; err_length++; }
  -
  -  /* save out time */
  -  if(done  requests) {
  -struct data s;
  -gettimeofday(c-done,0);
  -s.read = c-read;
  -s.ctime = timedif(c-connect, c-start);
  -s.time = timedif(c-done, c-start);
  -stats[done++] = s;
  +  if(c-read == 0  c-keepalive) {
  +/* server has legitiamately shut down an idle keep alive request */
  +good--;  /* connection never happend */
  +  } 
  +  else {
  +if(good==1) {
  +  /* first time here */
  +  doclen = c-bread;
  +} else if (c-bread!=doclen) { 
  +  bad++; 
  +  err_length++; 
  +}
  +
  +/* save out time */
  +if(done  requests) {
  +  struct data s;
  +  gettimeofday(c-done,0);
  +  s.read = c-read;
  +  s.ctime = timedif(c-connect, c-start);
  +  s.time = timedif(c-done, c-start);
  +  stats[done++] = s;
  +}
 }
   
 close(c-fd);
  @@ -316,6 +348,7 @@
   /* this next line is so that 

cvs commit: apachen/src/test/vhtest - New directory

1997-11-10 Thread dgaudet
dgaudet 97/11/09 18:08:33

  apachen/src/test/vhtest - New directory


cvs commit: apachen/src/test/vhtest/bin - New directory

1997-11-10 Thread dgaudet
dgaudet 97/11/09 18:08:53

  apachen/src/test/vhtest/bin - New directory


cvs commit: apachen/src/test/vhtest/docroot - New directory

1997-11-10 Thread dgaudet
dgaudet 97/11/09 18:08:55

  apachen/src/test/vhtest/docroot - New directory


cvs commit: apachen/src/test/vhtest/logs - New directory

1997-11-10 Thread dgaudet
dgaudet 97/11/09 18:08:56

  apachen/src/test/vhtest/logs - New directory


cvs commit: apachen/src/test/vhtest/docroot/default2 - New directory

1997-11-10 Thread dgaudet
dgaudet 97/11/09 18:09:42

  apachen/src/test/vhtest/docroot/default2 - New directory


cvs commit: apachen/src/test/vhtest/docroot/main - New directory

1997-11-10 Thread dgaudet
dgaudet 97/11/09 18:09:45

  apachen/src/test/vhtest/docroot/main - New directory


cvs commit: apachen/src/test/vhtest/docroot/vhost1 - New directory

1997-11-10 Thread dgaudet
dgaudet 97/11/09 18:09:47

  apachen/src/test/vhtest/docroot/vhost1 - New directory


cvs commit: apachen/src/test/vhtest/docroot/vhost4 - New directory

1997-11-10 Thread dgaudet
dgaudet 97/11/09 18:09:51

  apachen/src/test/vhtest/docroot/vhost4 - New directory


cvs commit: apachen/src/test/vhtest/docroot/vhost3 - New directory

1997-11-10 Thread dgaudet
dgaudet 97/11/09 18:09:50

  apachen/src/test/vhtest/docroot/vhost3 - New directory


cvs commit: apachen/src/test/vhtest/docroot/vhost2 - New directory

1997-11-10 Thread dgaudet
dgaudet 97/11/09 18:09:49

  apachen/src/test/vhtest/docroot/vhost2 - New directory


cvs commit: apachen/src/test/vhtest/docroot/vhost5 - New directory

1997-11-10 Thread dgaudet
dgaudet 97/11/09 18:09:52

  apachen/src/test/vhtest/docroot/vhost5 - New directory


cvs commit: apachen/src/test/vhtest/docroot/vhost5 vhost.txt

1997-11-10 Thread dgaudet
dgaudet 97/11/09 18:11:56

  Added:   src/test/vhtest README runtest
   src/test/vhtest/bin test1 test1d test2 test2d test3 test4
test5 test6 vhget
   src/test/vhtest/conf common.conf mime.types test1.conf
test1d.conf test2.conf test2d.conf test3.conf
test4.conf test5.conf test6.conf
   src/test/vhtest/docroot/default1 vhost.txt
   src/test/vhtest/docroot/default2 vhost.txt
   src/test/vhtest/docroot/default3 vhost.txt
   src/test/vhtest/docroot/main vhost.txt
   src/test/vhtest/docroot/vhost1 vhost.txt
   src/test/vhtest/docroot/vhost2 vhost.txt
   src/test/vhtest/docroot/vhost3 vhost.txt
   src/test/vhtest/docroot/vhost4 vhost.txt
   src/test/vhtest/docroot/vhost5 vhost.txt
  Log:
  add the vhost test suite
  
  Revision  ChangesPath
  1.1  apachen/src/test/vhtest/README
  
  Index: README
  ===
  This is a basic test of the virtual host functionality.
  
  At present it *does not test*:
  
  - ServerPath
  - VirtualHost DNS lookups (specifically, multiple A records is interesting)
  
  It does test the basic gear that uses ip addresses and ports to decide what
  ip-vhost or set of name-vhosts are to be considered.  It tests _default_
  behaviour with both explicit and wildcard ports.  It tests the precedence
  behaviour -- i.e. earlier vhosts have higher precedence than later vhosts.
  It has a basic ServerAlias test.
  
  It also tests some error conditions.
  
  These tests are white box tests, i.e. I know how the code is written and
  I'm testing very specific cases within the code.  Black box tests would
  be nice too.
  
  To use:
  
  cd conf
  perl -pi.orig -e s#/home/dgaudet/ap/vhtest#`pwd`# *.conf
  cd ..
  ./runtest /path/to/httpd
  
  Or to run a specific test:
  
  ./runtest /path/to/httpd test3
  
  The output looks something like:
  
  127.0.0.1:8080   ''   'vhost1'   : passed
  127.0.0.1:8080   'vhost1:8080''vhost1'   : passed
  127.0.0.1:8080   'vhost2:8080''vhost1'   : passed
  127.0.0.1:8081   ''   'vhost2'   : passed
  127.0.0.1:8081   'vhost2:8081''vhost2'   : passed
  127.0.0.1:8081   'vhost1:8081''vhost2'   : passed
  127.0.0.2:8080   ''   'vhost3'   : passed
  
  The first column is the ipaddr:port connected to.  The second column is
  the Host: header sent ('' means no Host: header sent).  The third column
  is the vhost expected.
  
  It probably only works on Linux because it uses the loopback interface for
  all tests -- and Linux lo0 responds to *all* addresses in 127/8 rather than
  just 127.0.0.1.  You'd probably have to add the following aliases to other
  boxes:
  
  127.0.0.2
  127.0.0.3
  127.0.0.4
  127.0.0.5
  
  Dean
  
  
  
  1.1  apachen/src/test/vhtest/runtest
  
  Index: runtest
  ===
  #!/bin/sh
  
  if [ $# -lt 1 ]; then
  echo usage: runtest /path/to/httpd 12
  exit 1
  fi;
  
  httpd=$1
  shift
  pwd=`pwd`
  
  
  if [ $# = 0 ]; then
  list=conf/test*.conf
  else
  list=$*
  fi
  
  pid=0
  exitcode=0
  trap 'kill $pid /dev/null 21; exit $exitcode' 0 1 2 3 15
  
  for i in $list; do
  j=`echo $i | sed -e 's#.*/##' -e 's#\.conf$##'`
  echo ''
  echo  $j 
  f=$pwd/conf/$j.conf
  grep '^##' $f
  $httpd -f $f
  # such a pain to wait for the pid file to be created
  sleep 1
  pid=`cat logs/httpd.pid`
  
  sh bin/$j
  
  # such a pain to know if it has finished
  kill $pid
  sleep 1
  while kill -0 $pid /dev/null 21; do
sleep 1
  done
  done
  
  
  
  1.1  apachen/src/test/vhtest/bin/test1
  
  Index: test1
  ===
  bin/vhget 127.0.0.1 8080 '' vhost1
  bin/vhget 127.0.0.1 8080 vhost1:8080 vhost1
  bin/vhget 127.0.0.1 8080 vhost2:8080 vhost1
  
  bin/vhget 127.0.0.2 8080 '' vhost2
  bin/vhget 127.0.0.2 8080 vhost2:8080 vhost2
  bin/vhget 127.0.0.2 8080 vhost1:8080 vhost2
  
  bin/vhget 127.0.0.3 8080 '' vhost3
  bin/vhget 127.0.0.3 8080 vhost3:8080 vhost3
  bin/vhget 127.0.0.3 8080 vhost4:8080 vhost4
  
  bin/vhget 127.0.0.4 8080 '' main
  bin/vhget 127.0.0.4 8080 'vhost1' main
  bin/vhget 127.0.0.4 8080 'vhost2' main
  
  
  
  1.1  apachen/src/test/vhtest/bin/test1d
  
  Index: test1d
  ===
  bin/vhget 127.0.0.1 8080 '' vhost1
  bin/vhget 127.0.0.1 8080 vhost1:8080 vhost1
  bin/vhget 127.0.0.1 8080 vhost2:8080 vhost1
  
  bin/vhget 127.0.0.2 8080 '' vhost2
  bin/vhget 127.0.0.2 

cvs commit: apache-site bugdb.cgi

1997-11-10 Thread coar
coar97/11/10 14:23:24

  Modified:.bugdb.cgi
  Log:
Added two canned-response buttons alongside the Edit button.
Editors can now one-step-close a PR with canned text about it
being a duplicate (read the FAQ and search the db), or about
it being a CGI/basic configuration issue (read the FAQ, search
the db, and check the newsgroups).
  
  Revision  ChangesPath
  1.17  +60 -5 apache-site/bugdb.cgi
  
  Index: bugdb.cgi
  ===
  RCS file: /export/home/cvs/apache-site/bugdb.cgi,v
  retrieving revision 1.16
  retrieving revision 1.17
  diff -u -r1.16 -r1.17
  --- bugdb.cgi 1997/11/09 17:04:58 1.16
  +++ bugdb.cgi 1997/11/10 22:23:23 1.17
  @@ -54,6 +54,8 @@
   #occlude things like mod_auth-any.
   #  11/9/1997 Ken Coar - Make general the default category on new PRs,
   #and non-critical the default severity.
  +#  11/10/1997 Ken Coar - Added some canned response buttons on the
  +#full display page seen by authorised editors.
   #
   ### End Modification log
   
  @@ -191,7 +193,7 @@
   ### Main menu
   } elsif ($PATH_INFO eq ) {
   main_menu();
  -print HRSMALLVersion: 9 November 1997BRAuthors: ,
  +print HRSMALLVersion: 10 November 1997BRAuthors: ,
A HREF=\http://alumni.caltech.edu/~dank/gnats.html\;Dan Kegel ,
and Huy Le/A, BR ,
with revamp work by ,
  @@ -1376,11 +1378,64 @@
print $err\n;
   } else {
if ($ENV{'REMOTE_USER'}) {
  + local ($timestamp) = timestamp($fullpr);
print EOM;
  -FORM ACTION=$SCRIPT_NAME/edit_pr
  -INPUT TYPE=submit VALUE=Click here to edit
  -INPUT NAME=pr TYPE=hidden VALUE=$pr
  -/FORM
  +TABLE
  + TR ALIGN=LEFT VALIGN=MIDDLE
  +  TD
  +   FORM ACTION=$SCRIPT_NAME/edit_pr
  +INPUT TYPE=submit VALUE= Edit 
  +INPUT NAME=pr TYPE=hidden VALUE=$pr
  +   /FORM
  +  /TD
  +  TDSTRONGEdit this problem report/STRONG
  +  /TD
  + /TR
  + TR ALIGN=LEFT VALIGN=MIDDLE
  +  TD
  +   FORM METHOD=POST 
ACTION=$SCRIPT_NAME/handle_edit_pr/$pr$fieldvalues{'State'}$timestamp
  +INPUT TYPE=submit VALUE=Close
  +
  +INPUT TYPE=hidden NAME=Editor VALUE=$ENV{'REMOTE_USER'}
  +INPUT TYPE=hidden NAME=Synopsis VALUE=
  +INPUT TYPE=hidden NAME=Originator 
VALUE=$fieldvalues{'Originator'}
  +INPUT TYPE=hidden NAME=Class VALUE=duplicate
  +INPUT TYPE=hidden NAME=Release VALUE=$fieldvalues{'Release'}
  +INPUT TYPE=hidden NAME=Severity VALUE=$fieldvalues{'Severity'}
  +INPUT TYPE=hidden NAME=State VALUE=closed
  +INPUT TYPE=hidden NAME=StateReason VALUE=[This is a standard 
response.]\nThis issue has been reported before;\nplease search the FAQ and the 
bug database.\nThanks for using Apache!
  +INPUT TYPE=hidden NAME=Category VALUE=$fieldvalues{'Category'}
  +INPUT TYPE=hidden NAME=Responsible 
VALUE=$fieldvalues{'Responsible'}
  +INPUT TYPE=hidden NAME=ResponsibleReason VALUE=
  +   /FORM
  +  /TD
  +  TDSTRONGClose as being a duplicate report.  (Refers submitter to bugdb
  +   and the FAQ.)/STRONG
  + /TR
  + TR ALIGN=LEFT VALIGN=MIDDLE
  +  TD
  +   FORM METHOD=POST 
ACTION=$SCRIPT_NAME/handle_edit_pr/$pr$fieldvalues{'State'}$timestamp
  +INPUT TYPE=submit VALUE=Close
  +
  +INPUT TYPE=hidden NAME=Editor VALUE=$ENV{'REMOTE_USER'}
  +INPUT TYPE=hidden NAME=Synopsis VALUE=
  +INPUT TYPE=hidden NAME=Originator 
VALUE=$fieldvalues{'Originator'}
  +INPUT TYPE=hidden NAME=Class VALUE=mistaken
  +INPUT TYPE=hidden NAME=Release VALUE=$fieldvalues{'Release'}
  +INPUT TYPE=hidden NAME=Severity VALUE=non-critical
  +INPUT TYPE=hidden NAME=State VALUE=closed
  +INPUT TYPE=hidden NAME=StateReason VALUE=[This is a standard 
response.]\nThis is a CGI programming or basic configuration issue.\nAs 
mentioned on the main bug database page, we must refer\nall such basic or 
non-Apache-related questions to the\ncomp.infosystems.www.servers.unix and 
related newsgroups.\nPlease ask your question there.\nPlease also search the 
FAQ and the bug database.\nThanks for using Apache!
  +INPUT TYPE=hidden NAME=Category VALUE=$fieldvalues{'Category'}
  +INPUT TYPE=hidden NAME=Responsible 
VALUE=$fieldvalues{'Responsible'}
  +INPUT TYPE=hidden NAME=ResponsibleReason VALUE=
  +   /FORM
  +  /TD
  +  TDSTRONGClose as concerning CGI, basic configuration, or something else
  +   with which we say we don't provide assistance.  (Refers submitter to
  +   newsgroups and FAQ.)/STRONG
  +  /TD
  + /TR
  +/TABLE
   EOM
   }
print H2Full text of PR number $pr:/H2\npre\n;