From patchwork Mon Oct 16 16:17:30 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Patrick DELAUNAY X-Patchwork-Id: 826410 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 3yG3T70GNxz9t61 for ; Tue, 17 Oct 2017 03:20:26 +1100 (AEDT) Received: by lists.denx.de (Postfix, from userid 105) id 9508DC21DE7; Mon, 16 Oct 2017 16:19:05 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id 3B08EC21E3B; Mon, 16 Oct 2017 16:18:16 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 30A46C21DA3; Mon, 16 Oct 2017 16:17:50 +0000 (UTC) Received: from mx07-00178001.pphosted.com (mx08-00178001.pphosted.com [91.207.212.93]) by lists.denx.de (Postfix) with ESMTPS id B8172C21D99 for ; Mon, 16 Oct 2017 16:17:47 +0000 (UTC) Received: from pps.filterd (m0046661.ppops.net [127.0.0.1]) by mx08-.pphosted.com (8.16.0.21/8.16.0.21) with SMTP id v9GGEWTc029737; Mon, 16 Oct 2017 18:17:41 +0200 Received: from beta.dmz-eu.st.com (beta.dmz-eu.st.com [164.129.1.35]) by mx08-00178001.pphosted.com with ESMTP id 2dk9fcund3-1 (version=TLSv1 cipher=ECDHE-RSA-AES256-SHA bits=256 verify=NOT); Mon, 16 Oct 2017 18:17:41 +0200 Received: from zeta.dmz-eu.st.com (zeta.dmz-eu.st.com [164.129.230.9]) by beta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 8244631; Mon, 16 Oct 2017 16:17:39 +0000 (GMT) Received: from Webmail-eu.st.com (Safex1hubcas24.st.com [10.75.90.94]) by zeta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 3BB162CCF; Mon, 16 Oct 2017 16:17:39 +0000 (GMT) Received: from SAFEX1HUBCAS21.st.com (10.75.90.44) by Safex1hubcas24.st.com (10.75.90.94) with Microsoft SMTP Server (TLS) id 14.3.352.0; Mon, 16 Oct 2017 18:17:39 +0200 Received: from localhost (10.201.23.85) by Webmail-ga.st.com (10.75.90.48) with Microsoft SMTP Server (TLS) id 14.3.352.0; Mon, 16 Oct 2017 18:17:38 +0200 From: Patrick Delaunay To: Date: Mon, 16 Oct 2017 18:17:30 +0200 Message-ID: <1508170655-17707-1-git-send-email-patrick.delaunay@st.com> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 X-Originating-IP: [10.201.23.85] X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:, , definitions=2017-10-16_05:, , signatures=0 Cc: Alison Chaiken , Stefan Roese , Heinrich Schuchardt , Alison Chaiken , Peter Jones , Vincent Tinelli , Stephen Warren , Maxime Ripard Subject: [U-Boot] [PATCH v2 0/5] solve issues in gpt management X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" in the last version v2017.09, I see some regression for the command $> gpt write mmc 0 "name=test,start=0x4400,size=0" $> gpt write mmc 0 "name=test,size=0" I use sandbox python test to verify if this issue is also present in v2017.11-rc1 and when I check the log tests, I detect a other issue for the swap / rename feature : the offset and the size is always 1MB align, that cause issue if the partition wasn't initially 1MB align. And it is the case of the test (the size of partition change after the command gpt rename or swap) I propose this patch-set with: - updated gpt test to highlight the issues - my proposed correction for the 2 issues Changes in v2: - Split test to functional change Patrick Delaunay (5): test/py: gpt: copy persistent file test/py: gpt: add test for sub-command read/verify/write disk: efi: correct the overlap check on GPT header and PTE test/py: gpt: test start LBA for sub-command rename and swap cmd: gpt: solve issue for swap cmd/gpt.c | 12 +++---- disk/part_efi.c | 4 +-- test/py/tests/test_gpt.py | 80 +++++++++++++++++++++++++++++++++++++++-------- 3 files changed, 75 insertions(+), 21 deletions(-)