Received: by 2002:ab2:7a55:0:b0:1f4:4a7d:290d with SMTP id u21csp151079lqp; Thu, 4 Apr 2024 09:14:23 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVy+sY6i9aco2TvbyAz3jQlIHPliz0S6Mk6jVVt23vIbKNqa2tvORjU89HXz11P+YWpPfwIJb22vcHAEksm5/aIiZnMDs5nU4Nh4M4HBw== X-Google-Smtp-Source: AGHT+IHuKBt4g9K4pK5DK9OFThs/VsD3pxRy6QoMpZeW+o8QaCLeRYNskWIowNo400Semtc4jbPn X-Received: by 2002:a50:9354:0:b0:56e:99e:1fac with SMTP id n20-20020a509354000000b0056e099e1facmr165724eda.39.1712247263548; Thu, 04 Apr 2024 09:14:23 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712247263; cv=pass; d=google.com; s=arc-20160816; b=whlft8KBLA8Rcaa5lZX9mCczYtjyMENpfrhPkmJKLGJLdm3Kp0rPhKEaWfJUBleLy5 Nlu+tO1EjXqlCUoI8U8TdY8PAl6ya/bBvOd/JMhF/zkyqJYvdStFOc1zeS/OIp6GGIdh ihrrIug1d5/6667F/pmqNx7asE33ctWhlqyzoaCC0J9HTr4yG99JmmI8Nu/TeT27Nm/r cKVN8BQ2+lr1dLvo/3kgW1oOWMcqJKhMQPOBAiXaAmejh8GDZrmXvFGtw2n7pwxglo/r mfCyt2ZgYji6R9j4KRXWo2IDRGOZ6XzEiytEgJ/neSIvGUsx8yCDCz8kowsdAo5X72Rx NUVQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature; bh=n/1nyKEFwpOQ+kbHS/7YNFKQ2/mV6hCCQD2TUQhzzDU=; fh=ALOkOm1SoolRUSrKjSdmSuEh7ZIj8elqIkR3FAJ9z28=; b=bQXLpwTkhUMiXQ1ugGCXAep0mCPmJW1DUWIF0jQDUuXoC5kyLiftv1tYl1ZmmZh9OK E6+fywdAPY4IKjSznQuPmwp4oEqtZz1+7waTNImLw7023kBu2CkhCQLKiuKZzExK43yV Sdkj8Wod7P2ou18UwOnyuuOVdvCjMBP8lYE8XQM2tcndXKTNbAuZ5nvqPxt1H5Y0iVgf t0W++S8034QMH7H9pHDXbSJazE0pK0B8APHSoSnnvUCekEL9dDR2SlUCCMCGqZRkeF5K NLFZS9iHy7sF0QKvh7j7CA9qOdCdBqa9DC7p6sDzzNhuHPeAiOXkoUOdCCaQM6Wjxtq5 u4RQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=uoYLWTLs; arc=pass (i=1 spf=pass spfdomain=collabora.com dkim=pass dkdomain=collabora.com dmarc=pass fromdomain=collabora.com); spf=pass (google.com: domain of linux-kernel+bounces-131799-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-131799-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id fd19-20020a056402389300b0056c1ac8659esi173436edb.603.2024.04.04.09.14.23 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 04 Apr 2024 09:14:23 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-131799-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=uoYLWTLs; arc=pass (i=1 spf=pass spfdomain=collabora.com dkim=pass dkdomain=collabora.com dmarc=pass fromdomain=collabora.com); spf=pass (google.com: domain of linux-kernel+bounces-131799-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-131799-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 488C01F2489E for ; Thu, 4 Apr 2024 16:14:23 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id F129512AAF8; Thu, 4 Apr 2024 16:14:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b="uoYLWTLs" Received: from madrid.collaboradmins.com (madrid.collaboradmins.com [46.235.227.194]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A8595224DE; Thu, 4 Apr 2024 16:14:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=46.235.227.194 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712247252; cv=none; b=WhpO/L3eG8BmLKIf2/fkl2DG6Cg4fJPnRTu/1IVE+rjzW0qsU7GSyQ6YdFlObkMcicXjcFRh7yplGV9cW0i1LDeOAZLhySwkY+z3XVW/nMmS7FDDfmB93uH58FIx7FTkhGk8QdpJd13a8LQsbFezJbmAJzDXUyNizOvzpuc0QP0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712247252; c=relaxed/simple; bh=UUiZipEEAobiO7PS4UAv/nMDLlJTMGONEQDPS3ap/14=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=rbtQ0fdKH40vj/eF+PPuV9ZmnVVLyXvGjwUA7EYW6UZVgmpY6/lTLDdPShzT4KAh+KSAML+DoRUkgwqGnkHftZauviVRQ1c6nqksZRDV/CNH8/Y6icLhxw5eKYUpuwKZU0LsFl3/MxUojD1+Cvj1PKZa8CGczR94ontYO5fBhpY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=collabora.com; spf=pass smtp.mailfrom=collabora.com; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b=uoYLWTLs; arc=none smtp.client-ip=46.235.227.194 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=collabora.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=collabora.com 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 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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(-) -- 2.39.2