Skip to contentSkip to conversation

tweak results organization and reporting

PATCH In review Scott Mayhew 2 participants 11 messages Mar 12, 2025

lore
Share & tools
lore
#0 lore raw

v2 cover tweak results organization and reporting

I do most of my kdevops runs under buildbot. Currently I don't have an easy way to view test results in buildbot's web interface.

The first four patches implement a "last-run" directory and "last-kernel.txt" file similar to what the fstests workflow already has. This is mainly to facilitate the remaining patches, but I think it will also make it easier for me to feed my test results into other tooling in the future.

The remaining patches add a "<workflow>-show-results" makefile target, which basically print the test results to the standard output. The results for the most recent run are printed by default, but that can be changed by overriding the LAST_KERNEL variable. The results printed varies from workflow to workflow, and can be overidden via the PATTERN variable.

Changes since v1:
- fstests-show-results now outputs the xunit_results.txt file by default
- ltp-show-results now outputs the "*.log" files by default
- simplified the find command in the show-results targets by doing a little more variable parsing earlier in the makefiles

Scott Mayhew (9):
pynfs: add last-run directory and last-kernel.txt to the results
nfstest: add last-run directory and last-kernel.txt to the results
gitr: add last-run directory and last-kernel.txt to the results
ltp: add last-run directory and last-kernel.txt to the results
fstests: add makefile target to show test results
pynfs: add makefile target to show test results
nfstest: add makefile target to show test results
gitr: add makefile target to show test results
ltp: add makefile target to show test results

 playbooks/roles/gitr/tasks/main.yml    | 59 +++++++++++++++++++++----
 playbooks/roles/ltp/tasks/main.yml     | 60 ++++++++++++++++++++++++--
 playbooks/roles/nfstest/tasks/main.yml | 60 ++++++++++++++++++++++----
 playbooks/roles/pynfs/tasks/main.yml   | 38 +++++++++++++++-
 workflows/fstests/Makefile             | 27 ++++++++++++
 workflows/gitr/Makefile                | 23 ++++++++++
 workflows/ltp/Makefile                 | 23 ++++++++++
 workflows/nfstest/Makefile             | 23 ++++++++++
 workflows/pynfs/Makefile               | 23 ++++++++++
 9 files changed, 314 insertions(+), 22 deletions(-)
Signature · 1 line
2.48.1
#1 lore raw

PATCH v2 1/9 pynfs: add last-run directory and last-kernel.txt to the results

Create the last-run directory and last-kernel.txt file in a manner similar to the way the fstests workflow does it.

This will make it easier to get at the most recent test results for reporting purposes.

---
 playbooks/roles/pynfs/tasks/main.yml | 38 ++++++++++++++++++++++++++--
 1 file changed, 36 insertions(+), 2 deletions(-)
playbooks/roles/pynfs/tasks/main.yml +36 -2
index c6add8e..882dd1c 100644
@@ -12,6 +12,8 @@
 - name: Set the path where we collect our local pynfs results
   set_fact:
     pynfs_workflow_dir: "../workflows/pynfs"
+    pynfs_results_full_path: "{{ topdir_path }}/workflows/pynfs/results"
+    pynfs_results_target: "../workflows/pynfs/results/last-run/"
   tags: [ 'vars' ]
 
 - name: Clean up our localhost results directory and files
@@ -127,6 +129,16 @@
   delay: 1
   until: result.rc == 0
 
+- name: Clean up our localhost results/last-run directory
+  local_action: file path="{{ pynfs_results_target }}/" state=absent
+  run_once: true
+  tags: [ 'run_tests', 'copy_results', 'clean_local_results' ]
+
+- name: Create empty last-run directory
+  local_action: file path="{{ pynfs_results_target }}/" state=directory
+  run_once: true
+  tags: [ 'run_tests', 'copy_results', 'clean_local_results' ]
+
 - name: Run pynfs
   tags: [ 'run_tests' ]
   script: "{{ pynfs_workflow_dir }}/scripts/run_pynfs.sh"
@@ -156,6 +168,11 @@
     kernel_rev: "{{ uname_cmd.stdout_lines | regex_replace('\\]') | regex_replace('\\[') | replace(\"'\",'') }}"
   run_once: true
 
