README for the "changeup" interface example.
$Id: README,v 1.3 1995/09/20 20:00:29 spreitze Exp $

[ Copyright (c) 1994 Xerox Corporation.  All Rights Reserved.  

  Unlimited use, reproduction, and distribution of this software is
  permitted.  Any copy of this software must include both the above
  copyright notice of Xerox Corporation and this paragraph.  Any
  distribution of this software must comply with all applicable United
  States export control laws.  This software is made available AS IS,
  and XEROX CORPORATION DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED,
  INCLUDING WITHOUT LIMITATION THE IMPLIED WARRANTIES OF MERCHANTABILITY
  AND FITNESS FOR A PARTICULAR PURPOSE, AND NOTWITHSTANDING ANY OTHER
  PROVISION CONTAINED HEREIN, ANY LIABILITY FOR DAMAGES RESULTING FROM
  THE SOFTWARE OR ITS USE IS EXPRESSLY DISCLAIMED, WHETHER ARISING IN
  CONTRACT, TORT (INCLUDING NEGLIGENCE) OR STRICT LIABILITY, EVEN IF
  XEROX CORPORATION IS ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. ]

"changeup" is tests closing servers and connections and recovery from such things.

To build:

% ilumkmf
% make

There is one server program that exhibits three behaviors.  It periodically:
0 -	closes the idle incoming connections;
1 -	closes its port and opens a new one (not implemented yet); or
2 -	closes its server and starts a new one (same server ID).
Usage: c-server [-p <pinfo>] [-t <tinfo>] <style: {0, 1, 2}> <period: unsigned (secs)>
You want the server's period to be longer than twice the client's period.

There is one client program that exhibits 5 behaviors.  It periodically uses the server.  It has an additional behavior in which it engages either every period or only when an error occurs.  That additional behavior is one of:
0 -	calls ilu_ReLookupObject;
1 -	calls ILU_C_ValidateOrDestroyObjSvr then ILU_C_LookupObject if needed; or
2 -	calls ILU_C_DestroyObjectAndServer then ILU_C_LookupObject.
Usage: c-client <always: C-bool> <destroy: {0, 1, 2}> <period: unsigned (secs)>
There are only 5 behaviors, instead of 6, because
	c-client 0 1 P
is the same as
	c-client 0 2 P
.  The client runs an infinite loop.  Except for `c-client 1 2 P`, expect to see unusual error recovery things happen at the end of a period in which the server does something; messages are prefixed with times so you can check this easily.

To exercise server behavior 0:

% c-server 0 20
ChgUp server, style=0, period=20
793401986 = Tue Feb 21 13:26:26 1995
793402006 FD usage = 1
793402026 FD usage = 1
793402046 FD usage = 1
...


Against that, try these client behaviors:


% c-client 0 0 7
ChgUp test, always=F, destroy=0, period=7
793401990 = Tue Feb 21 13:26:30 1995
793401990 Lookup 1 succeeded (chg=1, sbh=A@ChgUp-Server@sunrpc_2_0x31000400_3202210180|tcp_13.2.116.14_4571).
793401990 Lookup 2 succeeded (chg=0, sbh=B@ChgUp-Server@sunrpc_2_0x31000400_3202210180|tcp_13.2.116.14_4571).

793401990 At top of loop.
793401990 Iteration 0: g1=0, g2=0

793401997 At top of loop.
793401997 Iteration 1: g1=0, g2=0

793402004 At top of loop.
793402004 Iteration 2: g1=0, g2=0

793402011 At top of loop.
793402011 GetBrother(o1) => exn CORBA: communication failure
793402012 Lookup 1 succeeded (chg=0, sbh=A@ChgUp-Server@sunrpc_2_0x31000400_3202210180|tcp_13.2.116.14_4571).
793402012 Lookup 2 succeeded (chg=0, sbh=B@ChgUp-Server@sunrpc_2_0x31000400_3202210180|tcp_13.2.116.14_4571).

793402012 At top of loop.
793402012 Iteration 3: g1=1, g2=1

793402019 At top of loop.
793402019 Iteration 4: g1=1, g2=1
...


% c-client 0 2 7
ChgUp test, always=F, destroy=2, period=7
793402044 = Tue Feb 21 13:27:24 1995
793402044 Lookup 1 succeeded (chg=1, sbh=A@ChgUp-Server@sunrpc_2_0x31000400_3202210180|tcp_13.2.116.14_4571).
793402044 Lookup 2 succeeded (chg=0, sbh=B@ChgUp-Server@sunrpc_2_0x31000400_3202210180|tcp_13.2.116.14_4571).

