1cd30c339dae692a3eb5c5fc55f70726457f4756bmridge#!/bin/sh
2cd30c339dae692a3eb5c5fc55f70726457f4756bmridge
3cd30c339dae692a3eb5c5fc55f70726457f4756bmridge################################################################################
4cd30c339dae692a3eb5c5fc55f70726457f4756bmridge##                                                                            ##
5cd30c339dae692a3eb5c5fc55f70726457f4756bmridge## Copyright (c) International Business Machines  Corp., 2005                 ##
6cd30c339dae692a3eb5c5fc55f70726457f4756bmridge##                                                                            ##
7cd30c339dae692a3eb5c5fc55f70726457f4756bmridge## This program is free software;  you can redistribute it and#or modify      ##
8cd30c339dae692a3eb5c5fc55f70726457f4756bmridge## it under the terms of the GNU General Public License as published by       ##
9cd30c339dae692a3eb5c5fc55f70726457f4756bmridge## the Free Software Foundation; either version 2 of the License, or          ##
10cd30c339dae692a3eb5c5fc55f70726457f4756bmridge## (at your option) any later version.                                        ##
11cd30c339dae692a3eb5c5fc55f70726457f4756bmridge##                                                                            ##
12cd30c339dae692a3eb5c5fc55f70726457f4756bmridge## This program is distributed in the hope that it will be useful, but        ##
13cd30c339dae692a3eb5c5fc55f70726457f4756bmridge## WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY ##
14cd30c339dae692a3eb5c5fc55f70726457f4756bmridge## or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License   ##
15cd30c339dae692a3eb5c5fc55f70726457f4756bmridge## for more details.                                                          ##
16cd30c339dae692a3eb5c5fc55f70726457f4756bmridge##                                                                            ##
17cd30c339dae692a3eb5c5fc55f70726457f4756bmridge## You should have received a copy of the GNU General Public License          ##
18cd30c339dae692a3eb5c5fc55f70726457f4756bmridge## along with this program;  if not, write to the Free Software               ##
194548c6cf9bcdd96d8303caa4130ab638b61f8a30Wanlong Gao## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA    ##
20cd30c339dae692a3eb5c5fc55f70726457f4756bmridge##                                                                            ##
21cd30c339dae692a3eb5c5fc55f70726457f4756bmridge##                                                                            ##
22cd30c339dae692a3eb5c5fc55f70726457f4756bmridge################################################################################
23cd30c339dae692a3eb5c5fc55f70726457f4756bmridge#
24cd30c339dae692a3eb5c5fc55f70726457f4756bmridge# File:
25cd30c339dae692a3eb5c5fc55f70726457f4756bmridge#   tcp4-uni-dsackoff01
26cd30c339dae692a3eb5c5fc55f70726457f4756bmridge#
27cd30c339dae692a3eb5c5fc55f70726457f4756bmridge# Description:
28cd30c339dae692a3eb5c5fc55f70726457f4756bmridge#   Verify that the kernel is not crashed with a TCP connection on an
29cd30c339dae692a3eb5c5fc55f70726457f4756bmridge#   unreliable to with the following condition:
30cd30c339dae692a3eb5c5fc55f70726457f4756bmridge#     - The version of IP is IPv4
31cd30c339dae692a3eb5c5fc55f70726457f4756bmridge#     - Network is not delayed
32cd30c339dae692a3eb5c5fc55f70726457f4756bmridge#     - IPsec is not used
33cd30c339dae692a3eb5c5fc55f70726457f4756bmridge#     - Disable window scaling
34cd30c339dae692a3eb5c5fc55f70726457f4756bmridge#     - Enable Nagle algorithm
3537550cf5a86c7ca7424a2a318dd64e550f13f5dfChris Dearman#     - Disable TCP Duplicate SACK support
36cd30c339dae692a3eb5c5fc55f70726457f4756bmridge#     - Enable SACK Support
37cd30c339dae692a3eb5c5fc55f70726457f4756bmridge#     - Some packets are lost
3837550cf5a86c7ca7424a2a318dd64e550f13f5dfChris Dearman#     - Disable TSO if it is avalable
39cd30c339dae692a3eb5c5fc55f70726457f4756bmridge#
40cd30c339dae692a3eb5c5fc55f70726457f4756bmridge#   *) This script may be read by the other test case
41cd30c339dae692a3eb5c5fc55f70726457f4756bmridge#
42cd30c339dae692a3eb5c5fc55f70726457f4756bmridge# Setup:
43cd30c339dae692a3eb5c5fc55f70726457f4756bmridge#   See ltp-yyyymmdd/testcases/network/stress/README
44cd30c339dae692a3eb5c5fc55f70726457f4756bmridge#
45cd30c339dae692a3eb5c5fc55f70726457f4756bmridge# Author:
46cd30c339dae692a3eb5c5fc55f70726457f4756bmridge#   Mitsuru Chinen <mitch@jp.ibm.com>
47cd30c339dae692a3eb5c5fc55f70726457f4756bmridge#
48cd30c339dae692a3eb5c5fc55f70726457f4756bmridge# History:
49cd30c339dae692a3eb5c5fc55f70726457f4756bmridge#	Oct 19 2005 - Created (Mitsuru Chinen)
50cd30c339dae692a3eb5c5fc55f70726457f4756bmridge#
51cd30c339dae692a3eb5c5fc55f70726457f4756bmridge#-----------------------------------------------------------------------
52cd30c339dae692a3eb5c5fc55f70726457f4756bmridge# Uncomment line below for debug output.
53cd30c339dae692a3eb5c5fc55f70726457f4756bmridge#trace_logic=${trace_logic:-"set -x"}
54cd30c339dae692a3eb5c5fc55f70726457f4756bmridge$trace_logic
55cd30c339dae692a3eb5c5fc55f70726457f4756bmridge
56cd30c339dae692a3eb5c5fc55f70726457f4756bmridge# The test case ID, the test case count and the total number of test case
57cd30c339dae692a3eb5c5fc55f70726457f4756bmridgeTCID=${TCID:-tcp4-uni-dsackoff01}
58cd30c339dae692a3eb5c5fc55f70726457f4756bmridgeTST_TOTAL=1
59cd30c339dae692a3eb5c5fc55f70726457f4756bmridgeTST_COUNT=1
60cd30c339dae692a3eb5c5fc55f70726457f4756bmridgeexport TCID
61cd30c339dae692a3eb5c5fc55f70726457f4756bmridgeexport TST_COUNT
62cd30c339dae692a3eb5c5fc55f70726457f4756bmridgeexport TST_TOTAL
63cd30c339dae692a3eb5c5fc55f70726457f4756bmridge
64cd30c339dae692a3eb5c5fc55f70726457f4756bmridge# Test description
65cd30c339dae692a3eb5c5fc55f70726457f4756bmridgetst_resm TINFO "Verify that the kernel, when the Duplicate SACK support is off, is not crashed by a TCP connection on an unreliable network(Namely, some of the packet is lost, some of them is duplicated)."
66cd30c339dae692a3eb5c5fc55f70726457f4756bmridge
67cd30c339dae692a3eb5c5fc55f70726457f4756bmridge# Disable DSACK support
68cd30c339dae692a3eb5c5fc55f70726457f4756bmridgeDO_DSACK=false
69cd30c339dae692a3eb5c5fc55f70726457f4756bmridge
70cd30c339dae692a3eb5c5fc55f70726457f4756bmridge# Make some packets are lost
7137550cf5a86c7ca7424a2a318dd64e550f13f5dfChris DearmanDO_PACKET_LOSS=true
72cd30c339dae692a3eb5c5fc55f70726457f4756bmridge
73cd30c339dae692a3eb5c5fc55f70726457f4756bmridge# Make some packets are duplicated
7437550cf5a86c7ca7424a2a318dd64e550f13f5dfChris DearmanDO_PACKET_DUP=true
75cd30c339dae692a3eb5c5fc55f70726457f4756bmridge
76cd30c339dae692a3eb5c5fc55f70726457f4756bmridge# Load tcp4-uni-basic01
77cd30c339dae692a3eb5c5fc55f70726457f4756bmridgeNON_BASIC=true
78cd30c339dae692a3eb5c5fc55f70726457f4756bmridge
79dabc620430264c191330e5b0b1603ad1d064d8b4vapier. tcp4-uni-basic01
80cd30c339dae692a3eb5c5fc55f70726457f4756bmridge
81cd30c339dae692a3eb5c5fc55f70726457f4756bmridgeexit 0
82