From patchwork Wed Mar 20 21:57:07 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Petr Vorel X-Patchwork-Id: 1059574 X-Patchwork-Delegate: petr.vorel@gmail.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=lists.linux.it (client-ip=2001:1418:10:5::2; helo=picard.linux.it; envelope-from=ltp-bounces+incoming=patchwork.ozlabs.org@lists.linux.it; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="io+vNXYV"; dkim-atps=neutral Received: from picard.linux.it (picard.linux.it [IPv6:2001:1418:10:5::2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 44PkL56tksz9sR3 for ; Thu, 21 Mar 2019 08:57:33 +1100 (AEDT) Received: from picard.linux.it (localhost [IPv6:::1]) by picard.linux.it (Postfix) with ESMTP id 39E3B3EAEB5 for ; Wed, 20 Mar 2019 22:57:31 +0100 (CET) X-Original-To: ltp@lists.linux.it Delivered-To: ltp@picard.linux.it Received: from in-5.smtp.seeweb.it (in-5.smtp.seeweb.it [217.194.8.5]) by picard.linux.it (Postfix) with ESMTP id B715E3EA8F2 for ; Wed, 20 Mar 2019 22:57:28 +0100 (CET) Received: from mail-pf1-x443.google.com (mail-pf1-x443.google.com [IPv6:2607:f8b0:4864:20::443]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by in-5.smtp.seeweb.it (Postfix) with ESMTPS id 78D3E600732 for ; Wed, 20 Mar 2019 22:57:29 +0100 (CET) Received: by mail-pf1-x443.google.com with SMTP id p10so2887999pff.3 for ; Wed, 20 Mar 2019 14:57:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=bkYDcmVYIjFl4hzkx+A28HfyqLMlWcfwkF+mg7ILWP8=; b=io+vNXYVYAcapQXvWjlEfH+j4hPpWw+2IAuUwqDZzowd/RzznNi9m1X35cmaBWMLst TCk7ZpnFu1ebMoXJ1ac4YFE1fFRUPKEfI/DkH4h6Fx6T0s8JWpLgHjxzEcW8gpTuZ1Ut mp0ltcBOeD/QHK8oyZPLNKZ194NNoyDLKe9jlEcBNEWUHysAK/a//FASGnzUvI6BYcW5 YZdhukdlX2yH3EzSO4u2wSwEey4q9vNRr77RIIKyG8f6ghxk3J/DW7830f8RU1l3F9Xc Vx3GD4zbOxKd7l/HlqUC9EwnyIyQRrXMz522BzsoqN22vcaCZhI+ZASm1oIwA/WAnunC Y5wA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=bkYDcmVYIjFl4hzkx+A28HfyqLMlWcfwkF+mg7ILWP8=; b=lSgiP50q7ZvSosFnzTlzH94hmh+GrffrPj+KY11bV12EPGFfeaMs42Po0BLXXp5VoG p+EDL/SFywfMwHgz7dBn7uS6htnDlRrF6M8JOTAH5QXwhntjP37FdJX1E66EvY4/J8Sd TP57frd+MMWDC4SxccES9o2qW+gb9j3aNRDPf6jpCv+RO/pywwQ+Fr/69aBJVr0wM6DD vLZye5b0XrppVCjiALIIzcbJO5+VyoRl56u/XHyghPuIH/qgVt3+0BqKW/IP9FH6caiJ Ojl8ReOUZjmfT5sUYoHl+TvMuLKN7yP+rsbH5yOYmmhjrnOJIPanwoWFthbVlXvXQ9dP e43g== X-Gm-Message-State: APjAAAXX2Vn+8hG6y0bOCMOl1CDyymJxzFcr7HFcQ0bJxGe9Qs8WPstD itG+l/VhGtBFywEocShNZ0fCrkX8 X-Google-Smtp-Source: APXvYqxvw17I7Vfgz6Xa/7GyySeTBQ8h/RM6KdthIXnxV0ZDsCbUYddke4UugDqhJcp6tDRLcWBSnw== X-Received: by 2002:a17:902:8ecb:: with SMTP id x11mr62601plo.40.1553119046305; Wed, 20 Mar 2019 14:57:26 -0700 (PDT) Received: from dell5510.suse.cz ([62.201.25.198]) by smtp.gmail.com with ESMTPSA id s6sm3922532pfm.94.2019.03.20.14.57.23 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 20 Mar 2019 14:57:25 -0700 (PDT) From: Petr Vorel To: ltp@lists.linux.it Date: Wed, 20 Mar 2019 22:57:07 +0100 Message-Id: <20190320215707.30268-1-petr.vorel@gmail.com> X-Mailer: git-send-email 2.21.0 MIME-Version: 1.0 X-Virus-Scanned: clamav-milter 0.99.2 at in-5.smtp.seeweb.it X-Virus-Status: Clean X-Spam-Status: No, score=0.1 required=7.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, SPF_PASS autolearn=disabled version=3.4.0 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on in-5.smtp.seeweb.it Cc: Dengke Du Subject: [LTP] [PATCH 1/1] msgrcv/msgrcv08.c: Use struct msgbuf defined in X-BeenThere: ltp@lists.linux.it X-Mailman-Version: 2.1.18 Precedence: list List-Id: Linux Test Project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ltp-bounces+incoming=patchwork.ozlabs.org@lists.linux.it Sender: "ltp" which requires to define _GNU_SOURCE. This fixes MUSL build. NOTE: char array from struct has usually length 1, the one from test had 16, but that's not a limitation. Fixes: eccd238da ("ipc/msgrcv: add new testcase msgrcv08") Reported-by: Dengke Du Signed-off-by: Petr Vorel --- Hi Li, what was the reason to use size 16? Kind regards, Petr PS: I found and fix this error independently while working on MUSL build fixes, but than found it was reported by Dengke Du in PR #177 [1]. [1] https://github.com/linux-test-project/ltp/pull/177/commits/87c4a4ae2817f835a594ab795dc938a27c642b92 --- testcases/kernel/syscalls/ipc/msgrcv/msgrcv08.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/testcases/kernel/syscalls/ipc/msgrcv/msgrcv08.c b/testcases/kernel/syscalls/ipc/msgrcv/msgrcv08.c index a757c0d18..21d77c9dd 100644 --- a/testcases/kernel/syscalls/ipc/msgrcv/msgrcv08.c +++ b/testcases/kernel/syscalls/ipc/msgrcv/msgrcv08.c @@ -35,6 +35,7 @@ * If this progarm is compiled as 64-bit application it works. */ +#define _GNU_SOURCE #include #include #include @@ -48,11 +49,6 @@ const int TST_TOTAL = 1; #if __WORDSIZE == 32 -struct msgbuf { - long mtype; /* message type, must be > 0 */ - char mtext[16]; /* message data */ -}; - static void msr(int msqid) { struct msgbuf msbs;