From mboxrd@z Thu Jan 1 00:00:00 1970 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 292EDC77B76 for ; Mon, 17 Apr 2023 16:43:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229568AbjDQQnI (ORCPT ); Mon, 17 Apr 2023 12:43:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56174 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229542AbjDQQnH (ORCPT ); Mon, 17 Apr 2023 12:43:07 -0400 Received: from out4-smtp.messagingengine.com (out4-smtp.messagingengine.com [66.111.4.28]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D9D117D84; Mon, 17 Apr 2023 09:43:06 -0700 (PDT) Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.nyi.internal (Postfix) with ESMTP id 49C1D5C007C; Mon, 17 Apr 2023 12:43:06 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute3.internal (MEProxy); Mon, 17 Apr 2023 12:43:06 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=devkernel.io; h= cc:cc:content-type:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:sender :subject:subject:to:to; s=fm1; t=1681749786; x=1681836186; bh=YD e3y1T8NWWsjl/y28nmrnwl6G1y0u8s1lFy/i0ih80=; b=b+MrrqmkqnhWnXyJzS +Hug34CJDBjbLk5mJEQi4cnFU/leVEaDstO0jkZZv3DZGS+QaNMEacn1E5hS985x Rq2B/cmHgqjyF4t7EUcQ4IYgKTn9Km0262ErSAjFO2o/xjf/VhWNKnJjRenYuXBN 0US8Hr6b1oGQTDDh2PHEGXr9MntmpuCfdqOVQHadrOP3U48KHXHIS3eQ9rQe4HFb wPN9xBMC7Ow5GuwKFEfSyOjTRoE7QXT61XkipHiu7kQe0ku/JH3GTs6Z9ppHkqn2 xGqVINFBYcGV9EicZAhEHzSjx3ny7545Okc25v4sGXa/YBP40GxWpMYV1+CBf/Sq hyRw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:sender:subject :subject:to:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm3; t=1681749786; x=1681836186; bh=YDe3y1T8NWWsj l/y28nmrnwl6G1y0u8s1lFy/i0ih80=; b=OmXJCtZ0e8x+NUyE3P6D2U2F1NBIO dzCNJxBz85VvpX8WrqJOEZ1yp1D65nsJkLziTq8BrS4FmYvZgbxQ2G7R27EAWv21 0bx/yjSHqzRK8w8ZWaVp0WXL7frKJrHxZ2/wutn09xDw25NAvtTjmGeNpAG4pukv ipewXi0x7D6siNWcJXqVqOCdICB0mjdMktmqEp4mXCKz2gY5quwFRpxnW+SP6oFp eGxJ/kwLoB7YWA2CedgOceSWdbTP/bJwfDKYhnhXKGEptW/AxGPjYCG00JDU8l85 7UwsDoKqsDbsCopDPLy3xXsB6RxhyAJLqVBFaLEjZvkmzTedafLd6ojPw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrvdeliedguddtfecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpehffgfhvfevufffjgfkgggtsehttdertddtredtnecuhfhrohhmpefuthgv fhgrnhcutfhovghstghhuceoshhhrhesuggvvhhkvghrnhgvlhdrihhoqeenucggtffrrg htthgvrhhnpeevlefggffhheduiedtheejveehtdfhtedvhfeludetvdegieekgeeggfdu geeutdenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpe hshhhrseguvghvkhgvrhhnvghlrdhioh X-ME-Proxy: Feedback-ID: i84614614:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 17 Apr 2023 12:43:04 -0400 (EDT) References: <20230415225913.3206647-1-shr@devkernel.io> <20230415225913.3206647-4-shr@devkernel.io> <355f42d1-4354-376d-ab27-7e55d06e64a6@redhat.com> <954d6b1f-5b4d-48e5-02fe-646b3e79f6e5@redhat.com> User-agent: mu4e 1.10.1; emacs 28.2.50 From: Stefan Roesch To: David Hildenbrand Cc: kernel-team@fb.com, linux-mm@kvack.org, riel@surriel.com, mhocko@suse.com, linux-kselftest@vger.kernel.org, linux-doc@vger.kernel.org, akpm@linux-foundation.org, hannes@cmpxchg.org, willy@infradead.org, Bagas Sanjaya Subject: Re: [PATCH v8 3/3] selftests/mm: add new selftests for KSM Date: Mon, 17 Apr 2023 09:42:39 -0700 In-reply-to: <954d6b1f-5b4d-48e5-02fe-646b3e79f6e5@redhat.com> Message-ID: MIME-Version: 1.0 Content-Type: text/plain Precedence: bulk List-ID: X-Mailing-List: linux-kselftest@vger.kernel.org David Hildenbrand writes: > On 17.04.23 16:35, David Hildenbrand wrote: >>> +/* Verify that KSM can be enabled / queried with prctl. */ >>> +static void test_prctl(void) >>> +{ >>> + int ret; >>> + >>> + ksft_print_msg("[RUN] %s\n", __func__); >>> + >>> + ret = prctl(PR_SET_MEMORY_MERGE, 1, 0, 0, 0); >>> + if (ret < 0 && errno == EINVAL) { >>> + ksft_test_result_skip("PR_SET_MEMORY_MERGE not supported\n"); >>> + return; >>> + } else if (ret) { >>> + ksft_test_result_fail("PR_SET_MEMORY_MERGE=1 failed\n"); >>> + } >> Just realized we're missing a "return;" in case of the failure here. >> > > > And we should probably fix that as well: > > ERROR: do not initialise globals to 0 > #235: FILE: tools/testing/selftests/mm/ksm_tests.c:57: > +int debug = 0; > > total: 1 errors, 0 warnings, 512 lines checked I'll fix it in the next version.'