Received: by 10.223.164.202 with SMTP id h10csp288971wrb; Mon, 6 Nov 2017 06:41:45 -0800 (PST) X-Google-Smtp-Source: ABhQp+Tw6lbkJjAnCJU2HtFU+K2qt8Pwx4ZvK9l7kItmezO9zCw9TuS1gKE+7+Q8kFCHT0JzltLn X-Received: by 10.159.216.131 with SMTP id s3mr14726462plp.432.1509979305708; Mon, 06 Nov 2017 06:41:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1509979305; cv=none; d=google.com; s=arc-20160816; b=iXHyYWT9esb/HPubu2DCSsZp4DRDQLXTLM5PzM2O+4pn6km+c8jqj9BpnyvXjJpL/l 2T5hMbAWJshH1AJOA/69TecXLbPh6oVZRuZH7Im7AWIGI4zJSb+RGb3UMuuyLyEKHaDZ pl1mnjIZnx1398R4Pkq0FBAH0v3NKe4zCrvruGZy0TVb5LvMuTdA4PhVPb7yw3rtuV2g PrvhbpDeCt2sy8eD4O7m2SntMbwQrWZcOGcFR+8jy0SjHCuWRKRv8fg8tTrc6zbiq660 Vhalk3D18W3isbg6mOjVNavhtzKrYpd3xeaYjdIrJsJYEY0I8OGmg1UT+rzUHkAuZogo lrVw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dmarc-filter:arc-authentication-results; bh=akMIkg5EXgNdk94U8Ai9Dcmap78k41dkVTmrw5HU6tM=; b=tDzJZzlUakwit+KznG02EWxdNt4sxnUDou14Peepra6iWFFw59pd12KitpQAz1sw92 pCrXCh2JG01EN8Hk6nICbswK/8PaeGKKNj/vZGTqhvRLCavTBWypnnsa6NhuTx5cmWoY nt85OmUm5poxlbDGzzM7aWHEBKD8grldORwVkx6Zw+TSfWn2VTW4v3r7n/5d/rmUfTJ2 ni0CoXPrgsNSBI16M2kuYvBdDzs28I8p1cZhYLcBI4ReRErjwGDcal7ElIwZ3AMfn6Yc 7eWAvC8wWCP5LjMGmLNCZn4atcjw/OJzjdoT43YIdAYhjqlW1tcM3GtvKRGYAx4iPhRN LuJQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h34si3738445pld.89.2017.11.06.06.41.32; Mon, 06 Nov 2017 06:41:45 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932485AbdKFOk0 (ORCPT + 97 others); Mon, 6 Nov 2017 09:40:26 -0500 Received: from mx1.redhat.com ([209.132.183.28]:43408 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753199AbdKFOkY (ORCPT ); Mon, 6 Nov 2017 09:40:24 -0500 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 77CE6A58A5; Mon, 6 Nov 2017 14:40:24 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 77CE6A58A5 Authentication-Results: ext-mx01.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx01.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=marcandre.lureau@redhat.com Received: from localhost (ovpn-112-67.ams2.redhat.com [10.36.112.67]) by smtp.corp.redhat.com (Postfix) with ESMTP id E02895D965; Mon, 6 Nov 2017 14:40:19 +0000 (UTC) From: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= To: linux-mm@kvack.org, linux-kernel@vger.kernel.org Cc: aarcange@redhat.com, hughd@google.com, nyc@holomorphy.com, mike.kravetz@oracle.com, =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= Subject: [PATCH v2 7/9] memfd-test: add 'memfd-hugetlb:' prefix when testing hugetlbfs Date: Mon, 6 Nov 2017 15:39:42 +0100 Message-Id: <20171106143944.13821-8-marcandre.lureau@redhat.com> In-Reply-To: <20171106143944.13821-1-marcandre.lureau@redhat.com> References: <20171106143944.13821-1-marcandre.lureau@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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.25]); Mon, 06 Nov 2017 14:40:24 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Suggested-by: Mike Kravetz Signed-off-by: Marc-André Lureau --- tools/testing/selftests/memfd/memfd_test.c | 26 ++++++++++++++++---------- 1 file changed, 16 insertions(+), 10 deletions(-) diff --git a/tools/testing/selftests/memfd/memfd_test.c b/tools/testing/selftests/memfd/memfd_test.c index cca957a06525..955d09ee16ca 100644 --- a/tools/testing/selftests/memfd/memfd_test.c +++ b/tools/testing/selftests/memfd/memfd_test.c @@ -20,6 +20,7 @@ #include #define MEMFD_STR "memfd:" +#define MEMFD_HUGE_STR "memfd-hugetlb:" #define SHARED_FT_STR "(shared file-table)" #define MFD_DEF_SIZE 8192 @@ -30,6 +31,7 @@ */ static int hugetlbfs_test; static size_t mfd_def_size = MFD_DEF_SIZE; +static const char *memfd_str = MEMFD_STR; /* * Copied from mlock2-tests.c @@ -606,7 +608,7 @@ static void test_create(void) char buf[2048]; int fd; - printf("%s CREATE\n", MEMFD_STR); + printf("%s CREATE\n", memfd_str); /* test NULL name */ mfd_fail_new(NULL, 0); @@ -652,7 +654,7 @@ static void test_basic(void) { int fd; - printf("%s BASIC\n", MEMFD_STR); + printf("%s BASIC\n", memfd_str); fd = mfd_assert_new("kern_memfd_basic", mfd_def_size, @@ -704,7 +706,7 @@ static void test_seal_write(void) { int fd; - printf("%s SEAL-WRITE\n", MEMFD_STR); + printf("%s SEAL-WRITE\n", memfd_str); fd = mfd_assert_new("kern_memfd_seal_write", mfd_def_size, @@ -730,7 +732,7 @@ static void test_seal_shrink(void) { int fd; - printf("%s SEAL-SHRINK\n", MEMFD_STR); + printf("%s SEAL-SHRINK\n", memfd_str); fd = mfd_assert_new("kern_memfd_seal_shrink", mfd_def_size, @@ -756,7 +758,7 @@ static void test_seal_grow(void) { int fd; - printf("%s SEAL-GROW\n", MEMFD_STR); + printf("%s SEAL-GROW\n", memfd_str); fd = mfd_assert_new("kern_memfd_seal_grow", mfd_def_size, @@ -782,7 +784,7 @@ static void test_seal_resize(void) { int fd; - printf("%s SEAL-RESIZE\n", MEMFD_STR); + printf("%s SEAL-RESIZE\n", memfd_str); fd = mfd_assert_new("kern_memfd_seal_resize", mfd_def_size, @@ -808,7 +810,7 @@ static void test_share_dup(char *banner, char *b_suffix) { int fd, fd2; - printf("%s %s %s\n", MEMFD_STR, banner, b_suffix); + printf("%s %s %s\n", memfd_str, banner, b_suffix); fd = mfd_assert_new("kern_memfd_share_dup", mfd_def_size, @@ -850,7 +852,7 @@ static void test_share_mmap(char *banner, char *b_suffix) int fd; void *p; - printf("%s %s %s\n", MEMFD_STR, banner, b_suffix); + printf("%s %s %s\n", memfd_str, banner, b_suffix); fd = mfd_assert_new("kern_memfd_share_mmap", mfd_def_size, @@ -884,7 +886,7 @@ static void test_share_open(char *banner, char *b_suffix) { int fd, fd2; - printf("%s %s %s\n", MEMFD_STR, banner, b_suffix); + printf("%s %s %s\n", memfd_str, banner, b_suffix); fd = mfd_assert_new("kern_memfd_share_open", mfd_def_size, @@ -927,7 +929,7 @@ static void test_share_fork(char *banner, char *b_suffix) int fd; pid_t pid; - printf("%s %s %s\n", MEMFD_STR, banner, b_suffix); + printf("%s %s %s\n", memfd_str, banner, b_suffix); fd = mfd_assert_new("kern_memfd_share_fork", mfd_def_size, @@ -963,7 +965,11 @@ int main(int argc, char **argv) } hugetlbfs_test = 1; + memfd_str = MEMFD_HUGE_STR; mfd_def_size = hpage_size * 2; + } else { + printf("Unknown option: %s\n", argv[1]); + abort(); } } -- 2.15.0.rc0.40.gaefcc5f6f From 1583639935615655636@xxx Fri Nov 10 01:18:53 +0000 2017 X-GM-THRID: 1583611730559911755 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread