From patchwork Wed Jun 30 22:45:02 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Jo=C3=A3o_Marcos_Costa?= X-Patchwork-Id: 1499110 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=Pl0/pTD4; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4GFbyv4Kw3z9sCD for ; Thu, 1 Jul 2021 08:45:27 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 0429983176; Thu, 1 Jul 2021 00:45:20 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="Pl0/pTD4"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id DBE5F83176; Thu, 1 Jul 2021 00:45:17 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,SPF_HELO_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-pj1-x1032.google.com (mail-pj1-x1032.google.com [IPv6:2607:f8b0:4864:20::1032]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 05AD58314D for ; Thu, 1 Jul 2021 00:45:15 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=jmcosta944@gmail.com Received: by mail-pj1-x1032.google.com with SMTP id q91so2867444pjk.3 for ; Wed, 30 Jun 2021 15:45:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=l1tsaIwohS1d6Dm6Zsmx3yRm8LM2ZU6iU0jGce5KhM0=; b=Pl0/pTD483sneHn1C6KPuZOQk+CEdyRH7J/6D+MBIcPpzHujO0eS3Sbv6eaBSY4qNO PWIi612QX9z6pKoDLd7YcvqOX7uUvkdTLJSQ3wBUScObLxzWB2WbwYY7yPrZBZrt0lTO ZE5+eWBqTo/3mQXnsmZioZe+ph9XCzh3L8ND01bwKIS0NdjBbgqWNXOb1qDcHlmk/wZq vAZ6WQG7vpR441hcN8I1B8H17usVxsjn6/NzrDEpZvgCd7sfomKTU9DJJSdK2Zcf/7XK zCMjXt6c4rDvTtAHfdL2Ir/DWApTAYEEXKBlDih2zRlBQUmOyWOeNyULc4cVZFJy31es 1zeg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=l1tsaIwohS1d6Dm6Zsmx3yRm8LM2ZU6iU0jGce5KhM0=; b=UJGkUnMfDM26tbPaoWdj3gusP4moOFUjMM8VhwIzLnqZ9u0IwrSz3i5cv2Hu4jkEUY ghbvEh5zVgsDz34DdDisQP1wn0FqmeRLgJi9PYhpRq/JNeIHtjZ9pgVIwvIXZ3YDX/42 V6S9FLf8clK8TwD3QmIvQdK69KwvMIVaiQFenmgEP6S9U0hcrgijvHAD3GhozVL16jxI QTRx7EDce/1UHnbNBUXPQY14jKoEim/0iodjOTzUFArvAbnU8CEjb2n0aKMTpRXRtoAc whrKTmPX/9oyq5YppfJ8LL+0PcdQWu3gYbHdvPmbq7zmnr2SCtSrgSF8+DHba3q2Ns+4 hBaA== X-Gm-Message-State: AOAM532ewW7coINeW/qmlX/g51Oa6JeWJYIOxCNFqBnhe43y45Vcp4S4 bKj8I0xAGeHpKO5e/lydN+rLO2IFgXLRYiEz X-Google-Smtp-Source: ABdhPJxi1x7eS1xI7D9zkAghektycmDl6quo17T+POleIU6ADIaYjg2zrmkNuZUiSJwJaKV20zXeQw== X-Received: by 2002:a17:902:8206:b029:129:2e87:a86a with SMTP id x6-20020a1709028206b02901292e87a86amr930864pln.5.1625093112949; Wed, 30 Jun 2021 15:45:12 -0700 (PDT) Received: from localhost.localdomain ([177.194.32.83]) by smtp.googlemail.com with ESMTPSA id e3sm4964592pge.85.2021.06.30.15.45.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 30 Jun 2021 15:45:12 -0700 (PDT) From: Joao Marcos Costa To: u-boot@lists.denx.de Cc: thomas.petazzoni@bootlin.com, miquel.raynal@bootlin.com, richard.genoud@posteo.net, sjg@chromium.org, Joao Marcos Costa Subject: [PATCH v3 0/3] test/py: Rewrite SquashFS commands test suite Date: Wed, 30 Jun 2021 19:45:02 -0300 Message-Id: <20210630224505.104648-1-jmcosta944@gmail.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 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" X-Virus-Scanned: clamav-milter 0.103.2 at phobos.denx.de X-Virus-Status: Clean Hello, This patch series fixes the following issues: - poor strategy to check if files were properly loaded - wrong quoting style for strings - tests failing at the second run because of a wrong clean-up strategy Finally, it improves: - code overall documentation level, with more comments and better naming for functions and variables - code readability by adding more helper functions - completeness: more test cases were added for both sqfsls and sqfsload commands The sqfsload new test suite may fail when testing images with fragmented files if the patch I previously sent (fs/squashfs: fix reading of fragmented files) is not applied, so this patch series depends on it. Changes since V2: - Add check_mksquashfs_version function to raise an exception if mksquashfs version is too old. I chose to set the required version as 4.4, since it seems to be the most recent one. Changes since V1: - Leave the copyright year as it was (2020) instead of changing it to 2021 - Remove spurious comments and print statements - Fix the style issues pointed by pylint3 Best regards, Joao Joao Marcos Costa (3): test/py: rewrite common tools for SquashFS tests test/py: rewrite sqfsload command test suite test/py: rewrite sqfsls command test suite .../test_fs/test_squashfs/sqfs_common.py | 257 +++++++++++++----- .../test_fs/test_squashfs/test_sqfs_load.py | 168 ++++++++++-- .../test_fs/test_squashfs/test_sqfs_ls.py | 140 ++++++++-- 3 files changed, 452 insertions(+), 113 deletions(-)