Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.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 79C9D211A12 for ; Mon, 3 Mar 2025 13:10:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.129.124 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1741007402; cv=none; b=JVXnF2W4aY4X/z58zp3Lw3iUcokn6bt50YEcg7WrybA28xJeRBCIkvNZ7hrgoJjY7Vyt8kzO7d+X4VcKDTFdztQ4XliuI4tOEJjWuEiGQys1KNdmwBNrLHYBKAToTMcsLlEYNkHAdeL+wid0Xn4UxiR9S1MkYUh/KCa32o71mNU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1741007402; c=relaxed/simple; bh=FbzVrdMAZUQ8zQS6jCj8dwn6KXOD6y4lIJQ1AAwZm0Q=; h=From:To:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:content-type; b=WYo4w9yFDPOed44nr1oZbP1U7Gxeuyj262FTrnBnFbsPzyOZgrv0eQBzkTvsW1lbD6xejc8vXZIrhRMInTxXsbWE6qkGjSPkkqUU8kZ9ZxD7Iiar/zhQLdGi3CNCz/M5MihADbvub60ZnwdwQcXQCJv9F503OJ7gL6+ZDPuuVFY= 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=G+70W83+; arc=none smtp.client-ip=170.10.129.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="G+70W83+" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1741007399; 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=G+70W83+J4x4SqtOdaJ3qA39kgBllMS2EJ1hoBCjLQdgD2u8Lwb7lFyMvSfmRKmXuq6S0+ Z0Pp9miPGnUwaTX2NV3oHZFRdflHirvF6qhGDQWe5xBTKyBWqYbRbFXIi1myPKIOYYxACs hXp3FjTm5Nx0Sh+7fzmwcOuzkD4kjoc= Received: from mx-prod-mc-01.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-349-duOwI7P8Pv68QbmaIZXYvw-1; Mon, 03 Mar 2025 08:09:53 -0500 X-MC-Unique: duOwI7P8Pv68QbmaIZXYvw-1 X-Mimecast-MFC-AGG-ID: duOwI7P8Pv68QbmaIZXYvw_1741007392 Received: from mx-prod-int-04.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-04.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.40]) (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-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 3AF9C1944CD1 for ; Mon, 3 Mar 2025 13:09:52 +0000 (UTC) Received: from aion.redhat.com (unknown [10.22.64.10]) by mx-prod-int-04.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 0DF0519560AA for ; Mon, 3 Mar 2025 13:09:52 +0000 (UTC) Received: from aion.redhat.com (localhost [IPv6:::1]) by aion.redhat.com (Postfix) with ESMTP id 2E844336C2B for ; Mon, 03 Mar 2025 08:09:49 -0500 (EST) From: Scott Mayhew To: kdevops@lists.linux.dev Subject: [PATCH 9/9] ltp: add makefile target to show test results Date: Mon, 3 Mar 2025 08:09:48 -0500 Message-ID: <20250303130948.630029-10-smayhew@redhat.com> In-Reply-To: <20250303130948.630029-1-smayhew@redhat.com> References: <20250303130948.630029-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.40 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: -2tjrWKCOgkjWR7zxY-89wKate3Z3VfNFLwT65-bxKs_1741007392 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: 8bit 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" -- 2.48.1