793402044 At top of loop.
793402044 Iteration 0: g1=2, g2=2

793402051 At top of loop.
793402051 GetBrother(o1) => exn CORBA: communication failure
793402051 Lookup 1 succeeded (chg=1, sbh=A@ChgUp-Server@sunrpc_2_0x31000400_3202210180|tcp_13.2.116.14_4571).
793402051 Lookup 2 succeeded (chg=0, sbh=B@ChgUp-Server@sunrpc_2_0x31000400_3202210180|tcp_13.2.116.14_4571).

793402051 At top of loop.
793402051 Iteration 1: g1=3, g2=3

793402058 At top of loop.
793402058 Iteration 2: g1=3, g2=3
...


% c-client 1 0 7
ChgUp test, always=T, destroy=0, period=7
793402118 = Tue Feb 21 13:28:38 1995

793402118 At top of loop.
793402118 Lookup 1 succeeded (chg=1, sbh=A@ChgUp-Server@sunrpc_2_0x31000400_3202210180|tcp_13.2.116.14_4571).
793402118 Lookup 2 succeeded (chg=0, sbh=B@ChgUp-Server@sunrpc_2_0x31000400_3202210180|tcp_13.2.116.14_4571).
793402118 Iteration 0: g1=6, g2=6

793402125 At top of loop.
793402125 Lookup 1 succeeded (chg=0, sbh=A@ChgUp-Server@sunrpc_2_0x31000400_3202210180|tcp_13.2.116.14_4571).
793402125 Lookup 2 succeeded (chg=0, sbh=B@ChgUp-Server@sunrpc_2_0x31000400_3202210180|tcp_13.2.116.14_4571).
793402125 Iteration 1: g1=6, g2=6

793402132 At top of loop.
793402132 Lookup 1 failed.
793402133 Lookup 1 succeeded (chg=0, sbh=A@ChgUp-Server@sunrpc_2_0x31000400_3202210180|tcp_13.2.116.14_4571).
793402133 Lookup 2 succeeded (chg=0, sbh=B@ChgUp-Server@sunrpc_2_0x31000400_3202210180|tcp_13.2.116.14_4571).
793402133 Iteration 2: g1=7, g2=7

793402140 At top of loop.
793402140 Lookup 1 succeeded (chg=0, sbh=A@ChgUp-Server@sunrpc_2_0x31000400_3202210180|tcp_13.2.116.14_4571).
793402140 Lookup 2 succeeded (chg=0, sbh=B@ChgUp-Server@sunrpc_2_0x31000400_3202210180|tcp_13.2.116.14_4571).
793402140 Iteration 3: g1=7, g2=7
...


% c-client 1 1 7
ChgUp test, always=T, destroy=1, period=7
793402154 = Tue Feb 21 13:29:14 1995

793402154 At top of loop.
793402154 Lookup 1 succeeded (chg=1, sbh=A@ChgUp-Server@sunrpc_2_0x31000400_3202210180|tcp_13.2.116.14_4571).
793402154 Lookup 2 succeeded (chg=0, sbh=B@ChgUp-Server@sunrpc_2_0x31000400_3202210180|tcp_13.2.116.14_4571).
793402155 Iteration 0: g1=8, g2=8

793402162 At top of loop.
793402162 Iteration 1: g1=8, g2=8

793402169 At top of loop.
793402169 Lookup 1 succeeded (chg=1, sbh=A@ChgUp-Server@sunrpc_2_0x31000400_3202210180|tcp_13.2.116.14_4571).
793402169 Lookup 2 succeeded (chg=0, sbh=B@ChgUp-Server@sunrpc_2_0x31000400_3202210180|tcp_13.2.116.14_4571).
793402169 Iteration 2: g1=9, g2=9

793402176 At top of loop.
793402176 Iteration 3: g1=9, g2=9
...


% c-client 1 2 7
ChgUp test, always=T, destroy=2, period=7
793402195 = Tue Feb 21 13:29:55 1995

793402195 At top of loop.
793402195 Lookup 1 succeeded (chg=1, sbh=A@ChgUp-Server@sunrpc_2_0x31000400_3202210180|tcp_13.2.116.14_4571).
793402195 Lookup 2 succeeded (chg=0, sbh=B@ChgUp-Server@sunrpc_2_0x31000400_3202210180|tcp_13.2.116.14_4571).
793402195 Iteration 0: g1=10, g2=10

