From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10889 invoked by alias); 28 Jan 2009 16:55:11 -0000 Received: (qmail 10880 invoked by uid 22791); 28 Jan 2009 16:55:10 -0000 X-SWARE-Spam-Status: No, hits=-1.7 required=5.0 tests=AWL,BAYES_00,J_CHICKENPOX_74 X-Spam-Check-By: sourceware.org Received: from hagrid.ecoscentric.com (HELO mail.ecoscentric.com) (212.13.207.197) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 28 Jan 2009 16:55:05 +0000 Received: from localhost (hagrid.ecoscentric.com [127.0.0.1]) by mail.ecoscentric.com (Postfix) with ESMTP id 531773B40039 for ; Wed, 28 Jan 2009 16:55:03 +0000 (GMT) Received: from mail.ecoscentric.com ([127.0.0.1]) by localhost (hagrid.ecoscentric.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id h0Zdxtd-KOb5; Wed, 28 Jan 2009 16:55:02 +0000 (GMT) Received: (from bartv@localhost) by hermione.bartv.net (8.14.3/8.14.3/Submit) id n0SGt1ZX017661; Wed, 28 Jan 2009 16:55:01 GMT Date: Wed, 28 Jan 2009 16:55:00 -0000 Message-Id: <200901281655.n0SGt1ZX017661@hermione.bartv.net> From: Bart Veer To: ecos-patches@sourceware.org Subject: fix signals tests Mailing-List: contact ecos-patches-help@ecos.sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: ecos-patches-owner@ecos.sourceware.org X-SW-Source: 2009-01/txt/msg00034.txt.bz2 This patches signal1.c to only test abort() if there is a real implementation of that function, and patches both tests to cope with configurations that don't use main(). Bart 2009-01-28 Bart Veer * tests/signal1.c: skip the abort() test if there is no proper implementation. * tests/signal1.c, tests/signal2.c: allow to run if CYGPKG_LIBC_STARTUP is absent. Index: tests/signal1.c =================================================================== RCS file: /cvs/ecos/ecos/packages/language/c/libc/signals/current/tests/signal1.c,v retrieving revision 1.4 diff -u -p -r1.4 signal1.c --- tests/signal1.c 23 May 2002 23:07:10 -0000 1.4 +++ tests/signal1.c 28 Jan 2009 16:53:26 -0000 @@ -58,6 +58,10 @@ // INCLUDES +#include +#ifdef CYGPKG_ISOINFRA +# include +#endif #include // Common type definitions and support #include // Test infrastructure #include // Signal functions @@ -86,8 +90,12 @@ myhandler2(int signal) longjmp(jbuf, 1); } // myhandler2() +#ifndef CYGPKG_LIBC_STARTUP +void cyg_user_start(void) +#else int main( int argc, char *argv[] ) +#endif { __sighandler_t handler1; int rc; @@ -184,6 +192,7 @@ main( int argc, char *argv[] ) CYG_TEST_PASS_FAIL(6==state, "SIGTERM handler returned correctly"); +#if defined(CYGINT_ISO_ENVIRON) && (CYGINT_ISO_ENVIRON > 0) // Test 6 CYG_TEST_INFO("Test 6"); @@ -200,11 +209,13 @@ main( int argc, char *argv[] ) } CYG_TEST_PASS_FAIL(7==state, "SIGABRT handler returned correctly"); +#else + CYG_TEST_INFO("skipping abort() test, function not implemented"); +#endif CYG_TEST_FINISH("Finished tests from testcase " __FILE__ " for C " "library signal functions"); - return 0; } // main() // EOF signal1.c Index: tests/signal2.c =================================================================== RCS file: /cvs/ecos/ecos/packages/language/c/libc/signals/current/tests/signal2.c,v retrieving revision 1.6 diff -u -p -r1.6 signal2.c --- tests/signal2.c 23 May 2002 23:07:10 -0000 1.6 +++ tests/signal2.c 28 Jan 2009 16:54:30 -0000 @@ -152,8 +152,12 @@ volatile int tmp; #endif +#ifndef CYGPKG_LIBC_STARTUP +void cyg_user_start(void) +#else int main( int argc, char *argv[] ) +#endif { #ifdef CYGSEM_LIBC_SIGNALS_HWEXCEPTIONS __sighandler_t handler1;