+- name: Document used target kernel version
+  local_action: "shell echo {{ kernel_rev }} > {{ pynfs_results_target }}/../last-kernel.txt"
+  tags: [ 'run_tests', 'copy_results', 'print_results' ]
+  run_once: true
+
 - name: Copy the version-specific results to the control node
   tags: [ 'copy_results' ]
   become: yes
@@ -163,7 +180,7 @@
   become_method: sudo
   fetch:
     src: "{{ pynfs_data }}/pynfs-{{ item }}-results.json"
-    dest: "{{ pynfs_workflow_dir }}/results/{{ kernel_rev }}-v{{ item }}.json"
+    dest: "{{ pynfs_results_full_path }}/last-run/{{ kernel_rev}}/{{ kernel_rev }}-v{{ item }}.json"
     flat: yes
   with_items:
     - 4.0
@@ -176,9 +193,26 @@
   become_method: ansible.builtin.sudo
   fetch:
     src: "{{ pynfs_data }}/pynfs-{{ item }}-results.json"
-    dest: "{{ pynfs_workflow_dir }}/results/{{ kernel_rev }}-v{{ item }}.json"
+    dest: "{{ pynfs_results_full_path }}/last-run/{{ kernel_rev}}/{{ kernel_rev }}-v{{ item }}.json"
     flat: true
   with_items:
     - block
   when:
     - pynfs_pnfs_block|bool
+
+- name: Verify last-run kernel directory exists
+  tags: [ 'copy_results' ]
+  delegate_to: localhost
+  stat:
+    path: "{{ pynfs_results_full_path }}/last-run/{{ kernel_rev }}"
+  register: last_run_kernel_dir
+
+- name: Copy over the last-run into the results directory for archiving into kdevops
+  copy:
+    src: "{{ pynfs_results_full_path }}/last-run/{{ kernel_rev }}"
+    dest: "{{ pynfs_results_full_path }}/"
+  run_once: true
+  tags: [ 'copy_results' ]
+  delegate_to: localhost
+  when:
+    - last_run_kernel_dir.stat.exists
Signature · 1 line
2.48.1
#2 lore raw

PATCH v2 2/9 nfstest: add last-run directory and last-kernel.txt to the results

In reply to Scott Mayhew

Create the last-run directory and last-kernel.txt file in a manner similar to the way the fstests workflow does it.

This will make it easier to get at the most recent test results for reporting purposes.

---
 playbooks/roles/nfstest/tasks/main.yml | 60 ++++++++++++++++++++++----
 1 file changed, 52 insertions(+), 8 deletions(-)
playbooks/roles/nfstest/tasks/main.yml +52 -8
index 8c8db02..bf5cd9f 100644
@@ -131,6 +131,24 @@
   tags:
     - run_tests
 
+- name: Set the pathname of the results directory
+  ansible.builtin.set_fact:
+    nfstest_results_full_path: "{{ topdir_path }}/workflows/nfstest/results"
+    nfstest_results_target: "../workflows/nfstest/results/last-run"
+  when:
+    - kdevops_workflows_dedicated_workflow|bool
+  tags: copy_results
+
+- name: Clean up our localhost results/last-run directory
+  local_action: file path="{{ nfstest_results_target }}/" state=absent
+  run_once: true
+  tags: [ 'run_tests', 'copy_results', 'clean_local_results' ]
+
+- name: Create empty last-run directory
+  local_action: file path="{{ nfstest_results_target }}/" state=directory
+  run_once: true
+  tags: [ 'run_tests', 'copy_results', 'clean_local_results' ]
+
 - name: Run the test group script on the target node
   ansible.builtin.command:
     cmd: "/tmp/runtest.sh"
@@ -138,16 +156,25 @@
     - kdevops_workflows_dedicated_workflow|bool
   tags: run_tests
 
-- name: Set the pathname of the results directory
-  ansible.builtin.set_fact:
-    nfstest_results_dir: "../workflows/nfstest/results/{{ ansible_kernel }}"
-  when:
-    - kdevops_workflows_dedicated_workflow|bool
-  tags: copy_results
+- name: Get used target kernel version
+  tags: [ 'copy_results' ]
+  command: "uname -r"
+  register: uname_cmd
+
+- name: Store last kernel variable
+  tags: [ 'copy_results' ]
+  set_fact:
+    last_kernel: "{{ uname_cmd.stdout_lines | regex_replace('\\]') | regex_replace('\\[') | replace(\"'\",'') }}"
+  run_once: true
+
+- name: Document used target kernel version
+  local_action: "shell echo {{ last_kernel }} > {{ nfstest_results_target }}/../last-kernel.txt"
+  tags: [ 'run_tests', 'copy_results', 'print_results' ]
+  run_once: true
 
 - name: Create the results directory on the control node
   ansible.builtin.file:
-    path: "{{ nfstest_results_dir }}"
+    path: "{{ nfstest_results_full_path }}/last-run/{{ last_kernel }}"
     state: directory
     mode: "u=rwx,g=rx,o=rx"
   delegate_to: localhost
@@ -168,7 +195,7 @@
 - name: Copy the output logs to the control node
   ansible.builtin.fetch:
     src: "{{ item.path }}"
-    dest: "{{ nfstest_results_dir }}/{{ nfstest_test_group }}/"
+    dest: "{{ nfstest_results_full_path }}/last-run/{{ last_kernel }}/{{ nfstest_test_group }}/"
     flat: true
   with_items: "{{ nfstest_logs.files }}"
   loop_control:
@@ -178,3 +205,20 @@
     - kdevops_workflows_dedicated_workflow|bool
   changed_when: false
   tags: copy_results
+
+- name: Verify last-run kernel directory exists
+  tags: [ 'copy_results' ]
+  delegate_to: localhost
+  stat:
+    path: "{{ nfstest_results_full_path }}/last-run/{{ last_kernel }}"
+  register: last_run_kernel_dir
+
+- name: Copy over the last-run into the results directory for archiving into kdevops
+  copy:
+    src: "{{ nfstest_results_full_path }}/last-run/{{ last_kernel }}"
+    dest: "{{ nfstest_results_full_path }}/"
+  run_once: true
+  tags: [ 'copy_results' ]
+  delegate_to: localhost
+  when:
+    - last_run_kernel_dir.stat.exists
Signature · 1 line
2.48.1
#3 lore raw

PATCH v2 3/9 gitr: add last-run directory and last-kernel.txt to the results

In reply to Scott Mayhew

Create the last-run directory and last-kernel.txt file in a manner similar to the way the fstests workflow does it.

This will make it easier to get at the most recent test results for reporting purposes.

---
 playbooks/roles/gitr/tasks/main.yml | 59 +++++++++++++++++++++++++----
 1 file changed, 51 insertions(+), 8 deletions(-)
playbooks/roles/gitr/tasks/main.yml +51 -8
index 42005d2..f1e7b6c 100644
@@ -24,17 +24,43 @@
 - name: Set the pathname of the local results directory
   tags: vars
   ansible.builtin.set_fact:
-    gitr_results_dir: "../workflows/gitr/results/{{ ansible_kernel }}/{{ gitr_test_group }}/"
+    gitr_results_full_path: "{{ topdir_path }}/workflows/gitr/results"
+    gitr_results_target: "../workflows/gitr/results/last-run"
     gitr_run_uniqifier: "{{ ansible_date_time.iso8601_basic_short }}"
 
+- name: Clean up our localhost results/last-run directory
+  local_action: file path="{{ gitr_results_target }}/" state=absent
+  run_once: true
+  tags: [ 'run_tests', 'copy_results', 'clean_local_results' ]
+
+- name: Create empty last-run directory
+  local_action: file path="{{ gitr_results_target }}/" state=directory
+  run_once: true
+  tags: [ 'run_tests', 'copy_results', 'clean_local_results' ]
+
+- name: Get used target kernel version
+  tags: [ 'copy_results' ]
+  command: "uname -r"
+  register: uname_cmd
+
+- name: Store last kernel variable
+  tags: [ 'copy_results' ]
+  set_fact:
+    last_kernel: "{{ uname_cmd.stdout_lines | regex_replace('\\]') | regex_replace('\\[') | replace(\"'\",'') }}"
+  run_once: true
+
+- name: Document used target kernel version
+  local_action: "shell echo {{ last_kernel }} > {{ gitr_results_target }}/../last-kernel.txt"
+  tags: [ 'run_tests', 'copy_results', 'print_results' ]
+  run_once: true
+
 - name: Ensure the local results directory exists
   tags: copy_results
   ansible.builtin.file:
-    path: "{{ gitr_results_dir }}"
+    path: "{{ gitr_results_full_path }}/last-run/{{ last_kernel }}/{{ gitr_test_group }}"
     state: directory
     mode: "u=rwx,g=rx,o=rx"
   delegate_to: localhost
-  run_once: true
 
 - name: Install dependencies for the git regression tests
   tags: gitr
@@ -303,7 +329,7 @@
   tags: copy_results
   ansible.builtin.fetch:
     src: "/tmp/{{ gitr_run_uniqifier }}.tgz"
-    dest: "{{ gitr_results_dir }}"
+    dest: "{{ gitr_results_full_path }}/last-run/{{ last_kernel }}/{{ gitr_test_group }}/"
     flat: true
     validate_checksum: true
 
@@ -311,7 +337,7 @@
   tags: copy_results
   ansible.builtin.fetch:
     src: "{{ gitr_mnt }}/{{ gitr_run_uniqifier }}.summary"
-    dest: "{{ gitr_results_dir }}"
+    dest: "{{ gitr_results_full_path }}/last-run/{{ last_kernel }}/{{ gitr_test_group }}/"
     flat: true
     validate_checksum: false
 
@@ -319,7 +345,7 @@
   tags: copy_results
   ansible.builtin.fetch:
     src: "{{ gitr_mnt }}/{{ gitr_run_uniqifier }}.stderr"
-    dest: "{{ gitr_results_dir }}"
+    dest: "{{ gitr_results_full_path }}/last-run/{{ last_kernel }}/{{ gitr_test_group }}/"
     flat: true
     validate_checksum: false
   when: gitr_results.rc != 0
@@ -328,7 +354,7 @@
   tags: copy_results
   ansible.builtin.fetch:
     src: "{{ gitr_mnt }}/{{ gitr_run_uniqifier }}.rpc"
-    dest: "{{ gitr_results_dir }}"
+    dest: "{{ gitr_results_full_path }}/last-run/{{ last_kernel }}/{{ gitr_test_group }}/"
     flat: true
     validate_checksum: false
   when:
@@ -339,9 +365,26 @@
   tags: copy_results
   ansible.builtin.fetch:
     src: "{{ gitr_mnt }}/{{ gitr_run_uniqifier }}.xprt"
-    dest: "{{ gitr_results_dir }}"
+    dest: "{{ gitr_results_full_path }}/last-run/{{ last_kernel }}/{{ gitr_test_group }}/"
     flat: true
     validate_checksum: false
   when:
     - gitr_fstype == "nfs"
     - ansible_os_family == 'RedHat'
+
+- name: Verify last-run kernel directory exists
+  tags: [ 'copy_results' ]
+  delegate_to: localhost
+  stat:
+    path: "{{ gitr_results_full_path }}/last-run/{{ last_kernel }}"
+  register: last_run_kernel_dir
+
+- name: Copy over the last-run into the results directory for archiving into kdevops
+  copy:
+    src: "{{ gitr_results_full_path }}/last-run/{{ last_kernel }}"
+    dest: "{{ gitr_results_full_path }}/"
+  run_once: true
+  tags: [ 'copy_results' ]
+  delegate_to: localhost
+  when:
+    - last_run_kernel_dir.stat.exists
Signature · 1 line
2.48.1
#4 lore raw

PATCH v2 4/9 ltp: add last-run directory and last-kernel.txt to the results

In reply to Scott Mayhew

Create the last-run directory and last-kernel.txt file in a manner similar to the way the fstests workflow does it.

This will make it easier to get at the most recent test results for reporting purposes.

---
 playbooks/roles/ltp/tasks/main.yml | 60 ++++++++++++++++++++++++++++--
 1 file changed, 56 insertions(+), 4 deletions(-)
playbooks/roles/ltp/tasks/main.yml +56 -4
index b15f87d..8baa47f 100644
@@ -20,17 +20,52 @@
   tags: ['vars']
   ansible.builtin.set_fact:
     ltp_test_group: "{{ ansible_host | regex_replace(kdevops_host_prefix + '-') | regex_replace('-dev') }}"
-    ltp_results_dir: "../workflows/ltp/results/{{ ansible_kernel }}"
+    ltp_results_full_path: "{{ topdir_path }}/workflows/ltp/results"
+    ltp_results_target: "../workflows/ltp/results/last-run"
 
 - name: Create the local results directory
   tags: ['first_run']
   ansible.builtin.file:
-    path: "{{ ltp_results_dir }}"
+    path: "{{ ltp_results_full_path }}"
     state: directory
     mode: "u=rwx,g=rx,o=rx"
   delegate_to: localhost
   run_once: true
 
+- name: Clean up our localhost results/last-run directory
+  local_action: file path="{{ ltp_results_target }}/" state=absent
+  run_once: true
+  tags: [ 'run_tests', 'copy_results', 'clean_local_results' ]
+
+- name: Create empty last-run directory
+  local_action: file path="{{ ltp_results_target }}/" state=directory
+  run_once: true
+  tags: [ 'run_tests', 'copy_results', 'clean_local_results' ]
+
+- name: Get used target kernel version
+  tags: [ 'copy_results' ]
+  command: "uname -r"
+  register: uname_cmd
+
+- name: Store last kernel variable
+  tags: [ 'copy_results' ]
+  set_fact:
+    last_kernel: "{{ uname_cmd.stdout_lines | regex_replace('\\]') | regex_replace('\\[') | replace(\"'\",'') }}"
+  run_once: true
+
+- name: Document used target kernel version
+  local_action: "shell echo {{ last_kernel }} > {{ ltp_results_target }}/../last-kernel.txt"
+  tags: [ 'run_tests', 'copy_results', 'print_results' ]
+  run_once: true
+
+- name: Ensure the local results directory exists
+  tags: copy_results
+  ansible.builtin.file:
+    path: "{{ ltp_results_full_path }}/last-run/{{ last_kernel }}/{{ ltp_test_group }}"
+    state: directory
+    mode: "u=rwx,g=rx,o=rx"
+  delegate_to: localhost
+
 - name: Set OS-specific variables
   ansible.builtin.include_vars: "{{ lookup('ansible.builtin.first_found', params) }}"
   vars:
@@ -195,7 +230,7 @@
   tags: ['copy_results']
   ansible.builtin.fetch:
     src: "{{ item.path }}"
-    dest: "{{ ltp_results_dir }}/{{ ltp_test_group }}/"
+    dest: "{{ ltp_results_full_path }}/last-run/{{ last_kernel }}/{{ ltp_test_group }}/"
     flat: true
     validate_checksum: false
   with_items: "{{ results_files.files }}"
@@ -217,7 +252,7 @@
   tags: ['copy_results']
   ansible.builtin.fetch:
     src: "{{ item.path }}"
-    dest: "{{ ltp_results_dir }}/{{ ltp_test_group }}/"
+    dest: "{{ ltp_results_full_path }}/last-run/{{ last_kernel }}/{{ ltp_test_group }}/"
     flat: true
     validate_checksum: false
   with_items: "{{ output_files.files }}"
@@ -225,3 +260,20 @@
     - output_files.matched > 0
   loop_control:
     label: "Copying {{ item.path | basename }} ..."
+
+- name: Verify last-run kernel directory exists
+  tags: [ 'copy_results' ]
+  delegate_to: localhost
+  stat:
+    path: "{{ ltp_results_full_path }}/last-run/{{ last_kernel }}"
+  register: last_run_kernel_dir
+
+- name: Copy over the last-run into the results directory for archiving into kdevops
+  copy:
+    src: "{{ ltp_results_full_path }}/last-run/{{ last_kernel }}"
+    dest: "{{ ltp_results_full_path }}/"
+  run_once: true
+  tags: [ 'copy_results' ]
+  delegate_to: localhost
+  when:
+    - last_run_kernel_dir.stat.exists
Signature · 1 line
2.48.1
#5 lore raw

PATCH v2 5/9 fstests: add makefile target to show test results

In reply to Scott Mayhew

Add 'fstests-show-results' makefile target to show test results.

Under the hood, it more or less just does 'find ... | xargs cat'.

By default, the xunit_result.txt file 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.13.4-300.fc41.x86_64 make fstests-show-results

You can change the files being shown by overriding the PATTERN variable. For example, to just see the xml output files:

$ PATTERN="-name \"*.xml\"" make fstests-show-results

or to see the xunit_results.txt and the bad results:

$ PATTERN="\( -name xunit_results.txt -o -name \"*.bad\" \)" make fstests-show-results

or you can do any combination thereof, e.g.

$ LAST_KERNEL=6.13.4-300.fc41.x86_64 PATTERN="-name \"*.bad\"" make fstests-show-results

Finally, note that if you override the PATTERN variable, then the output will also include the filename... otherwise it the output will not include the filename. The reason I did it this way for this workflow specifically is so that Luis can use 'make fstests-show-results' in his github workflow and he should get exactly the same output as he does today.

---
 workflows/fstests/Makefile | 27 +++++++++++++++++++++++++++
 1 file changed, 27 insertions(+)
workflows/fstests/Makefile +27 -0
index 344a1f8..40629fd 100644
@@ -115,6 +115,28 @@ ifneq (,$(COUNT))
 FSTESTS_DYNAMIC_RUNTIME_VARS += , "oscheck_extra_args": "-I $(COUNT)"
 endif
 
+ifndef LAST_KERNEL
+LAST_KERNEL := $(shell cat workflows/fstests/results/last-kernel.txt 2>/dev/null)
+endif
+
+ifeq ($(LAST_KERNEL), $(shell cat workflows/fstests/results/last-kernel.txt 2>/dev/null))
+FIND_PATH := workflows/fstests/results/last-run
+else
+FIND_PATH := workflows/fstests/results/$(LAST_KERNEL)
+endif
+
+ifndef PATTERN
+PATTERN := -name xunit_results.txt
+endif
+
+ifndef XARGS_ARGS
+ifeq (-name xunit_results.txt,$(PATTERN))
+XARGS_ARGS := cat
+else
+XARGS_ARGS := -I {} bash -c 'echo "{}:"; cat {}; echo;'
+endif
+endif
+
 fstests: $(FSTESTS_BASELINE_EXTRA)
 	$(Q)ansible-playbook $(ANSIBLE_VERBOSE) -l localhost,baseline,dev \
 		-f 30 -i hosts playbooks/fstests.yml --skip-tags run_tests,copy_results $(LIMIT_HOSTS)
@@ -218,6 +240,11 @@ fstests-dev-results: $(KDEVOPS_EXTRA_VARS)
 		--extra-vars=@./extra_vars.yaml \
 		$(LIMIT_HOSTS)
 
+fstests-show-results:
+	@find $(FIND_PATH) -type f $(PATTERN) \
+		| xargs $(XARGS_ARGS) \
+		| sed '$${/^$$/d;}'
+
 fstests-help-menu:
 	@echo "fstests options:"
 	@echo "fstests                                 - Git clones fstests, builds and install it"
Signature · 1 line
2.48.1
Reviewed-by on v2 5/9
#6 lore raw

Re: [PATCH v2 5/9] fstests: add makefile target to show test results

Quoted 21 lines · Scott Mayhew

Add 'fstests-show-results' makefile target to show test results.

Under the hood, it more or less just does 'find ... | xargs cat'.

By default, the xunit_result.txt file 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.13.4-300.fc41.x86_64 make fstests-show-results

You can change the files being shown by overriding the PATTERN variable. For example, to just see the xml output files:

$ PATTERN="-name \"*.xml\"" make fstests-show-results

or to see the xunit_results.txt and the bad results:

$ PATTERN="\( -name xunit_results.txt -o -name \"*.bad\" \)" make fstests-show-results

