From patchwork Thu Apr 4 16:14:31 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Muhammad Usama Anjum X-Patchwork-Id: 13618038 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 kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id DF039CD1284 for ; Thu, 4 Apr 2024 16:14:12 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 386BC6B009B; Thu, 4 Apr 2024 12:14:12 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 336826B009C; Thu, 4 Apr 2024 12:14:12 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 1FE4E6B009E; Thu, 4 Apr 2024 12:14:12 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0015.hostedemail.com [216.40.44.15]) by kanga.kvack.org (Postfix) with ESMTP id 035856B009B for ; Thu, 4 Apr 2024 12:14:11 -0400 (EDT) Received: from smtpin08.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay07.hostedemail.com (Postfix) with ESMTP id 6837D160FD0 for ; Thu, 4 Apr 2024 16:14:11 +0000 (UTC) X-FDA: 81972346302.08.893B443 Received: from madrid.collaboradmins.com (madrid.collaboradmins.com [46.235.227.194]) by imf25.hostedemail.com (Postfix) with ESMTP id B013DA0002 for ; Thu, 4 Apr 2024 16:14:09 +0000 (UTC) Authentication-Results: imf25.hostedemail.com; dkim=pass header.d=collabora.com header.s=mail header.b=uoYLWTLs; spf=pass (imf25.hostedemail.com: domain of usama.anjum@collabora.com designates 46.235.227.194 as permitted sender) smtp.mailfrom=usama.anjum@collabora.com; dmarc=pass (policy=quarantine) header.from=collabora.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1712247249; a=rsa-sha256; cv=none; b=XtMFU5pzSzg1z4caTtIaRPbp1ozayFA0oOc8Tu4ibPRBuLR9FMbGYwnIKc0JOBbc4ffmpR w51BbdM0k+LbakZ9LG3ZuaQnN07EGb6VzizpjD95PiLuviqcpXEQlXpBUN+zT6EGP6mG22 SZZrfNEQ9LdBf2cPwPyLN4ODJehp1dM= ARC-Authentication-Results: i=1; imf25.hostedemail.com; dkim=pass header.d=collabora.com header.s=mail header.b=uoYLWTLs; spf=pass (imf25.hostedemail.com: domain of usama.anjum@collabora.com designates 46.235.227.194 as permitted sender) smtp.mailfrom=usama.anjum@collabora.com; dmarc=pass (policy=quarantine) header.from=collabora.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1712247249; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-transfer-encoding:content-transfer-encoding: in-reply-to:references:dkim-signature; bh=n/1nyKEFwpOQ+kbHS/7YNFKQ2/mV6hCCQD2TUQhzzDU=; b=K1CpN91vFgJPNu53IeR+mNi6yZ3kByz2OnfnybDunrexzJgyskN2icOnDhxGvNBIqN9UBj bQ3vcG6N/q1x2FvNPeOPfttLDvLXc+mV+LysDIZS88ABa8srl6M3g+T2ChQ/gnFmskR2pC yHDK3n8Q1gazpNN3er9kwF4s0Kn9Mpk= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1712247248; bh=UUiZipEEAobiO7PS4UAv/nMDLlJTMGONEQDPS3ap/14=; h=From:To:Cc:Subject:Date:From; b=uoYLWTLshZC5vsrh5QM1FNAKKvY2Oy4coxEmM3VUMh5wSaI3dAf4duzwnKfZvde3s QLxOkaplfRvUpS2q5WELklv+KOAY8P/hHosBP6auRavnnSQC+O6FsFtwqyi8FRfHE/ v8EL+go/6vPo+A8tMrksy5iKRGWBdbyf+Dvdx9hXm766CfqCaX9J/qErdLu7dhvvAd 2V8LX+i1WsvgYhXcLcqchQfLwRs8LFzNNUmhoskaIPWnCl+vFOxXbAZtt9jCml7oCq GiupKWuxr43RjQpok1ppX8/Oma0MWjDI7jwaBN4G8K8w+MVXVfC1kt+owi0u5nRREG 13X6Qf8bGJAwQ== Received: from localhost.localdomain (broslavsky.collaboradmins.com [68.183.210.73]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: usama.anjum) by madrid.collaboradmins.com (Postfix) with ESMTPSA id C941337813A4; Thu, 4 Apr 2024 16:14:04 +0000 (UTC) From: Muhammad Usama Anjum To: Eric Biederman , Kees Cook , Shuah Khan , Muhammad Usama Anjum , linux-mm@kvack.org, linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org Cc: kernel@collabora.com Subject: [PATCH 0/2] selftests: add ksft_exit_fail_perror() Date: Thu, 4 Apr 2024 21:14:31 +0500 Message-Id: <20240404161433.114497-1-usama.anjum@collabora.com> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 X-Rspamd-Server: rspam08 X-Rspamd-Queue-Id: B013DA0002 X-Stat-Signature: ixge6tc5mjgdc3fufy5118bdi7hynqxx X-Rspam-User: X-HE-Tag: 1712247249-576835 X-HE-Meta: U2FsdGVkX1//gG5PAuzzWZsE7NJgIcTPzFidtpIRLcBae8jZp7qAnd0RFM2W5B88+ReFvi/PwEQMS7sUNMhZypCfNu7wsKe4TrY15ooVZCLSA/+6xl9/RCtdij8n+QrL596YlRdLn2QllkhTTq1232Whvp5XUbjkcthSNRTEGUxSMdJELzikXLDZR7Lq9qeUi9FFShBYznu9iD3EQHOYhwFbDGR0OLBiiJyIOUpBW/q0LRXbrJIFE2CgICm96BsQGTTKvuAVd9OlbHwN1Ci/iG0Jf63N6UFF/h/wfmpTJjDMjs+9M7qi4zpC4DyJ9NHdTjo4NB8GbU21j3KFXlA/rOQBg9ctFaEX57qgktm3wYwBans/uKK8dSBIDqqxlnwacuTt47ebrgdyrbTFNza0Q5AYUpe2zkiBg2SwYeb+zJflmzft18MnonAWKDAgGVyijFI+PqAMEjBbeA86b1QGgDu0Chj2FEXg70jr1bnh7/x7cZTL6KQlXzjSdb721x/HqQMF3Xeci7docCr3/Dv0+ciCl3jMVj2ZG+cKY984+vfWbrPWt15+gXoIvqZfGiOmgZ+FRm0PfdGDCN1SHjgGB4OIch0t7ZChfp0OXFi8cI/YiyL/iafnxlCGqb/8ljxiL8QpTzlorAgK52OhHF4C8Hsfu7z7q66jGj3D8jVFMEwfoQsMXOozjIrNtz2ZpzFL9VrIevyKfhWJkEL3ixEw5ivMD8D1j/W6lxx90MVcCGEiqIWgkV6B1R1ULVTKz9L9RiPzgxJWaDbiEQygc9KtyRVsAtN6chaHInzLFLJevKiPuE3aoK/qEC978aDzYQlpYpCl+XRLIxYGJUEjexdhoMO56P+0uskso4wJNs/cBO5wCY60m6Ip+2yU6YDaymkFn76AL/jFCEyMYNclOelFi0525+YoO9ff7SpdZDsN5TlyQX0VE1CUI7XkYVya2mdIrp39QTGIbSo8hgBmmlZ KIDJKdj3 ywPO4X7TuxeQN7tFFHP4PDQwq0+7VCoxP6CCStfQSte1Wilzw7ROF5gDOBN/oGCswLsqnun/rm47h5ZlzfDb3EjrJGMKsbYEQY8jzTQjy98Yw/OGbQTA0ZuNT6i1ZRwCh+rTmQOh9TxjDRYCkhy40bN8P2fzM1xOnbBA6Gbey/B0f2uqyjoH1KjdGNwRaEbDFiphNv3utaERtNSumAptGpxZ1HG5Xd+14O4BtMa1+KB9JTOc= X-Bogosity: Ham, tests=bogofilter, spamicity=0.000742, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: In this series, ksft_exit_fail_perror() is being added which is helper function on top of ksft_exit_fail_msg(). It prints errno and its string form always. After writing and porting several kselftests, I've found out that most of times ksft_exit_fail_msg() isn't useful if errno value isn't printed. The ksft_exit_fail_perror() provides a convenient way to always print errno when its used. Muhammad Usama Anjum (2): selftests: add ksft_exit_fail_perror() selftests: exec: Use new ksft_exit_fail_perror() helper tools/testing/selftests/exec/recursion-depth.c | 10 +++++----- tools/testing/selftests/kselftest.h | 14 ++++++++++++++ 2 files changed, 19 insertions(+), 5 deletions(-)