This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] x86: fix inval-equ-2 gas test


On Wed, Apr 15, 2009 at 6:15 AM, H.J. Lu <hjl.tools@gmail.com> wrote:
> On Wed, Apr 15, 2009 at 6:09 AM, Jan Beulich <jbeulich@novell.com> wrote:
>>>>> "H.J. Lu" <hjl.tools@gmail.com> 15.04.09 14:55 >>>
>>>On Wed, Apr 15, 2009 at 4:30 AM, Jan Beulich <jbeulich@novell.com> wrote:
>>>> This is the patch addressing the issues raised in an earlier thread
>>>> starting at http://sourceware.org/ml/binutils/2008-11/msg00130.html.
>>>>
>>>> gas/testsuite/
>>>> 2009-04-15 ?Jan Beulich ?<jbeulich@novell.com>
>>>>
>>>> ? ? ? ?* gas/i386/inval-equ-2.s: Change to not make assumptions about
>>>> ? ? ? ?internal (and possibly broken) behavior.
>>>> ? ? ? ?* gas/i386/inval-equ-2.l: Adjust expectations.
>>>>
>>>Those tests are added so that assembler won't crash on them. If you remove
>>>those tests, someone may change assembler and assembler crash on them
>>>again.
>>
>> You had said the same thing a couple of months back, when I first asked
>> about this dubious test. Since you didn't fix it so far, I now felt it was my
>> turn to submit a fix. As described in the original posting, the test you
>> do is bogus, and as such is prone to break at any time due to completely
>> unrelated changes (as I have seen in the past). So I'd request that either
>
> We can update the expected error messages ?when assembler is updated.
>
>> you fix the test yourself to not depend on broken-ness elsewhere in the
>> assembler (admitted, testing for the assembler to reject something in a
>> particular way is always problematic, because invalid constructs can
>> potentially be rejected in various different ways, but I think such specific
>> behavior should simply not be tested for), or you allow the change in.
>>
>
> I don't think we should allow those crashes untested on x86. As long
> as assembler doesn't crash, I really mind what kinds of error messages
> assembler generates.
>

I am enclosing a script to generate the expected error message from assembler
outputs.


-- 
H.J.
---
#! /bin/sh

sed -e "s/\(\[\)/\\\\\1/g" \
    -e "s/\(\]\)/\\\\\1/g" \
    -e "s/\(\*\)/\\\\\1/g" \
    -e "s/\(\+\)/\\\\\1/g" \
    -e "s/\?/\\\?/g" \
    -e "s/\([#.\$(){}]\)/\\\\\1/g" \
    -e "s/.*\.s:\([0-9]\+\): Error: .*$/.*:\1: Error: .*/" \
    -e "s/.*\.s:\([0-9]\+\): Warning:\(.*\)$/.*:\1: Warning:\2/" \
    -e "s/.*\.s: \(Assembler messages:.*\)/.*: \1/"  \
    -e "s/\(GAS LISTING\) .*/\1 .*/"  \
    -e "s/[ \t]*\([0-9]\+\)[ \t]\+/[ \t]*\1[ \t]+/" \


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]