or you can do any combination thereof, e.g.

$ LAST_KERNEL=6.13.4-300.fc41.x86_64 PATTERN="-name \"*.bad\"" make fstests-show-results
Quoted 8 lines

Finally, note that if you override the PATTERN variable, then the output will also include the filename... otherwise it the output will not include the filename. The reason I did it this way for this workflow specifically is so that Luis can use 'make fstests-show-results' in his github workflow and he should get exactly the same output as he does today.

Luis

#7 lore raw

PATCH v2 6/9 pynfs: add makefile target to show test results

In reply to Scott Mayhew

Add 'pynfs-show-results' makefile target to show test results.

Under the hood, it more or less just does 'find ... | xargs cat'.

It shows the json results files for the most recent kernel run. You can show the results for a differnt kernel by overriding the LAST_KERNEL variable, e.g.

$ LAST_KERNEL=6.13.4-300.fc41.x86_64 make pynfs-show-results
---
 workflows/pynfs/Makefile | 23 +++++++++++++++++++++++
 1 file changed, 23 insertions(+)
workflows/pynfs/Makefile +23 -0
index 75a4b6a..c69b804 100644
@@ -24,6 +24,24 @@ PYNFS_KERNEL_CI_LOOP      := scripts/workflows/pynfs/run_kernel_ci.sh
 PYNFS_KERNEL_CI_LOOP_KOTD := scripts/workflows/pynfs/run_kernel_ci_kotd.sh
 endif # CONFIG_KERNEL_CI
 
+ifndef LAST_KERNEL
+LAST_KERNEL := $(shell cat workflows/pynfs/results/last-kernel.txt 2>/dev/null)
+endif
+
+ifeq ($(LAST_KERNEL), $(shell cat workflows/pynfs/results/last-kernel.txt 2>/dev/null))
+FIND_PATH := workflows/pynfs/results/last-run
+else
+FIND_PATH := workflows/pynfs/results/$(LAST_KERNEL)
+endif
+
+ifndef PATTERN
+PATTERN := -name "*.json"
+endif
+
+ifndef XARGS_ARGS
+XARGS_ARGS := -I {} bash -c 'echo "{}:"; cat {}; echo;'
+endif
+
 # Makefile for pynfs targets
 pynfs:
 	$(Q)ansible-playbook $(ANSIBLE_VERBOSE) -l baseline,dev \
@@ -63,6 +81,11 @@ pynfs-dev-reset:
 	$(Q)ansible-playbook $(ANSIBLE_VERBOSE) \
 		-f 30 -i hosts -l dev playbooks/pynfs.yml --tags vars,reset --extra-vars=@./extra_vars.yaml
 
+pynfs-show-results:
+	@find $(FIND_PATH) -type f $(PATTERN) \
+		| xargs $(XARGS_ARGS) \
+		| sed '$${/^$$/d;}'
+
 pynfs-help-menu:
 	@echo "pynfs options:"
 	@echo "pynfs                             - Git clone pynfs, build and install it"
Signature · 1 line
2.48.1
#8 lore raw

PATCH v2 7/9 nfstest: add makefile target to show test results

In reply to Scott Mayhew

Under the hood, it more or less just does 'find ... | xargs cat'.

It shows the text results files 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.13.4-300.fc41.x86_64 make nfstest-show-results

Note that since the nfstest 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 change that by overriding the PATTERN variable).

---
 workflows/nfstest/Makefile | 23 +++++++++++++++++++++++
 1 file changed, 23 insertions(+)
workflows/nfstest/Makefile +23 -0
index 638ec1f..7cac039 100644
@@ -53,6 +53,24 @@ NFSTEST_KERNEL_CI_LOOP      := scripts/workflows/nfstest/run_kernel_ci.sh
 NFSTEST_KERNEL_CI_LOOP_KOTD := scripts/workflows/nfstest/run_kernel_ci_kotd.sh
 endif # CONFIG_KERNEL_CI
 
