All of lore.kernel.org
 help / color / mirror / Atom feed
* [igt-dev] [PATCH i-g-t 00/11] runner: Don't report subtests that have dynamic subtests
@ 2019-12-02 13:00 Petri Latvala
  2019-12-02 13:00 ` [igt-dev] [PATCH i-g-t 01/11] runner/resultgen: Extract igt-version field handling to a helper Petri Latvala
                   ` (12 more replies)
  0 siblings, 13 replies; 17+ messages in thread
From: Petri Latvala @ 2019-12-02 13:00 UTC (permalink / raw)
  To: igt-dev; +Cc: Petri Latvala

A feature requested by Martin before full-on conversion to the use of
dynamic subtests can begin from cibuglog's perspective.

If we have dynamic subtests to report, don't also report the subtest
that contains them.

For example, if we have test "some-test" with subtest "some-subtest"
with dynamic subtests "foo" and "bar", we only report
igt@some-test@some-subtest@foo and igt@some-test@some-subtest@bar,
avoiding igt@some-test@some-subtest altogether.

Parsing dynamic subtests has been changed so that the first dynamic
subtest includes all output from the beginning of the subtest so we
get the setup messages *somewhere*. Same for the last dynamic subtest,
we include all output to the end of the subtest output.

Note that this only changes what gets into results.json; Running the
test yourself still gives you all the output.


Petri Latvala (11):
  runner/resultgen: Extract igt-version field handling to a helper
  runner/resultgen: Extract finding begin/end lines for a subtest to a
    helper
  runner/resultgen: Extract finding begin/end pointers for test output
    to helpers
  runner/resultgen: Hoist handling of dynamic subtest output to a helper
  runner/resultgen: Extrude dynamic subtest result texts
  runner/resultgen: Add support for extra validation hook in
    find_matches()
  runner/resultgen: Make subtest result line finding more robust
  runner/json_tests: Adapt to dynamic subtest result parsing
  runner/resultgen: Don't report subtest result if it has dynamic
    subtests
  runner/json_tests: Adapt to no longer reporting subtests with dynamic
    subtests
  runner/json_tests: Add test for parsing dynamic subtests with same
    name

 .../0/dmesg.txt                               |  10 +
 .../0/err.txt                                 |  10 +
 .../0/journal.txt                             |   3 +
 .../0/out.txt                                 |  11 +
 .../README.txt                                |   2 +
 .../endtime.txt                               |   1 +
 .../joblist.txt                               |   1 +
 .../metadata.txt                              |  12 +
 .../reference.json                            |  84 +++
 .../starttime.txt                             |   1 +
 .../uname.txt                                 |   1 +
 .../dynamic-subtests/reference.json           |  70 +--
 runner/resultgen.c                            | 528 +++++++++++-------
 runner/runner_json_tests.c                    |   1 +
 14 files changed, 475 insertions(+), 260 deletions(-)
 create mode 100644 runner/json_tests_data/dynamic-subtest-name-in-multiple-subtests/0/dmesg.txt
 create mode 100644 runner/json_tests_data/dynamic-subtest-name-in-multiple-subtests/0/err.txt
 create mode 100644 runner/json_tests_data/dynamic-subtest-name-in-multiple-subtests/0/journal.txt
 create mode 100644 runner/json_tests_data/dynamic-subtest-name-in-multiple-subtests/0/out.txt
 create mode 100644 runner/json_tests_data/dynamic-subtest-name-in-multiple-subtests/README.txt
 create mode 100644 runner/json_tests_data/dynamic-subtest-name-in-multiple-subtests/endtime.txt
 create mode 100644 runner/json_tests_data/dynamic-subtest-name-in-multiple-subtests/joblist.txt
 create mode 100644 runner/json_tests_data/dynamic-subtest-name-in-multiple-subtests/metadata.txt
 create mode 100644 runner/json_tests_data/dynamic-subtest-name-in-multiple-subtests/reference.json
 create mode 100644 runner/json_tests_data/dynamic-subtest-name-in-multiple-subtests/starttime.txt
 create mode 100644 runner/json_tests_data/dynamic-subtest-name-in-multiple-subtests/uname.txt

-- 
2.19.1

_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

