View Issue Details

IDProjectCategoryView StatusLast Update
0000619Pgpool-IIBugpublic2020-06-17 15:58
Reportergregn123Assigned Topengbo 
PrioritynormalSeverityminorReproducibilityalways
Status assignedResolutionopen 
Product Version4.1.2 
Target VersionFixed in Version 
Summary0000619: Regression test 055.backend_all_down fails if PG_INSTALL_DIR is not set to "/usr/local/pgsql/bin" (the default value)
DescriptionRegression test 055.backend_all_down does not respect the PG_INSTALL_DIR setting in regress.sh - the test fails with the following type of error if PG_INSTALL_DIR is changed to something other than (the default value) "/usr/local/pgsql/bin":

    /usr/local/pgsql12/bin/pgpool: error while loading shared libraries: libpq.so.5: cannot open shared object file: No such file or directory.

The problem is caused by the LD_LIBRARY_PATH value being hard-wired in src/test/regression/tests/055.backend_all_down/test.sh:

    echo "LD_LIBRARY_PATH=/usr/local/pgsql/lib" > pgpool.sh

This only works correctly if PG_INSTALL_DIR is /usr/local/pgsql/bin

Instead, it should be:

    echo "LD_LIBRARY_PATH=$PGBIN/../lib" > pgpool.sh

I've attached a patch. Please review.
Steps To ReproduceInstall Postgres to a non-default location (i.e. something other than /usr/local/pgsql), set PG_INSTALL_DIR (in regress.sh) to corresponding bin directory, and run the pgpool2 regression tests.
Additional InformationNOTE: regression test 019.log_client_messages correctly sets LD_LIBRARY_PATH to $PGBIN/../lib
TagsNo tags attached.

Activities

gregn123

2020-06-17 13:30

reporter  

0001-Fix-LD_LIBRARY_PATH-setting-in-test-055.backend_all_.patch (933 bytes)
From d8e7ba282df584dd62f396bf1b6e9bf8dade305d Mon Sep 17 00:00:00 2001
From: Greg Nancarrow <gregn4422@gmail.com>
Date: Wed, 17 Jun 2020 13:54:49 +1000
Subject: [PATCH] Fix LD_LIBRARY_PATH setting in test 055.backend_all_down to
 respect PG_INSTALL_DIR setting in regress.sh

---
 src/test/regression/tests/055.backend_all_down/test.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/test/regression/tests/055.backend_all_down/test.sh b/src/test/regression/tests/055.backend_all_down/test.sh
index 66e8ebc..15c1535 100755
--- a/src/test/regression/tests/055.backend_all_down/test.sh
+++ b/src/test/regression/tests/055.backend_all_down/test.sh
@@ -23,7 +23,7 @@ source ./bashrc.ports
 
 export PGPORT=$PGPOOL_PORT
 
-echo "LD_LIBRARY_PATH=/usr/local/pgsql/lib" > pgpool.sh
+echo "LD_LIBRARY_PATH=$PGBIN/../lib" > pgpool.sh
 echo 'dir=`pwd`' >> pgpool.sh
 grep pgpool.conf startall >> pgpool.sh
 
-- 
1.8.3.1

Issue History

Date Modified Username Field Change
2020-06-17 13:30 gregn123 New Issue
2020-06-17 13:30 gregn123 File Added: 0001-Fix-LD_LIBRARY_PATH-setting-in-test-055.backend_all_.patch
2020-06-17 15:58 pengbo Assigned To => pengbo
2020-06-17 15:58 pengbo Status new => assigned
2020-06-17 15:58 pengbo Description Updated View Revisions
2020-06-17 15:58 pengbo Steps to Reproduce Updated View Revisions