This is an automated email from the git hooks/post-receive script.
git pushed a commit to branch devs/devilhorns/apos
in repository efl.
View the commit online.
commit a40ba25e05ccb7cc5d7484a4e71ea72bdeb7a141
Author: Carsten Haitzler <ras...@rasterman.com>
AuthorDate: Tue Jan 9 10:11:28 2024 +0000
run timeout directly with out sh and check fork and execl returns
check returns in case fork or execl fail and report and abort
approptiately. this should solve a always-timeout on some systems with
some sh shells...
---
src/tests/efl_check.h | 32 ++++++++++++++++++++++++++++----
1 file changed, 28 insertions(+), 4 deletions(-)
diff --git a/src/tests/efl_check.h b/src/tests/efl_check.h
index 20d2203075..aa5bc9be15 100644
--- a/src/tests/efl_check.h
+++ b/src/tests/efl_check.h
@@ -306,9 +306,9 @@ _efl_suite_wait_on_fork(int *num_forks, Eina_Bool *timeout)
ret = WEXITSTATUS(status);
else
ret = 1;
- if (pid == timeout_pid)
+ if ((timeout_pid > 0) && (pid == timeout_pid))
*timeout = EINA_TRUE;
- else
+ else if (timeout_pid > 0)
{
eina_hash_del_by_key(fork_map, &pid);
(*num_forks)--;
@@ -374,8 +374,25 @@ _efl_suite_build_and_run(int argc, const char **argv, const char *suite_name, co
if (!timeout_pid)
{
timeout_pid = fork();
- if (!timeout_pid)
- execl("/bin/sh", "/bin/sh", "-c", PACKAGE_BUILD_DIR "/src/tests/timeout", (char *)NULL);
+ if (timeout_pid == 0)
+ {
+ int ret = execl(PACKAGE_BUILD_DIR "/src/tests/timeout",
+ (char *)NULL);
+ if (ret != 0)
+ {
+ fprintf(stderr, "EXECL %s TO RUN TIMEOUT!!!\n", PACKAGE_BUILD_DIR "/src/tests/timeout");
+ perror("EXECL");
+ fflush(stderr);
+ abort();
+ }
+ }
+ else if (timeout_pid < 0)
+ {
+ fprintf(stderr, "FORK TO RUN TIMEOUT TOOL FAILED!!!\n");
+ perror("FORK");
+ fflush(stderr);
+ abort();
+ }
}
if (num_forks == eina_cpu_count())
failed_count += _efl_suite_wait_on_fork(&num_forks, &timeout_reached);
@@ -392,6 +409,13 @@ _efl_suite_build_and_run(int argc, const char **argv, const char *suite_name, co
# endif
continue;
}
+ else if (pid < 0)
+ {
+ fprintf(stderr, "FORK TO RUN TIMEOUT TOOL FAILED!!!\n");
+ perror("FORK");
+ fflush(stderr);
+ abort();
+ }
}
#endif
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.