^ permalink raw reply	[flat|nested] 17+ messages in thread
* [igt-dev] [PATCH i-g-t 01/11] runner/resultgen: Extract igt-version field handling to a helper
@ 2019-12-17  9:47 Petri Latvala
  2019-12-17  9:47 ` [igt-dev] [PATCH i-g-t 07/11] runner/resultgen: Make subtest result line finding more robust Petri Latvala
  0 siblings, 1 reply; 17+ messages in thread
From: Petri Latvala @ 2019-12-17  9:47 UTC (permalink / raw)
  To: igt-dev; +Cc: Petri Latvala

Signed-off-by: Petri Latvala <petri.latvala@intel.com>
Reviewed-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
---
 runner/resultgen.c | 27 ++++++++++++++-------------
 1 file changed, 14 insertions(+), 13 deletions(-)

diff --git a/runner/resultgen.c b/runner/resultgen.c
index aa438000..31bc0bb1 100644
--- a/runner/resultgen.c
+++ b/runner/resultgen.c
@@ -365,6 +365,17 @@ static void free_matches(struct matches *matches)
 	free(matches->items);
 }
 
+static void add_igt_version(struct json_object *testobj,
+			    const char *igt_version,
+			    size_t igt_version_len)
+{
+	if (igt_version)
+		json_object_object_add(testobj, "igt-version",
+				       json_object_new_string_len(igt_version,
+								  igt_version_len));
+
+}
+
 static bool fill_from_output(int fd, const char *binary, const char *key,
 			     struct subtest_list *subtests,
 			     struct json_object *tests)
@@ -420,10 +431,7 @@ static bool fill_from_output(int fd, const char *binary, const char *key,
 
 		json_object_object_add(current_test, key,
 				       json_object_new_string_len(buf, statbuf.st_size));
-		if (igt_version)
-			json_object_object_add(current_test, "igt-version",
-					       json_object_new_string_len(igt_version,
-									  igt_version_len));
+		add_igt_version(current_test, igt_version, igt_version_len);
 
 		return true;
 	}
@@ -522,11 +530,7 @@ static bool fill_from_output(int fd, const char *binary, const char *key,
 		json_object_object_add(current_test, key,
 				       json_object_new_string_len(beg, end - beg));
 
-		if (igt_version) {
-			json_object_object_add(current_test, "igt-version",
-					       json_object_new_string_len(igt_version,
-									  igt_version_len));
-		}
+		add_igt_version(current_test, igt_version, igt_version_len);
 
 		if (!json_object_object_get_ex(current_test, "result", NULL)) {
 			parse_subtest_result(subtests->subs[i].name,
@@ -608,10 +612,7 @@ static bool fill_from_output(int fd, const char *binary, const char *key,
 
 				json_object_object_add(current_dynamic_test, key,
 						       json_object_new_string_len(dynbeg, dynend - dynbeg));
-				if (igt_version)
-					json_object_object_add(current_dynamic_test, "igt-version",
-							       json_object_new_string_len(igt_version,
-											  igt_version_len));
+				add_igt_version(current_dynamic_test, igt_version, igt_version_len);
 
 				if (!json_object_object_get_ex(current_dynamic_test, "result", NULL)) {
 					const char *dynresulttext;
-- 
2.19.1

_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

^ permalink raw reply related	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2019-12-17  9:48 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-02 13:00 [igt-dev] [PATCH i-g-t 00/11] runner: Don't report subtests that have dynamic subtests Petri Latvala
2019-12-02 13:00 ` [igt-dev] [PATCH i-g-t 01/11] runner/resultgen: Extract igt-version field handling to a helper Petri Latvala
2019-12-02 13:01 ` [igt-dev] [PATCH i-g-t 02/11] runner/resultgen: Extract finding begin/end lines for a subtest " Petri Latvala
2019-12-03 13:33   ` Arkadiusz Hiler
2019-12-11 12:46     ` Arkadiusz Hiler
2019-12-02 13:01 ` [igt-dev] [PATCH i-g-t 03/11] runner/resultgen: Extract finding begin/end pointers for test output to helpers Petri Latvala
2019-12-02 13:01 ` [igt-dev] [PATCH i-g-t 04/11] runner/resultgen: Hoist handling of dynamic subtest output to a helper Petri Latvala
2019-12-02 13:01 ` [igt-dev] [PATCH i-g-t 05/11] runner/resultgen: Extrude dynamic subtest result texts Petri Latvala
2019-12-02 13:01 ` [igt-dev] [PATCH i-g-t 06/11] runner/resultgen: Add support for extra validation hook in find_matches() Petri Latvala
2019-12-02 13:01 ` [igt-dev] [PATCH i-g-t 07/11] runner/resultgen: Make subtest result line finding more robust Petri Latvala
2019-12-02 13:01 ` [igt-dev] [PATCH i-g-t 08/11] runner/json_tests: Adapt to dynamic subtest result parsing Petri Latvala
2019-12-02 13:01 ` [igt-dev] [PATCH i-g-t 09/11] runner/resultgen: Don't report subtest result if it has dynamic subtests Petri Latvala
2019-12-02 13:01 ` [igt-dev] [PATCH i-g-t 10/11] runner/json_tests: Adapt to no longer reporting subtests with " Petri Latvala
2019-12-02 13:01 ` [igt-dev] [PATCH i-g-t 11/11] runner/json_tests: Add test for parsing dynamic subtests with same name Petri Latvala
2019-12-02 13:47 ` [igt-dev] ✓ Fi.CI.BAT: success for runner: Don't report subtests that have dynamic subtests Patchwork
2019-12-02 15:07 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
2019-12-17  9:47 [igt-dev] [PATCH i-g-t 01/11] runner/resultgen: Extract igt-version field handling to a helper Petri Latvala
2019-12-17  9:47 ` [igt-dev] [PATCH i-g-t 07/11] runner/resultgen: Make subtest result line finding more robust Petri Latvala

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.