Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1iHZKe-0004Kh-V4 for pgsql-hackers@arkaria.postgresql.org; Mon, 07 Oct 2019 20:10:13 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1iHZKd-0006Gr-CJ for pgsql-hackers@arkaria.postgresql.org; Mon, 07 Oct 2019 20:10:11 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1iHZKb-0006GI-DU for pgsql-hackers@lists.postgresql.org; Mon, 07 Oct 2019 20:10:11 +0000 Received: from out4-smtp.messagingengine.com ([66.111.4.28]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1iHZKZ-00088h-9N for pgsql-hackers@lists.postgresql.org; Mon, 07 Oct 2019 20:10:08 +0000 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id 41A582129D; Mon, 7 Oct 2019 16:10:06 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute5.internal (MEProxy); Mon, 07 Oct 2019 16:10:06 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=anarazel.de; h= date:from:to:cc:subject:message-id:references:mime-version :content-type:in-reply-to; s=fm2; bh=mnUuiEg4zOhFGavPFQDkC6utzEq zjcki51AqJY9E0ao=; b=iYZOoA3FaCQFZBHffw9/l6jZQIdF4X9+z0zIwtVJ/6h isK114q+uwGNFpj0K4L8QGRNXlvW5qNVRHbj60QaLD00Hsvj2RM+TpUpSdkIlC4v ETERyBaIuhj/apnVccfiFMoslNNhwzFRDwArdg9tBoCBFl0I8p/SxydHDwuOrOQl KaoDOACIAfBTruQ2I3CHCsKcLPeWD2sp0ZtlkB3F5rPMxNXnC74dAXmcPkzmEOPH CDr5gNDqz7EcMltwPzl+pN4pqXVzFs7cj/g8qJL1yRKQIgBfCgdZJE8r05zolKSH ZKO2vkAR/W5SxMYtFDwtG3RUoaRFCJVar3w5qFmQS+w== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=mnUuiE g4zOhFGavPFQDkC6utzEqzjcki51AqJY9E0ao=; b=m985GvlWv0PO1CG2zd5vDY 8ioitMOu6ERr5eEf7fAz3rH6Pl5xdSIZF7PV4o3kNPO5ruxKngHAv6G54pt9YkYS QugLDB+VwjWzioVg4SyXHGeRrYnAHaI/jLHSDf0zlepniZa+om6zxbdFXB1ktsG4 nZhuJ8LD3jb7xQsNaqmEdJ37/DHTqsKCmNypncilaRHgGrUDf6FnzICYWWOXJEfH TTmS32o808Ta1JM/XT8fUU+1VKZv/byPdtgnw90tx94ScpJ2JNnFNd+bilKqe4Fo iHy+HC7IQqzcrWz+AsfcNzmWTyyvjXyld66oo4rKcChyQT75JObFoK/rveXjBt3w == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedufedrheejgddufeefucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepfffhvffukfhfgggtuggjsehttdertddttddvnecuhfhrohhmpeetnhgurhgv shcuhfhrvghunhguuceorghnughrvghssegrnhgrrhgriigvlhdruggvqeenucfkphepie ejrdduiedtrddvudekrddvfeejnecurfgrrhgrmhepmhgrihhlfhhrohhmpegrnhgurhgv shesrghnrghrrgiivghlrdguvgenucevlhhushhtvghrufhiiigvpedt X-ME-Proxy: Received: from intern.anarazel.de (c-67-160-218-237.hsd1.ca.comcast.net [67.160.218.237]) by mail.messagingengine.com (Postfix) with ESMTPA id 8058DD6005D; Mon, 7 Oct 2019 16:10:05 -0400 (EDT) Date: Mon, 7 Oct 2019 13:10:04 -0700 From: Andres Freund To: Peter Eisentraut Cc: Tom Lane , Noah Misch , pgsql-hackers@lists.postgresql.org Subject: Re: expressive test macros (was: Report test_atomic_ops() failures consistently, via macros) Message-ID: <20191007201004.o7n6tp35iyag7lwn@alap3.anarazel.de> References: <20191005190729.6sx7g23ifdu65s7s@alap3.anarazel.de> <2144.1570471061@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Hi, On 2019-10-07 21:58:08 +0200, Peter Eisentraut wrote: > On 2019-10-07 19:57, Tom Lane wrote: > > I'd just put them all in c.h. I see no reason why a new header > > is helpful. > > Assert stuff is already in there, but surely stuff that calls elog() > doesn't belong in there? Make it call an ExpectFailure() (or similar) function that takes the various parameters (expression, file, line, severity, format string, args) as an argument? And that's implemented in terms of elog() in the backend, and pg_log* + abort() (when appropriate) in the frontend? Greetings, Andres Freund