Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1aHBhK-0004xZ-EO for pgsql-hackers@arkaria.postgresql.org; Thu, 07 Jan 2016 14:37:54 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84) (envelope-from ) id 1aHBhK-0007uM-0r for pgsql-hackers@arkaria.postgresql.org; Thu, 07 Jan 2016 14:37:54 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84) (envelope-from ) id 1aHBhD-0007oZ-Sf for pgsql-hackers@postgresql.org; Thu, 07 Jan 2016 14:37:48 +0000 Received: from mail-by2on0088.outbound.protection.outlook.com ([207.46.100.88] helo=na01-by2-obe.outbound.protection.outlook.com) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84) (envelope-from ) id 1aHBh8-0005rZ-Vj for pgsql-hackers@postgresql.org; Thu, 07 Jan 2016 14:37:47 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=BlueTreble.onmicrosoft.com; s=selector1-bluetreble-com; h=From:To:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=zb0NHsRholf/p6/PojY6gJbvDN9xgh79QiKbRYXKZNk=; b=V8vIMe26AoqvqHGACgHE65pKNzNOXjqP5MFPrOtDrCo1OnI9Wua2ODKbUeQm/JyYyYM/0bnAJ0zM45OXpENw9ulnp+Pz7VcbywodbJnnUU3HvD2vM2tJXEZv+Nktsjacn5lOHQo5nIFWFSjV9A4EJTwJWtM+oemAJbYeA8RenwM= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Jim.Nasby@bluetreble.com; Received: from decina.local (70.113.16.71) by BY2PR11MB0680.namprd11.prod.outlook.com (10.163.111.22) with Microsoft SMTP Server (TLS) id 15.1.361.13; Thu, 7 Jan 2016 14:37:35 +0000 Subject: Re: Very confusing installcheck behavior with PGXS To: Tom Lane , Robert Haas References: <56899F36.9000607@BlueTreble.com> <5651.1452102882@sss.pgh.pa.us> CC: Pg Hackers From: Jim Nasby Message-ID: <568E7829.2050805@BlueTreble.com> Date: Thu, 7 Jan 2016 08:37:29 -0600 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:38.0) Gecko/20100101 Thunderbird/38.5.0 MIME-Version: 1.0 In-Reply-To: <5651.1452102882@sss.pgh.pa.us> Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [70.113.16.71] X-ClientProxiedBy: SN1PR17CA0023.namprd17.prod.outlook.com (25.169.33.161) To BY2PR11MB0680.namprd11.prod.outlook.com (25.163.111.22) X-Microsoft-Exchange-Diagnostics: 1; BY2PR11MB0680; 2:J4tXbhZPscBm0JHnyU9ZATF341Oj0MDRP/duPgEP8fgQUoToScxlkzB7wU5z0gMBPTh4YbOIjHJuNOZmTknm9UIXggaSmrpM9Z67X1RIyMkFdO5c5WflEt841tneKcKfsHZscENkAXehprbUPg+m7g==; 3:7YA8d8OZJQNzo5IFPzDxe94zeOSbFuO9U7t2sfAdK3hb82VKOf0gUswlPpYfzsOPbDHGRQFvvVIy9VuRsjKfeP15d+0M5Qvmvvq/AAwka+YL1IDNPh9nIjhOff9IW1hh; 25:1X1wZGYTp+NuDgHBSDO1mQtO2Yr6qtO5MCQVL4O57DqwJDHJaXoL/Ijn23zJy2PA2+v8EGzj7LEYNOnmXMNyv28vrFEmmdqmoJl6yM6E1cerO9ArfOD8FExNNJnC1CIvZUeAuCIl5tS8aExuJuxjn6G3y1Ui09/JKdH0+0Q3Mb3iaY7xVi7yYhJpyPWBf3V0xZwj60kkWrH0oVvMua8X9lfk8DBv8AiRBknZ/S9GDRP8Oqnub0Sm5LbXxm4292T3; 20:jWRVFiCrav0lG/Uhd1hIzZ2TlIMsmRxOtm9SzYOFh5IvFuB8sKg1nDByv9BNIP9X8Rh84qA5nWxUH1DOFwlRnlMRQQnaiCFT14TTZsHrCtYYiOTIlSafOUEDD8RAK9QHvG4QvNc1QQuXUTPG5z91467hHcGMoFrNiHuaTrGu0g4= X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:BY2PR11MB0680; X-MS-Office365-Filtering-Correlation-Id: 6f62c181-f350-4e8a-02fb-08d3177015bd X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004)(2401047)(520078)(8121501046)(5005006)(3002001)(10201501046); SRVR:BY2PR11MB0680; BCL:0; PCL:0; RULEID:; SRVR:BY2PR11MB0680; X-Microsoft-Exchange-Diagnostics: 1; BY2PR11MB0680; 4:stcNjc4PzIAzPNGFaJhCG9LLToU28K6uauuOUZdwMnZ+q5jhld7rZ5ZFuzbS6tBze5DoA8SkjM8YEP0Zfg6pzqhxsyltZkIwjBx/U9Voplk7wh1QUC8bd7dkd6HUJEiWcDrAnzoF6uJ+7wDrBI4/Sc2Ve8Znu6uJYKZAhbLMmTj/WZxdsF3OvPvnvo2ocj59SEMzcLzAUKEXJjwLo5rckAB5hZAZ3E1tkMoU27YJxifgkgXxb1hqTHJ3gO+K7stOX0plO5+uR9a9Mj+J0FVhLVO2YrWElP9wwyyrZXA7bTo5tZqbMb9/ktz2x3qzh2JrKtdiQvUIUNUZiLA3W66FRsJrGhT7WOpU1R96DTC7dyobB3+4LexrofcBhb6kvvcF X-Forefront-PRVS: 0814A2C7A3 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(6009001)(189002)(24454002)(479174004)(377454003)(199003)(76176999)(4001350100001)(3846002)(19580405001)(65956001)(33656002)(36756003)(92566002)(230700001)(50986999)(5001960100002)(2950100001)(42186005)(106356001)(2906002)(6116002)(189998001)(1096002)(97736004)(586003)(81156007)(65806001)(65816999)(87976001)(101416001)(64126003)(47776003)(105586002)(50466002)(59896002)(5004730100002)(80316001)(19580395003)(77096005)(54356999)(15975445007)(122386002)(86362001)(66066001)(5008740100001)(87266999)(4326007)(83506001)(40100003)(23676002)(5001770100001)(85282002)(336755003)(18886065003); DIR:OUT; SFP:1101; SCL:1; SRVR:BY2PR11MB0680; H:decina.local; FPR:; SPF:None; PTR:InfoNoRecords; MX:3; A:3; LANG:en; Received-SPF: None (protection.outlook.com: bluetreble.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?utf-8?B?MTtCWTJQUjExTUIwNjgwOzIzOlVJamtrMlJSVlJwK0VXZjlHZXJsTUgvOFR6?= =?utf-8?B?TUlaQWdRTTN6NmR6SGpuWExsTEdqdUtOL0ZXRmhteHNHNUw3aFlQMlFzektI?= =?utf-8?B?RHJNRmpkOFlJNm1yanVXYlhMa0NvcEZLaGlWVHZCdGpNZWFmVkpaenkwd3VR?= =?utf-8?B?b1hRVzFkNXA4dWNsNFV2Y09RRi9aa1hMdlE4a3dDWVVkcW9lbU1IcE9tT2lQ?= =?utf-8?B?V01GSG8vSXlQbVZHc2ZhRnMxZ1k0RENLRmRtSVF0bVhrdUp1ZHdmeFBvalVl?= =?utf-8?B?Z3RtOGlLMWJCUTAwUnoxOG9FSDVRSGJjUUlLcnNWLzl5TlpPMTFCVE8vOXRU?= =?utf-8?B?Zzd5VzJsTWJDaWdMY3VuSkpubTJPaDZsMURZSXpOdkI1ZVlGYnFyTG8xeFNn?= =?utf-8?B?R2ZOa2NIRTNjRUFhZlU5Q3Q1cFlxTEJRZXQ5K2FpWlVINmNyb2oxY0VuNFk1?= =?utf-8?B?UXdzQ1NwbEN2MFVtY29DVTFYQWtxOXJWNkR0WEdOSFZ3enlNNlNQZ0FMdGUy?= =?utf-8?B?d3YzZWxHdi9iUjZONlBZZG5NTkN0L1NhclVoaC9pR2RzWUM4ZnI4eE03RDBI?= =?utf-8?B?ZktROFVMdTVZMGNFbDFPY0cxZ2ZZaXcvNmlpbXRBRHFrY2gxQ0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EzQzB3Sjk0Ty9mRzdVRGhLWXBhaXlr?= =?utf-8?B?QmtrVWVJc1JyNmZSZW1oeFpXYTFpb3c3QmcyQlVTTmJzOFNBRjh4UEdkb1VZ?= =?utf-8?B?RGFUSVpvRmptOVU5OU9tYjFxeDJMdU1DRE5RQzR6Mk84bWJ6L0ZlcW5wYTBB?= =?utf-8?B?MzlVbVR0aHpZRHdBNHRBQ3YwV0JmbXlIazBaZW9ydEdlMHdTSDgvdjNVclBD?= =?utf-8?B?cEY1ZDYxNWdGSmtjS05oVS90Z3JYM1RnNWxwVTBlSWpmdUMyOVdJVThPMFJa?= =?utf-8?B?VDQvSjY2NnV0UEdBbWttd1UrS0RVVTdvVGp3RjhSbUxTN2MyL1h5Y0t5Z3Ay?= =?utf-8?B?WnVxdnRIdlFWQ3F2SFprNzArYkxuUzNXV2o3VmFNRWFzWEx0OSt1SFlGekVE?= =?utf-8?B?V2JZMDhzM3hnPT0=?= X-Microsoft-Exchange-Diagnostics: 1; BY2PR11MB0680; 5:2GVI16UHlbcZghoGmm2Cd5iJEsgtpwQdI79x1mS+TBvH2uW5AZk1wsdR5ENtGLj0+DEQU8QwYcsf8d6cOtPH7raWE7ogNAx2Lr2Ng52d+eSIeQ4NF8KLJlCiy9VdHg4Xx8dtYheTxQ6dE+Q+m5s7Sg==; 24:/4FlsQPGrZGZn8aIdhNqtpyaIGf4BdU8eHZLpKCs8Mx8U+CbHacCxZZKayFqvBlYfMpg6iliqHx80D7M8+hFR/hxIGYxWllAtmb0Sh2TyQg= SpamDiagnosticOutput: 1:23 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: bluetreble.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Jan 2016 14:37:35.4575 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY2PR11MB0680 X-Pg-Spam-Score: -1.9 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-hackers Precedence: bulk Sender: pgsql-hackers-owner@postgresql.org On 1/6/16 11:54 AM, Tom Lane wrote: > Robert Haas writes: >> On Sun, Jan 3, 2016 at 5:22 PM, Jim Nasby wrote: >>> The rule that gets executed if you do `make installcheck` with something >>> using PGXS is >>> >>> pgxs.mk: $(pg_regress_installcheck) $(REGRESS_OPTS) $(REGRESS) >>> >>> where $(pg_regress_installcheck) is set in Makefile.global.in to >>> >> pg_regress_installcheck = $(top_builddir)/src/test/regress/pg_regress >> --inputdir=$(srcdir) --bindir='$(bindir)' $(pg_regress_locale_flags) >> $(EXTRA_REGRESS_OPTS) >>> >>> The problem here is that in a PGXS make, srcdir is set to '.'[1], and >>> --inputdir is specified a second time in REGRESS_OPTS. Normally that works >>> OK (for some reason ignoring what's in ./sql), but if you happen to have a >>> file in your test/sql directory that matches a file in ./sql, pg_regress >>> runs the first file and not the second. > >> Stupid question time: why in the world would you have that? It doesn't seem that odd to have a test file that matches an extension file... > AFAICS, the pieces we supply (Makefile.global and pgxs.mk) would only > specify --inputdir once. If there's a second specification being added > to REGRESS_OPTS by your own Makefile, that would override the default, > which seems like entirely sensible behavior. Maybe I'm misunderstanding > something, but it sounds like you're saying "if I write --inputdir=test > in REGRESS_OPTS, it runs the tests in test/sql not those in ./sql". > Why would you not think that's expected? Actually, it's more bizarre than I thought... This is what my makefile[1] produces, which currently works: /Users/decibel/pgsql/HEAD/i/lib/pgxs/src/makefiles/../../src/test/regress/pg_regress --inputdir=./ --bindir='/Users/decibel/pgsql/HEAD/i/bin' --inputdir=test --load-language=plpgsql --dbname=contrib_regression acl_type build compat rights Removing the first --inputdir also works: /Users/decibel/pgsql/HEAD/i/lib/pgxs/src/makefiles/../../src/test/regress/pg_regress --bindir='/Users/decibel/pgsql/HEAD/i/bin' --inputdir=test --load-language=plpgsql --dbname=contrib_regression acl_type build compat rights However, if I do this: mv test/sql/acl_type.sql test/sql/acl.sql mv test/expected/acl_type.out test/expected/acl.out And change acl_type to acl in that pg_regress command: /Users/decibel/pgsql/HEAD/i/lib/pgxs/src/makefiles/../../src/test/regress/pg_regress --bindir='/Users/decibel/pgsql/HEAD/i/bin' --inputdir=test --load-language=plpgsql --dbname=contrib_regression acl build compat rights Instead of executing test/sql/acl.sql, it executes ./sql/acl.sql. I'd assumed this was due to the extra --inputdir option, but clearly something else is going on here. Time to gvim pg_regress.c... [1] https://github.com/decibel/pg_acl -- Jim Nasby, Data Architect, Blue Treble Consulting, Austin TX Experts in Analytics, Data Architecture and PostgreSQL Data in Trouble? Get it in Treble! http://BlueTreble.com -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers