From 3249d23130e24479262711133ad439a8261bb5ce Mon Sep 17 00:00:00 2001 From: Tomasz Gromadzki Date: Wed, 17 May 2023 15:32:01 +0200 Subject: [PATCH 1/4] test: print out build system version Signed-off-by: Tomasz Gromadzki --- .github/workflows/gha.yml | 3 ++ .github/workflows/nightly.yml | 3 ++ utils/docker/get-system-info.sh | 47 ++++++++++++++++++++++++++++ utils/gha-runners/get-system-info.sh | 4 +++ 4 files changed, 57 insertions(+) create mode 100755 utils/docker/get-system-info.sh diff --git a/.github/workflows/gha.yml b/.github/workflows/gha.yml index 0eb1d748ded..d23684130dc 100644 --- a/.github/workflows/gha.yml +++ b/.github/workflows/gha.yml @@ -40,6 +40,9 @@ jobs: with: fetch-depth: 50 + - name: Get system information + run: ./$WORKDIR/get-system-info.sh + - name: Pull or rebuild the image run: cd $WORKDIR && ${{ matrix.CONFIG }} ./pull-or-rebuild-image.sh diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index c6ee3369a38..42205d5bd9c 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -50,6 +50,9 @@ jobs: with: fetch-depth: 50 + - name: Get system information + run: ./$WORKDIR/get-system-info.sh + - name: Pull or rebuild the image run: cd $WORKDIR && ${{ matrix.CONFIG }} ./pull-or-rebuild-image.sh rebuild diff --git a/utils/docker/get-system-info.sh b/utils/docker/get-system-info.sh new file mode 100755 index 00000000000..01bdad34e91 --- /dev/null +++ b/utils/docker/get-system-info.sh @@ -0,0 +1,47 @@ +#!/usr/bin/env bash +# SPDX-License-Identifier: BSD-3-Clause +# Copyright 2023, Intel Corporation + +# +# get-system-info.sh - Script for printing system info +# + +function system_info { + echo "********** system_info **********" + cat /etc/os-release | grep -oP "PRETTY_NAME=\K.*" + uname -r + echo "libndctl: $(pkg-config --modversion libndctl || echo 'libndctl not found')" + echo "valgrind: $(pkg-config --modversion valgrind || echo 'valgrind not found')" + echo "*************** installed-packages ***************" + # Instructions below will return some minor errors, as they are dependent on the Linux distribution. + zypper se --installed-only 2>/dev/null || true + apt list --installed 2>/dev/null || true + yum list installed 2>/dev/null || true + echo "**********/proc/cmdline**********" + cat /proc/cmdline + echo "**********/proc/modules**********" + cat /proc/modules + echo "**********/proc/cpuinfo**********" + cat /proc/cpuinfo + echo "**********/proc/meminfo**********" + cat /proc/meminfo + echo "**********/proc/swaps**********" + cat /proc/swaps + echo "**********/proc/version**********" + cat /proc/version + echo "**********check-updates**********" + # Instructions below will return some minor errors, as they are dependent on the Linux distribution. + zypper list-updates 2>/dev/null || true + apt-get update 2>/dev/null || true + apt upgrade --dry-run 2>/dev/null || true + dnf check-update 2>/dev/null || true + echo "**********list-enviroment**********" + env + echo "******list-build-system-versions*******" + gcc --version + clang --version + make --version +} + +# Call the function above to print system info. +system_info diff --git a/utils/gha-runners/get-system-info.sh b/utils/gha-runners/get-system-info.sh index ad061d1ce08..185d89c1c9f 100755 --- a/utils/gha-runners/get-system-info.sh +++ b/utils/gha-runners/get-system-info.sh @@ -51,6 +51,10 @@ function system_info { ls -la /sys/bus/nd/devices/ndbus*/region*/pfn*/resource ls -la /sys/bus/nd/devices/ndbus*/region*/namespace*/resource ls -la /sys/bus/nd/devices/region*/deep_flush + echo "******list-build-system-versions*******" + gcc --version + clang --version + make --version } # Call the function above to print system info. From 252b4f1a9a1bf844a869c0707f87987a91b6f87d Mon Sep 17 00:00:00 2001 From: Tomasz Gromadzki Date: Wed, 17 May 2023 23:17:22 +0200 Subject: [PATCH 2/4] common: avoid error message when tools are not available --- utils/docker/get-system-info.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/utils/docker/get-system-info.sh b/utils/docker/get-system-info.sh index 01bdad34e91..648a98f7081 100755 --- a/utils/docker/get-system-info.sh +++ b/utils/docker/get-system-info.sh @@ -38,9 +38,9 @@ function system_info { echo "**********list-enviroment**********" env echo "******list-build-system-versions*******" - gcc --version - clang --version - make --version + gcc --version 2>/dev/null || true + clang --version 2>/dev/null || true + make --version2>/dev/null || true } # Call the function above to print system info. From 3aca5be0ac8ce74a81785e42657b6c51c8825293 Mon Sep 17 00:00:00 2001 From: Tomasz Gromadzki Date: Wed, 17 May 2023 23:22:37 +0200 Subject: [PATCH 3/4] common: avoid error message when tools are not available --- utils/docker/get-system-info.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utils/docker/get-system-info.sh b/utils/docker/get-system-info.sh index 648a98f7081..dde7230d213 100755 --- a/utils/docker/get-system-info.sh +++ b/utils/docker/get-system-info.sh @@ -40,7 +40,7 @@ function system_info { echo "******list-build-system-versions*******" gcc --version 2>/dev/null || true clang --version 2>/dev/null || true - make --version2>/dev/null || true + make --version 2>/dev/null || true } # Call the function above to print system info. From 4f29fd87438540714b78781e9b35d4ce38db5104 Mon Sep 17 00:00:00 2001 From: Tomasz Gromadzki Date: Wed, 17 May 2023 23:46:40 +0200 Subject: [PATCH 4/4] common: avoid error message when tools are not available --- utils/gha-runners/get-system-info.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/utils/gha-runners/get-system-info.sh b/utils/gha-runners/get-system-info.sh index 185d89c1c9f..9a41e1c6427 100755 --- a/utils/gha-runners/get-system-info.sh +++ b/utils/gha-runners/get-system-info.sh @@ -52,9 +52,9 @@ function system_info { ls -la /sys/bus/nd/devices/ndbus*/region*/namespace*/resource ls -la /sys/bus/nd/devices/region*/deep_flush echo "******list-build-system-versions*******" - gcc --version - clang --version - make --version + gcc --version 2>/dev/null || true + clang --version 2>/dev/null || true + make --version 2>/dev/null || true } # Call the function above to print system info.