From nobody Sun Jul 24 18:26:25 2022 X-Original-To: dev-commits-src-all@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 4LrWpk3byJz4XDrZ; Sun, 24 Jul 2022 18:26:38 +0000 (UTC) (envelope-from asomers@gmail.com) Received: from mail-qt1-f174.google.com (mail-qt1-f174.google.com [209.85.160.174]) (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 4LrWpj4t8rz3TWw; Sun, 24 Jul 2022 18:26:37 +0000 (UTC) (envelope-from asomers@gmail.com) Received: by mail-qt1-f174.google.com with SMTP id w29so6837382qtv.9; Sun, 24 Jul 2022 11:26:37 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=mxwZmGs06oyEC03PrhbjWJc5UBHSHt5p+JjS8u0b+cI=; b=XNnVt7Xkqe2t1AtZoXHuHKnh6TkeKxWp5SRzWy2udhspd17LAZ+jNXdTt42zAH48kx +3NhwLKpqymrxPKVe8LXPQbT/ov4W06EA8srDbTIehEjlqB9IMstT8bEjwpgEiQx8XrI basFnzo6yuUrpW1kW1GeZVSfyJDDmduQyxMm8JgbN113zyJNEbg8+oCWeTlq07a7KEWd xLR2J28/IpbnhzzUW1Ci92vpAPx4UD/KdXDNDNDWfLtrmBOubkozhGu8e84fznkP8wVH wY2O3NZr+Z4GAFuAY4lGB1MqZfdYfoMr4HTcISFMsjIn45fzIQvUSw4a/v0OVNDqTnTH GzaQ== X-Gm-Message-State: AJIora/Kq6rmZQMjtkfD/Q55GdGDng4p4PuuThmN0G2ooFh/ILd8EPWv JJ/F72sMWxzhom3VjRMQABJDv4ZfxJKFaXs73Vtq/80gtNI= X-Google-Smtp-Source: AGRyM1tWoJ5cNSwpFLPXNdd+ef5qO6tKBXjiFQi4nHNfekQrzVpKzucPzXIylHLTUwxm1d7sfBFTTyyV+Y20OWRd6zk= X-Received: by 2002:a05:622a:1a8b:b0:31f:82e:8b1c with SMTP id s11-20020a05622a1a8b00b0031f082e8b1cmr7926813qtc.659.1658687196682; Sun, 24 Jul 2022 11:26:36 -0700 (PDT) List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 References: <202207161727.26GHRNIc055355@gitrepo.freebsd.org> In-Reply-To: <202207161727.26GHRNIc055355@gitrepo.freebsd.org> From: Alan Somers Date: Sun, 24 Jul 2022 12:26:25 -0600 Message-ID: Subject: Re: git: 90e29718cffc - main - Clarify when GEOM utilities exit with success or failure. To: Kirk McKusick Cc: src-committers , "" , dev-commits-src-main@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 4LrWpj4t8rz3TWw X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of asomers@gmail.com designates 209.85.160.174 as permitted sender) smtp.mailfrom=asomers@gmail.com X-Spamd-Result: default: False [-3.09 / 15.00]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_SHORT(-0.99)[-0.995]; FORGED_SENDER(0.30)[asomers@freebsd.org,asomers@gmail.com]; R_SPF_ALLOW(-0.20)[+ip4:209.85.128.0/17:c]; MIME_GOOD(-0.10)[text/plain]; RWL_MAILSPIKE_GOOD(-0.10)[209.85.160.174:from]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US]; RCVD_IN_DNSWL_NONE(0.00)[209.85.160.174:from]; MIME_TRACE(0.00)[0:+]; MLMMJ_DEST(0.00)[dev-commits-src-all@freebsd.org,dev-commits-src-main@freebsd.org]; FROM_NEQ_ENVFROM(0.00)[asomers@freebsd.org,asomers@gmail.com]; R_DKIM_NA(0.00)[]; ARC_NA(0.00)[]; TO_DN_SOME(0.00)[]; FROM_HAS_DN(0.00)[]; FREEFALL_USER(0.00)[asomers]; FREEMAIL_ENVFROM(0.00)[gmail.com]; RCPT_COUNT_THREE(0.00)[4]; RCVD_TLS_LAST(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; DMARC_NA(0.00)[freebsd.org]; RCVD_COUNT_TWO(0.00)[2] X-ThisMailContainsUnwantedMimeParts: N On Sat, Jul 16, 2022 at 11:27 AM Kirk McKusick wrote: > > The branch main has been updated by mckusick: > > URL: https://cgit.FreeBSD.org/src/commit/?id=90e29718cffcec987769ccbe39308357202c46d5 > > commit 90e29718cffcec987769ccbe39308357202c46d5 > Author: Kirk McKusick > AuthorDate: 2022-07-16 17:25:22 +0000 > Commit: Kirk McKusick > CommitDate: 2022-07-16 17:26:51 +0000 > > Clarify when GEOM utilities exit with success or failure. > > Historically, GEOM utilities (gpart(8), gstripe(8), gmirror(8), > etc) used the gctl_error() routine to report errors. If they called > gctl_error() they would exit with EXIT_FAILURE, otherwise they would > return with EXIT_SUCCESS. If they used gctl_error() to output an > informational message, for example when run with the -v (verbose) > option, they would mistakenly exit with EXIT_FAILURE. A further > limitation of the gctl_error() function was that it could only be > called once. Messages from any additional calls to gctl_error() > would be silently discarded. > > To resolve these problems a new function, gctl_msg() has been added. > It can be called multiple times to output multiple messages. It > also has an additional errno argument which should be zero if it is > an informational message or an errno value (EINVAL, EBUSY, etc) if > it is an error. When done the gctl_post_messages() function should > be called to indicate that all messages have been posted. If any > of the messages had a non-zero errno, the utility will EXIT_FAILURE. > If only informational messages (with zero errno) were posted, the > utility will EXIT_SUCCESS. > > Tested by: Peter Holm > PR: 265184 > MFC after: 1 week > --- > lib/libgeom/geom_ctl.c | 6 ++-- > sbin/geom/core/geom.c | 5 +++- > sys/geom/geom.h | 2 +- > sys/geom/geom_ctl.c | 10 ++++++- > sys/geom/union/g_union.c | 75 ++++++++++++++++++++++++++---------------------- > 5 files changed, 57 insertions(+), 41 deletions(-) This change is causing a bunch of ATF tests to fail. I'm not sure if you broke something or if the tests just need to be updated because geli returns better error codes. In either case, could you please investigate? https://ci.freebsd.org/job/FreeBSD-main-amd64-test/21633/ -Alan