From 62ed583fbb0253f239bf6cc7d08ef0c4f1995b17 Mon Sep 17 00:00:00 2001 From: Jim Garlick Date: Thu, 6 Dec 2018 07:33:58 -0800 Subject: [PATCH 1/7] AUTHORS: add Phil Regier --- AUTHORS | 1 + 1 file changed, 1 insertion(+) diff --git a/AUTHORS b/AUTHORS index a34b11f..5afba4f 100644 --- a/AUTHORS +++ b/AUTHORS @@ -5,3 +5,4 @@ Mark Grondona Tim Randles Jim Silva Cameron Harr +Phil Regier From a47b68632bf200e84eb7a422472b4b80bd4bda2a Mon Sep 17 00:00:00 2001 From: Jim Garlick Date: Thu, 6 Dec 2018 07:34:34 -0800 Subject: [PATCH 2/7] README.md: fix markdown formatting error Problem: TAP link renders incorrectly due to extra word in link portion. Remove extra word. --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 338f386..d423fcf 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ Nodediag provides an extensible -[TAP](http://testanything.org/wiki/index.php/Main_Page TAP) +[TAP](http://testanything.org/wiki/index.php/Main_Page) framework for executing node diagnostic checks at system startup. Tests installed in `/etc/nodediag.d/` are run in parallel by the `nodediag` From 05d8626de4969b492fde073b3b59ee4df57f5c25 Mon Sep 17 00:00:00 2001 From: Jim Garlick Date: Thu, 6 Dec 2018 07:38:39 -0800 Subject: [PATCH 3/7] scripts/mkdist: add script for creating dist tarball --- scripts/mkdist | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100755 scripts/mkdist diff --git a/scripts/mkdist b/scripts/mkdist new file mode 100755 index 0000000..51d0e3d --- /dev/null +++ b/scripts/mkdist @@ -0,0 +1,15 @@ +#!/bin/sh + +if test $# -gt 1; then + echo "Usage: mkdist [git-tag]" >&2 + exit 1 +fi +VERSION=$1 +if test -z "$VERSION"; then + VERSION=$(git describe --always | awk '/.*/ {printf "%s",$1; exit}') +fi + +echo "Creating ${VERSION}.tar.gz" + +git archive --format=tar --prefix=nodediag-${VERSION}/ ${VERSION} \ + | gzip >nodediag-${VERSION}.tar.gz From 8f6a3e85935d649b70377bba353f9de4fcfdb4f0 Mon Sep 17 00:00:00 2001 From: Jim Garlick Date: Thu, 6 Dec 2018 08:21:43 -0800 Subject: [PATCH 4/7] Makefile: add top level Makefile Problem: it's not obvious how to make a dist tarball or run regression tests. Add a top level Makefile wtih the following targets: dist - run scripts/mkdist check - run scripts/runtests Relocate test/tconfig to scripts/runtests. Drop test/Makefile. --- Makefile | 11 +++++++++++ test/tconfig => scripts/runtests | 5 +++++ test/Makefile | 2 -- 3 files changed, 16 insertions(+), 2 deletions(-) create mode 100644 Makefile rename test/tconfig => scripts/runtests (90%) delete mode 100644 test/Makefile diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..b651801 --- /dev/null +++ b/Makefile @@ -0,0 +1,11 @@ +all: + @echo Nothing to do + +clean: + rm -f nodediag-*.tar.gz + +dist: + @scripts/mkdist + +check: + cd test && ../scripts/runtests diff --git a/test/tconfig b/scripts/runtests similarity index 90% rename from test/tconfig rename to scripts/runtests index a9ff1db..1eb68c5 100755 --- a/test/tconfig +++ b/scripts/runtests @@ -1,5 +1,10 @@ #!/bin/bash +if ! test -d ../diags; then + echo Must be run within test directory >&2 + exit 1 +fi + export NODEDIAGDIR=../diags for file in */dmidecode; do diff --git a/test/Makefile b/test/Makefile deleted file mode 100644 index 6ffe673..0000000 --- a/test/Makefile +++ /dev/null @@ -1,2 +0,0 @@ -check: - ./tconfig From fa742524699683dc10dd1bc52bc6ee0069ca6b49 Mon Sep 17 00:00:00 2001 From: Jim Garlick Date: Thu, 6 Dec 2018 08:42:09 -0800 Subject: [PATCH 5/7] scripts/runtests: limit output, exit 1 on failure Problem: runtests script doesn't fail if any tests fail, which allows "make check" to succeed with failing tests. Simplify the tests to - count the number of errors and exit if > 0 - expect only one dmi.conf, pci.conf per platform - don't validate *.conf against -c generated version - limit output to only the failing ("not ok") lines --- scripts/runtests | 41 +++++++++++++++++------------------------ 1 file changed, 17 insertions(+), 24 deletions(-) diff --git a/scripts/runtests b/scripts/runtests index 1eb68c5..fab9631 100755 --- a/scripts/runtests +++ b/scripts/runtests @@ -7,36 +7,29 @@ fi export NODEDIAGDIR=../diags +fail_count=0 + for file in */dmidecode; do + platform=$(basename $(dirname $file)) + echo $platform: running dmi.t on cached config and dmidecode dump file export DMIDECODE_DUMP_FILE=$file - for cfg in $(dirname $file)/dmi*.conf; do - export NODEDIAGCONF=$cfg - $NODEDIAGDIR/dmi.t - done - unset NODEDIAGCONF - tmpfile=$(mktemp) || exit 1 - $NODEDIAGDIR/dmi.t -c >$tmpfile - if diff -q $(dirname $file)/dmi.conf $tmpfile; then - echo $(dirname $file): config file OK - else - echo $(dirname $file): config file FAIL + export NODEDIAGCONF=$(dirname $file)/dmi.conf + if $NODEDIAGDIR/dmi.t | grep 'not ok'; then + fail_count=$(($fail_count+1)) fi - rm -f $tmpfile + unset NODEDIAGCONF done for file in */lspci; do + platform=$(basename $(dirname $file)) + echo $platform: running pci.t on cached config and lspci dump file export LSPCI_DUMP_FILE=$file - for cfg in $(dirname $file)/pci*.conf; do - export NODEDIAGCONF=$cfg - $NODEDIAGDIR/pci.t - done - unset NODEDIAGCONF - tmpfile=$(mktemp) || exit 1 - $NODEDIAGDIR/pci.t -c >$tmpfile - if diff -q $(dirname $file)/pci.conf $tmpfile; then - echo $(dirname $file): config file OK - else - echo $(dirname $file): config file FAIL + export NODEDIAGCONF=$(dirname $file)/pci*.conf + if $NODEDIAGDIR/pci.t | grep 'not ok'; then + fail_count=$(($fail_count+1)) fi - rm -f $tmpfile + unset NODEDIAGCONF done + +echo Failed $fail_count tests >&2 +test $fail_count -eq 0 || exit 1 From 5e7da98bfe79767741f987bfd3ef5841f3e78d64 Mon Sep 17 00:00:00 2001 From: Jim Garlick Date: Thu, 6 Dec 2018 10:06:37 -0800 Subject: [PATCH 6/7] test/T5500: update Broadcom vendor name Problem: T5500 lspci test fails with not ok 7 - pci: 06:00.0 name Broadcom Limited NetXtreme BCM5761 Gigabit Ethernet PCIe (rev 10), expected Broadcom Corporation NetXtreme BCM5761 Gigabit Ethernet PCIe (rev 10) Update pci.conf to reflect new vendor name. --- test/T5500/pci.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/T5500/pci.conf b/test/T5500/pci.conf index 65888cd..2c89fb4 100644 --- a/test/T5500/pci.conf +++ b/test/T5500/pci.conf @@ -10,7 +10,7 @@ DIAG_PCI_SPEED[1]="2.5GT/s" DIAG_PCI_WIDTH[1]="x16" # DIAG_PCI_SLOT[2]="06:00.0" -DIAG_PCI_NAME[2]="Broadcom Corporation NetXtreme BCM5761 Gigabit Ethernet PCIe (rev 10)" +DIAG_PCI_NAME[2]="Broadcom Limited NetXtreme BCM5761 Gigabit Ethernet PCIe (rev 10)" DIAG_PCI_SPEED[2]="2.5GT/s" DIAG_PCI_WIDTH[2]="x1" # From 9d77d4d3132fa81e39ea5d04d3dd0ed76988149b Mon Sep 17 00:00:00 2001 From: Jim Garlick Date: Thu, 6 Dec 2018 07:35:01 -0800 Subject: [PATCH 7/7] NEWS: prep for 1.2.23 release Update NEWS file for 1.2.23 release. Drop deprecated META file and put version directly in spec file. --- META | 7 ------- NEWS | 13 +++++++++++++ nodediag.spec | 6 +++--- 3 files changed, 16 insertions(+), 10 deletions(-) delete mode 100644 META diff --git a/META b/META deleted file mode 100644 index 9361ed2..0000000 --- a/META +++ /dev/null @@ -1,7 +0,0 @@ -## -# Metadata for RPM/TAR makefile targets -## - Meta: 1 - Name: nodediag - Version: 1.2.22 - Release: 1 diff --git a/NEWS b/NEWS index 14dd61b..f2eb1f9 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,16 @@ +========================================================================= +Release Notes for nodediag version 1.2.23 06 Dec 2018 +========================================================================= + +* Allow alternate interface dev name to be specified for network.t test + (Phil Regier) + +* Add 'make dist' and 'make check' targets. + +* Ensure failing tests result in nonzero exit code. + +* Update Dell T5500 PCI vendor name for Broadcom. + ========================================================================= Release Notes for nodediag version 1.2.22 30 May 2018 ========================================================================= diff --git a/nodediag.spec b/nodediag.spec index ea33373..bfec54c 100644 --- a/nodediag.spec +++ b/nodediag.spec @@ -1,7 +1,7 @@ Name: nodediag -Version: -Release: -Source: +Version: 1.2.23 +Release: 1 +Source: %{name}-%{version}.tar.gz License: GPL Summary: Tests to verify hardware Group: Applications/Devel