Re: [PATCH v2 01/10] t/test-lib: teach --chain-lint to detect broken &&-chains in subshells

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Jul 11 2018, Eric Sunshine wrote:

Found in some 2.19 testing on AIX:

> +# here-doc -- swallow it to avoid false hits within its body (but keep the
> +# command to which it was attached)
> +/<<[ 	]*[-\\]*EOF[ 	]*/ {
> +	s/[ 	]*<<[ 	]*[-\\]*EOF//
> +	h
> +	:hereslurp
> +	N
> +	s/.*\n//
> +	/^[ 	]*EOF[ 	]*$/!bhereslurp
> +	x
> +}

AIX sed doesn't like this, and will yell:

    :hereslurp is greater than eight characters

This on top fixes it:

    diff --git a/t/chainlint.sed b/t/chainlint.sed
    index 8544df38df..2333705b27 100644
    --- a/t/chainlint.sed
    +++ b/t/chainlint.sed
    @@ -100 +100 @@
    -       :hereslurp
    +       :hered
    @@ -104 +104 @@
    -               bhereslurp
    +               bhered
    @@ -286 +286 @@ s/[     ]*<<//
    -:hereslurpsub
    +:heredsub
    @@ -290 +290 @@ N
    -       bhereslurpsub
    +       bheredsub

> +:subshell
> +# bare "(" line?
> +/^[ 	]*([	]*$/ {
> +	# stash for later printing
> +	h
> +	bnextline
> +}
> +# "(..." line -- split off and stash "(", then process "..." as its own line

AIX sed doesn't like this either, and prints:

    sed:    # stash for later printing is not a recognized function.

I have no idea what the fix is for that one.



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux