From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS31976 209.132.180.0/23 X-Spam-Status: No, score=-3.2 required=3.0 tests=AWL,BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED, SPF_HELO_PASS,SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.1 Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dcvr.yhbt.net (Postfix) with ESMTPS id 013711F597 for ; Tue, 17 Jul 2018 13:53:49 +0000 (UTC) DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:subject:from:to:references:message-id:date :mime-version:in-reply-to:content-type :content-transfer-encoding; q=dns; s=default; b=Pm6sp8/0tWgMsvh/ 9cy0KiI2lYVvVKSV9euhvYHDSGobBgumV6nz5hHtRtHOaTC2kRueh9lMGoQFZfMa yncUcD7W/UiQfaJ42ziBV2MBnGVnI4ovlsQCx3rqELq/0IULbTvhnfEOXiO+6mw9 lwKRueQ8V2PE2PmYgM6n6rhUwNI= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:subject:from:to:references:message-id:date :mime-version:in-reply-to:content-type :content-transfer-encoding; s=default; bh=VsjCxyzHo0wr4AT72NrFjK LtfeY=; b=Y7ZjBo2GZWwOF8bqG6i9xp8YyXOcVR5KsKO+Nfh8vAKNLm92R02nII V4vpxA0r72+cy2W7l7jkdu0Lgl9nr7Ofaxugdfyyj2+9Ioinh8kbXVCLbrz/Mkyd IYix1JH9aEi/EmRcykrRN2fYS+xZo5ODau/0aKk6MCFxkZ2sWWikc= Received: (qmail 11369 invoked by alias); 17 Jul 2018 13:53:47 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Received: (qmail 11358 invoked by uid 89); 17 Jul 2018 13:53:46 -0000 Authentication-Results: sourceware.org; auth=none X-HELO: mail-ua0-f196.google.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=subject:from:to:references:openpgp:autocrypt:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=EY+23+1G/Iu2sUOYWIya35rEADUTt6fQoYL8E3rk7EI=; b=bRs5NYeYGS0BgGvQkFMg7a+E8OSd/v5lPSJz2RG7zeMf00ZWBEJX0V4gZhnM8dW/d+ CDi46VI+5ntaHXstOzxsKlCfiDSn3Ft7OPIjn6RnmmKOIveF+yaMnQBXEpRVXI7TAY0e ar+EK7B+xd2p9zOD5VRmDD1uKOZcLNueh27dw= Subject: Re: [PATCH v8 7/8] nptl: Add test cases for ISO C11 threads From: Adhemerval Zanella To: Florian Weimer , libc-alpha@sourceware.org References: <1517591084-11347-1-git-send-email-adhemerval.zanella@linaro.org> <1517591084-11347-8-git-send-email-adhemerval.zanella@linaro.org> <4a152fab-0950-bc8a-a0a7-85e0e2472da8@redhat.com> <5c33245e-c052-f4c9-716c-ded49f14924d@linaro.org> <24e20d45-8f1a-edca-6b4c-d905a4554cd4@redhat.com> Openpgp: preference=signencrypt Message-ID: <1491b17f-9d06-fd73-295b-2a36f97a1d6c@linaro.org> Date: Tue, 17 Jul 2018 10:53:38 -0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit On 13/07/2018 10:29, Adhemerval Zanella wrote: > > > On 13/07/2018 10:11, Florian Weimer wrote: >> On 07/13/2018 03:10 PM, Adhemerval Zanella wrote: >>> >>> >>> On 13/07/2018 06:31, Florian Weimer wrote: >>>> On 02/02/2018 06:04 PM, Adhemerval Zanella wrote: >>>>> This patch adds to testsuite new test cases to test all new introduced >>>>> C11 threads functions, types and macros are tested. >>>> >>>> Somewhere, there should be a test that the types (thrd_t, once_flag, mtx_t, cnd_t) have identicial size and alignment as the POSIX types, and that TSS_DTOR_ITERATIONS equals PTHREAD_DESTRUCTOR_ITERATIONS. >>>> >>>> It should probably be a separate test, to avoid including in the tests. >>> >>> Right, I will work on a extra test for this. >> >> I've since realized that these asserts are in the implementation, which is a bit questionable, but better than nothing.  I guess you can add the assert for TSS_DTOR_ITERATIONS into the implementation itself. > > The asserts are more for implementation consistency, if we eventually > change internal implementation so POSIX and C11 either shared a common > or distinct implementation we can change the test to check for ABI > expected values instead. > > Ok, I also think an assert TSS_DTOR_ITERATIONS should simplify things. > I added a static assert to check TSS_DTOR_ITERATIONS is equal to PTHREAD_DESTRUCTOR_ITERATIONS.