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 C0EB6C25B4E for ; Tue, 24 Jan 2023 19:02:53 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 1092885666; Tue, 24 Jan 2023 20:02:51 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=konsulko.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=konsulko.com header.i=@konsulko.com header.b="Q9bJTlTc"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 740B58563A; Tue, 24 Jan 2023 20:02:49 +0100 (CET) Received: from mail-ot1-x32c.google.com (mail-ot1-x32c.google.com [IPv6:2607:f8b0:4864:20::32c]) (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 953D2855B5 for ; Tue, 24 Jan 2023 20:02:45 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=konsulko.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=trini@konsulko.com Received: by mail-ot1-x32c.google.com with SMTP id f5-20020a9d5f05000000b00684c0c2eb3fso9771951oti.10 for ; Tue, 24 Jan 2023 11:02:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=konsulko.com; s=google; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=z1/P2RnDKecfGVC9mCKl8gIzhmDqGfCKGcmjHS3+k2I=; b=Q9bJTlTcN4hz6Q27TmlCpng7flTclGLJ7ojWG1mRg6ukGT+35Va0LDGVvHfDhR9y4e OhMaNYHU62oWDWwWCps3OLTXLmFH7Cnn8gu3cpsE2w/LDQYpTtFWt75uj9JfOBpm1f6t b6ZiHJIp1U+uzBsZVixvUYUlOBcxatZe8yBos= 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:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=z1/P2RnDKecfGVC9mCKl8gIzhmDqGfCKGcmjHS3+k2I=; b=JT+VZCE+3OyBEpSG3F1YPUMfbReS/ZOF+KJuHf9ZJoGpIk7EbLmjMnvkhc0kCN1Pyl l9cWs0FUdkYADl0pWKtuGYDSuhyLDtfKHuDuufYaaDtCjzaoC8jd1bg7RKXuNks8vEpz KhCC6/Ev9vZf2Ci22zjbcElzU0Wai/ezXh3IU/0PNi9lw8rvRTNfqeluxaA3lwZp1uLE 0KKr7Pr6OmlilZ2669aQh86ftfzo7jc89lDIBs2Vg6v1Y+/qANjfUjfGo7cIcI0Yhf4H ezQpSxosKaNbokXUoFBuN4jZo5H3cH2FIX5QrbXHa4sJIHCETkb6yBbNE9vslLdnvVU/ /zVA== X-Gm-Message-State: AFqh2kp4nsNqSIGElUurImaHvLFI/SbxO3m6ctO8CJI5h1FpAkUXfpIJ aQ1F0AJPr7picgBfJXViT0x9djFD4mDkCjWXP7M= X-Google-Smtp-Source: AMrXdXuzVsSDq7/uB7glOaQxSzjkqUOa3S9hZM7mQiISqtZu7FnoZmG5Ia4z1vnZSt/2IkTb2FHmTA== X-Received: by 2002:a9d:4548:0:b0:670:98dc:cd5 with SMTP id p8-20020a9d4548000000b0067098dc0cd5mr16880752oti.4.1674586963937; Tue, 24 Jan 2023 11:02:43 -0800 (PST) Received: from bill-the-cat (2603-6081-7b00-6400-fdfe-8628-3fc7-956b.res6.spectrum.com. [2603:6081:7b00:6400:fdfe:8628:3fc7:956b]) by smtp.gmail.com with ESMTPSA id x5-20020ae9f805000000b0070d10ecb4besm1936440qkh.1.2023.01.24.11.02.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 24 Jan 2023 11:02:43 -0800 (PST) Date: Tue, 24 Jan 2023 14:02:41 -0500 From: Tom Rini To: Simon Glass Cc: u-boot@lists.denx.de Subject: Re: [PATCH v3 12/70] dm: part: Update test to use mmc2 Message-ID: <20230124190241.GM631605@bill-the-cat> References: <20230117174820.1281477-1-sjg@chromium.org> <20230117174820.1281477-13-sjg@chromium.org> <20230124013922.GF631605@bill-the-cat> <20230124154901.GH631605@bill-the-cat> <20230124182758.GL631605@bill-the-cat> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="AVsU0XxfC6ed1aQ6" Content-Disposition: inline In-Reply-To: X-Clacks-Overhead: GNU Terry Pratchett 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 --AVsU0XxfC6ed1aQ6 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Jan 24, 2023 at 11:55:32AM -0700, Simon Glass wrote: > Hi Tom, >=20 > On Tue, 24 Jan 2023 at 11:28, Tom Rini wrote: > > > > On Tue, Jan 24, 2023 at 11:15:15AM -0700, Simon Glass wrote: > > > Hi Tom, > > > > > > On Tue, 24 Jan 2023 at 08:49, Tom Rini wrote: > > > > > > > > On Tue, Jan 24, 2023 at 03:56:00AM -0700, Simon Glass wrote: > > > > > Hi Tom, > > > > > > > > > > On Mon, 23 Jan 2023 at 18:39, Tom Rini wrote: > > > > > > > > > > > > On Tue, Jan 17, 2023 at 10:47:22AM -0700, Simon Glass wrote: > > > > > > > > > > > > > At present this test sets up a partition table on mmc1. But t= his is used > > > > > > > by the bootstd tests, so it is not possible to run those afte= r this test > > > > > > > has run, without restarting the Python test harness. > > > > > > > > > > > > > > This is inconvenient when running tests repeatedly with 'ut d= m'. Move the > > > > > > > test to use mmc2, which is not used by anything. > > > > > > > > > > > > > > Signed-off-by: Simon Glass > > > > > > > > > > > > When I run tests like this: > > > > > > TEST=3D"not sleep and not event_dump and not bootmgr and not ex= tension" > > > > > > ./tools/buildman/buildman -o /tmp/sandbox -P --board sandbox > > > > > > ./test/py/test.py --bd $ARGS --build-dir /tmp/sandbox -k "$TEST= " -ra > > > > > > I get: > > > > > > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D FAILURES = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > > > > > > _________________________________ test_ut[ut_dm_dm_test_part] _= ________________________________ > > > > > > test/py/tests/test_ut.py:341: in test_ut > > > > > > assert output.endswith('Failures: 0') > > > > > > E assert False > > > > > > E + where False =3D ('Failures: 0') > > > > > > E + where =3D 'Test: dm_test_part: part.c\r\r\n** No device specified **\r\r\n= Couldn\'t find partition mmc \r\r\n** No device ...: 0 =3D=3D do_test= (uts, 2, "1:2", 0): Expected 0x0 (0), got 0x1 (1)\r\r\nTest dm_test_part fa= iled 4 times\r\r\nFailures: 4'.endswith > > > > > > ------------------------------------ Captured stdout call -----= -------------------------------- > > > > > > =3D> ut dm dm_test_part > > > > > > Test: dm_test_part: part.c > > > > > > ** No device specified ** > > > > > > Couldn't find partition mmc > > > > > > ** No device specified ** > > > > > > Couldn't find partition mmc > > > > > > ** No partition table - mmc 0 ** > > > > > > Couldn't find partition mmc 0 > > > > > > Could not find "test1" partition > > > > > > ** Bad device specification mmc #test1 ** > > > > > > ** Bad device specification mmc #test1 ** > > > > > > Couldn't find partition mmc #test1 > > > > > > ** Bad partition specification mmc 1:0 ** > > > > > > Couldn't find partition mmc 1:0 > > > > > > ** Invalid partition 2 ** > > > > > > Couldn't find partition mmc 1:2 > > > > > > test/dm/part.c:20, do_test(): expected =3D=3D part_get_info_by_= dev_and_name_or_num("mmc", part_str, &mmc_dev_desc, &part_info, whole): Exp= ected 0x2 (2), got 0xfffffffe (-2) > > > > > > test/dm/part.c:82, dm_test_part(): 0 =3D=3D do_test(uts, 2, "1:= 2", 0): Expected 0x0 (0), got 0x1 (1) > > > > > > Test: dm_test_part: part.c (flat tree) > > > > > > ** No device specified ** > > > > > > Couldn't find partition mmc > > > > > > ** No device specified ** > > > > > > Couldn't find partition mmc > > > > > > ** No partition table - mmc 0 ** > > > > > > Couldn't find partition mmc 0 > > > > > > Could not find "test1" partition > > > > > > ** Bad device specification mmc #test1 ** > > > > > > ** Bad device specification mmc #test1 ** > > > > > > Couldn't find partition mmc #test1 > > > > > > ** Bad partition specification mmc 1:0 ** > > > > > > Couldn't find partition mmc 1:0 > > > > > > ** Invalid partition 2 ** > > > > > > Couldn't find partition mmc 1:2 > > > > > > test/dm/part.c:20, do_test(): expected =3D=3D part_get_info_by_= dev_and_name_or_num("mmc", part_str, &mmc_dev_desc, &part_info, whole): Exp= ected 0x2 (2), got 0xfffffffe (-2) > > > > > > test/dm/part.c:82, dm_test_part(): 0 =3D=3D do_test(uts, 2, "1:= 2", 0): Expected 0x0 (0), got 0x1 (1) > > > > > > Test dm_test_part failed 4 times > > > > > > Failures: 4 > > > > > > =3D> > > > > > > > > > > Oh dear. I believe this is an ordering problem. These two patches= need > > > > > to be applied together because the first one changes mmc1.img and= the > > > > > second one relies on that change: > > > > > > > > > > part: Add a function to find the first bootable partition > > > > > dm: part: Update test to use mmc2 > > > > > > > > > > I have them quite far apart in the series. > > > > > > > > > > I can merge them into one commit, perhaps? > > > > > > > > > > > > > > > > > And further tests down the series also fail / introduce failure= s, but > > > > > > this is the first one, and why I thought v2 had more problems. > > > > > > > > > > For some reason I'm not seeing this, but it could be another orde= ring > > > > > thing. I don't see failures on CI but it only tests the whole. > > > > > > > > > > Let me know what you'd like me to do. I don't currently have a wa= y to > > > > > run tests on every commit, so my testing there is a bit random. I > > > > > normally just build-test the series and then check with CI. > > > > > > > > Well, your ordering comment is interesting. I bisect'd down to this > > > > patch being a problem because with the full series applied I see: > > > > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D FAILURES =3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > > > > ___________________________________ test_ut_dm_init_bootstd _______= ____________________________ > > > > test/py/tests/test_ut.py:320: in test_ut_dm_init_bootstd > > > > setup_bootflow_image(u_boot_console) > > > > test/py/tests/test_ut.py:226: in setup_bootflow_image > > > > fname, mnt =3D setup_image(cons, mmc_dev, 0xc, second_part=3DTr= ue) > > > > test/py/tests/test_ut.py:45: in setup_image > > > > u_boot_utils.run_and_log(cons, 'sudo sfdisk %s' % fname, > > > > test/py/u_boot_utils.py:180: in run_and_log > > > > output =3D runner.run(cmd, ignore_errors=3Dignore_errors, stdin= =3Dstdin) > > > > test/py/multiplexed_log.py:182: in run > > > > raise exception > > > > E ValueError: Exit code: 1 > > > > ------------------------------------ Captured stdout call ---------= ---------------------------- > > > > +qemu-img create /home/trini/work/u-boot/u-boot/mmc1.img 20M > > > > Formatting '/home/trini/work/u-boot/u-boot/mmc1.img', fmt=3Draw siz= e=3D20971520 > > > > +sudo sfdisk /home/trini/work/u-boot/u-boot/mmc1.img > > > > Checking that no-one is using this disk right now ... OK > > > > > > > > Disk /home/trini/work/u-boot/u-boot/mmc1.img: 20 MiB, 20971520 byte= s, 40960 sectors > > > > Units: sectors of 1 * 512 =3D 512 bytes > > > > Sector size (logical/physical): 512 bytes / 512 bytes > > > > I/O size (minimum/optimal): 512 bytes / 512 bytes > > > > > > > > >>> Created a new DOS disklabel with disk identifier 0xab7e7834. > > > > /home/trini/work/u-boot/u-boot/mmc1.img1: Created a new partition 1= of type 'W95 FAT32 (LBA)' and of size 18 MiB. > > > > /home/trini/work/u-boot/u-boot/mmc1.img2: All space for primary par= titions is in use. > > > > > > I see this on my Ubuntu 20.04 machine but it doesn't happen on 22.04. > > > Is it a bug in sfdisk? What version are you using? > > > > > > Works: 2.37.2-4ubuntu3 > > > Fails: 2.34-0.1ubuntu9.3 > > > > > > Do you see this in CI at all? > > > > Ah, so that's the fun part of this then. Yes, CI is fine since it's on > > 22.04, but my workstation is on 20.04, and so fails. Doing a quick try > > and running sandbox tests in Docker on my workstation does have the > > series passing. So, the series is fine, but I need to adjust my local > > flow a little bit now. >=20 > OK ta. >=20 > Yes I actually only found that out when I tried it on another machine > this morning. It was a surprise, but a bit of fiddling made me suspect > it is a bug, e.g. that it doesn't allow partitions as small as 2MB? One of the first hits I see on the error message is https://github.com/util-linux/util-linux/issues/851 which leads me to think yes, there's an sfdisk bug, and it's been fixed. So the reasonable paths forward here are that we just note that CI uses Ubuntu 22.02 and any failures based on host tool problems are up to users to deal with, I think. Since I let my workstation lag behind LTS upgrades for just a little bit, I'll just do the upgrade I was going to do in April, to 22.02.x, now'ish. --=20 Tom --AVsU0XxfC6ed1aQ6 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQGzBAABCgAdFiEEGjx/cOCPqxcHgJu/FHw5/5Y0tywFAmPQK04ACgkQFHw5/5Y0 tyxr+gv/dDhwu5hulT20t7zVyHazp7QYRFofn7IFxTUGEzNSxvS2KtC7AwxsKdB9 iFbGqVepDhrDo+fFHSLb3RCPBqnFjuIfhwrA7+cHrDgQSa1hKadQP8AKRm6vevpa +7XKgXI6f+KXhRBhiRhoTM2iWLSijjVTQUN34xHEk9Kf4+eVa5+TPfbLMl7GJlxj BYUTAcYcaVJjA461YOGF53kNYmtp235LI5OerYDudhIVTrW4SmgTb9JnxqWdvawa CXcFsApnxmL/0YSD97QkKVbJnieSF2cCQ3quFfVW81eeyxtxbiLdG9iSKI4Vukmv a7GbeEN3LTt/EaoJ17yBjrprt/8rWDNHBDWwd3kLCH9B4PPy4BDjKoUCiBe6x7zq l4TanCcM2TsMuRSgAd089NvOaOBlu85dJm6LFOnlMa64wYI6FUFBkXJmxCwi8MYc am2zw4Fv+4UHCjV7R7ucprohaV7bC5WG9nf1pkhpg/HaM29bFotlP0GfCU8/MQUC HVcE/uA+ =vcjz -----END PGP SIGNATURE----- --AVsU0XxfC6ed1aQ6--