From nobody Tue Sep 26 20:30:17 2023 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 4RwBFf59PYz4vchY for ; Tue, 26 Sep 2023 20:30:30 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Received: from mail-wr1-f47.google.com (mail-wr1-f47.google.com [209.85.221.47]) (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 4RwBFf3LMPz3YHV for ; Tue, 26 Sep 2023 20:30:30 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-wr1-f47.google.com with SMTP id ffacd0b85a97d-32008e339adso9091320f8f.2 for ; Tue, 26 Sep 2023 13:30:30 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1695760228; x=1696365028; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=dcuRRZgG3zDckkQjUeveCY3vE4jpILmwyZHLLSLfZc0=; b=B06SR8qgxoAyyy+qcqyuiUdPzrIQH3DpkV1IF8qeUvxIf6Tuvn2lridFc4dEl5stqS l2MXk2wCUYyOkMFM6eppAovkA0pcLVNr33rs2Ems5B+LR/7PEU7fKWkop+QTfgAloqXA 7DkedNA79T6OflaoDhU09oE74vVhYoI65/OABosSm1mpfqZUUYPL1XZLyf2u+/5UEZr5 UjKp8GtwpuZjrUpZgFtp8sN28jVxxz3UBv9SWn7U2upjUsy714cu91JbS05jt6Vj1QZK Fj36m69ObjdP8ZQCZf3PsTRErl43+BCcMlf1qY7jGIeuJ1bl/lznypcq/B6Y/dpVFNHG gNLg== X-Gm-Message-State: AOJu0Yz1xY9su5zwRfU+ti0eFLwZzcaQAgxT0zHKox+fBriuAxb5vZ+b WaFVOC5NZsrer3ttwtZLZhX0QA== X-Google-Smtp-Source: AGHT+IFtMZp6bBX4T3ULDrJTGkUZ27n7LAGdeWdHsuk/SNzHs7o5EknZ6WaoFHspHE7HXxC3U3+j0A== X-Received: by 2002:adf:f192:0:b0:321:4de3:fd5c with SMTP id h18-20020adff192000000b003214de3fd5cmr9755629wro.51.1695760228382; Tue, 26 Sep 2023 13:30:28 -0700 (PDT) Received: from smtpclient.apple ([131.111.5.246]) by smtp.gmail.com with ESMTPSA id b1-20020a5d4d81000000b003140f47224csm15417512wru.15.2023.09.26.13.30.27 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 26 Sep 2023 13:30:28 -0700 (PDT) Content-Type: text/plain; charset=utf-8 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 (Mac OS X Mail 16.0 \(3731.600.7\)) Subject: Re: git: c7dd4601aeeb - main - libc: Add a rudimentary test for quick_exit(3). From: Jessica Clarke In-Reply-To: <202309262026.38QKQY4A083001@gitrepo.freebsd.org> Date: Tue, 26 Sep 2023 21:30:17 +0100 Cc: "src-committers@freebsd.org" , "dev-commits-src-all@freebsd.org" , "dev-commits-src-main@freebsd.org" Content-Transfer-Encoding: quoted-printable Message-Id: <3FB4642C-6B3D-4125-8E71-F99D61FF0B16@freebsd.org> References: <202309262026.38QKQY4A083001@gitrepo.freebsd.org> To: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= X-Mailer: Apple Mail (2.3731.600.7) X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US] X-Rspamd-Queue-Id: 4RwBFf3LMPz3YHV Jess > On 26 Sep 2023, at 21:26, Dag-Erling Sm=C3=B8rgrav = wrote: >=20 > The branch main has been updated by des: >=20 > URL: = https://cgit.FreeBSD.org/src/commit/?id=3Dc7dd4601aeebbc1bbe131cbe6747476c= 124b47fe >=20 > commit c7dd4601aeebbc1bbe131cbe6747476c124b47fe > Author: Dag-Erling Sm=C3=B8rgrav > AuthorDate: 2023-09-26 20:07:03 +0000 > Commit: Dag-Erling Sm=C3=B8rgrav > CommitDate: 2023-09-26 20:07:10 +0000 >=20 > libc: Add a rudimentary test for quick_exit(3). >=20 > Sponsored by: Klara, Inc. > Reviewed by: kib > Differential Revision: https://reviews.freebsd.org/D41937 > --- > lib/libc/tests/stdlib/Makefile | 1 + > lib/libc/tests/stdlib/quick_exit_test.c | 81 = +++++++++++++++++++++++++++++++++ > 2 files changed, 82 insertions(+) >=20 > diff --git a/lib/libc/tests/stdlib/Makefile = b/lib/libc/tests/stdlib/Makefile > index a2a6420aba41..860e530389df 100644 > --- a/lib/libc/tests/stdlib/Makefile > +++ b/lib/libc/tests/stdlib/Makefile > @@ -12,6 +12,7 @@ ATF_TESTS_C+=3D qsort_b_test > ATF_TESTS_C+=3D qsort_r_compat_test > ATF_TESTS_C+=3D qsort_r_test > ATF_TESTS_C+=3D qsort_s_test > +ATF_TESTS_C+=3D quick_exit_test > ATF_TESTS_C+=3D set_constraint_handler_s_test > ATF_TESTS_C+=3D strfmon_test > ATF_TESTS_C+=3D tsearch_test > diff --git a/lib/libc/tests/stdlib/quick_exit_test.c = b/lib/libc/tests/stdlib/quick_exit_test.c > new file mode 100644 > index 000000000000..9feed8a6fa63 > --- /dev/null > +++ b/lib/libc/tests/stdlib/quick_exit_test.c > @@ -0,0 +1,81 @@ > +/*- > + * Copyright (c) 2023 Klara, Inc. > + * > + * SPDX-License-Identifier: BSD-2-Clause > + */ > + > +#include > + > +#include > +#include > +#include > + > +#include > + > +static void func_a(void) > +{ > + if (write(STDOUT_FILENO, "a", 1) !=3D 1) > + _Exit(1); > +} > + > +static void func_b(void) > +{ > + if (write(STDOUT_FILENO, "b", 1) !=3D 1) > + _Exit(1); > +} > + > +static void func_c(void) > +{ > + if (write(STDOUT_FILENO, "c", 1) !=3D 1) > + _Exit(1); > +} > + > +static void child(void) > +{ > + // this will be received by the parent style(9) is to only do C-style /* */ comments. Jess