Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp851706iog; Fri, 17 Jun 2022 15:30:29 -0700 (PDT) X-Google-Smtp-Source: AGRyM1sKHUnxZkHkEFz7h8X7iwalklWvIipP/EbC3V8cJreRgyoMrZ2VqwjLeYVf0Pa99FeybNqr X-Received: by 2002:a50:fe0c:0:b0:435:510a:9f1f with SMTP id f12-20020a50fe0c000000b00435510a9f1fmr10801017edt.297.1655505029707; Fri, 17 Jun 2022 15:30:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1655505029; cv=none; d=google.com; s=arc-20160816; b=gykfKB6H4JPuf1Og9kMFMSgFAWs4MP9KzZnwsNPgJaz6KNPAgpMuWTtQBKxY+EDjMQ 4PDAj2aiWK33DvjS0AEzRzE9yDfD/7zH9jYaY1imFMxJoDEx0B3cjSh48Rjyfhr4Yavv mE/Ac812nk8BCWlRckaSAF5VWvUZw6I7ORrXQmtlVqA84D4PjyXwoLbHy5hRB5rA1y61 E+SFlS6ozwjpNOFKFO2hUJ1LNXIR9F6vJg0+IazRfX2uCklQIvEi4a42GN/aHcXvOvCR C1aabHa6mmfl2rZ4C+rRIvsSoJbovX6wEEEGzFLFfVxapQRTzkZ+cFSjosx2+mLqpQLX QmIA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature; bh=BWoZH05gfMTA7sYUbTkU0N63/c9r6q3L+sOo8Fl00Ng=; b=xOVzQt8kpIdBxiDH/blOP97VhRFv/YtR+KSv2AYjJkZJAdBLt8WDh+6cGv2t6nkQZc ltm3I3gBW4dH5TXoUrnxOD1KxJYZ5yyNLwp53faSlMozfZXwolDb8Z3Timnf8cyI//lZ R0cKPZsXG8REKaXutcsCXiy4b0bNstsKgf4dbOhvbU5/XcP1o9vmRg52haIthXr07hEh SaZukFjsxEnixIYDqHcKxNVfgAWXHF2IfS4JpV6/VwQ5hQbB6w/JfK6eQO3YCjJ2t0L2 +l/U5igJ/g9UI3worDNJs2XCVMKVOTX7k3yp4Xbh3shfNyg1dpv1ceV++SzKrgM7jKiW Ll8w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=google header.b=Xgyi4MQc; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id c3-20020a0564021f8300b004356c15c79fsi536213edc.362.2022.06.17.15.30.05; Fri, 17 Jun 2022 15:30:29 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=google header.b=Xgyi4MQc; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346517AbiFQW1i (ORCPT + 99 others); Fri, 17 Jun 2022 18:27:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38050 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S245162AbiFQW1g (ORCPT ); Fri, 17 Jun 2022 18:27:36 -0400 Received: from mail-oi1-x22c.google.com (mail-oi1-x22c.google.com [IPv6:2607:f8b0:4864:20::22c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 73305E4B for ; Fri, 17 Jun 2022 15:27:34 -0700 (PDT) Received: by mail-oi1-x22c.google.com with SMTP id bd16so6939579oib.6 for ; Fri, 17 Jun 2022 15:27:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=google; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=BWoZH05gfMTA7sYUbTkU0N63/c9r6q3L+sOo8Fl00Ng=; b=Xgyi4MQcDW1OVDu1nFkyetAQAAdhN/kvJcA3uyoQR+T1CXxXyUwGN4a/pqHIDHVX4P 07fxzEziBlveMKdrE416PECbuRmAyrHT+Kx96DJJ/+xyjg5WDtYkTeuAJdwdp4aCRAMr d97NyRLt9uX9EAw9QAQbWhcI1MQQJzTkHD6ug= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=BWoZH05gfMTA7sYUbTkU0N63/c9r6q3L+sOo8Fl00Ng=; b=tZrF6bMQSL7suJfSXC8d3N5ocJJHZKK/RS8uolaqGYfS0KnBdTK6jogwX6R8FJcsJ4 r+uxW05H6zmDC4ZKJRflwbnV62ibT/NIn32mY8HF0ekeCX5UDX8AKn7GjhiCeT84JGWF LACAZvBM3ZW9hc3kNAKYkwuvGycX1rzRtcxuVeIcIrKwLe+tuVWdUUCf1DGVcn+zRDcW 7a3wNwsxqP8HKtzBiaDM2ywqmU2mjsKvriaw+dZPR3vv23X6PcRAXjXKKbpcSfT3Cr9g aTOWsjPRb+nEzUTuhb+B4mGzdpx2ZMU8ol+ip6qDlaXHx1DfxRESFoIyv8BciFCVUTEK NsWg== X-Gm-Message-State: AJIora+qFTw/7aqsdJKxWM03rdq3+j1r8hg7JquvanLdRvAq5miO1Dul G43cGQ6sG/UnuLuwIRSv6N/rHA== X-Received: by 2002:a05:6808:23d6:b0:333:1a12:f682 with SMTP id bq22-20020a05680823d600b003331a12f682mr1216419oib.44.1655504853779; Fri, 17 Jun 2022 15:27:33 -0700 (PDT) Received: from [192.168.1.128] ([38.15.45.1]) by smtp.gmail.com with ESMTPSA id 89-20020a9d0362000000b0060603221281sm3223566otv.81.2022.06.17.15.27.33 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 17 Jun 2022 15:27:33 -0700 (PDT) Subject: Re: [PATCH] selftests/proc: Fix proc-pid-vm for vsyscall=xonly. To: Dylan Hatch Cc: Shuah Khan , linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-kselftest@vger.kernel.org, Shuah Khan References: <20220616211016.4037482-1-dylanbhatch@google.com> <941e0991-eb3e-f988-8262-3d51ff8badad@linuxfoundation.org> <47312e8a-87fe-c7dc-d354-74e81482bc1e@linuxfoundation.org> From: Shuah Khan Message-ID: Date: Fri, 17 Jun 2022 16:27:31 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.8.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-4.9 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 6/17/22 4:05 PM, Dylan Hatch wrote: > On Fri, Jun 17, 2022 at 12:38 PM Shuah Khan wrote: >> >> On 6/17/22 12:45 PM, Dylan Hatch wrote: >>> On Thu, Jun 16, 2022 at 4:01 PM Shuah Khan wrote: >>>> > >> >> It depends on the goal of the test. Is the test looking to see if the >> probe fails with insufficient permissions, then you are changing the >> test to not check for that condition. > > The goal of the test is to validate the output of /proc/$PID/maps, and > the memory probe is only needed as setup to determine what the > expected output should be. This used to be sufficient, but now it can > no longer fully disambiguate it with the introduction of > vsyscall=xonly. The solution proposed here is to disambiguate it by > also checking the length read from /proc/$PID/maps. > >> Makes sense. However the question is does this test need to be enhanced with the addition of vsyscall=xonly? >> I would say in this case, the right approach would be to leave the test >> as is and report expected fail and add other cases. >> >> The goal being adding more coverage and not necessarily opt for a simple >> solution. > > What does it mean to report a test as expected fail? Is this a > mechanism unique to kselftest? I agree adding another test case would > work, but I'm unsure how to do it within the framework of kselftest. > Ideally, there would be separate test cases for vsyscall=none, > vsyscall=emulate, and vsyscall=xonly, but these options can be toggled > both in the kernel config and on the kernel command line, meaning (to > the best of my knowledge) these test cases would have to be built > conditionally against the conflig options and also parse the command > line for the 'vsyscall' option. > Expected fail isn't unique kselftest. It is a testing criteria where a test is expected to fail. For example if a file can only be opened with privileged user a test that runs and looks for failure is an expected to fail case - we are looking for a failure. A complete battery of tests for vsyscall=none, vsyscall=emulate, vsyscall=xonly would test for conditions that are expected to pass and fail based on the config. tools/testing/selftests/proc/config doesn't have any config options that are relevant to VSYSCALL Can you please send me the how you are running the test and what the failure output looks like? thanks, -- Shuah