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 59666EB64D9 for ; Tue, 27 Jun 2023 19:01:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231196AbjF0TBP (ORCPT ); Tue, 27 Jun 2023 15:01:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39750 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229504AbjF0TBK (ORCPT ); Tue, 27 Jun 2023 15:01:10 -0400 Received: from madras.collabora.co.uk (madras.collabora.co.uk [IPv6:2a00:1098:0:82:1000:25:2eeb:e5ab]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D550119A9; Tue, 27 Jun 2023 12:01:09 -0700 (PDT) Received: from [192.168.10.54] (unknown [182.179.162.32]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: usama.anjum) by madras.collabora.co.uk (Postfix) with ESMTPSA id E48DF6607155; Tue, 27 Jun 2023 20:01:06 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1687892468; bh=/9PrOHnvrybO+vm7KEMCWRQ/zQkS6KYWvsrScJjK7KY=; h=Date:Cc:Subject:To:References:From:In-Reply-To:From; b=NQstSq2G2pKMTArKMF7wiQZ7161dBYh0/WOHI7OckZnQpgxDo34ElDUL2Oylrgltp vdngVF4HMSH88fluxuIMFYAEicAWMv0WsQe3xYy7eJvw6/ae8wG0zC5km2sJ63IiVE b0EBEI1lTPVwb8T3nvrtQ4rtRlKaFP1iCTGpQE1vX8F++tjNCYEKNaN6E9nNYTf/zf HkFbMmOVQ5lA4kqs3Up0TECHJ3bFIfY0gN7sVboYUtKyBe/0m3U/tbKtxmC29Zbj2u tJd4hKGzFZrg2gT+QewrnyT18B18Efqudvb7FhCpmpB2UAJG1K6q1Y1YMtHysgESej SGe2PH4arzLvQ== Message-ID: <758f6c94-ac29-5e9c-f5c1-68210c2427ab@collabora.com> Date: Wed, 28 Jun 2023 00:01:01 +0500 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.12.0 Cc: Muhammad Usama Anjum , linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org Subject: Re: [PATCH v2] selftests: prctl: Add new prctl test for PR_SET_NAME Content-Language: en-US To: Shuah Khan , Osama Muhammad , shuah@kernel.org References: <20230607153600.15816-1-osmtendev@gmail.com> From: Muhammad Usama Anjum In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 6/10/23 2:43 AM, Shuah Khan wrote: > On 6/7/23 09:36, Osama Muhammad wrote: >> This patch will add the new test, which covers the prctl call >> PR_SET_NAME command. The test tries to give a name using the PR_SET_NAME >> call and then confirm it that it changed correctly by using  PR_GET_NAME. >> It also tries to rename it with empty name.In the test PR_GET_NAME is >> tested by passing null pointer to it and check its behaviour. >> >> Signed-off-by: Osama Muhammad >> >> --- >> changes since v1: >>     -Used TASK_COMM_LEN instead of using numerical value 16. > > Please add linux/sched.h here as an include to pull this. > It is good to add an explicit include as opposed taking > a chance on it being included from another include. TASK_COMM_LEN is defined in include/linux/sched.h. It is only to be used by the kernel. If we look at include/uapi/linux/sched.h, TASK_COMM_LEN isn't defined. So this test looks good to me. > > thanks, > -- Shuah -- BR, Muhammad Usama Anjum