From 47bb3747f6ef3b8aa688238cbfb5aa3e440c6292 Mon Sep 17 00:00:00 2001 From: Sebastien GODARD Date: Sun, 13 Oct 2019 12:03:45 +0200 Subject: [PATCH] simtest: Add new tests to check sadf XML header validity Signed-off-by: Sebastien GODARD --- tests/00305 | 4 ++++ tests/00405 | 5 +++++ tests/00415 | 5 +++++ tests/TLIST | 3 +++ 4 files changed, 17 insertions(+) create mode 100644 tests/00305 create mode 100644 tests/00405 create mode 100644 tests/00415 diff --git a/tests/00305 b/tests/00305 new file mode 100644 index 0000000..0bbb9ac --- /dev/null +++ b/tests/00305 @@ -0,0 +1,4 @@ +. tests/variables +if [ ! -z "$VER_JSON" ]; then + ./sadf -Hj tests/data.tmp -C | $VER_JSON >/dev/null; +fi diff --git a/tests/00405 b/tests/00405 new file mode 100644 index 0000000..f4e3e40 --- /dev/null +++ b/tests/00405 @@ -0,0 +1,5 @@ +. tests/variables +if [ ! -z "$VER_XML" ]; then + export LC_ALL=C + ./sadf -Hx tests/data.tmp -C | $VER_XML --schema xml/sysstat.xsd - >/dev/null; +fi diff --git a/tests/00415 b/tests/00415 new file mode 100644 index 0000000..49dbbec --- /dev/null +++ b/tests/00415 @@ -0,0 +1,5 @@ +. tests/variables +if [ ! -z "$VER_XML" ]; then + export LC_ALL=C + ./sadf -Hx tests/data.tmp -C | $VER_XML --dtdvalid xml/sysstat-*.dtd - >/dev/null; +fi diff --git a/tests/TLIST b/tests/TLIST index 1a6a4fc..b79ddfa 100644 --- a/tests/TLIST +++ b/tests/TLIST @@ -45,6 +45,7 @@ NOTES: ===== Checking JSON output validity 00300 ./sadf -j tests/data.tmp -C -- -A | $VER_JSON >/dev/null && ./sadf -j tests/data.tmp | $VER_JSON >/dev/null && ./sadf -t -j tests/data.tmp | $VER_JSON >/dev/null +00305 ./sadf -Hj tests/data.tmp -C | $VER_JSON >/dev/null 00310 ./mpstat -A -o JSON | $VER_JSON >/dev/null 00320 ./iostat -t -p ALL -o JSON | $VER_JSON >/dev/null 00330 ./mpstat -o JSON 1 10 | $VER_JSON >/dev/null @@ -60,7 +61,9 @@ NOTES: ===== Checking XML output validity 00400 export LC_ALL=C ; ./sadf -x tests/data.tmp -C -- -A | $VER_XML --schema xml/sysstat.xsd - >/dev/null && ./sadf -x tests/data.tmp | $VER_XML --schema xml/sysstat.xsd - >/dev/null && ./sadf -T -x tests/data.tmp | $VER_XML --schema xml/sysstat.xsd - >/dev/null +00405 export LC_ALL=C ; ./sadf -Hx tests/data.tmp -C | $VER_XML --schema xml/sysstat.xsd - >/dev/null 00410 export LC_ALL=C ; ./sadf -x tests/data.tmp -C -- -A | $VER_XML --dtdvalid xml/sysstat-*.dtd - >/dev/null && ./sadf -x tests/data.tmp | $VER_XML --dtdvalid xml/sysstat-*.dtd - >/dev/null && ./sadf -t -x tests/data.tmp | $VER_XML --dtdvalid xml/sysstat-*.dtd - >/dev/null +00415 export LC_ALL=C ; ./sadf -Hx tests/data.tmp -C | $VER_XML --dtdvalid xml/sysstat-*.dtd - >/dev/null ===== Checking sadf output 00500 LC_ALL=C ./sadf -p tests/data.tmp -C -- -A > tests/out.sadf-p.tmp -- 2.40.0