From patchwork Mon Aug 14 10:45:50 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rong Tao X-Patchwork-Id: 13352709 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 046ACEB64DD for ; Mon, 14 Aug 2023 10:47:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234362AbjHNKqd (ORCPT ); Mon, 14 Aug 2023 06:46:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36866 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233529AbjHNKqC (ORCPT ); Mon, 14 Aug 2023 06:46:02 -0400 Received: from out203-205-251-53.mail.qq.com (out203-205-251-53.mail.qq.com [203.205.251.53]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6A93DD2; Mon, 14 Aug 2023 03:45:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=foxmail.com; s=s201512; t=1692009955; bh=umFsdvDAuvz1J8EoJo1lr2CqjYOfjh1XPn/9tPSiG4Y=; h=From:To:Cc:Subject:Date; b=xFJ6BehuCpx83twfFIAQ7Or3PYxyyNfZYb3G6zlD9PTD3iEamNckUK/PAS/BKBbUo PgicPDmem6m6eOhXkD2LU72EZ7its13ndR7/0QO909DIOngj1YnuerfYZ+wNXwwNmL TOoYCP0NOkxIbMg2mGngdDjoD3Ldrd3x+VCCyUmE= Received: from localhost.localdomain ([39.156.73.12]) by newxmesmtplogicsvrszb1-0.qq.com (NewEsmtp) with SMTP id B74184DB; Mon, 14 Aug 2023 18:45:52 +0800 X-QQ-mid: xmsmtpt1692009952t89pqxxic Message-ID: X-QQ-XMAILINFO: N+tZcXNNU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S1Vd6Y4Mggwc= From: Rong Tao To: akpm@linux-foundation.org Cc: rongtao@cestc.cn, rtoax@foxmail.com, Shuah Khan , linux-mm@kvack.org (open list:MEMORY MANAGEMENT), linux-kselftest@vger.kernel.org (open list:KERNEL SELFTEST FRAMEWORK), linux-kernel@vger.kernel.org (open list) Subject: [PATCH] selftests/mm: fix uffd-stress help information Date: Mon, 14 Aug 2023 18:45:50 +0800 X-OQ-MSGID: <20230814104550.62846-1-rtoax@foxmail.com> X-Mailer: git-send-email 2.39.3 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-kselftest@vger.kernel.org From: Rong Tao commit 686a8bb72349("selftests/mm: split uffd tests into uffd-stress and uffd-unit-tests") split uffd tests into uffd-stress and uffd-unit-tests, obviously we need to modify the help information synchronously. Also modify code indentation. Signed-off-by: Rong Tao --- tools/testing/selftests/mm/uffd-stress.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/tools/testing/selftests/mm/uffd-stress.c b/tools/testing/selftests/mm/uffd-stress.c index 995ff13e74c7..e40b6d7d2c0e 100644 --- a/tools/testing/selftests/mm/uffd-stress.c +++ b/tools/testing/selftests/mm/uffd-stress.c @@ -53,21 +53,21 @@ pthread_attr_t attr; do { typeof(a) __tmp = (a); (a) = (b); (b) = __tmp; } while (0) const char *examples = - "# Run anonymous memory test on 100MiB region with 99999 bounces:\n" - "./userfaultfd anon 100 99999\n\n" - "# Run share memory test on 1GiB region with 99 bounces:\n" - "./userfaultfd shmem 1000 99\n\n" - "# Run hugetlb memory test on 256MiB region with 50 bounces:\n" - "./userfaultfd hugetlb 256 50\n\n" - "# Run the same hugetlb test but using private file:\n" - "./userfaultfd hugetlb-private 256 50\n\n" - "# 10MiB-~6GiB 999 bounces anonymous test, " - "continue forever unless an error triggers\n" - "while ./userfaultfd anon $[RANDOM % 6000 + 10] 999; do true; done\n\n"; + "# Run anonymous memory test on 100MiB region with 99999 bounces:\n" + "./uffd-stress anon 100 99999\n\n" + "# Run share memory test on 1GiB region with 99 bounces:\n" + "./uffd-stress shmem 1000 99\n\n" + "# Run hugetlb memory test on 256MiB region with 50 bounces:\n" + "./uffd-stress hugetlb 256 50\n\n" + "# Run the same hugetlb test but using private file:\n" + "./uffd-stress hugetlb-private 256 50\n\n" + "# 10MiB-~6GiB 999 bounces anonymous test, " + "continue forever unless an error triggers\n" + "while ./uffd-stress anon $[RANDOM % 6000 + 10] 999; do true; done\n\n"; static void usage(void) { - fprintf(stderr, "\nUsage: ./userfaultfd \n\n"); + fprintf(stderr, "\nUsage: ./uffd-stress \n\n"); fprintf(stderr, "Supported : anon, hugetlb, " "hugetlb-private, shmem, shmem-private\n\n"); fprintf(stderr, "Examples:\n\n");