From patchwork Thu Mar 13 17:04:50 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arlin Davis X-Patchwork-Id: 3827351 Return-Path: X-Original-To: patchwork-linux-rdma@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id E97DCBF540 for ; Thu, 13 Mar 2014 17:06:15 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 13A4B201C0 for ; Thu, 13 Mar 2014 17:06:15 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id E133720172 for ; Thu, 13 Mar 2014 17:06:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754502AbaCMRGM (ORCPT ); Thu, 13 Mar 2014 13:06:12 -0400 Received: from mga09.intel.com ([134.134.136.24]:54999 "EHLO mga09.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754316AbaCMRGL (ORCPT ); Thu, 13 Mar 2014 13:06:11 -0400 Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga102.jf.intel.com with ESMTP; 13 Mar 2014 10:00:21 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.97,648,1389772800"; d="scan'208";a="471772369" Received: from orsmsx107.amr.corp.intel.com ([10.22.240.5]) by orsmga001.jf.intel.com with ESMTP; 13 Mar 2014 10:04:51 -0700 Received: from orsmsx101.amr.corp.intel.com ([169.254.8.45]) by ORSMSX107.amr.corp.intel.com ([169.254.1.189]) with mapi id 14.03.0123.003; Thu, 13 Mar 2014 10:04:50 -0700 From: "Davis, Arlin R" To: "linux-rdma@vger.kernel.org" CC: "ofw@lists.openfabrics.org" , "ewg@lists.openfabrics.org" Subject: [PATCH 1/5] dapltest: update scripts for regression testing purposes Thread-Topic: [PATCH 1/5] dapltest: update scripts for regression testing purposes Thread-Index: Ac8+3bwBp7tBBcCrR8O+pq28hzuWnw== Date: Thu, 13 Mar 2014 17:04:50 +0000 Message-ID: <54347E5A035A054EAE9D05927FB467F972E0C8E7@ORSMSX101.amr.corp.intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.22.254.139] MIME-Version: 1.0 Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP cl.sh and srv.sh update to provide better examples and a method to quickly regression test any dapltest changes. usage: srv.sh devicename where devicename is provider (default = ofa-v2-mlx4_0-1) usage: cl.sh hostname testname devicename where testname stop - request DAPLtest server to exit. conn - simple connection with limited dater transfer trans - single transaction test transm - transaction test: multiple transactions [RW SND, RDMA] transt - transaction test: multi-threaded, single transaction transme - transaction test: multi-endpoints per thread transmet - transaction test: multi: threads and endpoints per thread transmete - transaction test: multi threads == endpoints perf - Performance test threads - multi-threaded single transaction test. threadsm - multi: threads and endpoints, single transaction test. rdma-write - RDMA write rdma-read - RDMA read bw - bandwidth latb - latency tests, blocking for events latp - latency tests, polling for events lim - limit tests. regression - loop over a collection of all tests. where devicename is provider (default = ofa-v2-mlx4_0-1) Signed-off-by: Arlin Davis --- test/dapltest/scripts/cl.sh | 236 +++++++++++++++++++++++++++++++++++++----- test/dapltest/scripts/srv.sh | 24 +++-- 2 files changed, 226 insertions(+), 34 deletions(-) -- 1.7.3 diff --git a/test/dapltest/scripts/cl.sh b/test/dapltest/scripts/cl.sh index 9a8d64f..46c7edb 100755 --- a/test/dapltest/scripts/cl.sh +++ b/test/dapltest/scripts/cl.sh @@ -1,6 +1,7 @@ #!/bin/sh # # Copyright (c) 2002-2005, Network Appliance, Inc. All rights reserved. +# Copyright (c) 2014 Intel Corporation. All rights reserved. # # This Software is licensed under one of the following licenses: # @@ -28,31 +29,218 @@ # notice, one of the license notices in the documentation # and/or other materials provided with the distribution. # -# Sample client invocation +# Sample DAPLtest client Usage: cl.sh hostname [testname] [device] # +# default device = ofa-v2-mlx4_0-1 # -me=`basename $0` -case $# in -0) host=dat-linux3 - device=0 ;; -1) host=$1 - device=0 ;; -2) host=$1 - device=$2 ;; -*) echo Usage: $me '[hostname [device] ]' 1>&2 ; exit 1;; -esac -# -# -# ./dapltest -T T -V -d -t 2 -w 2 -i 1000111 -s ${host} -D ${device} \ -# client RW 4096 1 server RW 2048 4 \ -# client RR 1024 2 server RR 2048 2 \ -# client SR 1024 3 -f server SR 256 3 -f - ./dapltest -T T -P -d -t 2 -w 2 -i 1024 -s ${host} -D ${device} \ - client RW 4096 1 server RW 2048 4 \ - client RR 1024 2 server RR 2048 2 \ - client SR 1024 3 -f server SR 256 3 -f +DT=dapltest +D=ofa-v2-mlx4_0-1 +L=1 +X= +T= +E= + +# need some help? +if [ "$1" == "-h" ] ; then + T= +else + S=$1 + if [ ! "$2" == "" ] ; then + T=$2 + if [ ! "$3" == "" ] ; then + D=$3 + fi + fi +fi + +if [ ! "$X" == "" ] ; then + DAT_OS_DBG_TYPE=$X + DAT_DBG_TYPE=$X + DAT_DBG_LEVEL=$X + DAPL_DBG_LEVEL=$X + DAPL_DBG_TYPE=$X +else + DAT_DBG_TYPE=0x1 + DAT_DBG_LEVEL=1 +fi + +echo "" +echo "uDAPL client test $DT $T $D -> $S" +echo "" + +# Endpoint and Thread stress +if [ "$T" == "epa" ] ; then + T=10 + E=10 + LT=10 + LE=50 + for ((T=$T ; $T <= $LT ; $((T++)) )) ; do + for ((E=$E ; $E <= $LE ; $((E++)) )) ; do + echo $T $E: Multi: Threads[$T] Endpoints[$E] Send/Recv test - 4096 iterations, 3 8K segs + $DT -T T -s $S -D $D -i 4096 -t $T -w $E client SR 8192 3 server SR 8192 3 + if [ $? -ne 0 ] ; then + echo failed $X + exit 1 + fi + done + done + echo THREADS $LT and ENDPOINTS $LE loops completed. + exit +fi + +if [ "$T" == "conn" ] ; then +# Connectivity test - client sends one buffer with one 4KB segments, one time. +# add '-d' for debug output. + $DT -T T -s $S -D $D -i 1 -t 1 -w 1 client SR 4096 server SR 4096 + exit +fi + +if [ "$T" == "trans" ] ; then + echo Transaction test - 8192 iterations, 1 thread, SR 4KB buffers + $DT -T T -s $S -D $D -i 8192 -t 1 -w 1 client SR 4096 server SR 4096 + exit +fi + +if [ "$T" == "transm" ] ; then + echo Multiple RW, RR, SR transactions, 4096 iterations + $DT -T T -P -t 1 -w 1 -i 4096 -s $S -D $D client RW 4096 1 server RW 2048 4 server RR 1024 1 client RR 2048 1 client SR 1024 3 -f server SR 256 3 -f + exit +fi + +if [ "$T" == "transmx" ] ; then + echo Multiple RW, RR, SR transactions, 8192 iterations + $DT -T T -P -t 1 -w 1 -i 8192 -s $S -D $D \ + client RW 32768 4 server RW 32768 4 \ + server RR 32768 1 client RR 32768 1 \ + client SR 16384 4 -f server SR 16384 4 -f + exit +fi + +if [ "$T" == "transt" ] ; then + echo Multi-threaded[4] Transaction test - 4096 iterations, 1 thread, SR 4KB buffers + $DT -T T -s $S -D $D -i 4096 -t 4 -w 1 client SR 8192 3 server SR 8192 3 + exit +fi + +if [ "$T" == "transme" ] ; then + echo Multiple endpoints[4] transactions [RW, RR, SR], 4096 iterations + $DT -T T -P -t 1 -w 4 -i 4096 -s $S -D $D client RW 4096 1 server RW 2048 4 server RR 1024 1 client RR 2048 1 client SR 1024 3 -f server SR 256 3 -f + exit +fi + +if [ "$T" == "transmet" ] ; then + echo Multiple: threads[2] endpoints[4] transactions[RW, RR, SR], 4096 iterations + $DT -T T -P -t 2 -w 4 -i 4096 -s $S -D $D client RW 4096 1 server RW 2048 4 server RR 1024 1 client RR 2048 1 client SR 1024 3 -f server SR 256 3 -f + exit +fi + +if [ "$T" == "transmete" ] ; then + echo Multiple: threads[4] endpoints[4] transactions[RW, RR, SR], 8192 iterations + $DT -T T -P -t 4 -w 4 -i 8192 -s $S -D $D client RW 4096 1 server RW 2048 4 server RR 1024 1 client RR 2048 1 client SR 1024 3 -f server SR 256 3 -f + exit +fi + +if [ "$T" == "threads" ] ; then + echo Multi Threaded[6] Send/Recv test - 4096 iterations, 3 8K segs + $DT -T T -s $S -D $D -i 4096 -t 6 -w 1 client SR 8192 3 server SR 8192 3 + exit +fi + +if [ "$T" == "threadsm" ] ; then + echo Multi: Threads[4] endpoints[4] Send/Recv test - 4096 iterations, 3 8K segs + $DT -T T -s $S -D $D -i 4096 -t 4 -w 4 client SR 8192 3 server SR 8192 3 + exit +fi + +if [ "$T" == "perf" ] ; then + #echo Performance test + $DT -T P -s $S -D $D -i 2048 -m b RW 4096 2 + exit +fi + +if [ "$T" == "rdma-read" ] ; then + $DT -T P -s $S -D $D -i 4096 RR 32768 1 + exit +fi + +if [ "$T" == "rdma-write" ] ; then + $DT -T P -s $S -D $D -i 4096 RW 32768 4 + exit +fi + +if [ "$T" == "bw" ] ; then + echo bandwidth 65K msgs + $DT -T P -s $S -D $D -i 4096 -p 16 -m b RW 65536 2 + exit +fi + +if [ "$T" == "latb" ] ; then + echo latency test - block for completion events + $DT -T P -s $S -D $D -i 8192 -p 1 -m b RW 4 1 + exit +fi + +if [ "$T" == "latp" ] ; then + echo latency test - poll completion events + $DT -T P -s $S -D $D -i 100000 -p 1 -m p RW 4 1 + exit +fi + +if [ "$T" == "lim" ] ; then + echo Resource limit tests + $DT -T L -D $D -w 8 -m 100 limit_ia + $DT -T L -D $D -w 8 -m 100 limit_pz + $DT -T L -D $D -w 8 -m 100 limit_evd + $DT -T L -D $D -w 8 -m 100 limit_ep + $DT -T L -D $D -w 8 -m 100 limit_psp + $DT -T L -D $D -w 8 -m 100 limit_lmr + $DT -T L -D $D -w 8 -m 15 limit_rpost + exit +fi + +if [ "$T" == "regression" ] ; then + echo $T testing in $L Loops + # rdma-write, read, perf + TST="trans perf threads threadsm transm transt transme transmet transmete rdma-write rdma-read bw latb latp " + for ((n=1 ; $n <= $L ; $((n++)) )) ; do + for X in $TST ; do + $0 $1 $X $D + if [ $? -ne 0 ] ; then + echo failed $X + exit 1 + fi + done + echo $n $T loops completed. + done + $DT -T Q -s $S -D $D + exit 0 +fi + +if [ "$T" == "stop" ] ; then + $DT -T Q -s $S -D $D + exit +fi + +echo " usage: cl.sh hostname [testname [-D]]" +echo " where testname" +echo " stop - request DAPLtest server to exit." +echo " conn - simple connection with limited dater transfer" +echo " trans - single transaction test" +echo " transm - transaction test: multiple transactions [RW SND, RDMA]" +echo " transt - transaction test: multi-threaded, single transaction" +echo " transme - transaction test: multi-endpoints per thread " +echo " transmet - transaction test: multi: threads and endpoints per thread" +echo " transmete - transaction test: multi threads == endpoints" +echo " perf - Performance test" +echo " threads - multi-threaded single transaction test." +echo " threadsm - multi: threads and endpoints, single transaction test." +echo " rdma-write - RDMA write" +echo " rdma-read - RDMA read" +echo " bw - bandwidth" +echo " latb - latency tests, blocking for events" +echo " latp - latency tests, polling for events" +echo " lim - limit tests." +echo " regression - loop over a collection of all tests." -#dapltest -T T -d -s ${host} -D ${device} -i 10000 -t 1 -w 1 \ -# client SR 256 \ -# server SR 256 +exit 0 diff --git a/test/dapltest/scripts/srv.sh b/test/dapltest/scripts/srv.sh index 78e8f63..1f05c7a 100755 --- a/test/dapltest/scripts/srv.sh +++ b/test/dapltest/scripts/srv.sh @@ -1,6 +1,7 @@ #!/bin/sh # # Copyright (c) 2002-2005, Network Appliance, Inc. All rights reserved. +# Copyright (c) 2014 Intel Corporation. All rights reserved. # # This Software is licensed under one of the following licenses: # @@ -28,16 +29,19 @@ # notice, one of the license notices in the documentation # and/or other materials provided with the distribution. # -# Sample server invocation +# Sample DAPLtest server Usage: srv.sh [device] # -me=`basename $0` -case $# in -0) device=0;; -1) device=$1 ;; -*) echo Usage: $me '[device]' 1>&2 ; exit 1;; -esac +# default device = ofa-v2-mlx4_0-1 # -# -# ./dapltest -T S -d -D ${device} - ./dapltest -T S -D ${device} +DT=dapltest +D=ofa-v2-mlx4_0-1 + +if [ ! "$1" == "" ] ; then + D=$1 +fi + +$DT -T S -D $D +exit $? + +