From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 73429 invoked by alias); 10 Jul 2017 15:39:55 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Received: (qmail 73415 invoked by uid 89); 10 Jul 2017 15:39:54 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.6 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE,RCVD_IN_SORBS_SPAM,RP_MATCHES_RCVD,SPF_PASS,URIBL_RED autolearn=no version=3.3.2 spammy=fn8 X-HELO: mail-ua0-f169.google.com X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=7BlZznuqRaqyjIzCuDmUKFmNMdV+RFyFLiNfRkAHPo0=; b=l7pCYiPqxdvbknxTN+YG3ewFSCcKpdi+O/HmGECeB0Yn9iKe2Fk+XSKY9x4dexGu5h FGmPI8hcjEZsF4lfISnp0etlPwUJwCrBGPkAsh5od35bgExOx9+u6rwmUwg1Cj3ZDWVH L5JH1hPIIVNqLiirxVLzjQYfIIkvVoOtflAiXt3kdnnxEetkgryAjDEvokBlRIM9BrEu phDN19YaMK5vXmhoMH2TUcoCj3QvXCX/udhcCTH7HyrP07/C13ujDC+1BnKHBG+WkUZO ukQg/7tlgTLTPhn5UCQecbPTP17/kx0gM1Pkdhprlr3IDCGO78k1kDlCpbe3B0Ap/ikf r+Sg== X-Gm-Message-State: AIVw113RnSrJ4YVMQXRj0zwBC3MGjewRi4fvWJsd+mA2soX+lKCJ5/pz cyZhHLggEMOSwSXrycj2VxN39EygunGtnc8= X-Received: by 10.176.9.3 with SMTP id w3mr8912210uag.65.1499701191155; Mon, 10 Jul 2017 08:39:51 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: References: From: Paul Pluzhnikov Date: Mon, 10 Jul 2017 15:39:00 -0000 Message-ID: Subject: Re: [patch] Add tests for atexit/on_exit firing order To: Joseph Myers Cc: GLIBC Devel Content-Type: text/plain; charset="UTF-8" X-SW-Source: 2017-07/txt/msg00396.txt.bz2 On Mon, Jul 10, 2017 at 8:18 AM, Joseph Myers wrote: >> This patch adds such test. I am using on_exit here because it >> conveniently allows passing an argument. > > I'd think that it would make sense to test all of atexit, on_exit, > at_quick_exit this way. I could be missing something, but I don't see an easy way to test atexit and at_quick_exit the same way due to them not taking an argument. To test atexit, I would have to implement separate fn1 .. fn8 and hard-code expected call sequence into each of them, wouldn't I? That would make for a more verbose and more difficult to modify test, and given that all 3 functions currently share implementation, that seems like an overkill. Of course if later the implementation is un-shared, it would be nice to have a test case for each. But it seems unlikely to ever happen. Thanks, -- Paul Pluzhnikov