From nobody Sun Apr 30 13:21:59 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q8RpG2vHQz47nvP for ; Sun, 30 Apr 2023 13:22:14 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-ed1-x52a.google.com (mail-ed1-x52a.google.com [IPv6:2a00:1450:4864:20::52a]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Q8RpG1Jqbz3CQ0 for ; Sun, 30 Apr 2023 13:22:14 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-ed1-x52a.google.com with SMTP id 4fb4d7f45d1cf-50bc3088b7aso886700a12.3 for ; Sun, 30 Apr 2023 06:22:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20221208.gappssmtp.com; s=20221208; t=1682860933; x=1685452933; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=WnfFLRJfb+vHl7Fa80ATV3sWMvXn495NuDC18xkVY+U=; b=5N8quyn8o2eiX0UU6FVw/OAuZHyzucf5pijy6wcGSneyKyp3EXH+cObi7rsZh00bmU jduvJdEsfSn/mUMwOj2qdEOULB+o2tnCNfoa3/5X/FqNBKhnc888s3atZrL2LkwoTXp4 InSQIF08KffTp+Hfhq6lgnfeOeRLR018ik6LGoCZQIekRovtH3OjSWYkzlOpyS14gMDg k5FXzXF40iX4WsLfC2utvvPYMZCuRDT6+KYuKw1AcrG3uFWCxhBsOkyyv/FfDyXm/PzM Lmu+lZU+kl0qGm+YMwPQAFxlR1Ort2mFtMfBB4IEg0hRysN9Cxm5aGdHlsUtSmmer5u6 UfQw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682860933; x=1685452933; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=WnfFLRJfb+vHl7Fa80ATV3sWMvXn495NuDC18xkVY+U=; b=ZM05+aZEdMcRCPUNGv0ItRh38uB8Nnw73LYI6P0fov3ljUjKnlFGnooXpDTUAQph3T YMvnJzrmfWSC8gLyMnmJ8UBY965dW7je/QEddMmNaKasiHUg1fE8MzQnldjnZn4jZMmz 5EV3QlbXClQdx0hCDGE9SRJr/rQ+hGKRpwHuCAEfm93oE6mi3TirpH0uY4/YblEqjdup FxDNLh3/94C9GzoURqmMkZ1bjmNsWGusUVKqSElTwSzyrN1/eccEImuV+Hv/ZVB1j+kh WIsmp1O/e2LzAaL1hOhX6n+LZpURxM2dPCvWly91m2bGwD2i2v3lnOytPD02kB75zX7o hGhg== X-Gm-Message-State: AC+VfDz7AhSzqPZ20kvZSkOmkkY/runnMV4Y6dMWAnaS5STkCQGOGqMs sDKii3brqRsiSxNPrw7r++hwa6Nnqp3fwCxoFcM5kSh3YOTi81k/ X-Google-Smtp-Source: ACHHUZ5Bj05G/1QMyZ+3bvwy8MPzPsFWslOUuiSzESCde4/gEsQULdrUgGckbVgea0rSaZ4MsBxIdZtlJS/zSIdl30A= X-Received: by 2002:a05:6402:1017:b0:504:ae37:77d0 with SMTP id c23-20020a056402101700b00504ae3777d0mr3344455edu.10.1682860932594; Sun, 30 Apr 2023 06:22:12 -0700 (PDT) List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 References: <202304300700.33U70cF9082164@gitrepo.freebsd.org> <3ECD7073-5F45-4C62-BE47-D1C8CEC61883@freebsd.org> In-Reply-To: <3ECD7073-5F45-4C62-BE47-D1C8CEC61883@freebsd.org> From: Warner Losh Date: Sun, 30 Apr 2023 07:21:59 -0600 Message-ID: Subject: Re: git: 2e7797cd9bba - main - Yet another try to fix printf format conflict. To: Jessica Clarke Cc: Kirk McKusick , src-committers , "" , "" Content-Type: multipart/alternative; boundary="0000000000001811e605fa8d98c7" X-Rspamd-Queue-Id: 4Q8RpG1Jqbz3CQ0 X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-ThisMailContainsUnwantedMimeParts: N --0000000000001811e605fa8d98c7 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Sun, Apr 30, 2023, 1:08 AM Jessica Clarke wrote: > On 30 Apr 2023, at 08:00, Kirk McKusick wrote: > > > > The branch main has been updated by mckusick: > > > > URL: > https://cgit.FreeBSD.org/src/commit/?id=3D2e7797cd9bba4fa82391b53a7dd7aac= 074baf716 > > > > commit 2e7797cd9bba4fa82391b53a7dd7aac074baf716 > > Author: Kirk McKusick > > AuthorDate: 2023-04-30 06:59:45 +0000 > > Commit: Kirk McKusick > > CommitDate: 2023-04-30 07:00:23 +0000 > > > > Yet another try to fix printf format conflict. > > > > I find it very annoying that there is no FreeBSD infrastructure to > > determine failures across architectures other than to check in > > changes and then have Jenkins find them. > > That=E2=80=99s what make universe/tinderbox/worlds/kernels are for? (See = build(7)) > There's other ways too. The long way is to 'make buildworld TARGET=3Di386' which will catch things like this. However, that can take a while... If you've done one of those in the past, there will be enough of a tree for the next trick to work: cd sbin/dumpfs make buildenv TARGET=3Di386 make # in a subshell exit This will also build things and see if you got the printf formatting right and is pretty quick. So of course I always do this before I commit.... the fix that the tinderbox tells me I broke (since I don't always remember that I've changed a printf in larger commits). it would be nice if clang had a magic flag to catch this.... Warner Jess > > > Suggested by: Jessica Clarke > > MFC after: 1 week > > --- > > sbin/dumpfs/dumpfs.c | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/sbin/dumpfs/dumpfs.c b/sbin/dumpfs/dumpfs.c > > index 743734660e57..a0767c39e6bf 100644 > > --- a/sbin/dumpfs/dumpfs.c > > +++ b/sbin/dumpfs/dumpfs.c > > @@ -245,7 +245,7 @@ dumpfs(const char *name, int dosb) > > default: > > goto err; > > } > > - printf("old_cpg\t%d\tsize_cg\t%d\tCGSIZE\t%d\n", > > + printf("old_cpg\t%d\tsize_cg\t%zu\tCGSIZE\t%zu\n", > > afs.fs_old_cpg, sizeof(struct cg), CGSIZE(&afs)); > > printf("sblkno\t%d\tcblkno\t%d\tiblkno\t%d\tdblkno\t%d\n", > > afs.fs_sblkno, afs.fs_cblkno, afs.fs_iblkno, afs.fs_dblkno); > > --0000000000001811e605fa8d98c7 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


On Sun, Apr 30, 2023, 1:08 AM Jessica Clarke <jrtc27@freebsd.org> wrote:
On 30 Apr 2023, at 08:00, Kirk McKusick <= ;mckusick@FreeBSD.org> wrote:
>
> The branch main has been updated by mckusick:
>
> URL: https://cgit.FreeBSD.org/src/commit/?id=3D2e7797cd9bba4fa82391b53a7dd7aa= c074baf716
>
> commit 2e7797cd9bba4fa82391b53a7dd7aac074baf716
> Author:=C2=A0 =C2=A0 =C2=A0Kirk McKusick <mckusick@FreeBSD.org><= br> > AuthorDate: 2023-04-30 06:59:45 +0000
> Commit:=C2=A0 =C2=A0 =C2=A0Kirk McKusick <mckusick@FreeBSD.org><= br> > CommitDate: 2023-04-30 07:00:23 +0000
>
>=C2=A0 =C2=A0 Yet another try to fix printf format conflict.
>
>=C2=A0 =C2=A0 I find it very annoying that there is no FreeBSD infrastr= ucture to
>=C2=A0 =C2=A0 determine failures across architectures other than to che= ck in
>=C2=A0 =C2=A0 changes and then have Jenkins find them.

That=E2=80=99s what make universe/tinderbox/worlds/kernels are for? (See bu= ild(7))

There's other ways too. The long way is to 'make buildworld = TARGET=3Di386' which will catch things like this. However, that can tak= e a while... If you've done one of those in the past, there will be eno= ugh of a tree for the next trick to work:

=
cd sbin/dumpfs
make buildenv TARGE= T=3Di386
make=C2=A0 =C2=A0 =C2=A0# in a subshell
exit

This will also build things and see if you got the printf formatting right= and is pretty quick.

So= of course I always do this before I commit.... the fix that the tinderbox = tells me I broke (since I don't always remember that I've changed a= printf in larger commits). it would be nice if clang had a magic flag to c= atch this....

Warner

=
Jess

>=C2=A0 =C2=A0 Suggested by: Jessica Clarke
>=C2=A0 =C2=A0 MFC after:=C2=A0 =C2=A0 1 week
> ---
> sbin/dumpfs/dumpfs.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/sbin/dumpfs/dumpfs.c b/sbin/dumpfs/dumpfs.c
> index 743734660e57..a0767c39e6bf 100644
> --- a/sbin/dumpfs/dumpfs.c
> +++ b/sbin/dumpfs/dumpfs.c
> @@ -245,7 +245,7 @@ dumpfs(const char *name, int dosb)
>=C2=A0 =C2=A0 =C2=A0 =C2=A0default:
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0goto err;
>=C2=A0 =C2=A0 =C2=A0 =C2=A0}
> -=C2=A0 =C2=A0 =C2=A0printf("old_cpg\t%d\tsize_cg\t%d\tCGSIZE\t%d= \n",
> +=C2=A0 =C2=A0 =C2=A0printf("old_cpg\t%d\tsize_cg\t%zu\tCGSIZE\t%= zu\n",
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0afs.fs_old_cpg, sizeof(struct = cg), CGSIZE(&afs));
>=C2=A0 =C2=A0 =C2=A0 =C2=A0printf("sblkno\t%d\tcblkno\t%d\tiblkno\= t%d\tdblkno\t%d\n",
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0afs.fs_sblkno, afs.fs_cblkno, = afs.fs_iblkno, afs.fs_dblkno);

--0000000000001811e605fa8d98c7--