Обсуждение: pgsql: Move security_label test

Поиск
Список
Период
Сортировка

pgsql: Move security_label test

От
Alvaro Herrera
Дата:
Move security_label test

Rather than have the core security_label regression test depend on the
dummy_seclabel module, have that part of the test be executed by
dummy_seclabel itself directly.  This simplifies the testing rig a bit;
in particular it should silence the problems from the MSVC buildfarm
phylum, which haven't yet gotten taught how to install src/test/modules.

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/df761e3cf79db09d602610ee61e51cb378288382

Modified Files
--------------
src/test/modules/dummy_seclabel/Makefile           |    2 +
.../dummy_seclabel/input/dummy_seclabel.source     |   79 +++++++++++++
.../dummy_seclabel/output/dummy_seclabel.source    |   87 ++++++++++++++
src/test/regress/GNUmakefile                       |   16 +--
src/test/regress/expected/security_label.out       |   47 ++++++++
src/test/regress/input/security_label.source       |  108 -----------------
src/test/regress/output/security_label.source      |  123 --------------------
src/test/regress/sql/security_label.sql            |   49 ++++++++
8 files changed, 268 insertions(+), 243 deletions(-)


Re: pgsql: Move security_label test

От
Michael Paquier
Дата:
On Tue, Dec 2, 2014 at 4:13 AM, Alvaro Herrera <alvherre@alvh.no-ip.org> wrote:
> Move security_label test
>
> Rather than have the core security_label regression test depend on the
> dummy_seclabel module, have that part of the test be executed by
> dummy_seclabel itself directly.  This simplifies the testing rig a bit;
> in particular it should silence the problems from the MSVC buildfarm
> phylum, which haven't yet gotten taught how to install src/test/modules.
After this module has been moved to src/test/modules, I am seeing
failures with make check when manually kicking the test on at least
OSX where I tried because expected/ and sql/ are missing. pg_regress
does not like that much. That's annoying because check-world would
simply fail.
Also, I think that src/test/modules/dummy_seclabel/Makefile should be
taught to clean sql/dummy_seclabel.sql and expected/dummy_seclabel.out
with EXTRA_CLEAN and that we should have a .gitignore to ignore
tmp_check/ results/ and log/ in this path. Per se the patch attached
with those things added.
Thanks,
--
Michael

Вложения

Re: pgsql: Move security_label test

От
Alvaro Herrera
Дата:
Michael Paquier wrote:
> On Tue, Dec 2, 2014 at 4:13 AM, Alvaro Herrera <alvherre@alvh.no-ip.org> wrote:
> > Move security_label test
> >
> > Rather than have the core security_label regression test depend on the
> > dummy_seclabel module, have that part of the test be executed by
> > dummy_seclabel itself directly.  This simplifies the testing rig a bit;
> > in particular it should silence the problems from the MSVC buildfarm
> > phylum, which haven't yet gotten taught how to install src/test/modules.
> After this module has been moved to src/test/modules, I am seeing
> failures with make check when manually kicking the test on at least
> OSX where I tried because expected/ and sql/ are missing. pg_regress
> does not like that much. That's annoying because check-world would
> simply fail.

I had the directories locally but hadn't git-pushed them.

> Also, I think that src/test/modules/dummy_seclabel/Makefile should be
> taught to clean sql/dummy_seclabel.sql and expected/dummy_seclabel.out
> with EXTRA_CLEAN and that we should have a .gitignore to ignore
> tmp_check/ results/ and log/ in this path. Per se the patch attached
> with those things added.

Pushed the whole thing, thanks.

--
Álvaro Herrera                http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services


Re: pgsql: Move security_label test

От
Peter Eisentraut
Дата:
On 12/2/14 9:18 AM, Alvaro Herrera wrote:
>> After this module has been moved to src/test/modules, I am seeing
>> > failures with make check when manually kicking the test on at least
>> > OSX where I tried because expected/ and sql/ are missing. pg_regress
>> > does not like that much. That's annoying because check-world would
>> > simply fail.
> I had the directories locally but hadn't git-pushed them.

make check-world still fails.




Re: pgsql: Move security_label test

От
Alvaro Herrera
Дата:
Peter Eisentraut wrote:
> On 12/2/14 9:18 AM, Alvaro Herrera wrote:
> >> After this module has been moved to src/test/modules, I am seeing
> >> > failures with make check when manually kicking the test on at least
> >> > OSX where I tried because expected/ and sql/ are missing. pg_regress
> >> > does not like that much. That's annoying because check-world would
> >> > simply fail.
> > I had the directories locally but hadn't git-pushed them.
>
> make check-world still fails.

Ah, it needs errcodes.h to be generated.  We can add this (or similar)
to the makefiles:

OBJS: | submake-errcodes

submake-errcodes:
        $(MAKE) -C $(top_builddir)/src/backend submake-errcodes

but it would be very repetitive to have it in all test modules'
makefiles.  Why doesn't contrib need this?  Do you have a better idea?

--
Álvaro Herrera                http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services


Re: pgsql: Move security_label test

От
Alvaro Herrera
Дата:
Peter Eisentraut wrote:
> On 12/2/14 9:18 AM, Alvaro Herrera wrote:
> >> After this module has been moved to src/test/modules, I am seeing
> >> > failures with make check when manually kicking the test on at least
> >> > OSX where I tried because expected/ and sql/ are missing. pg_regress
> >> > does not like that much. That's annoying because check-world would
> >> > simply fail.
> > I had the directories locally but hadn't git-pushed them.
>
> make check-world still fails.

It should work now, I just pushed a couple of fixes.

--
Álvaro Herrera                http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services


Re: pgsql: Move security_label test

От
Peter Eisentraut
Дата:
On 12/2/14 3:46 PM, Alvaro Herrera wrote:
> Ah, it needs errcodes.h to be generated.  We can add this (or similar)
> to the makefiles:
>
> OBJS: | submake-errcodes
>
> submake-errcodes:
>         $(MAKE) -C $(top_builddir)/src/backend submake-errcodes
>
> but it would be very repetitive to have it in all test modules'
> makefiles.  Why doesn't contrib need this?  Do you have a better idea?

The top-level GNUmakefile has a dependency to build src/ before contrib/.