From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id EACC0C00140 for ; Mon, 1 Aug 2022 01:51:09 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 8E64383EE2; Mon, 1 Aug 2022 03:51:07 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org 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=linaro.org header.i=@linaro.org header.b="b1av0oYR"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id E179583FAD; Mon, 1 Aug 2022 03:51:05 +0200 (CEST) Received: from mail-pl1-x62f.google.com (mail-pl1-x62f.google.com [IPv6:2607:f8b0:4864:20::62f]) (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 6363F81115 for ; Mon, 1 Aug 2022 03:51:03 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=takahiro.akashi@linaro.org Received: by mail-pl1-x62f.google.com with SMTP id t2so9185300ply.2 for ; Sun, 31 Jul 2022 18:51:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=in-reply-to:content-disposition:mime-version:references :mail-followup-to:message-id:subject:cc:to:from:date:from:to:cc; bh=bwQ0z2x+dtYwD6J4V42NO7+JawhHhJ1pPQht/RHcLcg=; b=b1av0oYRuX6HxtniPbgJmeh7vgdTSQuzm5gq//P65HX9fB5RJApnvLem/MfrQfFGtV qwR8GQ2MSHGiBbEIAGvi6dRMJuOzwSrEIa+jTKagXtiBoLGVY8zur+f76ALUvY6L2DZx 9TzXdkTs1YrZbAUl9Lg5EpF4G00ABPEz+Ntx4aaXM42QIDFSBvjQHwqNUv3akrO1+sPI FfcfZL4w6igOSbvjqfmNMY7UzvFRpVSdaJJ1FIbNZoJ4EWxfTIzqPEQ8QQKFXnpa2XyD skHAI1OrrF73vdgAs1lHcryJgyylm/rgpgq5PTS6jWsBe0v4RSmRG/cxvwj2kXIWlIyy 5RFw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:content-disposition:mime-version:references :mail-followup-to:message-id:subject:cc:to:from:date :x-gm-message-state:from:to:cc; bh=bwQ0z2x+dtYwD6J4V42NO7+JawhHhJ1pPQht/RHcLcg=; b=VbbZIVcl0GJCHKyxw1uvd4qtTnhiaJpYencj/8U8QoPMhYM2GJypRnDzhclmQL8z9T 3NbEgkQsLGVtnvHhOVJvHS9mZVyfECQWKQORM9NRYlv2+2/YzjJJsQ7wYpB0UwdHJhe8 bvcdlBtCv0qliwwgZZSUULY0zxfgTK9Kak3mjop46agyDf8O8k5en+L599bCaYiDL1Dv JuLmQC3r9UVADIBZNNG01pxgwW7/cn0G+dKcrCeHUgYhde4j2nfJiR4Zu5qsYtXxuliT FKPlAQnekhgZYJKhvPT7uzZUPev/Ut2Tlt0/zrVCTaoR++04ZUmL4oCVkrd+841LlHX6 FI2A== X-Gm-Message-State: ACgBeo1af4QZif7dTbvF61yfGKGi7xRpuPE5wpv6w9fD613bYmCrbO0R YblRLJ2ZKgYQml4t0RoWOzPJNQ== X-Google-Smtp-Source: AA6agR6s0qOuAnS2pxQ/ckfSNWnVEhFBgVsQ4GcfONoBilJcW5Ew//cwDvDyhtUe1r5La8zzBhmbFg== X-Received: by 2002:a17:902:e5c6:b0:16e:f3b6:ddb5 with SMTP id u6-20020a170902e5c600b0016ef3b6ddb5mr1209275plf.122.1659318661506; Sun, 31 Jul 2022 18:51:01 -0700 (PDT) Received: from laputa ([2400:4050:c3e1:100:6d35:92a:3690:8d3a]) by smtp.gmail.com with ESMTPSA id o10-20020a656a4a000000b0041975999455sm6300802pgu.75.2022.07.31.18.50.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 31 Jul 2022 18:51:00 -0700 (PDT) Date: Mon, 1 Aug 2022 10:50:57 +0900 From: AKASHI Takahiro To: Heinrich Schuchardt Cc: Tom Rini , u-boot@lists.denx.de Subject: Re: [PATCH v2 5/5] test: add test for full FAT16 directory Message-ID: <20220801015057.GB37247@laputa> Mail-Followup-To: AKASHI Takahiro , Heinrich Schuchardt , Tom Rini , u-boot@lists.denx.de References: <20220731115837.77646-1-heinrich.schuchardt@canonical.com> <20220731115837.77646-6-heinrich.schuchardt@canonical.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220731115837.77646-6-heinrich.schuchardt@canonical.com> X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 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.6 at phobos.denx.de X-Virus-Status: Clean On Sun, Jul 31, 2022 at 01:58:37PM +0200, Heinrich Schuchardt wrote: > Add a unit test checking that a full FAT16 directory leads to an error > when trying to add an additional entry. Thank you for adding this test case, but why do you restrict this test to fat16 and the root directory? The root directory on fat16 is a very much special case and differently implemented from others. So the test scenario doesn't do what we expect for fulfilling the whole disk. I think we should use other sub directories (and other file systems as well). > Signed-off-by: Heinrich Schuchardt > --- > v2: > new patch > --- > test/py/tests/test_fs/test_mkdir.py | 17 +++++++++++++++++ > 1 file changed, 17 insertions(+) > > diff --git a/test/py/tests/test_fs/test_mkdir.py b/test/py/tests/test_fs/test_mkdir.py > index f5cc308362..e3a9e3ed27 100644 > --- a/test/py/tests/test_fs/test_mkdir.py > +++ b/test/py/tests/test_fs/test_mkdir.py > @@ -119,3 +119,20 @@ class TestMkdir(object): > assert('0123456789abcdef00/' in output) > assert('0123456789abcdef13/' in output) > assert_fs_integrity(fs_ubtype, fs_img) > + > + def test_mkdir7(self, u_boot_console, fs_obj_mkdir): > + """ Test Case 7 - max out number of root directory entries > + """ > + _, _, fs_type = fs_obj_mkdir Why not use fs_ubtype, _, fs_type = ..., then > + if fs_type != 'fat16': > + return > + with u_boot_console.log.section('Test Case 7 - mkdir (max out)'): > + for i in range(0, 512): > + output = u_boot_console.run_command( > + f'fatmkdir host 0:0 /U-Boot-mkdir-max-out-test-directory-{i:05d}') '%smkdir ...'.format(fs_ubtype, i) -Takahiro Akashi > + if 'Can\'t create directory entry' in output: > + break > + # A directory was created > + assert i > 0 > + # The FAT16 root directory has only 512 directory entries > + assert i <= 512 / 5 > -- > 2.36.1 >