From patchwork Fri Apr 8 15:44:50 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?=C5=81ukasz_Majewski?= X-Patchwork-Id: 608061 X-Patchwork-Delegate: l.majewski@samsung.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by ozlabs.org (Postfix) with ESMTP id 3qhP1h1lkdz9t5l for ; Sat, 9 Apr 2016 01:45:44 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id BB71DA7759; Fri, 8 Apr 2016 17:45:42 +0200 (CEST) Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 6WPqY4GgpSGw; Fri, 8 Apr 2016 17:45:42 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 1D2C4A76F1; Fri, 8 Apr 2016 17:45:42 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 2B2DDA7744 for ; Fri, 8 Apr 2016 17:45:39 +0200 (CEST) Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id FTWJl9KFpnZ5 for ; Fri, 8 Apr 2016 17:45:39 +0200 (CEST) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from mailout3.samsung.com (mailout3.samsung.com [203.254.224.33]) by theia.denx.de (Postfix) with ESMTPS id 0E725A75B9 for ; Fri, 8 Apr 2016 17:45:33 +0200 (CEST) Received: from epcpsbgm1new.samsung.com (epcpsbgm1 [203.254.230.26]) by mailout3.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTP id <0O5B00DX9NRUAG10@mailout3.samsung.com> for u-boot@lists.denx.de; Sat, 09 Apr 2016 00:45:30 +0900 (KST) X-AuditID: cbfee61a-f79a86d000001a1a-16-5707d2197db7 Received: from epmmp1.local.host ( [203.254.227.16]) by epcpsbgm1new.samsung.com (EPCPMTA) with SMTP id F8.A3.06682.912D7075; Sat, 9 Apr 2016 00:45:29 +0900 (KST) Received: from mcdsrvbld02.digital.local ([106.116.37.23]) by mmp1.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTPA id <0O5B00GQFNQU5X90@mmp1.samsung.com>; Sat, 09 Apr 2016 00:45:29 +0900 (KST) From: Lukasz Majewski To: u-boot@lists.denx.de, Stephen Warren , Stephen Warren Date: Fri, 08 Apr 2016 17:44:50 +0200 Message-id: <1460130291-24223-2-git-send-email-l.majewski@samsung.com> X-Mailer: git-send-email 1.7.10.4 In-reply-to: <1460130291-24223-1-git-send-email-l.majewski@samsung.com> References: <1460130291-24223-1-git-send-email-l.majewski@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFjrILMWRmVeSWpSXmKPExsVy+t9jAV3JS+zhBpNazSw2zljPavHwqr/F jjv3mS3ePOK2ePNwM6PFm7ZGRosdl2+wWByY+57F4tuWbYwWN6a3sFq8OtjGYvF2bye7A4/H 7IaLLB7zZp1g8dg56y67x9k7Oxg91k17y+zR2/yOzaNvyypGj+0nJzF5bJwbGsAZxWWTkpqT WZZapG+XwJWxZMt/9oIuoYq9l8QaGH/ydjFyckgImEi0T7jNBGGLSVy4t54NxBYSWMoocfpB bhcjF5D9h1Fi3ZcDzCAJNgE9ic93n4I1iAikS9w8t4kJpIhZ4DiTxN6pM9hBEsICyRKHr/4G K2IRUJX4OGMbWJxXwE3i9xmYbYoS3c8mgG3jFHCX2Hi0ixVis5vEhoN/WCYw8i5gZFjFKJFa kFxQnJSea5iXWq5XnJhbXJqXrpecn7uJERywz6R2MB7c5X6IUYCDUYmH98J7tnAh1sSy4src Q4wSHMxKIryh59nDhXhTEiurUovy44tKc1KLDzFKc7AoifM+/r8uTEggPbEkNTs1tSC1CCbL xMEp1cA4sbRnRbBAYaDF949GeVdNZSo2uj7jfWUn6XvEPmLrnRyBatmUy2/3npFqsON7USm6 Yd6UMGHdvpcTWi4LTtrz5f/rZoPpBpN/M00s37vvvlSR8v37bcLvztUkT+fmFTv+vuGHd4Lz PhX2M//nBB94IeoVpsrEMOeJ70Yvmaqmwlkee/ni3Z8psRRnJBpqMRcVJwIAJQ7HtFQCAAA= Cc: Marek Vasut , b.zolnierkie@samsung.com, Samuel Egli , Przemyslaw Marczak Subject: [U-Boot] [PATCH 2/3] tests: py: dfu: Add functionality to set different u-boot's dfu env variable X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.15 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" By default (on almost all systems) the dfu env variable, which defines available alt settings, is named as "dfu_alt_info". However on some platforms (i.e. Odroid XU3), the 'dfu_alt_info' is concatenated from other variables - namely 'dfu_alt_boot' and 'dfu_alt_system' at run time (when one types 'dfu 0 mmc 0' for first time). 'dfu_alt_boot' describes alt settings which depend on boot medium - for example boot loader's LBA sectors which are different on eMMC and SD card because of e.g. MBR/GPT. 'dfu_alt_system' describes board agnostic alt settings - like rootfs, kernel. On such system we can only append/modify this env variable. Because of the above, we must have way to modify other than "dfu_ale_info" variable to perform tests. Signed-off-by: Lukasz Majewski --- test/py/tests/test_dfu.py | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/test/py/tests/test_dfu.py b/test/py/tests/test_dfu.py index df3b561..1ed6020 100644 --- a/test/py/tests/test_dfu.py +++ b/test/py/tests/test_dfu.py @@ -44,6 +44,11 @@ env__dfu_configs = ( # configurations, but don't want to test every single transfer size # on each, to avoid bloating the overall time taken by testing. "test_sizes": (63, 64, 65), + # Optional values. + # Those values are necessary on boards like Odroid XU3, where + # - dfu alt info env variable is concatenated from boot medium dependent + # (dfu_alt_boot) and user defined (dfu_alt_system) variables + "alt_info_env_name": "dfu_alt_system", }, ) @@ -124,7 +129,12 @@ def test_dfu(u_boot_console, env__usb_dev_port, env__dfu_config): u_boot_console.log.action( 'Starting long-running U-Boot dfu shell command') - cmd = 'setenv dfu_alt_info "%s"' % env__dfu_config['alt_info'] + dfu_alt_info_env = "dfu_alt_info" + if "alt_info_env_name" in env__dfu_config: + dfu_alt_info_env = env__dfu_config['alt_info_env_name'] + + cmd = 'setenv "%s" "%s"' % (dfu_alt_info_env, + env__dfu_config['alt_info']) u_boot_console.run_command(cmd) cmd = 'dfu 0 ' + env__dfu_config['cmd_params']