pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Kyotaro HORIGUCHI <horiguchi.kyotaro@lab.ntt.co.jp>
To: pgsql-hackers@postgresql.org
Subject: [CF2016-9] Allow spaces in working path on tap-tests
Date: Mon, 04 Jul 2016 16:02:13 +0900 (Tokyo Standard Time)
Message-ID: <20160704.160213.111134711.horiguchi.kyotaro@lab.ntt.co.jp> (raw)
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-hackers>

Hello, this is just an entry mail for the next CF.

The tap-test fails when the soruce directoy containing spaces. I
accidentially hit this by a Jenkins project with the name "test
project".

The function system_log() is safe for such parameters but
backup() uses it in wrong way. On the other hand,
enable_restoring() and enable_archiving() forgets to quote such a
path containing spaces as already done for Windows. I don't see
the similar problem in other places.

regards,
-- 
Kyotaro Horiguchi
NTT Open Source Software Center

-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Attachments:

0001-Allow-spaces-in-working-directory-path-on-TAP-tests.patch (text/x-patch, 1.4K) download From 4c38a3e95da1abb5360a80b9ad646c9c6309bd9b Mon Sep 17 00:00:00 2001 From: Kyotaro Horiguchi <horiguchi.kyotaro@lab.ntt.co.jp> Date: Mon, 4 Jul 2016 15:18:51 +0900 Subject: [PATCH] Allow spaces in working directory path on TAP-tests. Several tap tests fails when the soruce directory path is containing spaces. This patch fixes it. --- src/test/perl/PostgresNode.pm | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/test/perl/PostgresNode.pm b/src/test/perl/PostgresNode.pm index 636dfec..5767919 100644 --- a/src/test/perl/PostgresNode.pm +++ b/src/test/perl/PostgresNode.pm @@ -475,7 +475,8 @@ sub backup my $name = $self->name; print "# Taking pg_basebackup $backup_name from node \"$name\"\n"; - TestLib::system_or_bail("pg_basebackup -D $backup_path -p $port -x"); + TestLib::system_or_bail('pg_basebackup', '-D', $backup_path, + '-p', $port, '-x'); print "# Backup finished\n"; } @@ -763,7 +764,7 @@ sub enable_restoring my $copy_command = $TestLib::windows_os ? qq{copy "$path\\\\%f" "%p"} - : qq{cp $path/%f %p}; + : qq{cp "$path/%f" "%p"}; $self->append_conf( 'recovery.conf', qq( @@ -791,7 +792,7 @@ sub enable_archiving my $copy_command = $TestLib::windows_os ? qq{copy "%p" "$path\\\\%f"} - : qq{cp %p $path/%f}; + : qq{cp "%p" "$path/%f"}; # Enable archive_mode and archive_command on node $self->append_conf( -- 1.8.3.1

view thread (11+ messages)  latest in thread

Message-ID: <20160704.160213.111134711.horiguchi.kyotaro@lab.ntt.co.jp>
Permalink:  ../20160704.160213.111134711.horiguchi.kyotaro@lab.ntt.co.jp/
Also on:    postgresql.org/message-id/20160704.160213.111134711.horiguchi.kyotaro@lab.ntt.co.jp

 ·  · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-hackers@postgresql.org
  Cc: horiguchi.kyotaro@lab.ntt.co.jp
  Subject: Re: [CF2016-9] Allow spaces in working path on tap-tests
  In-Reply-To: <20160704.160213.111134711.horiguchi.kyotaro@lab.ntt.co.jp>
  References: <20160704.160213.111134711.horiguchi.kyotaro@lab.ntt.co.jp>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox