From: Scott Murray Date: Wed, 5 Jun 2024 18:36:45 +0000 (-0400) Subject: meta-agl-core: update ptest-runner patch X-Git-Tag: 17.92.0~6 X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=commitdiff_plain;h=1965129cdcddd27bc574c12aff2392b55ed39d35;p=AGL%2Fmeta-agl.git meta-agl-core: update ptest-runner patch Update our local ptest-runner LAVA support patch to apply against the new 2.4.4 release that has been backported to scarthgap branch. Bug-AGL: SPEC-5167 Change-Id: Iebd2793d335a092d2e79cb1848285d01926871ff Signed-off-by: Scott Murray Reviewed-on: https://gerrit.automotivelinux.org/gerrit/c/AGL/meta-agl/+/29977 Reviewed-by: Jan-Simon Moeller Tested-by: Jan-Simon Moeller --- diff --git a/meta-agl-core/recipes-support/ptest-runner/ptest-runner/0007-WIP-Initial-LAVA-support.patch b/meta-agl-core/recipes-support/ptest-runner/ptest-runner/0007-WIP-Initial-LAVA-support.patch index 11c6fd27b..3757fe0a7 100644 --- a/meta-agl-core/recipes-support/ptest-runner/ptest-runner/0007-WIP-Initial-LAVA-support.patch +++ b/meta-agl-core/recipes-support/ptest-runner/ptest-runner/0007-WIP-Initial-LAVA-support.patch @@ -23,13 +23,14 @@ Signed-off-by: Tim Orling [updated for ptest-runner 2.3.2] [updated for ptest-runner 2.4.1] [updated for ptest-runner 2.4.2] +[updated for ptest-runner 2.4.4] Signed-off-by: Scott Murray --- flags.h | 10 ++++++++++ main.c | 9 ++++++++- - utils.c | 17 ++++++++++++++++- + utils.c | 20 +++++++++++++++++++- utils.h | 2 +- - 4 files changed, 35 insertions(+), 3 deletions(-) + 4 files changed, 38 insertions(+), 3 deletions(-) create mode 100644 flags.h diff --git a/flags.h b/flags.h @@ -84,7 +85,7 @@ index 31e4dd5..f12d6d6 100644 print_usage(stdout, argv[0]); exit(1); diff --git a/utils.c b/utils.c -index 59b8b77..30423c4 100644 +index 6cf7705..f6a3a2a 100644 --- a/utils.c +++ b/utils.c @@ -49,6 +49,7 @@ @@ -95,17 +96,19 @@ index 59b8b77..30423c4 100644 #define GET_STIME_BUF_SIZE 1024 #define WAIT_CHILD_BUF_MAX_SIZE 1024 -@@ -425,6 +426,7 @@ run_ptests(struct ptest_list *head, const struct ptest_options opts, - } +@@ -369,6 +370,9 @@ run_ptests(struct ptest_list *head, const struct ptest_options opts, + strcpy(ptest_dir, p->run_ptest); + dirname(ptest_dir); - char *ptest_dir = strdup(p->run_ptest); + char *ptest = strdup(p->ptest); - if (ptest_dir == NULL) { ++ CHECK_ALLOCATION(ptest, 1, 1); ++ + if (pipe2(pipefd_stdout, 0) == -1) { + fprintf(fp, "ERROR: pipe2() failed with: %s.\n", strerror(errno)); rc = -1; - break; -@@ -477,7 +479,10 @@ run_ptests(struct ptest_list *head, const struct ptest_options opts, - fprintf(fp, "ERROR: setpgid() failed, %s\n", strerror(errno)); - } +@@ -425,7 +429,10 @@ run_ptests(struct ptest_list *head, const struct ptest_options opts, + do_close(&pipefd_stdout[PIPE_WRITE]); + do_close(&pipefd_stderr[PIPE_WRITE]); - time_t start_time= time(NULL); + if (opts.flags & LAVA_SIGNAL_ENABLE) { @@ -115,7 +118,7 @@ index 59b8b77..30423c4 100644 fprintf(fp, "%s\n", get_stime(stime, GET_STIME_BUF_SIZE, start_time)); fprintf(fp, "BEGIN: %s\n", ptest_dir); -@@ -594,6 +599,16 @@ run_ptests(struct ptest_list *head, const struct ptest_options opts, +@@ -542,6 +549,16 @@ run_ptests(struct ptest_list *head, const struct ptest_options opts, fprintf(fp, "END: %s\n", ptest_dir); fprintf(fp, "%s\n", get_stime(stime, GET_STIME_BUF_SIZE, end_time)); @@ -130,8 +133,16 @@ index 59b8b77..30423c4 100644 + fprintf(stdout, "\n", ptest, result); + } } - free(ptest_dir); - do_close(&pipefd_stdout[PIPE_READ]); + + ptest_list_fail4: +@@ -556,6 +573,7 @@ ptest_list_fail2: + do_close(&pipefd_stdout[PIPE_WRITE]); + + ptest_list_fail1: ++ free(ptest); + fflush(fp); + fflush(fp_stderr); + diff --git a/utils.h b/utils.h index 04fc666..ad702d8 100644 --- a/utils.h @@ -148,5 +159,5 @@ index 04fc666..ad702d8 100644 extern struct ptest_list *get_available_ptests(const char *); extern int print_ptests(struct ptest_list *, FILE *); -- -2.37.3 +2.44.0