From patchwork Wed Mar 12 21:42:32 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Scott Mayhew X-Patchwork-Id: 14013943 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 53BB37083C for ; Wed, 12 Mar 2025 21:43:02 +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=1741815783; cv=none; b=Nkg7lBJ361KP+UmnQwqIIYYEXeAM3vlLJ/qmm38EOCJW050UY6dq3U7KQJXKVruTbXbld9+QS5MKKwQJCwgg1dTRAdhtnpPSX5hfV+bLNpmHZN7LJNinjrl1s05bjW/b7aLfKJ0rM56QeBy9F7P2sppBy8Fh2HhOlrmcO7GnLyc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1741815783; c=relaxed/simple; bh=8OFcO2FQYJTBFmCv+z+wPBcHX4PkcLIEk/hHdqRNcao=; h=From:To:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:content-type; b=oKJN3KB0cV/ktotzhPWzBXmfgClg2LwI42bIWyQmK4czTiI8eDEO4AOFp/7XqC5Rf68ywcFyPsPH3JC16WIDlqf3Zuv+hXn8vPK5tVd9MCi5csa3dnE/jar6pOC8tqRrLWDX6o748qDX6rISWoVvWF2rnd5UNftuwztdf1JNT44= 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=ETktKFg7; 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="ETktKFg7" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1741815781; 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=XKWUwDLlABoDXiTFifKSXhGDSQkHX1r9lJI9ES0JLF8=; b=ETktKFg7xz8cgA7eJU5FPxk/2bWu07ljxZBwi/yIdR6JmADO03FNop2VL8DyeUmON9/laa LqBSB4qfXELxi7Sl2+Q1EJaxUMGbvYU/yXB+tzMwQYArLe0EcErgMMdSUddgCFLdw5qXtg kvwX4j+quR5irW5CE4CltekYcR+N9iY= 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-661-8mK8Dtx0NRC_KNa-0t4dXQ-1; Wed, 12 Mar 2025 17:42:36 -0400 X-MC-Unique: 8mK8Dtx0NRC_KNa-0t4dXQ-1 X-Mimecast-MFC-AGG-ID: 8mK8Dtx0NRC_KNa-0t4dXQ_1741815756 Received: from mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.93]) (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 0CA6D1955DE4 for ; Wed, 12 Mar 2025 21:42:36 +0000 (UTC) Received: from aion.redhat.com (unknown [10.22.80.106]) by mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id D77561828AA1 for ; Wed, 12 Mar 2025 21:42:35 +0000 (UTC) Received: from aion.redhat.com (localhost [IPv6:::1]) by aion.redhat.com (Postfix) with ESMTP id 0E6D8338A16 for ; Wed, 12 Mar 2025 17:42:33 -0400 (EDT) From: Scott Mayhew To: kdevops@lists.linux.dev Subject: [PATCH v2 9/9] ltp: add makefile target to show test results Date: Wed, 12 Mar 2025 17:42:32 -0400 Message-ID: <20250312214232.955450-10-smayhew@redhat.com> In-Reply-To: <20250312214232.955450-1-smayhew@redhat.com> References: <20250312214232.955450-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.4.1 on 10.30.177.93 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: c1kwtvyi-YhI-KKHowWrftb16AB3qaItnWOSi1L7p2M_1741815756 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 "*.log" 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 failures: $ PATTERN="-name \"*.failed\"" make ltp-show-results Note that since the ltp 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 in 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 | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/workflows/ltp/Makefile b/workflows/ltp/Makefile index 4e439da..e946be7 100644 --- a/workflows/ltp/Makefile +++ b/workflows/ltp/Makefile @@ -96,6 +96,24 @@ 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 + +ifeq ($(LAST_KERNEL), $(shell cat workflows/ltp/results/last-kernel.txt 2>/dev/null)) +FIND_PATH := workflows/ltp/results/last-run +else +FIND_PATH := workflows/ltp/results/$(LAST_KERNEL) +endif + +ifndef PATTERN +PATTERN := -name "*.log" +endif + +ifndef XARGS_ARGS +XARGS_ARGS := -I {} bash -c 'echo "{}:"; cat {}; echo;' +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 +146,11 @@ ltp-dev-reset: -f 30 -i hosts -l dev playbooks/ltp.yml \ --tags vars,reset --extra-vars=@./extra_vars.yaml +ltp-show-results: + @find $(FIND_PATH) -type f $(PATTERN) \ + | xargs $(XARGS_ARGS) \ + | sed '$${/^$$/d;}' + ltp-help-menu: @echo "ltp options:" @echo "ltp - Git clone ltp, build and install it"