From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-il1-f182.google.com (mail-il1-f182.google.com [209.85.166.182]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 789E5205AB4 for ; Tue, 3 Dec 2024 21:50:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.166.182 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1733262621; cv=none; b=NB57AyDY3dsw8+AajYA6oBXmEemV1Qp7vh8WLIL5o9/jmoTqCMbMpsjUVMdR2E8gAsewrfjAqkCXsTq2AZJNQSRGSi6Gd3ARIJLA+mRS9FUo1Q+FrkkTFSuB7/vbKqCFtFOnWW0ltfAfrQjxE4vGhRLOKlHoAfJrdeclPHbSCKM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1733262621; c=relaxed/simple; bh=ECPBHbiegD8JbXydWk2OBAJymkl00PiX260yQZspDVc=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=XOQi4ZhHef3S+r/buwrhecxTiooXEIdDXttHeSxFuB/Skkt4y2C4mJK7YS6IW9GjoHgsbt1HpCASkxsUrgvo8BGRpAct+zVoSloNDbt/KDAOj7qUrTrl78XV/2SvOZW/1VcuhOOpA3upuSo9RczXMPOco3NVXv7UUjuPZAEObLc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linuxfoundation.org; spf=pass smtp.mailfrom=linuxfoundation.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=THG2c1gZ; arc=none smtp.client-ip=209.85.166.182 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linuxfoundation.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linuxfoundation.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="THG2c1gZ" Received: by mail-il1-f182.google.com with SMTP id e9e14a558f8ab-3a75c24f447so22820835ab.0 for ; Tue, 03 Dec 2024 13:50:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=google; t=1733262618; x=1733867418; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=zhF1TSIpiDnDO1ss7QPfLqqIBrxMtPOq9kWp98JCdA8=; b=THG2c1gZtrh7Nt4TfPcpCor1NDNBhsLiNPuNJYSwJ2+5jtk6Ucck9MZv/9+0SjHsFI cIHzxp2l7UtVCzH0JckIWCymc7Ywq4YhdCUcHAf+z+D9K2Di9kGx/9loIzfuf2T4+XoP PnUNF30xhKEL18/1hc/dsOMHSg0Yx2zc71fB4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1733262618; x=1733867418; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=zhF1TSIpiDnDO1ss7QPfLqqIBrxMtPOq9kWp98JCdA8=; b=X1ifNbdMUSHcD0HC1svOaOCVF90ikiu59zoyymIylOVOhpE/9xJGa80aoNs9j2UEKf TvnMcSieJga9bkK1hQ5DibnJh1zx4t8mpTwyKfkdg2kgYg2HbMyYtPdgTPRXbyoK8uLO Lo66c9d7068PY4T6sfS51K/bzROqwcEKfTlUpKP2meXY1ePuZgF/Z6X/CwcL1CauK6tt Z/JkuvR0qva4G6UBPeUe+rEHbX/PR9q2PMunKMsOpO5ixusSedGGv2NdK5YrrMEPp1qp H4PQTKAtp8rR1hqqhnP7lxm3Z3m8T/o7zsURyqZvFTFDPcF8VNsM1WR+r6fw40vIiR/G DBQQ== X-Forwarded-Encrypted: i=1; AJvYcCUf+zHm6yAK+mJN4Q8oKg/W5eygq9YxmKAFNo7ikrS1m+MgLFOriiyWHqL3U0/eAaC+KoBetImGhkgj4jA=@vger.kernel.org X-Gm-Message-State: AOJu0YzmOMZaRoQltxQpwg3xHk1LtFpBG+ZjxaMCMbHgO+8hFJuBqAA6 rT6SZEovhDU9gYHuwJnYZJXxG8hkvSXpmiDzIQFQtnyidEZjbQJLcszgNFmmLMQ= X-Gm-Gg: ASbGncseDMTNdUeNIVYqjoOi/qlJrzQvbQ/WcOO0nJhl7UHDn3thm48vK1q5siUD41n vABWuLV6Yb9BXiG+89ktKfLrElp5c+T8dHJs2aZcb4r1nbZaiZYrFYtSmBWmusxNsKVLeQS9u/k ZpmN2QTUSFkj+Kh3qPDJkRIRGJNh69CYQflqBnmZQfmswXci6m+iILlpXv65MlU5+DibwaEw8ry cmZdnI8rZtdK6CxwMi52Tgr6VAa10H/XPxVwnqCHG9DpQkcApD58cPWRSL0ig== X-Google-Smtp-Source: AGHT+IE4KQboi9ErKWinbYCH6Z/vNSaAcEIyRgGgfhFgXJKVUu3tOxpqb4sddr38iHqq+kfIPDfBZQ== X-Received: by 2002:a05:6e02:178d:b0:3a7:7124:bd2c with SMTP id e9e14a558f8ab-3a7f9a97fc8mr49953145ab.19.1733262618667; Tue, 03 Dec 2024 13:50:18 -0800 (PST) Received: from [192.168.1.128] ([38.175.170.29]) by smtp.gmail.com with ESMTPSA id 8926c6da1cb9f-4e230e908b4sm2688367173.158.2024.12.03.13.50.18 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 03 Dec 2024 13:50:18 -0800 (PST) Message-ID: <35238cbe-7f4e-4486-915e-ab13ca0120de@linuxfoundation.org> Date: Tue, 3 Dec 2024 14:50:17 -0700 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v5 0/2] kselftest: tmpfs: Add ksft macros and skip if no root To: Shivam Chaudhary , shuah@kernel.org Cc: linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org, Shuah Khan References: <20241112143056.565122-1-cvam0000@gmail.com> Content-Language: en-US From: Shuah Khan In-Reply-To: <20241112143056.565122-1-cvam0000@gmail.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 11/12/24 07:30, Shivam Chaudhary wrote: > This version 5 patch series replace direct error handling methods with ksft > macros, which provide better reporting.Currently, when the tmpfs test runs, > it does not display any output if it passes,and if it fails > (particularly when not run as root),it simply exits without any warning or > message. > > This series of patch adds: > > 1. Add 'ksft_print_header()' and 'ksft_set_plan()' > to structure test outputs more effectively. > > 2. Error if not run as root. This should be a skip - not a fail. > > 3. Replace direct error handling with 'ksft_test_result_*', > 'ksft_exit_fail_msg' macros for better reporting. > > v4->v5: > - Remove unnecessary pass messages. > - Remove unnecessary use of KSFT_SKIP. > - Add appropriate use of ksft_exit_fail_msg. > > v4 1/2: https://lore.kernel.org/all/20241105202639.1977356-2-cvam0000@gmail.com/ > v4 2/2: https://lore.kernel.org/all/20241105202639.1977356-3-cvam0000@gmail.com/ > > v3->v4: > - Start a patchset > - Split patch into smaller patches to make it easy to review. > Patch1 Replace 'ksft_test_result_skip' with 'KSFT_SKIP' during root run check. > Patch2 Replace 'ksft_test_result_fail' with 'KSFT_SKIP' where fail does not make sense, > or failure could be due to not unsupported APIs with appropriate warnings. > > > v3: https://lore.kernel.org/all/20241028185756.111832-1-cvam0000@gmail.com/ > > v2->v3: > - Remove extra ksft_set_plan() > - Remove function for unshare() > - Fix the comment style > v2: https://lore.kernel.org/all/20241026191621.2860376-1-cvam0000@gmail.com/ > > v1->v2: > - Make the commit message more clear. > v1: https://lore.kernel.org/all/20241024200228.1075840-1-cvam0000@gmail.com/T/#u > > > thanks > Shivam > > Shivam Chaudhary (2): > selftests: tmpfs: Add Test-fail if not run as root > selftests: tmpfs: Add kselftest support to tmpfs > > .../selftests/tmpfs/bug-link-o-tmpfile.c | 60 ++++++++++++------- > 1 file changed, 37 insertions(+), 23 deletions(-) > thanks, -- Shuah