From patchwork Mon Mar 19 08:18:21 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Sun Lianwen X-Patchwork-Id: 887603 X-Patchwork-Delegate: chrubis@suse.cz Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=lists.linux.it (client-ip=2001:1418:10:5::2; helo=picard.linux.it; envelope-from=ltp-bounces+incoming=patchwork.ozlabs.org@lists.linux.it; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=cn.fujitsu.com Received: from picard.linux.it (picard.linux.it [IPv6:2001:1418:10:5::2]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 404TQQ5j9Yz9sWD for ; Mon, 19 Mar 2018 19:15:24 +1100 (AEDT) Received: from picard.linux.it (localhost [IPv6:::1]) by picard.linux.it (Postfix) with ESMTP id B80CA3E76F1 for ; Mon, 19 Mar 2018 09:15:16 +0100 (CET) X-Original-To: ltp@lists.linux.it Delivered-To: ltp@picard.linux.it Received: from in-7.smtp.seeweb.it (in-7.smtp.seeweb.it [IPv6:2001:4b78:1:20::7]) by picard.linux.it (Postfix) with ESMTP id 8A8993E76DF for ; Mon, 19 Mar 2018 09:15:15 +0100 (CET) Received: from heian.cn.fujitsu.com (mail.cn.fujitsu.com [183.91.158.132]) by in-7.smtp.seeweb.it (Postfix) with ESMTP id 2B29A200D1A for ; Mon, 19 Mar 2018 09:15:12 +0100 (CET) X-IronPort-AV: E=Sophos; i="5.43,368,1503331200"; d="scan'208,217"; a="37932945" Received: from bogon (HELO cn.fujitsu.com) ([10.167.33.5]) by heian.cn.fujitsu.com with ESMTP; 19 Mar 2018 16:15:08 +0800 Received: from G08CNEXCHPEKD02.g08.fujitsu.local (unknown [10.167.33.83]) by cn.fujitsu.com (Postfix) with ESMTP id 12E224D0EFFC for ; Mon, 19 Mar 2018 16:15:09 +0800 (CST) Received: from [192.168.1.232] (10.167.226.95) by G08CNEXCHPEKD02.g08.fujitsu.local (10.167.33.89) with Microsoft SMTP Server id 14.3.361.1; Mon, 19 Mar 2018 16:15:10 +0800 From: sunlianwen To: Message-ID: Date: Mon, 19 Mar 2018 16:18:21 +0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 Content-Language: en-US X-Originating-IP: [10.167.226.95] X-yoursite-MailScanner-ID: 12E224D0EFFC.A084F X-yoursite-MailScanner: Found to be clean X-yoursite-MailScanner-From: sunlw.fnst@cn.fujitsu.com X-Spam-Status: No, score=-0.0 required=7.0 tests=HTML_MESSAGE, T_RP_MATCHES_RCVD autolearn=disabled version=3.4.0 X-Virus-Scanned: clamav-milter 0.99.2 at in-7.smtp.seeweb.it X-Virus-Status: Clean X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on in-7.smtp.seeweb.it Subject: [LTP] [PATCH] busy_poll* : revise poll_cmp X-BeenThere: ltp@lists.linux.it X-Mailman-Version: 2.1.18 Precedence: list List-Id: Linux Test Project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ltp-bounces+incoming=patchwork.ozlabs.org@lists.linux.it Sender: "ltp" set low latency busy poll to 50 per socket will spent more time than set low latency busy poll to 0 per socket. that mean the value of res_50 is bigger than res_0, so the value of poll_comp always less than zero and  test fail. Signed-off-by: Lianwen Sun ---  testcases/network/busy_poll/busy_poll01.sh | 2 +-  testcases/network/busy_poll/busy_poll02.sh | 2 +-  2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/testcases/network/busy_poll/busy_poll01.sh b/testcases/network/busy_poll/busy_poll01.sh index 3c3035600..119ae0176 100755 --- a/testcases/network/busy_poll/busy_poll01.sh +++ b/testcases/network/busy_poll/busy_poll01.sh @@ -60,7 +60,7 @@ for x in 50 0; do         tst_netload -H $(tst_ipaddr rhost) -d res_$x  done -poll_cmp=$(( 100 - ($(cat res_50) * 100) / $(cat res_0) )) +poll_cmp=$(( 100 - ($(cat res_0) * 100) / $(cat res_50) ))  if [ "$poll_cmp" -lt 1 ]; then         tst_resm TFAIL "busy poll result is '$poll_cmp' %" diff --git a/testcases/network/busy_poll/busy_poll02.sh b/testcases/network/busy_poll/busy_poll02.sh index 427857996..05b5cf8c4 100755 --- a/testcases/network/busy_poll/busy_poll02.sh +++ b/testcases/network/busy_poll/busy_poll02.sh @@ -51,7 +51,7 @@ for x in 50 0; do         tst_netload -H $(tst_ipaddr rhost) -d res_$x -b $x  done -poll_cmp=$(( 100 - ($(cat res_50) * 100) / $(cat res_0) )) +poll_cmp=$(( 100 - ($(cat res_0) * 100) / $(cat res_50) ))  if [ "$poll_cmp" -lt 1 ]; then         tst_resm TFAIL "busy poll result is '$poll_cmp' %"