From patchwork Wed Mar 5 00:57:54 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Scott Mayhew X-Patchwork-Id: 14001724 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (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 DECF5824A3 for ; Wed, 5 Mar 2025 00:58:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.133.124 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1741136283; cv=none; b=N6EE9rhluYMP9mvFHosP2l8U8KgMkdOAuYNsgESJW2GerO9WtVoSuUslLPGbPr00F1vWx4iqh+tC+aY8ECZVqSitJMCxNMj1BTsc+O2/Psj7gntBucqRJMlU6apCkU2Nwo4j9M9M1SE/gnCnNNPxRXhrVxpFlThierktTjaHwFw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1741136283; c=relaxed/simple; bh=FbzVrdMAZUQ8zQS6jCj8dwn6KXOD6y4lIJQ1AAwZm0Q=; h=From:To:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:content-type; b=s36vTweTusui0VisxNYuYUFNiR7Qt1hrrbMlFtEzcV8EnuRlXG39792D6iBrBT4IlL2St47CLqsjpIBMML5Kf3zVkrzmFPJV1t28isFbqcMKGHCeUwIynf3YObiy7kMLErK+UrJzQlh4B/+4sYMzoPlPETRAvsKsUmV3AO1r0IY= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=CT2RtQSK; arc=none smtp.client-ip=170.10.133.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="CT2RtQSK" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1741136280; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=SlpW1qlYd6QkfsXVIjVn4WIAfHnx8Q1t4Wd/7bZQkrA=; b=CT2RtQSKM9F5qmMO0eaOxEk22rzISPWR2ZPrACVo6dDHDfeUF3cVobS+eMYonTK8x21yb/ ZoF480XD78knGGmswbenxho1IJ/ajlZ1dH8qcJ7sew917M6/RJVTRwxlCjKgG0vX2V6cDR a9gEWOC8CjpxbwZ8VEVb5sni14uygG4= Received: from mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-48-asD1J3uuPB6Vd6xVhu54rQ-1; Tue, 04 Mar 2025 19:57:59 -0500 X-MC-Unique: asD1J3uuPB6Vd6xVhu54rQ-1 X-Mimecast-MFC-AGG-ID: asD1J3uuPB6Vd6xVhu54rQ_1741136278 Received: from mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.12]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id C5370190FF83 for ; Wed, 5 Mar 2025 00:57:58 +0000 (UTC) Received: from aion.redhat.com (unknown [10.22.64.10]) by mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 9A6711954B00 for ; Wed, 5 Mar 2025 00:57:58 +0000 (UTC) Received: from aion.redhat.com (localhost [IPv6:::1]) by aion.redhat.com (Postfix) with ESMTP id DCE3A337295 for ; Tue, 04 Mar 2025 19:57:55 -0500 (EST) From: Scott Mayhew To: kdevops@lists.linux.dev Subject: [PATCH 9/9] ltp: add makefile target to show test results Date: Tue, 4 Mar 2025 19:57:54 -0500 Message-ID: <20250305005755.697599-11-smayhew@redhat.com> In-Reply-To: <20250305005755.697599-1-smayhew@redhat.com> References: <20250305005755.697599-1-smayhew@redhat.com> Precedence: bulk X-Mailing-List: kdevops@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.12 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: TM8EUPk75vinWUgd0m2JreC79wQ-4DP6EljP-NEK7v0_1741136278 X-Mimecast-Originator: redhat.com content-type: text/plain; charset="US-ASCII"; x-default=true Under the hood, it more or less just does 'find ... | xargs cat'. By default, the "*.failed" files will be shown for the most recent kernel run. You can show the results for a different kernel by overriding the LAST_KERNEL variable, e.g. $ LAST_KERNEL=6.11.9-100.fc39.x86_64 make ltp-show-results You can change the files being shown by overriding the PATTERN variable. For example, to just see the full test logs: $ PATTERN="-name \"*.log\"" make ltp-show-results Note that since the gitr log files have a date and timestamp in the filename, it's possible to accumulate logs from multiple test runs. If you're showing the results from the most recent kernel, then we'll only show the logs from the most recent run (i.e. logs that are newer than the timestamp of the last-run directory). But if you're showing the results from an older kernel, then we'll show all the logs in that directory (but you can override that too if you get creative with the PATTERN variable). Signed-off-by: Scott Mayhew --- workflows/ltp/Makefile | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/workflows/ltp/Makefile b/workflows/ltp/Makefile index 4e439da..8de76a0 100644 --- a/workflows/ltp/Makefile +++ b/workflows/ltp/Makefile @@ -96,6 +96,14 @@ LTP_KERNEL_CI_LOOP := scripts/workflows/ltp/run_kernel_ci.sh LTP_KERNEL_CI_LOOP_KOTD := scripts/workflows/ltp/run_kernel_ci_kotd.sh endif # CONFIG_KERNEL_CI +ifndef LAST_KERNEL +LAST_KERNEL := $(shell cat workflows/ltp/results/last-kernel.txt 2>/dev/null) +endif + +ifndef PATTERN +PATTERN := -name "*.failed" +endif + ltp: $(Q)ansible-playbook $(ANSIBLE_VERBOSE) -l baseline,dev \ -f 30 -i hosts playbooks/ltp.yml --skip-tags run_tests,copy_results @@ -128,6 +136,19 @@ ltp-dev-reset: -f 30 -i hosts -l dev playbooks/ltp.yml \ --tags vars,reset --extra-vars=@./extra_vars.yaml +ltp-show-results: +ifdef LAST_KERNEL +ifeq ($(LAST_KERNEL), $(shell cat workflows/ltp/results/last-kernel.txt 2>/dev/null)) + find workflows/ltp/results/$(LAST_KERNEL) -type f $(PATTERN) -newer workflows/ltp/results/last-run \ + | xargs -I {} bash -c 'echo "{}:"; cat {}; echo;' +else + @find workflows/ltp/results/$(LAST_KERNEL) -type f $(PATTERN) \ + | xargs -I {} bash -c 'echo "{}:"; cat {}; echo;' +endif +else + @echo "No results." +endif + ltp-help-menu: @echo "ltp options:" @echo "ltp - Git clone ltp, build and install it"