From patchwork Sun May 30 00:09:35 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: 1485421 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=85.214.62.61; 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=hxGDed5p; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (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 4FszMY2n93z9sWC for ; Sun, 30 May 2021 10:10:09 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 1462682B71; Sun, 30 May 2021 02:09:58 +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="hxGDed5p"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 1FEA382B5B; Sun, 30 May 2021 02:09:55 +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-qv1-xf2a.google.com (mail-qv1-xf2a.google.com [IPv6:2607:f8b0:4864:20::f2a]) (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 3ADBD81C84 for ; Sun, 30 May 2021 02:09:52 +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-qv1-xf2a.google.com with SMTP id u13so93354qvt.7 for ; Sat, 29 May 2021 17:09:52 -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=0JSoaSUJeKzkUDV5SNeolgFNg0Rl6xKLDPqD3gcLeHY=; b=hxGDed5p19bCeA8pS05xTl+OvGZiR62jqbNOIfM81JaofbCNY2mnd37ATZptEHyHjx HNXgrULk6RscuFvZfURJJk35jxnwRdWcioZhJu1ElzbdMytYNFxh0wW+9qvi8tOiHmXY 9WHFflKkTgXGa2c6E5ah2dW6Oq74KWRJau+iKL5+vycyOhZ6MKBlihtS/QFFePr5HIy1 8GBOpgMXp6iT5djBjGnWQaFqAZDjcNVfHYgSZy2P0ruW59PxLw7wQtFWS8Ai49yrd9Oa Fj1w81/5cdyjFSoULYvvJj7lSHeUJViYDpTCTZImD2SBepblfgfFivseW/8iTdYya5m5 V2Nw== 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=0JSoaSUJeKzkUDV5SNeolgFNg0Rl6xKLDPqD3gcLeHY=; b=BK35KNnqYDx1ROmQasxM7IhplmAiybwZBwI5iCr+u2AZ0ZHHP3MPcNkQlwJ5GOnhLT w1o4xj3lsI+oYNLRyK1YOtdqyKXbN6+p6n8fgSHEFZ/iMmz/SSQWG+oQr1UgQeSGjDWX PFDZ7hWBvMsK8ufQbumbKacYh/PYAMhD7xcec8AumhyPguQMoiScn6qABBzckrelgHQ/ J1BKbVS8PEfGVSzGwIgxAIhBdbr3F0Cmi/+ujNHQGToSOa1ydU1c+sdm2+OoIllHWwQI rn+0slDn0S572Ti59RmqrWVeoIXT4IegKMyG4wXT24PfhkQ24LhKcsDL2GIuzJSpnFbJ uenQ== X-Gm-Message-State: AOAM530BLEFGj83LYcN1BE5gHufy2ZeLgNlArfusSUcsp9fY2MX6T7Ng kQETR4AnkODSKrYo72af/PxWdJ1qLd0BRLco X-Google-Smtp-Source: ABdhPJy4NWwjcAxrcKJ3sr7JFPKLRqOrkpBsec2W3d8yuTenA8j/qj0G7HTdPsBn6RTi2L+qicjN+A== X-Received: by 2002:a0c:ff03:: with SMTP id w3mr10567666qvt.6.1622333390721; Sat, 29 May 2021 17:09:50 -0700 (PDT) Received: from localhost.localdomain ([177.194.32.83]) by smtp.googlemail.com with ESMTPSA id u22sm1514300qtw.18.2021.05.29.17.09.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 29 May 2021 17:09:50 -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 v2 0/3] test/py: Rewrite SquashFS commands test suite Date: Sat, 29 May 2021 21:09:35 -0300 Message-Id: <20210530000938.48873-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.102.4 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 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 | 237 +++++++++++++----- .../test_fs/test_squashfs/test_sqfs_load.py | 166 +++++++++--- .../test_fs/test_squashfs/test_sqfs_ls.py | 138 ++++++++-- 3 files changed, 428 insertions(+), 113 deletions(-)