Received: by 2002:ab2:784b:0:b0:1fd:adc2:8405 with SMTP id m11csp217384lqp; Mon, 10 Jun 2024 01:32:58 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCX0hrw/ygr7S+Pm9Ni2QPM21mWFICNozvQSvlG/EsiXDrDVbs1/3B4RG984yg9X1pHAd/O6hyY7GMJZnxXaPc+8pLz9l2mwW+WjcaVObA== X-Google-Smtp-Source: AGHT+IF6uh3bjDKbCF8yUGi4CJyo99JGd5s+rMBr7uado0O3TssZ9VokpfqmwPIa/baxZumIrQ/l X-Received: by 2002:a05:6a21:6da4:b0:1b4:a478:2275 with SMTP id adf61e73a8af0-1b4a4782312mr9348204637.29.1718008378042; Mon, 10 Jun 2024 01:32:58 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1718008378; cv=pass; d=google.com; s=arc-20160816; b=vrJR93TAgzLkZXTtOEWApi9XG9RwpFNiZMMHa4hub4m/HLElglsE0NCgpunlfk91Gm CsEndF6heBdwV9twA+5Q2eL/zSQc0MMliTr3DFQ0rdKlQ+iRC8aqVWprE7c1y1ddaAoI 59foQ8vTNPWQaoUDO+3fTP3XI1ttPU3QP8RETdE1wvHzhKMqdvUf5e8KgFqwzhfg61aB indyGvM6Bc9kydpKl7A2F8+BcXWDGvnMnIQC8bU0gs8mKNMu3AafErueTjc1reQqeQjQ scEz9PFxX8UVooZouVvlA/89zNBr9JDdKB3Nt8kuxGqExdAxvcM9s/QsA4B7rVmF7mtQ qQdg== 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=AeJEIowf+KPjtWp0WU3kaOROGLIw1dEcnyMhQShPEfA=; fh=KsUHpNsOaOSWwGWe8LIdK2SX4xyy4FQLB8+JX7+NgW8=; b=J+fZYVi/eIRPMfsD4PJ5m5vtpZZVwMyF+OJXbrOl/rR8VMZhsSdk/wX0ZpycShxfzT aaetFgm9R3Eq1OYOoCJprSL+dLhgGPikqzZn/Gv+3M4DjEx+JH38MdoxnzvMTj5GoDXb 94COeVuSSP2V809mrWNwqrZUTk8qob/SJUmtBQVmEWve3lU64oQI3oYqldGhnGBLAbKn jLrc5hsgT3tZke3jYPWK/GdatMzaW2WYMXNTYcJJboWu4RDFebNAYXL9Goch8P3M7b82 /vkZ2t7hkY301zLu8kT4GZ7wE7cNJSZdrLM9h3LTTfPCBX0ya942U89TF89ixO2/FQGC kaFQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=NjxkHvBS; 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-207851-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-207851-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id d2e1a72fcca58-7042b587914si3301322b3a.333.2024.06.10.01.32.57 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 10 Jun 2024 01:32:58 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-207851-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=NjxkHvBS; 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-207851-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-207851-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 sv.mirrors.kernel.org (Postfix) with ESMTPS id A98D6282721 for ; Mon, 10 Jun 2024 08:32:57 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 49EE56F2E8; Mon, 10 Jun 2024 08:32:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b="NjxkHvBS" 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 1650A3BBC5; Mon, 10 Jun 2024 08:32:47 +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=1718008369; cv=none; b=upUp4WDkeuqor2PgbGjdRUOgLdYIQ6Br99HEXTyWhYHCpfn46gnj9+Gg5VSQw/yUDPc1VCFTbh+FUcMqn5HR+vi7eyAQezHvrurY++x0qsYUoBxYzo6IU4wIoSlL65iJyZRonYr8a3KYgqswBgWNUFLOURxWIAVRSYXuyIAsrFk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718008369; c=relaxed/simple; bh=qwlTEAsrFOsgcn64/ZD8Sup2dFP172zw2LGV9PDNcEU=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=pddjFUD88GIZLjC6V+o2vukOtLse7Q6Cdv1Hs6bYOIxs//0dYvl8B/AfL6p1vsx/d9QGpC/xhTssSvLX0hiaB3TPcqjbBJNqDB3kyRPabDtcmxiNibQ+HzHNXQy7+V2pwUR1LoYOLci+YNlgLGOIykB22a/2Lnjj6vC6EwwlCBc= 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=NjxkHvBS; 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=1718008366; bh=qwlTEAsrFOsgcn64/ZD8Sup2dFP172zw2LGV9PDNcEU=; h=From:To:Cc:Subject:Date:From; b=NjxkHvBSnt6ozcEI8ys9Px1t4oDvsuMqcwRDSZYUDqjnEVCaXtZiWI9pvBsaUqSed XrDPuxmeLt/nPS9vhZgEs8AkKbTOaZKiSLbW1g5R4hIGDoWsK/2r0aKMiWn/NAL+FP tm4T7pOsKabjQjqrJtEz8l5D1l7BFZWQDEty7aMXARPIglKv+QCR9ajdtA3m8kP32Q 0D9m/9c0c8IFvCOZHBs5DuFZMQ51Y+/NqGi0LJiDw1LXcTcVyFERnqm90ekK6sa89f iyReNIOIqwqc8V789WoCl2JfXBKh9UnBj4t0ZAV+DqHmbPZ/xDREezLgCF2AY8N1Ki V037v+4RBt/xQ== Received: from localhost.localdomain (ec2-34-240-57-77.eu-west-1.compute.amazonaws.com [34.240.57.77]) (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 7401A3782113; Mon, 10 Jun 2024 08:32:44 +0000 (UTC) From: Muhammad Usama Anjum To: Shuah Khan , Jonathan Corbet Cc: Muhammad Usama Anjum , kernel@collabora.com, linux-kselftest@vger.kernel.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] selftests: Add information about TAP conformance in tests Date: Mon, 10 Jun 2024 13:32:45 +0500 Message-Id: <20240610083245.1938001-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 Although "TAP" word is being used already in documentation, but it hasn't been defined in informative way for developers that how to write TAP conformant tests and what are the benefits. Write a short brief about it. Signed-off-by: Muhammad Usama Anjum --- Documentation/dev-tools/kselftest.rst | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Documentation/dev-tools/kselftest.rst b/Documentation/dev-tools/kselftest.rst index dcf634e411bd9..b579f491f3e97 100644 --- a/Documentation/dev-tools/kselftest.rst +++ b/Documentation/dev-tools/kselftest.rst @@ -228,6 +228,14 @@ In general, the rules for selftests are * Don't cause the top-level "make run_tests" to fail if your feature is unconfigured. + * The output of tests must conform to the TAP standard to ensure high + testing quality and to capture failures/errors with specific details. + The kselftest.h and kselftest_harness.h headers provide wrappers for + outputting test results such as pass, fail, or skip etc. These wrappers + should be used instead of reinventing the wheel or using raw printf and + exit statements. CI systems can easily parse TAP output messages to + detect test failures. + Contributing new tests (details) ================================ -- 2.39.2