From patchwork Sat Jun 8 05:45:50 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Li Wang X-Patchwork-Id: 1112398 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=redhat.com 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 45LT0Y1KrRz9sBb for ; Sat, 8 Jun 2019 15:46:20 +1000 (AEST) Received: from picard.linux.it (localhost [IPv6:::1]) by picard.linux.it (Postfix) with ESMTP id E80463EB1A8 for ; Sat, 8 Jun 2019 07:46:14 +0200 (CEST) X-Original-To: ltp@lists.linux.it Delivered-To: ltp@picard.linux.it Received: from in-2.smtp.seeweb.it (in-2.smtp.seeweb.it [IPv6:2001:4b78:1:20::2]) by picard.linux.it (Postfix) with ESMTP id 81E253EB18F for ; Sat, 8 Jun 2019 07:46:07 +0200 (CEST) Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by in-2.smtp.seeweb.it (Postfix) with ESMTPS id 3455D601AE7 for ; Sat, 8 Jun 2019 07:45:59 +0200 (CEST) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id EB96AC01F28C for ; Sat, 8 Jun 2019 05:45:57 +0000 (UTC) Received: from localhost.localdomain.com (ovpn-12-30.pek2.redhat.com [10.72.12.30]) by smtp.corp.redhat.com (Postfix) with ESMTP id 292F25D707 for ; Sat, 8 Jun 2019 05:45:56 +0000 (UTC) From: Li Wang To: ltp@lists.linux.it Date: Sat, 8 Jun 2019 13:45:50 +0800 Message-Id: <20190608054550.13744-3-liwang@redhat.com> In-Reply-To: <20190608054550.13744-1-liwang@redhat.com> References: <20190608054550.13744-1-liwang@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.31]); Sat, 08 Jun 2019 05:45:57 +0000 (UTC) X-Virus-Scanned: clamav-milter 0.99.2 at in-2.smtp.seeweb.it X-Virus-Status: Clean X-Spam-Status: No, score=-0.0 required=7.0 tests=SPF_HELO_PASS,SPF_PASS autolearn=disabled version=3.4.0 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on in-2.smtp.seeweb.it Subject: [LTP] [PATCH RFC 3/3] testcase: get rid of compiling errors 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: , MIME-Version: 1.0 Errors-To: ltp-bounces+incoming=patchwork.ozlabs.org@lists.linux.it Sender: "ltp" Signed-off-by: Li Wang --- configure.ac | 1 + testcases/cve/meltdown.c | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/configure.ac b/configure.ac index 5a3dc5b62..39b2d6da7 100644 --- a/configure.ac +++ b/configure.ac @@ -58,6 +58,7 @@ AC_CHECK_HEADERS([ \ sys/shm.h \ sys/ustat.h \ sys/xattr.h \ + emmintrin.h \ ]) AC_CHECK_FUNCS([ \ diff --git a/testcases/cve/meltdown.c b/testcases/cve/meltdown.c index da35213ec..e6e911fcc 100644 --- a/testcases/cve/meltdown.c +++ b/testcases/cve/meltdown.c @@ -29,6 +29,7 @@ #include #include +#ifdef HAVE_EMMINTRIN_H #include #include "libtsc.h" @@ -387,3 +388,7 @@ static struct tst_test test = { .cleanup = cleanup, .min_kver = "2.6.32" }; + +#else /* HAVE_EMMINTRIN_H */ + TST_TEST_TCONF(" is not supported"); +#endif