From patchwork Sat Jun 15 04:20:48 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Li Wang X-Patchwork-Id: 1116351 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 45Qkn85jQpz9sNT for ; Sat, 15 Jun 2019 14:21:15 +1000 (AEST) Received: from picard.linux.it (localhost [IPv6:::1]) by picard.linux.it (Postfix) with ESMTP id 79E192988EE for ; Sat, 15 Jun 2019 06:21:12 +0200 (CEST) X-Original-To: ltp@lists.linux.it Delivered-To: ltp@picard.linux.it Received: from in-3.smtp.seeweb.it (in-3.smtp.seeweb.it [217.194.8.3]) by picard.linux.it (Postfix) with ESMTP id F3F0E294B33 for ; Sat, 15 Jun 2019 06:21:05 +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-3.smtp.seeweb.it (Postfix) with ESMTPS id C04701A01CAB for ; Sat, 15 Jun 2019 06:20:57 +0200 (CEST) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 82BD43082B71 for ; Sat, 15 Jun 2019 04:20:56 +0000 (UTC) Received: from dhcp-12-157.nay.redhat.com (dhcp-12-157.nay.redhat.com [10.66.12.157]) by smtp.corp.redhat.com (Postfix) with ESMTP id B01985D9E2 for ; Sat, 15 Jun 2019 04:20:55 +0000 (UTC) From: Li Wang To: ltp@lists.linux.it Date: Sat, 15 Jun 2019 12:20:48 +0800 Message-Id: <20190615042048.29839-3-liwang@redhat.com> In-Reply-To: <20190615042048.29839-1-liwang@redhat.com> References: <20190615042048.29839-1-liwang@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.45]); Sat, 15 Jun 2019 04:20:56 +0000 (UTC) X-Virus-Scanned: clamav-milter 0.99.2 at in-3.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-3.smtp.seeweb.it Subject: [LTP] [PATCH v2 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: , Errors-To: ltp-bounces+incoming=patchwork.ozlabs.org@lists.linux.it Sender: "ltp" Signed-off-by: Li Wang Acked-by: Petr Vorel --- configure.ac | 1 + testcases/cve/meltdown.c | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/configure.ac b/configure.ac index 5ecc92781..521f56541 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 72c9ec907..bc649b893 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