+ifndef LAST_KERNEL
+LAST_KERNEL := $(shell cat workflows/nfstest/results/last-kernel.txt 2>/dev/null)
+endif
+
+ifeq ($(LAST_KERNEL), $(shell cat workflows/nfstest/results/last-kernel.txt 2>/dev/null))
+FIND_PATH := workflows/nfstest/results/last-run
+else
+FIND_PATH := workflows/nfstest/results/$(LAST_KERNEL)
+endif
+
+ifndef PATTERN
+PATTERN := -name "*.log"
+endif
+
+ifndef XARGS_ARGS
+XARGS_ARGS := -I {} bash -c 'echo "{}:"; cat {}; echo;'
+endif
+
 nfstest:
 	$(Q)ansible-playbook $(ANSIBLE_VERBOSE) -l baseline,dev \
 		-f 30 -i hosts playbooks/nfstest.yml \
@@ -88,6 +106,11 @@ nfstest-dev-reset:
 		--tags vars,reset \
 		--extra-vars=@./extra_vars.yaml
 
+nfstest-show-results:
+	@find $(FIND_PATH) -type f $(PATTERN) \
+		| xargs $(XARGS_ARGS) \
+		| sed '$${/^$$/d;}'
+
 nfstest-help-menu:
 	@echo "nfstest options:"
 	@echo "nfstest                              - Git clone nfstest and install it"
Signature · 1 line
2.48.1
#9 lore raw

PATCH v2 8/9 gitr: add makefile target to show test results

In reply to Scott Mayhew

Under the hood, it more or less just does 'find ... | xargs cat'.

By default, the summary 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.13.4-100.fc40.x86_64 make gitr-show-results

You can change the files being shown by overriding the PATTERN variable. For example, to just see the rpc and xprt statisics:

$ PATTERN="\( -name \"*.rpc\" -o -name \"*.xprt\" \)" make gitr-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 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).

---
 workflows/gitr/Makefile | 23 +++++++++++++++++++++++
 1 file changed, 23 insertions(+)
workflows/gitr/Makefile +23 -0
index 5432f42..59c6dd5 100644
@@ -70,6 +70,24 @@ GITR_KERNEL_CI_LOOP      := scripts/workflows/gitr/run_kernel_ci.sh
 GITR_KERNEL_CI_LOOP_KOTD := scripts/workflows/gitr/run_kernel_ci_kotd.sh
 endif # CONFIG_KERNEL_CI
 
+ifndef LAST_KERNEL
+LAST_KERNEL := $(shell cat workflows/gitr/results/last-kernel.txt 2>/dev/null)
+endif
+
+ifeq ($(LAST_KERNEL), $(shell cat workflows/gitr/results/last-kernel.txt 2>/dev/null))
+FIND_PATH := workflows/gitr/results/last-run
+else
+FIND_PATH := workflows/gitr/results/$(LAST_KERNEL)
+endif
+
+ifndef PATTERN
+PATTERN := -name "*.summary"
+endif
+
+ifndef XARGS_ARGS
+XARGS_ARGS := -I {} bash -c 'echo "{}:"; cat {}; echo;'
+endif
+
 gitr:
 	$(Q)ansible-playbook $(ANSIBLE_VERBOSE) -l baseline,dev \
 		-f 30 -i hosts playbooks/gitr.yml \
@@ -103,6 +121,11 @@ gitr-dev-reset:
 	$(Q)ansible-playbook $(ANSIBLE_VERBOSE) \
 		-f 30 -i hosts -l dev playbooks/gitr.yml --tags vars,reset --extra-vars=@./extra_vars.yaml
 
+gitr-show-results:
+	@find $(FIND_PATH) -type f $(PATTERN) \
+		| xargs $(XARGS_ARGS) \
+		| sed '$${/^$$/d;}'
+
 gitr-help-menu:
 	@echo "gitr options:"
 	@echo "gitr                              - Git clone git, build and install it"
Signature · 1 line
2.48.1
#10 lore raw

PATCH v2 9/9 ltp: add makefile target to show test results

In reply to Scott Mayhew

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).

---
 workflows/ltp/Makefile | 23 +++++++++++++++++++++++
 1 file changed, 23 insertions(+)
workflows/ltp/Makefile +23 -0
index 4e439da..e946be7 100644
@@ -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"
Signature · 1 line
2.48.1