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 66129C25B4E for ; Tue, 24 Jan 2023 18:28:09 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 06CBF8563B; Tue, 24 Jan 2023 19:28:07 +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="Zl1/HUzO"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 433968563B; Tue, 24 Jan 2023 19:28:05 +0100 (CET) Received: from mail-qt1-x82c.google.com (mail-qt1-x82c.google.com [IPv6:2607:f8b0:4864:20::82c]) (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 DE95385662 for ; Tue, 24 Jan 2023 19:28:01 +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-qt1-x82c.google.com with SMTP id h24so9911574qta.12 for ; Tue, 24 Jan 2023 10:28:01 -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=Xo5ylv4nqSvcuERHBgnXI3dlPLLivnhjWAauxbBZ67Q=; b=Zl1/HUzOsRbXLn402xoAKSZxEvcIxE0LZ93+NB8NBb3ri4UfnA0wyR88hoqKR9W+Xv XARrKYb+MILzY4rWFgd8UrKwf52Ce1Mc2FzlhpqjYaAvdadk1/m61QZ91vXFl08ZzT41 gk/+ufMqiScm3Rk+kv1c+lBzXlcmo9hAfOIyw= 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=Xo5ylv4nqSvcuERHBgnXI3dlPLLivnhjWAauxbBZ67Q=; b=0hFCgjdApYvQak1Y8fwDf43Am5Whio8X9DCwUda6UTLrgrQKJlRk+ItRJN3h7Dw1ib N0tX9t2OmlFT/2wCPQvGjRX9JiZJNO93thw+wRUuSextp+EpdzoXQrBqcpFwDS05kC8C gpwl7mc912MhCJTj0BZ89S58y+4oBAVALZ5gYNjRD6zmPZbTfEIskNYW8J/+YAFx10GD 7qrncZUcIbJNqQySOszwGVGs/eMoPgoV3l12/RB5nWD4DYYtO1VWfNwI1iUb5urhgNkb xJVXkgJf8L0NPKBGYpVdhWoZ7kl7k3oUvYl27S5vu+LNmXLjSC0pbcbsAxvdxiACUiig Kgyw== X-Gm-Message-State: AFqh2koeBshTbAEwmCeP8Q9Dd+BfP7eA79plTupxHDR1KwrAaYuiPNFR Uq2YJpYEksrmLNHdlghSFQcUJq+BiLzJ7fq0QHQ= X-Google-Smtp-Source: AMrXdXuiRay3o5Db1X3L9vzdSwwC6wEtH30t8fnXo5p9ROHlbokXLkw5OQh8/PkeW3QvsQmgmhFC8A== X-Received: by 2002:ac8:45c2:0:b0:3b6:2c3b:8c00 with SMTP id e2-20020ac845c2000000b003b62c3b8c00mr40327684qto.66.1674584880615; Tue, 24 Jan 2023 10:28:00 -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 r9-20020ac85209000000b003b54a8fd02dsm1630802qtn.87.2023.01.24.10.27.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 24 Jan 2023 10:28:00 -0800 (PST) Date: Tue, 24 Jan 2023 13:27:58 -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: <20230124182758.GL631605@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> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="We3kTPdwkBGsLLkt" 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 --We3kTPdwkBGsLLkt Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Jan 24, 2023 at 11:15:15AM -0700, Simon Glass wrote: > Hi Tom, >=20 > 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 this = is used > > > > > by the bootstd tests, so it is not possible to run those after th= is test > > > > > has run, without restarting the Python test harness. > > > > > > > > > > This is inconvenient when running tests repeatedly with 'ut dm'. = 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 extens= ion" > > > > ./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\nCoul= dn\'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 failed= 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): Expecte= d 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): Expecte= d 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 failures, b= ut > > > > 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 ordering > > > 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 way 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=3DTrue) > > 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=3Ds= tdin) > > 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 size=3D= 20971520 > > +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 bytes, 4= 0960 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 partiti= ons is in use. >=20 > 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? >=20 > Works: 2.37.2-4ubuntu3 > Fails: 2.34-0.1ubuntu9.3 >=20 > 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 Tom --We3kTPdwkBGsLLkt Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQGzBAABCgAdFiEEGjx/cOCPqxcHgJu/FHw5/5Y0tywFAmPQIysACgkQFHw5/5Y0 tyzk6gv+OeSXu2PrpOcUZl7fJzwYO4NRXmJNGcnSDsdGKHd1T+qzyf8TRZ6WBohK q2PDlk2ZcsTz8T/kEBuOQLhUbXroiIKl2/TPzvKgyBnkTjQtVx++oTSE/+y1ZBBI 4vcbxjmuxqX9nf+8Q/Jk+hCaYHJUtgfBheuOd4uP4HEjpCza0RXGRmmhhc7RhvuT ELeRWDOo7qlGOnCMMFbsJ9H9Fzsu2t5488vj/D1WEYnGePPHpgDCW2xj4Ar1CkLk 6DOdR8bsrxlrD5kMk21K89G0mjVV+OhTlC0Mp90iRelMvMxAePHgg1GcfwLL95hH hSlDOV/klnFZPggK+/Bgj0X5KrPDrQ5GtJi0034oNApWeCE0zBMfpaF63p0w6mCZ sVrORvg2YBEate3+i2VGXIRvvtCbXboAzuJxxklYI4cjhIh7/0SQXWePzvnEBemM rvrp8Q6AB9I5zfdxkXjnUPYWUX1hGKJGLjwjIu2tfTuS9nXIE4FQ44jWFvVR4Y7f 89TkrJUW =89Pi -----END PGP SIGNATURE----- --We3kTPdwkBGsLLkt--