From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 95048 invoked by alias); 3 Nov 2016 20:12:17 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Received: (qmail 95024 invoked by uid 89); 3 Nov 2016 20:12:16 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.4 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE,RCVD_IN_SORBS_SPAM,SPF_PASS autolearn=no version=3.3.2 spammy=ack X-HELO: mail-ua0-f171.google.com X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:subject:to:references:cc:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding; bh=P0q+D0xpuItAiJV9Wt6BRoKbTLz2uhqn7fnvAivJMGE=; b=B62XqmC1jziHCKYn4c/kp6fMKWcxVcoKoex/vjYrb0ziYi3S8DoYUyi/znjWbZolst A8JL5xunjpFFKtTu3mftedqioeH4SvzVWHGCffnmhZNQ4T8NDeA47nnWxslmXYfXzfU2 /qTwQCi2aTxN+VYUWk2namZsUSEJR4nWHIrWtpAI48btfFCkXzJ2bVbovWT1nkTXWD12 z7ZkEDuWdWkZ8Nw3OfBsFpnEJq2j2JkBS0d2qwO432IG/h8Mujr/bx7SXHSVJGA4pU7G uDKnBvPbsx9CWFoFggj+8Vaf2b9xbL86jqT3ykYVMmtbep9Vq0cPpoo8haCwCzYcyEEG fS9A== X-Gm-Message-State: ABUngvfJvyj6S9nTIaS7dB6MVQN1ulBW+aW3ZrqFNfXLKedG3FEzGsMgK4sMNLJXhetWHhKy X-Received: by 10.159.48.91 with SMTP id i27mr8878056uab.13.1478203924230; Thu, 03 Nov 2016 13:12:04 -0700 (PDT) Subject: Re: [PATCH v2 06/16] Add SYSV message queue test To: Yury Norov References: <1478114813-3526-1-git-send-email-adhemerval.zanella@linaro.org> <1478114813-3526-7-git-send-email-adhemerval.zanella@linaro.org> <20161103170830.GB31761@yury-N73SV> Cc: libc-alpha@sourceware.org From: Adhemerval Zanella Message-ID: <708e1552-5ed9-eaac-eda6-5d0e7edd8cf8@linaro.org> Date: Thu, 03 Nov 2016 20:12:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.3.0 MIME-Version: 1.0 In-Reply-To: <20161103170830.GB31761@yury-N73SV> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-SW-Source: 2016-11/txt/msg00117.txt.bz2 On 03/11/2016 15:08, Yury Norov wrote: >> new file mode 100644 >> index 0000000..9393c83 >> --- /dev/null >> +++ b/sysvipc/test-sysvmsg.c >> @@ -0,0 +1,123 @@ >> +/* Basic tests for SYSV message queue functions. >> + Copyright (C) 2016 Free Software Foundation, Inc. >> + This file is part of the GNU C Library. >> + >> + The GNU C Library is free software; you can redistribute it and/or >> + modify it under the terms of the GNU Lesser General Public >> + License as published by the Free Software Foundation; either >> + version 2.1 of the License, or (at your option) any later version. >> + >> + The GNU C Library is distributed in the hope that it will be useful, >> + but WITHOUT ANY WARRANTY; without even the implied warranty of >> + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU >> + Lesser General Public License for more details. >> + >> + You should have received a copy of the GNU Lesser General Public >> + License along with the GNU C Library; if not, see >> + . */ >> + >> +#include >> +#include >> +#include >> +#include >> +#include >> +#include >> +#include >> + >> +static void do_prepare (void); >> +#define PREPARE(argc, argv) do_prepare () >> +static int do_test (void); >> +#define TEST_FUNCTION do_test () >> + >> +/* This defines the `main' function and some more. */ >> +#include >> + >> +#define TEXTSIZE 32 >> +struct msgbuf_t >> +{ >> + long int type; >> + char text[TEXTSIZE]; >> +}; >> + >> +#define MSGTYPE 0x01020304 >> +#define MSGDATA "0123456789" >> + >> +/* These are for the temporary file we generate. */ >> +static char *name; >> +static int msqid; >> + >> +static void >> +remove_msq (void) >> +{ >> + /* Enforce message queue removal in case o early test failure. > > Trailing whitespace Ack, I fixed it on my local branch.