[check_postgres] failure of make test in

Kevin Brannen KBrannen at efji.com
Fri Jul 7 19:13:11 UTC 2017


From: Christoph Berg [mailto:christoph.berg at credativ.de]


Re: Kevin Brannen 2017-07-05 <CE782658D4A193498ABF0FD938CD77BE26BE84E6 at EFJDFWMB01.EFJDFW.local<mailto:CE782658D4A193498ABF0FD938CD77BE26BE84E6 at EFJDFWMB01.EFJDFW.local>>

> ?  For 'make test', please report any failing tests to check_postgres at bucardo.org<mailto:check_postgres at bucardo.org<mailto:check_postgres at bucardo.org%3cmailto:check_postgres at bucardo.org>>. The tests need to have some standard Postgres binaries available, such as 'initdb', 'psql', and 'pg_ctl'.

>

> Hi,

>

> I've just tried to install v2.22.0 on Centos5.11 and Centos6.7 with Pg 9.5.1 and Perl 5.18.4 and both failed. The output is very similar, 5.11 is on top and 6.7 is at the bottom. If you need more info let me know.



I believe some of the problems have already been fixed in git HEAD.

Could you try that from https://github.com/bucardo/check_postgres ?



Christoph



---



Christoph,



That's better, but still not there. Here's the output on Centos 6.7 using HEAD.



I debugged the t/01_validate_range.t test a little. I don't have a 32bit machine to test, but I'm wondering if the problem is that the hardcoded values on line 150 and such (e.g. 1.15292150460685e+18) were created on a 32b machine while I have a 64b machine. To show that in more detail via the perl debugger:



main::(t/01_validate_range.t:150):          is $w, 1.15292150460685e+18, 'Should have warning == 1 exobytes';

  DB<24> p $w

1152921504606846976

  DB<25> p 1024**6 - 1.15292150460685e+18

-3024



I think you could fix that by changing from a hardcoded valued to a calculated value, e.g. 1e should be "1024**6". I'd also ask just how important those values are. I suppose someone somewhere (government agency) may have a server that has enough disk to be measured in exobytes, but I really doubt most of us do. :) Zettabytes are just out of this world for the foreseeable future.



As for t/02_dbstats.t, I think this is the test defaulting somewhere it shouldn't. The error about DB "nms" is the telling point because that is my default DB. I think the test program needs to set --dbname or something. Hmm, or maybe it's using the env-var PGDATABASE when it should ignore that? Yep, that's it, I unset PGDATABASE and the test worked. Here the patch for you:



$ diff -u t/02_dbstats.t t/02_dbstats.t.new

--- t/02_dbstats.t      2017-07-07 12:04:39.000000000 -0500

+++ t/02_dbstats.t.new  2017-07-07 14:05:14.000000000 -0500

@@ -12,6 +12,8 @@

 use vars qw/$dbh $result $t $host $dbname/;

+$ENV{PGDATABASE} = undef;  # prevent user's default DB from influencing the test

+

my $cp = CP_Testing->new( {default_action => 'dbstats'} );

 $dbh = $cp->test_database_handle();

---^^^cut^^^---



So I suspect the program will work just fine, it's just the tests that are failing.



Kevin





~/check_postgres master $ perl Makefile.PL

Configuring check_postgres 2.22.0

Checking if your kit is complete...

Warning: the following files are missing in your kit:

        MYMETA.yml

Please inform the author.

Writing Makefile for check_postgres

Writing MYMETA.yml and MYMETA.json



~/check_postgres master $ make

cp check_postgres.pl blib/script/check_postgres.pl

/opt/perl/bin/perl -MExtUtils::MY -e 'MY->fixin(shift)' -- blib/script/check_postgres.pl

Manifying blib/man1/check_postgres.1p



~/check_postgres master $ make test

