This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC 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: [3/6] nvptx testsuite patches: stdio


On Oct 21, 2014, at 7:17 AM, Bernd Schmidt <bernds@codesourcery.com> wrote:
> Some tests use stdio functions which are unavaiable with the cut-down newlib I'm using for ptx testing. I'm somewhat uncertain what to do with these; they are by no means the only unavailable library functions the testsuite tries to use (signal is another example). Here's a patch which deals with parts of the problem, but I wouldn't mind leaving this one out if it doesn't seem worthwhile.

So, it is nice if an entire newlib port can be done, then, you don’t have to worry about subsets of it.

I think the patch is Ok, I would change:

+#ifndef __nvptx__
   fprintf (stderr, "Test failed: %s\n", msg);
+#endif

to just comment out the line.

If you want to try your hand at removing stdio in some fashion, you can try, I am skeptical that there is a meaningful way to do that and it seems larger and harder then the patch you have.  The usual fashion I would recommend would be a stub library for testing that simply disappears such calls as uninteresting.  int fpritnf (…) { return 0; } would go a long way.  For test cases that someone care about what fprintf actually does, those can be marked as stdio and likely, those would be a far smaller set to so mark.

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