From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1525 invoked by alias); 18 Oct 2004 13:37:02 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 1467 invoked from network); 18 Oct 2004 13:37:00 -0000 Received: from unknown (HELO smtp1.libero.it) (193.70.192.51) by sourceware.org with SMTP; 18 Oct 2004 13:37:00 -0000 Received: from localhost (172.16.1.79) by smtp1.libero.it (7.0.027-DD01) id 40C7315F01AC5A5B; Mon, 18 Oct 2004 15:37:11 +0200 Received: from bagio (151.37.66.242) by smtp20.libero.it (7.0.027-DD01) id 40E3F8E20436DAA6; Mon, 18 Oct 2004 15:36:52 +0200 Message-ID: <03a001c4b517$932b4be0$f2422597@bagio> From: "Giovanni Bajo" To: "Bruce Korb" Cc: , "GCC-Patches" References: <20040630163127.16300.skunk@iskunk.org> <20041016033011.24264.qmail@sourceware.org> <41734D28.A5607C6A@veritas.com> Subject: Re: [Bug target/16300] Bug in vendor /usr/include/net/if.h needs fixincluding Date: Mon, 18 Oct 2004 13:38:00 -0000 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at libero.it serv1 X-SW-Source: 2004-10/txt/msg01471.txt.bz2 Bruce Korb wrote: >> I can only fix things about which I get feedback so it >> incrementally gets better. I'm sorry you found it difficult. Sure, I did not want to sound offensive. >> Also, it does not explain if it is possible (and how) to use the >> test_text to >> verify the correctness of the fix. When I run 'make check' I don't >> understand >> if my new hack is being tested or not, and if it is correct or not. > > "test-text" should contain one or more examples of broken text that > needs to be fixed. "make check" will spin a file with that text in it > and run the "fixinc" program, then run a recursive "diff" between the > patched files and a set of example files. Any differences are > highlighted. I still do not understand. The diff is being performed between the patched file and what example files? If I add a new fix, should I also put a patched (correct) version in the set of example files (where are they)? > So, when you make a fix, you should pretty well understand how the > broken text ought to be transformed. In the "make check", you ought > to see a diff that includes that new transform in the new output and > not in the sample output. Now I am confused. I do not understand which of the following holds true: - The diff shows what fixinclude did. It shows the different between the original version (extracted from test-text) and the version that fixinclude produced by applying your diff. - The diff shows the mistakes of fixinclude, if any. It shows the different between what fixinclude produced as output (by applying your fix to the test-text) and what it is the expected result (which you have to put in a different file -- where? how?). >> 4. Rebuild the compiler and check the header causing the issue. >> Make sure it is now properly handled. Add tests to the >> "test_text" entry(ies) that validate your fix. This will >> help ensure that future fixes won't negate your work. > > That means first, ensure the header you want fixed is fixed. > Then, incorporate the brokenness in the "text-text" field. > Then, ensure it is fixed in the sample output. > Then, add the fixed result into the baseline sample files. This process can be done if you have physical access to the host with the broken header. In my case, I was developing a fixinclude for a broken header for another system. I have the broken header as a file (attacched to the bug). How can I test my fix in this situation? BTW: "rebuild the compiler" is a tad too much as first quick test for a fixinclude (e.g. check that the regulard expression does not have a typo or so). Even assuming access to the host, would you please explain if there is a quicker wasy to just run fixincludes without rebuilding everything? Of course, a full bootstrap would be still required as a final check. > That means send me email if you are still having problems. Thanks Giovanni Bajo