This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [MI] --thread-group test (was: RE: [MI] Duplicate --thread-group flag not detected)
> Do I need a PR number to use KFAIL? I don't have one.
> I used XFAIL instead. Is that right?
XFAIL is for the case where the problem is caused by what I call
the "environment". In other words, it's not GDB's fault. It could
be bad debugging info, kernel bug, assember, etc...
It took me a while to find the documentation for setup_kfail, but
I confirm that bug ID must be provided with setup_kfail.
> The annoying part there, is that the tests fails on a timeout,
> so marking them XFAIL instead of commenting them out makes
> the test file take 10 seconds more...
In that case, I suggest we simply open bugs for these tests. I understand
you are already making an effort trying to contribute this test, so I can
create the new PRs for you if you are busy. In the meantime, let's take
these tests out.
> To be honest, I don't even need a binary for this test, I can test the
> syntax without actually starting the inferior. I did this in the patch
> below, but I'm not sure if this follows proper 'protocol'. Just let me
> know.
I would be perfectly fine.
> > Do we want to test the MI command with a sequence number. I know that
> > they are allowed, but aren't they obsolete?
>
> We heavily use them in Eclipse :-)
> And I saw that other tests use them, so I thought it would make a
> 'syntax' test more complete.
In that case, that's also a good idea.
> 2010-12-06 Marc Khouzam <marc.khouzam@ericsson.com>
>
> * gdb.mi/mi-general.exp: New file.
> +# No need to actually start the inferior as the tests below only verify MI syntax.
> +# What we do instead is see that the parsing works, and passes the MI command
> +# further down to GDB, which will then fail because we didn't start the inferior.
> +# We wouldn't make it that far if the MI syntax parsing failed
Thanks a lot for writing comments - I think they are the best feature
of any language and always find them very helpful.
Just watch out for line length, which should not exceed 78 characters.
Also, a period at the end of the last sentence is missing.
> + # If we get to the breakpoint error, it means the -thread-group was parsed properly
Same here... and later on as well.
> + setup_xfail *-*-*
> + mi_gdb_test "25-break-insert --thread-group XYZ main" \
> + "25\\^error,msg=\"Invalid thread group id\"" \
> + "Invalid --thread-group flag which does not start with an i"
> +
> + setup_xfail *-*-*
> + mi_gdb_test "36-break-insert --thread-group i1 --thread-group i2 main" \
> + "36\\^error,msg=\"Duplicate '--thread-group' option\n\"" \
> + "Duplicate --thread-group flag"
So, as discussed above, let's discard these in favor of opening
new PRs.
Thanks again for doing this,
--
Joel