793402202 At top of loop.
793402202 Lookup 1 succeeded (chg=1, sbh=A@ChgUp-Server@sunrpc_2_0x31000400_3202210180|tcp_13.2.116.14_4571).
793402202 Lookup 2 succeeded (chg=0, sbh=B@ChgUp-Server@sunrpc_2_0x31000400_3202210180|tcp_13.2.116.14_4571).
793402202 Iteration 1: g1=10, g2=10

793402209 At top of loop.
793402209 Lookup 1 succeeded (chg=1, sbh=A@ChgUp-Server@sunrpc_2_0x31000400_3202210180|tcp_13.2.116.14_4571).
793402209 Lookup 2 succeeded (chg=0, sbh=B@ChgUp-Server@sunrpc_2_0x31000400_3202210180|tcp_13.2.116.14_4571).
793402209 Iteration 2: g1=11, g2=11

793402216 At top of loop.
793402216 Lookup 1 succeeded (chg=1, sbh=A@ChgUp-Server@sunrpc_2_0x31000400_3202210180|tcp_13.2.116.14_4571).
793402216 Lookup 2 succeeded (chg=0, sbh=B@ChgUp-Server@sunrpc_2_0x31000400_3202210180|tcp_13.2.116.14_4571).
793402217 Iteration 3: g1=11, g2=11
...


To exercise server behavior 2:

% c-server 2 20
ChgUp server, style=2, period=20
793402291 = Tue Feb 21 13:31:31 1995
793402311 Closing server...
793402311 Server restarted
793402331 Closing server...
793402331 Server restarted
...


Against that, try these client behaviors:


% c-client 0 0 7
ChgUp test, always=F, destroy=0, period=7
793402296 = Tue Feb 21 13:31:36 1995
793402297 Lookup 1 succeeded (chg=1, sbh=A@ChgUp-Server@sunrpc_2_0x31000400_3202210180|tcp_13.2.116.14_4572).
793402297 Lookup 2 succeeded (chg=0, sbh=B@ChgUp-Server@sunrpc_2_0x31000400_3202210180|tcp_13.2.116.14_4572).

793402297 At top of loop.
793402297 Iteration 0: g1=0, g2=0

793402304 At top of loop.
793402304 Iteration 1: g1=0, g2=0

793402311 At top of loop.
793402311 Iteration 2: g1=0, g2=0

793402318 At top of loop.
793402318 GetBrother(o1) => exn CORBA: communication failure
793402318 Lookup 1 succeeded (chg=1, sbh=A@ChgUp-Server@sunrpc_2_0x31000400_3202210180|tcp_13.2.116.14_4573).
793402318 Lookup 2 succeeded (chg=0, sbh=B@ChgUp-Server@sunrpc_2_0x31000400_3202210180|tcp_13.2.116.14_4573).

793402318 At top of loop.
793402318 Iteration 3: g1=1, g2=1
...


% c-client 0 1 7
ChgUp test, always=F, destroy=1, period=7
793402359 = Tue Feb 21 13:32:39 1995
793402360 Lookup 1 succeeded (chg=1, sbh=A@ChgUp-Server@sunrpc_2_0x31000400_3202210180|tcp_13.2.116.14_4575).
793402360 Lookup 2 succeeded (chg=0, sbh=B@ChgUp-Server@sunrpc_2_0x31000400_3202210180|tcp_13.2.116.14_4575).

793402360 At top of loop.
793402360 Iteration 0: g1=3, g2=3

793402367 At top of loop.
793402367 Iteration 1: g1=3, g2=3

793402374 At top of loop.
793402374 GetBrother(o1) => exn CORBA: communication failure
793402374 Lookup 1 succeeded (chg=1, sbh=A@ChgUp-Server@sunrpc_2_0x31000400_3202210180|tcp_13.2.116.14_4576).
793402374 Lookup 2 succeeded (chg=0, sbh=B@ChgUp-Server@sunrpc_2_0x31000400_3202210180|tcp_13.2.116.14_4576).

793402374 At top of loop.
793402374 Iteration 2: g1=4, g2=4

793402381 At top of loop.
793402381 Iteration 3: g1=4, g2=4
...


% c-client 1 0 7
ChgUp test, always=T, destroy=0, period=7
793402402 = Tue Feb 21 13:33:22 1995

793402402 At top of loop.
793402402 Lookup 1 succeeded (chg=1, sbh=A@ChgUp-Server@sunrpc_2_0x31000400_3202210180|tcp_13.2.116.14_4577).
793402402 Lookup 2 succeeded (chg=0, sbh=B@ChgUp-Server@sunrpc_2_0x31000400_3202210180|tcp_13.2.116.14_4577).
793402402 Iteration 0: g1=5, g2=5

793402409 At top of loop.
793402409 Lookup 1 succeeded (chg=0, sbh=A@ChgUp-Server@sunrpc_2_0x31000400_3202210180|tcp_13.2.116.14_4577).
793402409 Lookup 2 succeeded (chg=0, sbh=B@ChgUp-Server@sunrpc_2_0x31000400_3202210180|tcp_13.2.116.14_4577).
793402409 Iteration 1: g1=5, g2=5

793402416 At top of loop.
793402416 Lookup 1 failed.
793402417 Lookup 1 succeeded (chg=1, sbh=A@ChgUp-Server@sunrpc_2_0x31000400_3202210180|tcp_13.2.116.14_4578).
793402417 Lookup 2 succeeded (chg=0, sbh=B@ChgUp-Server@sunrpc_2_0x31000400_3202210180|tcp_13.2.116.14_4578).
793402417 Iteration 2: g1=6, g2=6

793402424 At top of loop.
793402424 Lookup 1 succeeded (chg=0, sbh=A@ChgUp-Server@sunrpc_2_0x31000400_3202210180|tcp_13.2.116.14_4578).
793402424 Lookup 2 succeeded (chg=0, sbh=B@ChgUp-Server@sunrpc_2_0x31000400_3202210180|tcp_13.2.116.14_4578).
793402424 Iteration 3: g1=6, g2=6
...


% c-client 1 1 7
ChgUp test, always=T, destroy=1, period=7
793402445 = Tue Feb 21 13:34:05 1995

793402445 At top of loop.
793402445 Lookup 1 succeeded (chg=1, sbh=A@ChgUp-Server@sunrpc_2_0x31000400_3202210180|tcp_13.2.116.14_4579).
793402445 Lookup 2 succeeded (chg=0, sbh=B@ChgUp-Server@sunrpc_2_0x31000400_3202210180|tcp_13.2.116.14_4579).
793402445 Iteration 0: g1=7, g2=7

793402452 At top of loop.
793402452 Lookup 1 succeeded (chg=1, sbh=A@ChgUp-Server@sunrpc_2_0x31000400_3202210180|tcp_13.2.116.14_4580).
793402452 Lookup 2 succeeded (chg=0, sbh=B@ChgUp-Server@sunrpc_2_0x31000400_3202210180|tcp_13.2.116.14_4580).
793402452 Iteration 1: g1=8, g2=8

793402459 At top of loop.
793402459 Iteration 2: g1=8, g2=8

793402466 At top of loop.
793402466 Iteration 3: g1=8, g2=8
...


% c-client 1 2 7
ChgUp test, always=T, destroy=2, period=7
793402478 = Tue Feb 21 13:34:38 1995

793402478 At top of loop.
793402478 Lookup 1 succeeded (chg=1, sbh=A@ChgUp-Server@sunrpc_2_0x31000400_3202210180|tcp_13.2.116.14_4581).
793402478 Lookup 2 succeeded (chg=0, sbh=B@ChgUp-Server@sunrpc_2_0x31000400_3202210180|tcp_13.2.116.14_4581).
793402478 Iteration 0: g1=9, g2=9

793402485 At top of loop.
793402486 Lookup 1 succeeded (chg=1, sbh=A@ChgUp-Server@sunrpc_2_0x31000400_3202210180|tcp_13.2.116.14_4581).
793402486 Lookup 2 succeeded (chg=0, sbh=B@ChgUp-Server@sunrpc_2_0x31000400_3202210180|tcp_13.2.116.14_4581).
793402486 Iteration 1: g1=9, g2=9

793402493 At top of loop.
793402493 Lookup 1 succeeded (chg=1, sbh=A@ChgUp-Server@sunrpc_2_0x31000400_3202210180|tcp_13.2.116.14_4582).
793402493 Lookup 2 succeeded (chg=0, sbh=B@ChgUp-Server@sunrpc_2_0x31000400_3202210180|tcp_13.2.116.14_4582).
793402493 Iteration 2: g1=10, g2=10

793402500 At top of loop.
793402500 Lookup 1 succeeded (chg=1, sbh=A@ChgUp-Server@sunrpc_2_0x31000400_3202210180|tcp_13.2.116.14_4582).
793402500 Lookup 2 succeeded (chg=0, sbh=B@ChgUp-Server@sunrpc_2_0x31000400_3202210180|tcp_13.2.116.14_4582).
793402500 Iteration 3: g1=10, g2=10