PERL_DL_NONLAZY=1 /opt/perl/bin/perl "-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib/lib', 'blib/arch')" t/*.t

t/00_basic.t ............... ok

t/00_release.t ............. skipped: Test skipped unless environment variable RELEASE_TESTING is set

t/00_signature.t ........... skipped: Test skipped unless environment variable RELEASE_TESTING is set

t/00_test_tester.t ......... skipped: Test skipped unless environment variable RELEASE_TESTING is set

t/01_validate_range.t ...... 1/144

#   Failed test 'Should have warning == 1 exobytes'

#   at t/01_validate_range.t line 150.

#          got: '1152921504606846976'

#     expected: '1.15292150460685e+18'



#   Failed test 'Should have critical == 42 exobytes'

#   at t/01_validate_range.t line 151.

#          got: '4.8422703193487573e+19'

#     expected: '4.84227031934876e+19'



#   Failed test 'Should have warning == 1 zettabytes'

#   at t/01_validate_range.t line 158.

#          got: '1.1805916207174113e+21'

#     expected: '1.18059162071741e+21'



#   Failed test 'Should have critical == 42 zettaytes'

#   at t/01_validate_range.t line 159.

#          got: '4.95848480701312747e+22'

#     expected: '4.95848480701313e+22'

# Looks like you failed 4 tests of 144.

t/01_validate_range.t ...... Dubious, test returned 4 (wstat 1024, 0x400)

Failed 4/144 subtests

t/02_autovac_freeze.t ...... # Creating database in directory "test_database_check_postgres"

sh: warning: setlocale: LC_ALL: cannot change locale (en): No such file or directory

/bin/sh: warning: setlocale: LC_ALL: cannot change locale (en): No such file or directory

Creating new symlink socket at /tmp/cptesting_socket

t/02_autovac_freeze.t ...... ok

t/02_backends.t ............ ok

t/02_bloat.t ............... ok

t/02_checkpoint.t .......... ok

t/02_cluster_id.t .......... ok

t/02_commitratio.t ......... ok

t/02_connection.t .......... ok

t/02_custom_query.t ........ ok

t/02_database_size.t ....... ok

t/02_dbstats.t ............. 2/42

#   Failed test 'Action 'dbstats' finds stats for database template0'

#   at t/02_dbstats.t line 39.

#                   'ERROR: FATAL:  database "nms" does not exist

# '

#     doesn't match '(?^:dbname:template0)'



#   Failed test 'Action 'dbstats' finds stats for database template1'

#   at t/02_dbstats.t line 39.

#                   'ERROR: FATAL:  database "nms" does not exist

# '

#     doesn't match '(?^:dbname:template1)'



#   Failed test 'Action 'dbstats' finds stats for database postgres'

#   at t/02_dbstats.t line 39.

#                   'ERROR: FATAL:  database "nms" does not exist

# '

#     doesn't match '(?^:dbname:postgres)'



#   Failed test 'Action 'dbstats' finds stats for database ardala'

#   at t/02_dbstats.t line 39.

#                   'ERROR: FATAL:  database "nms" does not exist

# '

#     doesn't match '(?^:dbname:ardala)'



#   Failed test 'Action 'dbstats' finds stats for database beedeebeedee'

#   at t/02_dbstats.t line 39.

#                   'ERROR: FATAL:  database "nms" does not exist

# '

#     doesn't match '(?^:dbname:beedeebeedee)'



#   Failed test 'Action 'dbstats' retrieves stats for backends'

#   at t/02_dbstats.t line 47.

#                   'ERROR: FATAL:  database "nms" does not exist

# '

#     doesn't match '(?^:\bbackends\b)'



#   Failed test 'Action 'dbstats' returns integer for backends'

#   at t/02_dbstats.t line 48.

#                   'ERROR: FATAL:  database "nms" does not exist

# '

#     doesn't match '(?^:\bbackends:\d+\b)'



#   Failed test 'Action 'dbstats' retrieves stats for commits'

#   at t/02_dbstats.t line 47.

#                   'ERROR: FATAL:  database "nms" does not exist

# '

#     doesn't match '(?^:\bcommits\b)'



#   Failed test 'Action 'dbstats' returns integer for commits'

#   at t/02_dbstats.t line 48.

#                   'ERROR: FATAL:  database "nms" does not exist

# '

#     doesn't match '(?^:\bcommits:\d+\b)'



#   Failed test 'Action 'dbstats' retrieves stats for rollbacks'

#   at t/02_dbstats.t line 47.

#                   'ERROR: FATAL:  database "nms" does not exist

# '

#     doesn't match '(?^:\brollbacks\b)'



#   Failed test 'Action 'dbstats' returns integer for rollbacks'

#   at t/02_dbstats.t line 48.

#                   'ERROR: FATAL:  database "nms" does not exist

# '

#     doesn't match '(?^:\brollbacks:\d+\b)'



#   Failed test 'Action 'dbstats' retrieves stats for read'

#   at t/02_dbstats.t line 47.

#                   'ERROR: FATAL:  database "nms" does not exist

# '

#     doesn't match '(?^:\bread\b)'



#   Failed test 'Action 'dbstats' returns integer for read'

#   at t/02_dbstats.t line 48.

#                   'ERROR: FATAL:  database "nms" does not exist

# '

#     doesn't match '(?^:\bread:\d+\b)'



#   Failed test 'Action 'dbstats' retrieves stats for hit'

#   at t/02_dbstats.t line 47.

#                   'ERROR: FATAL:  database "nms" does not exist

# '

#     doesn't match '(?^:\bhit\b)'



#   Failed test 'Action 'dbstats' returns integer for hit'

#   at t/02_dbstats.t line 48.

#                   'ERROR: FATAL:  database "nms" does not exist

# '

#     doesn't match '(?^:\bhit:\d+\b)'



#   Failed test 'Action 'dbstats' retrieves stats for idxscan'

#   at t/02_dbstats.t line 47.

#                   'ERROR: FATAL:  database "nms" does not exist

# '

#     doesn't match '(?^:\bidxscan\b)'



#   Failed test 'Action 'dbstats' returns integer for idxscan'

#   at t/02_dbstats.t line 48.

#                   'ERROR: FATAL:  database "nms" does not exist

# '

#     doesn't match '(?^:\bidxscan:\d+\b)'



#   Failed test 'Action 'dbstats' retrieves stats for idxtupread'

#   at t/02_dbstats.t line 47.

#                   'ERROR: FATAL:  database "nms" does not exist

# '

#     doesn't match '(?^:\bidxtupread\b)'



#   Failed test 'Action 'dbstats' returns integer for idxtupread'

#   at t/02_dbstats.t line 48.

#                   'ERROR: FATAL:  database "nms" does not exist

# '

#     doesn't match '(?^:\bidxtupread:\d+\b)'



#   Failed test 'Action 'dbstats' retrieves stats for idxtupfetch'

#   at t/02_dbstats.t line 47.

#                   'ERROR: FATAL:  database "nms" does not exist

# '

#     doesn't match '(?^:\bidxtupfetch\b)'



#   Failed test 'Action 'dbstats' returns integer for idxtupfetch'

#   at t/02_dbstats.t line 48.

#                   'ERROR: FATAL:  database "nms" does not exist

# '

#     doesn't match '(?^:\bidxtupfetch:\d+\b)'



#   Failed test 'Action 'dbstats' retrieves stats for idxblksread'

#   at t/02_dbstats.t line 47.

#                   'ERROR: FATAL:  database "nms" does not exist

# '

#     doesn't match '(?^:\bidxblksread\b)'



#   Failed test 'Action 'dbstats' returns integer for idxblksread'

#   at t/02_dbstats.t line 48.

#                   'ERROR: FATAL:  database "nms" does not exist

# '

#     doesn't match '(?^:\bidxblksread:\d+\b)'



#   Failed test 'Action 'dbstats' retrieves stats for idxblkshit'

#   at t/02_dbstats.t line 47.

#                   'ERROR: FATAL:  database "nms" does not exist

# '

#     doesn't match '(?^:\bidxblkshit\b)'



#   Failed test 'Action 'dbstats' returns integer for idxblkshit'

#   at t/02_dbstats.t line 48.

#                   'ERROR: FATAL:  database "nms" does not exist

# '

#     doesn't match '(?^:\bidxblkshit:\d+\b)'



#   Failed test 'Action 'dbstats' retrieves stats for seqscan'

#   at t/02_dbstats.t line 47.

#                   'ERROR: FATAL:  database "nms" does not exist

# '

#     doesn't match '(?^:\bseqscan\b)'



#   Failed test 'Action 'dbstats' returns integer for seqscan'

#   at t/02_dbstats.t line 48.

#                   'ERROR: FATAL:  database "nms" does not exist

# '

#     doesn't match '(?^:\bseqscan:\d+\b)'



#   Failed test 'Action 'dbstats' retrieves stats for seqtupread'

#   at t/02_dbstats.t line 47.

#                   'ERROR: FATAL:  database "nms" does not exist

# '

#     doesn't match '(?^:\bseqtupread\b)'



#   Failed test 'Action 'dbstats' returns integer for seqtupread'

#   at t/02_dbstats.t line 48.

#                   'ERROR: FATAL:  database "nms" does not exist

# '

#     doesn't match '(?^:\bseqtupread:\d+\b)'



#   Failed test 'Action 'dbstats' retrieves stats for ret'

#   at t/02_dbstats.t line 47.

#                   'ERROR: FATAL:  database "nms" does not exist

# '

#     doesn't match '(?^:\bret\b)'



#   Failed test 'Action 'dbstats' returns integer for ret'

#   at t/02_dbstats.t line 48.

#                   'ERROR: FATAL:  database "nms" does not exist

# '

#     doesn't match '(?^:\bret:\d+\b)'



#   Failed test 'Action 'dbstats' retrieves stats for fetch'

#   at t/02_dbstats.t line 47.

#                   'ERROR: FATAL:  database "nms" does not exist

# '

#     doesn't match '(?^:\bfetch\b)'



#   Failed test 'Action 'dbstats' returns integer for fetch'

#   at t/02_dbstats.t line 48.

#                   'ERROR: FATAL:  database "nms" does not exist

# '

#     doesn't match '(?^:\bfetch:\d+\b)'



#   Failed test 'Action 'dbstats' retrieves stats for ins'

#   at t/02_dbstats.t line 47.

#                   'ERROR: FATAL:  database "nms" does not exist

# '

#     doesn't match '(?^:\bins\b)'



#   Failed test 'Action 'dbstats' returns integer for ins'

#   at t/02_dbstats.t line 48.

#                   'ERROR: FATAL:  database "nms" does not exist

# '

#     doesn't match '(?^:\bins:\d+\b)'



#   Failed test 'Action 'dbstats' retrieves stats for upd'

#   at t/02_dbstats.t line 47.

#                   'ERROR: FATAL:  database "nms" does not exist

# '

#     doesn't match '(?^:\bupd\b)'



#   Failed test 'Action 'dbstats' returns integer for upd'

#   at t/02_dbstats.t line 48.

#                   'ERROR: FATAL:  database "nms" does not exist

# '

#     doesn't match '(?^:\bupd:\d+\b)'



#   Failed test 'Action 'dbstats' retrieves stats for del'

#   at t/02_dbstats.t line 47.

#                   'ERROR: FATAL:  database "nms" does not exist

# '

#     doesn't match '(?^:\bdel\b)'



#   Failed test 'Action 'dbstats' returns integer for del'

#   at t/02_dbstats.t line 48.

#                   'ERROR: FATAL:  database "nms" does not exist

# '

#     doesn't match '(?^:\bdel:\d+\b)'

# Looks like you failed 39 tests of 42.

t/02_dbstats.t ............. Dubious, test returned 39 (wstat 9984, 0x2700)

Failed 39/42 subtests

t/02_disabled_triggers.t ... ok

t/02_disk_space.t .......... skipped: Skipping disk_space tests because df does not work

t/02_fsm_pages.t ........... ok

t/02_fsm_relations.t ....... ok

t/02_hitratio.t ............ ok

t/02_last_analyze.t ........ ok

t/02_last_vacuum.t ......... ok

t/02_listener.t ............ ok

t/02_locks.t ............... ok

t/02_logfile.t ............. ok

t/02_new_version_bc.t ...... ok

t/02_new_version_box.t ..... ok

t/02_new_version_cp.t ...... ok

t/02_new_version_pg.t ...... ok

t/02_new_version_tnm.t ..... ok

t/02_pgagent_jobs.t ........ ok

t/02_pgbouncer_checksum.t .. ok

t/02_prepared_txns.t ....... ok

t/02_query_runtime.t ....... ok

t/02_query_time.t .......... ok

t/02_relation_size.t ....... ok

t/02_replicate_row.t ....... ok

t/02_replication_slots.t ... # Connected as 5432:/tmp/cptesting_socket:postgres

t/02_replication_slots.t ... ok

t/02_same_schema.t ......... # Creating database in directory "test_database_check_postgres2"

sh: warning: setlocale: LC_ALL: cannot change locale (en): No such file or directory

/bin/sh: warning: setlocale: LC_ALL: cannot change locale (en): No such file or directory

Creating new symlink socket at /tmp/cptesting_socket2

# Creating database in directory "test_database_check_postgres3"

sh: warning: setlocale: LC_ALL: cannot change locale (en): No such file or directory

/bin/sh: warning: setlocale: LC_ALL: cannot change locale (en): No such file or directory

Creating new symlink socket at /tmp/cptesting_socket3

t/02_same_schema.t ......... ok

t/02_sequence.t ............ ok

t/02_settings_checksum.t ... ok

t/02_slony_status.t ........ ok

t/02_timesync.t ............ ok

t/02_txn_idle.t ............ # Connected as 5432:/tmp/cptesting_socket:postgres

t/02_txn_idle.t ............ ok

t/02_txn_time.t ............ ok

t/02_txn_wraparound.t ...... ok

t/02_version.t ............. ok

t/02_wal_files.t ........... ok

t/03_translations.t ........ skipped: Test skipped unless environment variable RELEASE_TESTING is set

t/04_timeout.t ............. ok

t/05_docs.t ................ ok

t/99_cleanup.t ............. ok

t/99_perlcritic.t .......... skipped: Test skipped unless environment variable RELEASE_TESTING is set

t/99_pod.t ................. skipped: Test skipped unless environment variable RELEASE_TESTING is set

t/99_spellcheck.t .......... skipped: Test skipped unless environment variable RELEASE_TESTING is set



Test Summary Report

-------------------

t/01_validate_range.t    (Wstat: 1024 Tests: 144 Failed: 4)

  Failed tests:  32-35

  Non-zero exit status: 4

t/02_dbstats.t           (Wstat: 9984 Tests: 42 Failed: 39)

  Failed tests:  4-42

  Non-zero exit status: 39

Files=55, Tests=920, 276 wallclock secs ( 0.43 usr  0.08 sys + 64.13 cusr 14.18 csys = 78.82 CPU)

Result: FAIL

Failed 2/55 test programs. 43/920 subtests failed.

make: *** [test_dynamic] Error 255

This e-mail transmission, and any documents, files or previous e-mail messages attached to it, may contain confidential information. If you are not the intended recipient, or a person responsible for delivering it to the intended recipient, you are hereby notified that any disclosure, distribution, review, copy or use of any of the information contained in or attached to this message is STRICTLY PROHIBITED. If you have received this transmission in error, please immediately notify us by reply e-mail, and destroy the original transmission and its attachments without reading them or saving them to disk. Thank you.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.endcrypt.com/pipermail/check_postgres/attachments/20170707/a61bf227/attachment-0001.html>


More information about the Check_postgres mailing list