#!/bin/sh # test 0.1.8 (1999-Dec-20-Mon) # Adam M. Costello ##################### # Basic project tests # # short: Transfer 10,000 bytes. The byte source generates 1000 bytes # per second, 100 at a time, the byte sink never refuses any, # the network never drops, corrupts, duplicates, or reorders # packets. The one-way delay is 0.01 seconds, and buffer_max # is 1000 bytes on both ends. This is identical to what the # original simulator did. # # easy: Like short but transfers 100,000 bytes. # # last_packet: # Like short but transfers 9950 bytes, to see if an oddball-size # last packet is handled. # # small_mtu: # Like easy except max_payload_length = 320 (the smallest # allowable). # # large_mtu: # Like easy except max_payload_length = 65535. # # drop: Like easy except half of all packets are dropped. # # corrupt: # Like easy except half of all packets are corrupted. # # duplicate: # Like easy except half of all packets are duplicated. # # reorder: # Like easy except the max random delay is 2 seconds, so a # packet can arrive before about 20 packets that were sent # later. # # long_delay: # Like easy except the one-way delay is 60 seconds. # # misroute: # Like easy except half of all packets are sent to the wrong # destination. # # flakey_network: # Like easy except 30% of packets are dropped, 30% of the # remainder are duplicated, and the random delay is 2 seconds # (like in reorder). # # erratic_source: # Like easy except the byte source generates anywhere between 1 # and 2000 bytes at a time. # # erratic_sink: # Like easy except the byte sink accepts anywhere between 1 # and 2000 bytes at a time, then processes them at 1000 bytes per # second before accepting more. The source is sped up by a factor # of ten, to 10,000 bytes per second. # # erratic_both: # A combination of erratic_source and erratic_sink. # # erratic_flakey: # A combination of erratic_both and flakey_network. # # reinit: Does an easy test, deletes the connection, and does another # easy test, to see whether deletion and reinitialization works. # # strange_address: # Like easy, but the source address is 63 zeros and the sink # address is 64 zeros, to check whether arbitrary addresses are # handled properly. # # cheat: Like easy, but runs the transport source and sink in separate # processes, to prevent communication using global variables. # # platform: # Like easy, but run the transport source and sink on # different platforms. Suggestions: HP is 32-bit big-endian, # x86 is 32-bit little-endian, Alpha is 64-bit little-endian, # SPARC is 32-bit (?) big-endian. #################### # Flow control tests # # buffer_max: # Like erratic_both, but verify that buffer_max is being # respected. # # small_source_buffer: # Like buffer_max, but source's buffer_max is 1, and only 1000 # bytes are transferred. # # small_sink_buffer: # Like buffer_max, but sink's buffer_max is 1, and only 1000 # bytes are transferred. # # small_buffers: # A combination of small_source_buffer and small_sink_buffer. # # stop_source: # Like erratic_source, but the byte sink accepts only 4000 # bytes, and the transport sink's buffer_max is 4, so bytes 4004 # through 4007 should never be sent, which we verify. # # start_source: # Like stop_source, except the byte sink accepts only 1 byte, so # bytes 5 through 8 should never be sent. ################## # Efficiency tests # # speed: Like easy, except the byte source rate is 1 Mbps. The # throughput should be almost 1000 bytes / 0.02 seconds = # 400 kbps. # # speed_slow: # Like easy, except the one-way delay is 10 seconds. The # throughput should be almost 1000 bytes / 20 seconds = # 0.4 kbps. # # speed_fast: # Like easy, except source and sink buffer_max are 10,000 bytes # and the byte source rate is 10 Mbps. Throughput should be # close to 10,000 bytes / 0.02 seconds = 4000 kbps. #################### # Multiplexing tests # # multiplex: # Like easy, but create three connections, two with the same # source port, two with the same sink port, to check whether # multiplexing works. # # multiplex_flakey: # A combination of multiplex and flakey_network. ########################## # Congestion control tests # # congest: Like easy, except the byte source rate is 80 kbps, 1,500,000 # bytes are transferred, both buffer_max and are 6000 bytes. # The network can store 3000 payload bytes. The one-way delay # is 0.6 seconds for the first 500,000 bytes (40 kbps), 6 # seconds for the next 500,000 bytes (4 kbps), and 1.2 seconds # for the last 500,000 bytes (20 kbps). The throughputs for # bytes 400000-500000, 900000-1000000, and 1400000-1500000 # are output, and should be between 25% and 100% of the rates # mentioned above (40 kbps, 4 kbps, 20 kbps). The drop rate # is also output (the percentage of packets that get dropped), # which should be small (less than 5%). # # fair: Like congest, except the one-way delay is always 0.6. # A second connection is started after 500,000 bytes of # the first have been received. The throughput for bytes # 1400000-1500000 of the first connection is output, and the # throughput for the second connection during the same time, # and the drop rate. The throughputs should be roughly the # same, and their sum should be between 10 kbps and 40 kbps. # The drop rate should be small (less than 5%). basictests=" short easy last_packet small_mtu large_mtu drop corrupt duplicate reorder long_delay misroute flakey_network erratic_source erratic_sink erratic_both erratic_flakey reinit strange_address cheat platform " flowefftests=" buffer_max small_source_buffer small_sink_buffer small_buffers stop_source start_source speed speed_slow speed_fast " multitests=" multiplex multiplex_flakey " congesttests=" congest fair " touch transport.c make runtest || exit dotest() { test=$1 printf " ${test}: " ./runtest ${test} || : } echo echo "basic project:" for test in $basictests; do dotest $test done echo echo "flow control & efficiency:" for test in $flowefftests; do dotest $test done echo echo "multiplexing:" for test in $multitests; do dotest $test done echo echo "congestion control:" for test in $congesttests; do dotest $test done