Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[PATCH] Avoid double quotes in switchM.t runperl args. #13740

Closed
p5pRT opened this issue Apr 16, 2014 · 7 comments
Closed

[PATCH] Avoid double quotes in switchM.t runperl args. #13740

p5pRT opened this issue Apr 16, 2014 · 7 comments

Comments

@p5pRT
Copy link

p5pRT commented Apr 16, 2014

Migrated from rt.perl.org#121672 (status was 'resolved')

Searchable as RT121672$

@p5pRT
Copy link
Author

p5pRT commented Apr 16, 2014

From @craigberry

The new tests added in 9fdd5a7 were sending runperl a -e
command with double quotes around it, which confuses matters on
VMS where arguments get double quotes added unless they already
have them. The solution is simple​: just use the 'prog' parameter
to runperl and let runperl handle the quoting.

N.B. This modifies the same tests touched by the patch in
[perl #121662] so whichever gets applied last needs to be done
manually. The one here is just a replace of​:

, '-e "print t2​::id()"']

with

], prog => 'print t2​::id()'

in 2 places.

$ perl -V
Summary of my perl5 (revision 5 version 19 subversion 11 patch v5.19.10-80-g25fdf52) configuration​:
  Snapshot of​: 25fdf52
  Platform​:
  osname=VMS, osvers=V8.4, archname=VMS_IA64-thread-multi
  uname='VMS alma V8.4 HP rx2600 (1.50GHz/6.0MB)'
  config_args='-"des" -"Dusedevel" -"Duseithreads"'
  hint=none, useposix=false, d_sigaction=define
  useithreads=define, usemultiplicity=define
  use64bitint=undef, use64bitall=undef, uselongdouble=undef
  usemymalloc=undef, bincompat5005=undef
  Compiler​:
  cc='CC/DECC', ccflags ='/Include=[]/Standard=Relaxed_ANSI/Prefix=All/Obj=.obj /NOANSI_ALIAS/float=ieee/ieee=denorm/NAMES=(SHORTENED)/Define=_USE
_STD_STAT=1',
  optimize='/NoList',
  cppflags='undef'
  ccversion='70390020', gccversion='', gccosandvers='undef'
  intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=1234
  d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16
  ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8
  alignbytes=8, prototype=define
  Linker and Libraries​:
  ld='Link/nodebug', ldflags ='/NoTrace/NoMap'
  libpth=/sys$share /sys$library
  libs=
  perllibs=
  libc=(DECCRTL), so=exe, useshrplib=true, libperl=undef
  gnulibc_version='undef'
  Dynamic Linking​:
  dlsrc=dl_vms.xs, dlext=exe, d_dlsymun=undef, ccdlflags=''
  cccdlflags='', lddlflags='/Share'

Characteristics of this PERLSHR image​:
  Compile-time options​: HAS_TIMES HAVE_INTERP_INTERN MULTIPLICITY
  PERLIO_LAYERS PERL_DONT_CREATE_GVSV
  PERL_EXTERNAL_GLOB PERL_HASH_FUNC_ONE_AT_A_TIME_HARD
  PERL_IMPLICIT_CONTEXT PERL_MALLOC_WRAP
  PERL_NEW_COPY_ON_WRITE PERL_PRESERVE_IVUV USE_IEEE
  USE_ITHREADS USE_LARGE_FILES USE_LOCALE
  USE_LOCALE_COLLATE USE_LOCALE_CTYPE
  USE_LOCALE_NUMERIC USE_PERLIO USE_PERL_ATOF
  USE_REENTRANT_API VMS_DO_SOCKETS
  VMS_SHORTEN_LONG_SYMBOLS
  Locally applied patches​:
  SMOKE25fdf527591b902c99f699bb9d51d4f6ce49a6fc
  Built under VMS
  Compiled at Apr 15 2014 10​:12​:13
  %ENV​:
  PERLSHR="perl_root​:[000000]perlshr.exe"
  PERL_ROOT="MDA0​:[CRAIG.smoke.blead.]"
  @​INC​:
  /perl_root/lib/site_perl/VMS_IA64-thread-multi
  /perl_root/lib/site_perl
  /perl_root/lib/VMS_IA64-thread-multi/5_19_11
  /perl_root/lib
  .

________________________________________
Craig A. Berry
mailto​:craigberry@​mac.com

"... getting out of a sonnet is much more
difficult than getting in."
  Brad Leithauser

@p5pRT
Copy link
Author

p5pRT commented Apr 16, 2014

From @craigberry

0001-Avoid-double-quotes-in-switchM.t-runperl-args.patch
From a352d3163ef6e5b63ec847541ab57d41d179ef77 Mon Sep 17 00:00:00 2001
From: "Craig A. Berry" <craigberry@mac.com>
Date: Tue, 15 Apr 2014 19:30:26 -0500
Subject: [PATCH] Avoid double quotes in switchM.t runperl args.

The new tests added in 9fdd5a7ac74817 were sending runperl a -e
command with double quotes around it, which confuses matters on
VMS where arguments get double quotes added unless they already
have them.  The solution is simple: just use the 'prog' parameter
to runperl and let runperl handle the quoting.
---
 t/run/switchM.t | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/t/run/switchM.t b/t/run/switchM.t
index 6a75100..ac2f5de 100644
--- a/t/run/switchM.t
+++ b/t/run/switchM.t
@@ -18,10 +18,10 @@ like(runperl(switches => ['-Irun/flib/', '-Mbroken'], stderr => 1),
      qr/^Global symbol "\$x" requires explicit package name at run\/flib\/broken.pm line 6\./,
      "Ensure -Irun/flib/ produces correct filename in warnings");
 
-like(runperl(switches => ['-Irun/flib', '-Mt2', '-e "print t2::id()"'], stderr => 1),
+like(runperl(switches => ['-Irun/flib', '-Mt2'], prog => 'print t2::id()', stderr => 1),
      qr/^t2pmc$/,
      "Ensure -Irun/flib loads pmc");
 
-like(runperl(switches => ['-Irun/flib/', '-Mt2', '-e "print t2::id()"'], stderr => 1),
+like(runperl(switches => ['-Irun/flib/', '-Mt2'], prog => 'print t2::id()', stderr => 1),
      qr/^t2pmc$/,
      "Ensure -Irun/flib/ loads pmc");
-- 
1.8.4.2

@p5pRT
Copy link
Author

p5pRT commented Apr 21, 2014

From @tonycoz

On Wed Apr 16 05​:36​:32 2014, craigberry wrote​:

The new tests added in 9fdd5a7 were sending runperl a -e
command with double quotes around it, which confuses matters on
VMS where arguments get double quotes added unless they already
have them. The solution is simple​: just use the 'prog' parameter
to runperl and let runperl handle the quoting.

N.B. This modifies the same tests touched by the patch in
[perl #121662] so whichever gets applied last needs to be done
manually. The one here is just a replace of​:

, '-e "print t2​::id()"']

with

], prog => 'print t2​::id()'

I think this belongs in blead, and plan to apply it in a couple of days if no-one objects.

This fixes a new test introduced during the code freeze which I think makes it fair game.

Tony

@p5pRT
Copy link
Author

p5pRT commented Apr 21, 2014

The RT System itself - Status changed from 'new' to 'open'

@p5pRT
Copy link
Author

p5pRT commented Apr 21, 2014

From @wolfsage

On Sun, Apr 20, 2014 at 8​:38 PM, Tony Cook via RT
<perlbug-followup@​perl.org> wrote​:

On Wed Apr 16 05​:36​:32 2014, craigberry wrote​:

The new tests added in 9fdd5a7 were sending runperl a -e
command with double quotes around it, which confuses matters on
VMS where arguments get double quotes added unless they already
have them. The solution is simple​: just use the 'prog' parameter
to runperl and let runperl handle the quoting.

N.B. This modifies the same tests touched by the patch in
[perl #121662] so whichever gets applied last needs to be done
manually. The one here is just a replace of​:

, '-e "print t2​::id()"']

with

], prog => 'print t2​::id()'

I think this belongs in blead, and plan to apply it in a couple of days if no-one objects.

This fixes a new test introduced during the code freeze which I think makes it fair game.

Tony

+1. Thanks!

-- Matthew Horsfall (alh)

@p5pRT
Copy link
Author

p5pRT commented Apr 23, 2014

From @tonycoz

On Wed Apr 16 05​:36​:32 2014, craigberry wrote​:

The new tests added in 9fdd5a7 were sending runperl a -e
command with double quotes around it, which confuses matters on
VMS where arguments get double quotes added unless they already
have them. The solution is simple​: just use the 'prog' parameter
to runperl and let runperl handle the quoting.

N.B. This modifies the same tests touched by the patch in
[perl #121662] so whichever gets applied last needs to be done
manually. The one here is just a replace of​:

, '-e "print t2​::id()"']

with

], prog => 'print t2​::id()'

in 2 places.

Thanks, applied as 2a07cc4.

Tony

@p5pRT p5pRT closed this as completed Apr 23, 2014
@p5pRT
Copy link
Author

p5pRT commented Apr 23, 2014

@tonycoz - Status changed from 'open' to 'resolved'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant