Hi Manoj,
I am not the maintainer of gdb.threads -- that is Michael Snyder.
(See the gdb/MAINTAINERS file for a list of who maintains what
subdirectory). You'll have to work with Michael Snyder on this
patch. I can give you some feedback though.
The basic idea of the test is good but it needs revision. Don't get
discouraged by the long list that follows. I spent some time
proof-reading this because I think it's good and I want it to get in.
Also, since this is Michael Snyder's area, anything he says
outweighs anything I say. The changes below are just my advice.