Received: by 10.223.164.202 with SMTP id h10csp217593wrb; Tue, 7 Nov 2017 05:27:42 -0800 (PST) X-Google-Smtp-Source: ABhQp+TC/eHFRv564zbcsiY08gpHJGOxH4I6Zbc5bNPeaUOAv7VnfVWx/rEcixEaqxG66FPy2rfg X-Received: by 10.99.153.1 with SMTP id d1mr18425765pge.379.1510061261975; Tue, 07 Nov 2017 05:27:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1510061261; cv=none; d=google.com; s=arc-20160816; b=uQk4/wqq/zGjSW6L/Ci817jvqvK7PcMGbpD/wDsQFGrhBeayydpvuZY4ZAtybmxGzq z33JpoK2SuKnRN6AiTnCud66CGDGKtVH3GhMxQE13M70gAK+u+6IeYQQ2wVQSRiFSjCx 1jwTsBy8+W/A9eV8nXepqHxkNOZ2SujQfrWRGJi6x5Tx5CN/nvvZSksN2DGsjtgPQ3fD amNDYKbQZVZ+se0IBKuV8lJEkVkog0Mu5azBxCZBdyZDlelXj4kz5VUQ+svrcv8SrKY3 BV/WmKJA15s0hW94pSawyEXnk1XL7yTRjW1t9eu84K78uI6ZNLcxMFvb+9LccaoocLDj Kvwg== 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=up2ujCK5AlmTlDBNIaTX4B96Rpbhv/Y8TkmhPKU7R7o=; b=EfVHwc31y3WJVFbxMoHlUrjJGGn1hKDFoaenGHlUAdDUBOLlmbBu2DnHT9bVRtoACQ iZIJJkka/ssGb3MTGsmbd5RlNqb6bwKTwdjAu+gJ6GaktJ1oco0YVGpX+3L8nCB1r+wl m7RWp/nJSBl8PAz7KlEJJ5AlATDruk6Jgnpe/e6lTXiDI48Tg5VqIYRE5jPCBMURF+TU JuahWgWZTi3fKyWB1jfZx1o5l3H/d73felNepeC+gtsML0CGTsU8WsZ1AmpP23PMyfwY ZORp8Y8lAhW67ZtQkGc5wERl7O4srJWqHKgQJIbKrklZFeUBTXBpz41+RcDQaSrvzL2T d6mg== 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 x1si1117192pln.772.2017.11.07.05.27.27; Tue, 07 Nov 2017 05:27:41 -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 S1757712AbdKGM2i (ORCPT + 91 others); Tue, 7 Nov 2017 07:28:38 -0500 Received: from mx1.redhat.com ([209.132.183.28]:52482 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757676AbdKGM23 (ORCPT ); Tue, 7 Nov 2017 07:28:29 -0500 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id D329B82100; Tue, 7 Nov 2017 12:28:28 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com D329B82100 Authentication-Results: ext-mx02.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx02.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=marcandre.lureau@redhat.com Received: from localhost (ovpn-112-38.ams2.redhat.com [10.36.112.38]) by smtp.corp.redhat.com (Postfix) with ESMTP id 46BD86A023; Tue, 7 Nov 2017 12:28:28 +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 v3 7/9] memfd-test: add 'memfd-hugetlb:' prefix when testing hugetlbfs Date: Tue, 7 Nov 2017 13:27:58 +0100 Message-Id: <20171107122800.25517-8-marcandre.lureau@redhat.com> In-Reply-To: <20171107122800.25517-1-marcandre.lureau@redhat.com> References: <20171107122800.25517-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.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.26]); Tue, 07 Nov 2017 12:28:29 +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 Reviewed-by: Mike Kravetz --- 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.125.g8f49766d64 From 1583675373777635184@xxx Fri Nov 10 10:42:09 +0000 2017 X-GM-THRID: 1583449934153753267 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread