From patchwork Fri Apr 11 10:00:29 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Will Newton X-Patchwork-Id: 28257 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-pb0-f69.google.com (mail-pb0-f69.google.com [209.85.160.69]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 3CD2220822 for ; Fri, 11 Apr 2014 10:00:48 +0000 (UTC) Received: by mail-pb0-f69.google.com with SMTP id md12sf17085342pbc.8 for ; Fri, 11 Apr 2014 03:00:47 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:mailing-list :precedence:list-id:list-unsubscribe:list-subscribe:list-archive :list-post:list-help:sender:delivered-to:from:to:subject:date :message-id:x-original-sender:x-original-authentication-results; bh=2hfSRnyfoU2KGoqNp6TuUEagc3geuw7fF31bQjg2+a4=; b=Jc11f7Btzk/M5SyoQUrH54tJf6O8S8wgUJmD633rLhUj0E/P4UUOUgUE7tBWEQQgou yvCHpkIz+NFWOiU+MnASUwnVeNfnMksfkIFJSdK4ojJe5WJSJUfrGYaV55j0QKP7M02E j7kgTSLOf4hrZcE3zuGZEuIGumwhG/YMgADl4+U+vKRgXKUgpS228a3VWpYpsAQB4xuD 9mhx81ZtHtZ4ht+NJcxOsc7owz73OnUydN1nA6iVb8VkezUhmC5EMLiJBcYWzTGJ1E6V 8bkzyldS9GlvAhwox5HXU07BNBwNTfl16FabiPwqVGssqCCOzzKk6GjHkGMTqdeHHFA/ iscg== X-Gm-Message-State: ALoCoQkriZxhTjE5x/f8+ldwjrOLaB6b/HfxkWYmtnVqzqOvf4o0dGPYVtA/8VbF4nCPCF/5XXzO X-Received: by 10.66.189.228 with SMTP id gl4mr11565725pac.26.1397210447522; Fri, 11 Apr 2014 03:00:47 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.31.244 with SMTP id f107ls1507503qgf.65.gmail; Fri, 11 Apr 2014 03:00:47 -0700 (PDT) X-Received: by 10.220.106.84 with SMTP id w20mr19188316vco.18.1397210447380; Fri, 11 Apr 2014 03:00:47 -0700 (PDT) Received: from mail-ve0-x235.google.com (mail-ve0-x235.google.com [2607:f8b0:400c:c01::235]) by mx.google.com with ESMTPS id mp4si1212545vcb.4.2014.04.11.03.00.47 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 11 Apr 2014 03:00:47 -0700 (PDT) Received-SPF: neutral (google.com: 2607:f8b0:400c:c01::235 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=2607:f8b0:400c:c01::235; Received: by mail-ve0-f181.google.com with SMTP id oy12so4459931veb.26 for ; Fri, 11 Apr 2014 03:00:47 -0700 (PDT) X-Received: by 10.52.173.165 with SMTP id bl5mr15813094vdc.13.1397210447301; Fri, 11 Apr 2014 03:00:47 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.220.221.72 with SMTP id ib8csp43738vcb; Fri, 11 Apr 2014 03:00:46 -0700 (PDT) X-Received: by 10.66.65.138 with SMTP id x10mr26187848pas.17.1397210446617; Fri, 11 Apr 2014 03:00:46 -0700 (PDT) Received: from sourceware.org (server1.sourceware.org. [209.132.180.131]) by mx.google.com with ESMTPS id tc10si936683pbc.504.2014.04.11.03.00.46 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 11 Apr 2014 03:00:46 -0700 (PDT) Received-SPF: pass (google.com: domain of libc-alpha-return-48955-patch=linaro.org@sourceware.org designates 209.132.180.131 as permitted sender) client-ip=209.132.180.131; Received: (qmail 348 invoked by alias); 11 Apr 2014 10:00:38 -0000 Mailing-List: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org Precedence: list List-Id: List-Unsubscribe: , List-Subscribe: List-Archive: List-Post: , List-Help: , Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 337 invoked by uid 89); 11 Apr 2014 10:00:37 -0000 X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.0 required=5.0 tests=AWL, BAYES_00, RCVD_IN_DNSWL_LOW, SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-we0-f181.google.com X-Received: by 10.194.203.170 with SMTP id kr10mr20127644wjc.19.1397210433375; Fri, 11 Apr 2014 03:00:33 -0700 (PDT) From: Will Newton To: libc-alpha@sourceware.org Subject: [PATCH] test-skeleton.c: Use stderr for error messages Date: Fri, 11 Apr 2014 11:00:29 +0100 Message-Id: <1397210429-28716-1-git-send-email-will.newton@linaro.org> X-Original-Sender: will.newton@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 2607:f8b0:400c:c01::235 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org; dkim=pass header.i=@sourceware.org X-Google-Group-Id: 836684582541 At the moment a mixture of stderr and stdout is used for error messages. Switch to using stderr for consistency. ChangeLog: 2014-04-09 Will Newton * test-skeleton.c (create_temp_file): Use stderr for outputting error messages. (main): Likewise. --- test-skeleton.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/test-skeleton.c b/test-skeleton.c index d7d2f75..437c51d 100644 --- a/test-skeleton.c +++ b/test-skeleton.c @@ -110,7 +110,7 @@ create_temp_file (const char *base, char **filename) + sizeof ("XXXXXX")); if (fname == NULL) { - puts ("out of memory"); + fputs ("out of memory", stderr); return -1; } strcpy (stpcpy (stpcpy (stpcpy (fname, test_dir), "/"), base), "XXXXXX"); @@ -118,7 +118,7 @@ create_temp_file (const char *base, char **filename) fd = mkstemp (fname); if (fd == -1) { - printf ("cannot open temporary file '%s': %m\n", fname); + fprintf (stderr, "cannot open temporary file '%s': %m\n", fname); free (fname); return -1; } @@ -368,12 +368,12 @@ main (int argc, char *argv[]) termpid = TEMP_FAILURE_RETRY (waitpid (pid, &status, 0)); if (termpid == -1) { - printf ("Waiting for test program failed: %m\n"); + fprintf (stderr, "Waiting for test program failed: %m\n"); exit (1); } if (termpid != pid) { - printf ("Oops, wrong test program terminated: expected %ld, got %ld\n", + fprintf (stderr, "Oops, wrong test program terminated: expected %ld, got %ld\n", (long int) pid, (long int) termpid); exit (1); }