From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <anatoly.burakov@intel.com>
Received: from mga17.intel.com (mga17.intel.com [192.55.52.151])
 by dpdk.org (Postfix) with ESMTP id 5ED9A8D3C
 for <dev@dpdk.org>; Fri, 27 Apr 2018 15:56:26 +0200 (CEST)
X-Amp-Result: SKIPPED(no attachment in message)
X-Amp-File-Uploaded: False
Received: from orsmga001.jf.intel.com ([10.7.209.18])
 by fmsmga107.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;
 27 Apr 2018 06:56:25 -0700
X-ExtLoop1: 1
X-IronPort-AV: E=Sophos;i="5.49,335,1520924400"; d="scan'208";a="51325387"
Received: from aburakov-mobl.ger.corp.intel.com (HELO [10.252.25.158])
 ([10.252.25.158])
 by orsmga001.jf.intel.com with ESMTP; 27 Apr 2018 06:56:24 -0700
To: Reshma Pattan <reshma.pattan@intel.com>, john.mcnamara@intel.com,
 dev@dpdk.org
Cc: jananeex.m.parthasarathy@intel.com
References: <1524835241-12778-1-git-send-email-reshma.pattan@intel.com>
From: "Burakov, Anatoly" <anatoly.burakov@intel.com>
Message-ID: <0c0b4902-942c-f74b-5591-ad4c2ef90bf6@intel.com>
Date: Fri, 27 Apr 2018 14:56:23 +0100
User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101
 Thunderbird/52.7.0
MIME-Version: 1.0
In-Reply-To: <1524835241-12778-1-git-send-email-reshma.pattan@intel.com>
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Language: en-US
Content-Transfer-Encoding: 7bit
Subject: Re: [dpdk-dev] [PATCH] app/test: enhance sanity script
X-BeenThere: dev@dpdk.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: DPDK patches and discussions <dev.dpdk.org>
List-Unsubscribe: <https://dpdk.org/ml/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://dpdk.org/ml/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <https://dpdk.org/ml/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=subscribe>
X-List-Received-Date: Fri, 27 Apr 2018 13:56:27 -0000

On 27-Apr-18 2:20 PM, Reshma Pattan wrote:
> 1. Sanity Script is enhanced with additional test cases
> being added to autotest_data.py
> 2. Fixed in autotest_test_funcs.py to handle test cases
> which returns "Skipped" as result.
>    The issue was skipped test cases got timed out,
> causing delay in sanity script execution.
> 3. Enhanced support for FreeBSD to add the respective memory limit,
> as FreeBSD doesn't support socket-mem, file-prefix options.
> 
> Signed-off-by: Jananee Parthasarathy <jananeex.m.parthasarathy@intel.com>
> ---

<...>

> @@ -1,5 +1,5 @@
>   # SPDX-License-Identifier: BSD-3-Clause
> -# Copyright(c) 2010-2014 Intel Corporation
> +# Copyright(c) 2010-2018 Intel Corporation
>   
>   # The main logic behind running autotests in parallel
>   
> @@ -201,6 +201,13 @@ def __init__(self, cmdline, target, blacklist, whitelist):
>       # set up cmdline string
>       def __get_cmdline(self, test):
>           cmdline = self.cmdline
> +        os_name = platform.system()
> +
> +        # append the respective memory limitation on FREEBSD
> +        # as socket-mem, file-prefix is not supported
> +        if os_name == "FreeBSD" :
> +            cmdline += " -m " + str(sum(map(int, test["Memory"].split(","))))
> +            return cmdline

A better fix would've been to completely avoid calling __get_cmdline() 
for FreeBSD. Since file prefixes are not supported, tests cannot be run 
in parallel, so there is no need to limit allocated memory in the first 
place, so neither -m nor --socket-mem switches need to be added either. 
And without those, there's no need to modify the test cmdline at all.

-- 
Thanks,
Anatoly