Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp3363259rwl; Mon, 27 Mar 2023 12:58:32 -0700 (PDT) X-Google-Smtp-Source: AK7set/kBohvlh1xU5Fkph4dGR5MO/jsEbi6v1VzdEyzFfxbPctfKgxHvI6BLG5ORyQ+AC+JpvVn X-Received: by 2002:a05:6a20:3382:b0:d6:82a:ab45 with SMTP id f2-20020a056a20338200b000d6082aab45mr12403706pzd.29.1679947112674; Mon, 27 Mar 2023 12:58:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1679947112; cv=none; d=google.com; s=arc-20160816; b=hKwLXqi4Uub8wta4RyRL+hyhs/BivCWFATSMoos+3nYu9n90k6dGzCJX2JXMEXh8Yq Ec17dzKjemKTsELyOZ40l4jOKd7QpB8SkrV7Wzh860DfCH+23B+3NWk1rjE3er6+h2ZJ pCNxIb0AdLBjJtFIYsKIQ+BD7FW/yAAs3eFJ0v/SmHGe0v7I2gzEPme1P+8wSYW66qbS +b9fKXnsLmqXHJl9NAf/YbUkbYMDwzMZ4V9xe8unNFWR7GGprc42T38rQNU5f6jJ1gAO N7ZsKUd/GV0EWE1FVt+qAA8wlxHeFidZJ0aR6N3efYeE1P2ChQSKyWxKP+ohSV5y2/t+ 0oBQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=jIAxQ/0le8FlOj+IPxrPghHwfvROX6X5lZ45OBU9CpE=; b=pjpBoSObJk2yuhDVKlqXOkR1AatyaW0y5WyipZEuPKvo3rblQ6RP9K7Qvz2TR1xFSt C8wAbU4fx2PTtNy5dcw49Ga/ke+qHUrWeGSlH4Z3nqVU8PBSQXyLDoy2RCkpmBSTji4v JI5UnzL7DWhX9ZYosSB2SpSssyCwoBiJrat4iUK75Y8XNMNPugZpkFgN8FHOsTvlSa/3 wRr3bQrtu+TWbp2vIabS79F6LshAvHdChAXtv7ZaZTHVELXaGyd4CubE1cJNsgqy8i12 NMA3/TQM4nNwvX2A0uIxRT2C0mRZUq9O/zKayzX/fguwv2nia9iZMQvYl70R6TnBfT1u ympQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=google header.b=ehHWsi8o; 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 y135-20020a62ce8d000000b00625d6ac65b7si28408131pfg.372.2023.03.27.12.58.21; Mon, 27 Mar 2023 12:58:32 -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=ehHWsi8o; 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 S232377AbjC0TzG (ORCPT + 99 others); Mon, 27 Mar 2023 15:55:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50130 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230347AbjC0TzE (ORCPT ); Mon, 27 Mar 2023 15:55:04 -0400 Received: from mail-io1-xd34.google.com (mail-io1-xd34.google.com [IPv6:2607:f8b0:4864:20::d34]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8DFE1198C for ; Mon, 27 Mar 2023 12:55:03 -0700 (PDT) Received: by mail-io1-xd34.google.com with SMTP id bl9so4398715iob.8 for ; Mon, 27 Mar 2023 12:55:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=google; t=1679946903; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=jIAxQ/0le8FlOj+IPxrPghHwfvROX6X5lZ45OBU9CpE=; b=ehHWsi8ogs9OJVu4wXJQKImFL6wt2lQeGAx4d5rNgRPBtYlfI3ZSnHJyzWYEXid4vD fs1DCNfa9aNq+LL0N8LVdciV/bUAwVt+vwObrgMCxjDnETDcFujji1OVT9XfM6WbBULd huMLkbreYZr6YAkEzzaxyV1sJag91j+Lcm1CA= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679946903; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=jIAxQ/0le8FlOj+IPxrPghHwfvROX6X5lZ45OBU9CpE=; b=7rmlOhunDHNGFz844dXKcNnhSLPyroGgCLS4gMm8IcPsaBExc6K/2vpnaopBf8Av2M GSFHiCrBTNwxM2B044ShOhsiGknjK8ARIr5d4NH5ZeAMMebsgRS3p0rVLcz1QvuazNXP IsMwhEXcMi0iWlPTFh+H3LkjhhsY5WUDbSTSkigl6aisjZYRoUAITfEds6ssdpwsu1fi OrlUupkG5CF7lNvV20aGgURX+zqH5Io3XuHaoFUibdvd5sAkkrzCuNNccumo8Isz1b+P d09V00GYxgYNAzp5H+ORg7TImokXVYM6mct/6RRofWqBJdpWq7kR+wm+lDGSs9UruMPM fUOQ== X-Gm-Message-State: AO0yUKVob8lUd+ke0NstB/skzQHnInrXpvxKLdfAVhdI3StEEA4ek9mG wOF50nBiD93WX+3Bc6WSAsbwmA== X-Received: by 2002:a05:6602:1301:b0:758:6ae8:8e92 with SMTP id h1-20020a056602130100b007586ae88e92mr7583950iov.1.1679946902905; Mon, 27 Mar 2023 12:55:02 -0700 (PDT) Received: from [192.168.1.128] ([38.15.45.1]) by smtp.gmail.com with ESMTPSA id p5-20020a02b005000000b004063510ba0esm9181046jah.142.2023.03.27.12.55.02 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 27 Mar 2023 12:55:02 -0700 (PDT) Message-ID: Date: Mon, 27 Mar 2023 13:55:01 -0600 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.8.0 Subject: Re: [PATCH] selftests: sched: Add more core schedule prctl calls Content-Language: en-US To: Ivan Orlov , shuah@kernel.org Cc: linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org, himadrispandya@gmail.com, linux-kernel-mentees@lists.linuxfoundation.org, Shuah Khan References: <20230322203724.4757-1-ivan.orlov0322@gmail.com> From: Shuah Khan In-Reply-To: <20230322203724.4757-1-ivan.orlov0322@gmail.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-0.2 required=5.0 tests=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 autolearn=unavailable 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 Hi Ivan, On 3/22/23 14:37, Ivan Orlov wrote: > The core sched kselftest makes prctl calls only with correct > parameters. This patch will extend this test with more core > schedule prctl calls with wrong parameters to increase code > coverage. > > Signed-off-by: Ivan Orlov Thank you for the patch. > --- > tools/testing/selftests/sched/cs_prctl_test.c | 8 ++++++++ > 1 file changed, 8 insertions(+) > > diff --git a/tools/testing/selftests/sched/cs_prctl_test.c b/tools/testing/selftests/sched/cs_prctl_test.c > index 25e0d95d3713..df8e4629b3b5 100644 > --- a/tools/testing/selftests/sched/cs_prctl_test.c > +++ b/tools/testing/selftests/sched/cs_prctl_test.c > @@ -334,6 +334,14 @@ int main(int argc, char *argv[]) > validate(get_cs_cookie(pid) != 0); > validate(get_cs_cookie(pid) == get_cs_cookie(procs[pidx].thr_tids[0])); > > + printf("\n## Try to pass wrong subcommand PR_SCHED_CORE_MAX = %d to prctl (shouldn't succeed)\n", PR_SCHED_CORE_MAX); This message is unnecessary. validate() prints an error message. > + validate(_prctl(PR_SCHED_CORE, PR_SCHED_CORE_MAX, 0, PIDTYPE_PGID, 0) < 0 > + && errno == EINVAL); > + > + printf("\n## Try to pass not-null uaddr with forbidden command (shouldn't succeed)\n"); Same here. > + validate(_prctl(PR_SCHED_CORE, PR_SCHED_CORE_SHARE_TO, 0, PIDTYPE_PGID, 1) < 0 > + && errno == EINVAL); > + > if (errors) { > printf("TESTS FAILED. errors: %d\n", errors); > res = 10; thanks, -- Shuah