This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project gfxprim.git.
The branch, master has been updated via 019030bda9e79cde4165d8a9f9ca78be39a5ea28 (commit) via 8e61c5d90064c9b6ab07cba610604e2de02f4522 (commit) via 51c0091e49c24df4bf762499d1728fc9271610e3 (commit) via 95079c548cf33566bfc19a6a2fb861c38b3137b4 (commit) via 23876fbfc0681a3f3b8694316038679276c95d4e (commit) from de06f184c1474e76daba31543187ad4b0205c5c3 (commit)
Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below.
- Log ----------------------------------------------------------------- http://repo.or.cz/w/gfxprim.git/commit/019030bda9e79cde4165d8a9f9ca78be39a5e...
commit 019030bda9e79cde4165d8a9f9ca78be39a5ea28 Author: Cyril Hrubis metan@ucw.cz Date: Fri Nov 2 14:48:34 2012 +0100
tests: filters: convolution: Make use of ENOSYS.
diff --git a/tests/filters/LinearConvolution.c b/tests/filters/LinearConvolution.c index cbad724..78d1bd4 100644 --- a/tests/filters/LinearConvolution.c +++ b/tests/filters/LinearConvolution.c @@ -68,7 +68,10 @@ static int test_lin_conv_box_3x3(void) .kernel = box_3x3, };
- GP_FilterConvolution(in, in, &box_3x3_kernel, NULL); + if (GP_FilterConvolution(in, in, &box_3x3_kernel, NULL)) { + if (errno == ENOSYS) + return TST_SKIPPED; + }
/* Check result */ //TODO @@ -89,8 +92,11 @@ static int test_h_lin_conv_box_3_raw(void) /* Apply the convolution */ float kernel[] = {1, 1, 1};
- GP_FilterHLinearConvolution_Raw(in, 0, 0, in->w, in->h, in, 0, 0, - kernel, 3, 3, NULL); + if (GP_FilterHLinearConvolution_Raw(in, 0, 0, in->w, in->h, in, 0, 0, + kernel, 3, 3, NULL)) { + if (errno == ENOSYS) + return TST_SKIPPED; + } /* Check result */ //TODO @@ -113,8 +119,11 @@ static int test_v_lin_conv_box_3_raw(void) /* Apply the convolution */ float kernel[] = {1, 1, 1};
- GP_FilterVLinearConvolution_Raw(in, 0, 0, in->w, in->h, in, 0, 0, - kernel, 3, 3, NULL); + if (GP_FilterVLinearConvolution_Raw(in, 0, 0, in->w, in->h, in, 0, 0, + kernel, 3, 3, NULL)) { + if (errno == ENOSYS) + return TST_SKIPPED; + } /* Check result */ //TODO
http://repo.or.cz/w/gfxprim.git/commit/8e61c5d90064c9b6ab07cba610604e2de02f4...
commit 8e61c5d90064c9b6ab07cba610604e2de02f4522 Author: Cyril Hrubis metan@ucw.cz Date: Fri Nov 2 14:46:46 2012 +0100
filters: convolution: Fix segfault on unsupported pixel types.
This temporarily solves segfault on unsupported pixel types by returning ENOSYS.
diff --git a/libs/filters/GP_Linear.c b/libs/filters/GP_Linear.c index 1655ca8..a87372f 100644 --- a/libs/filters/GP_Linear.c +++ b/libs/filters/GP_Linear.c @@ -20,6 +20,8 @@ * * *****************************************************************************/
+#include <errno.h> + #include "core/GP_Context.h" #include "core/GP_GetPutPixel.h" #include "core/GP_TempAlloc.h" @@ -48,6 +50,12 @@ int GP_FilterHLinearConvolution_Raw(const GP_Context *src, "offset %ix%i rectangle %ux%u", kw, x_src, y_src, w_src, h_src);
+ /* Not yet implemented */ + if (src->pixel_type != GP_PIXEL_RGB888) { + errno = ENOSYS; + return 1; + } + for (i = 0; i < kw; i++) ikernel[i] = kernel[i] * MUL + 0.5;
@@ -157,6 +165,12 @@ int GP_FilterVLinearConvolution_Raw(const GP_Context *src, GP_DEBUG(1, "Vertical linear convolution kernel width %u " "offset %ix%i rectangle %ux%u", kh, x_src, y_src, w_src, h_src); + + /* Not yet implemented */ + if (src->pixel_type != GP_PIXEL_RGB888) { + errno = ENOSYS; + return 1; + }
ikern_div = kern_div * MUL + 0.5; @@ -310,6 +324,12 @@ int GP_FilterLinearConvolution_Raw(const GP_Context *src,
GP_DEBUG(1, "Linear convolution kernel %ix%i rectangle %ux%u", kw, kh, w_src, h_src); + + /* Not yet implemented */ + if (src->pixel_type != GP_PIXEL_RGB888) { + errno = ENOSYS; + return 1; + }
/* Do linear convolution */ for (y = 0; y < (GP_Coord)h_src; y++) {
http://repo.or.cz/w/gfxprim.git/commit/51c0091e49c24df4bf762499d1728fc927161...
commit 51c0091e49c24df4bf762499d1728fc9271610e3 Author: Cyril Hrubis metan@ucw.cz Date: Fri Nov 2 14:45:42 2012 +0100
tests: framework: Avoid division by zero.
Fix division by zero when no tests were finished.
diff --git a/tests/framework/tst_test.c b/tests/framework/tst_test.c index 1981302..4df0ef1 100644 --- a/tests/framework/tst_test.c +++ b/tests/framework/tst_test.c @@ -96,9 +96,16 @@ void tst_run_suite(const struct tst_suite *suite, const char *tst_name) tst_log_close(html, TST_LOG_HTML); tst_log_close(json, TST_LOG_JSON);
+ float percents; + + if (counter == 0) + percents = 100; + else + percents = 100.00 * counters[0] / counter; + fprintf(stderr, "nSummary: succedded %u out of " "%u %.2f%% (skipped %u)n", - counters[0], counter, 100.00 * counters[0] / counter, + counters[0], counter, percents, counters[TST_SKIPPED]); }
http://repo.or.cz/w/gfxprim.git/commit/95079c548cf33566bfc19a6a2fb861c38b313...
commit 95079c548cf33566bfc19a6a2fb861c38b3137b4 Author: Cyril Hrubis metan@ucw.cz Date: Fri Nov 2 14:43:25 2012 +0100
tests: framework: Split tst_job_wait().
This is preparation for parallel test execution.
diff --git a/tests/framework/tst_job.c b/tests/framework/tst_job.c index 2c19c08..d208b66 100644 --- a/tests/framework/tst_job.c +++ b/tests/framework/tst_job.c @@ -487,65 +487,78 @@ static void parent_read(struct tst_job *job, void *ptr, ssize_t size) tst_warn("parent: read(): %s", strerror(errno)); }
-void tst_job_wait(struct tst_job *job) +void tst_job_read(struct tst_job *job) { - int status, ret; char ch; + int ret;
if (!job->running) - tst_warn("Job %s (pid %i) not in running state", + tst_warn("job_read: Job %s (pid %i) not in running state", job->test->name, job->pid);
- while (job->running) { - ret = read(job->pipefd, &ch, 1); + errno = 0;
- if (ret < 0) { - tst_warn("job_wait: read() failed: %s", - strerror(errno)); - job->running = 0; - continue; - } + ret = read(job->pipefd, &ch, 1);
- /* Child exited => read returns end of file */ - if (ret == 0) { - job->running = 0; - continue; - } + if (ret < 0) { + tst_warn("job_read: read() failed: %s", strerror(errno)); + job->running = 0; + + //TODO: kill the process?
- switch (ch) { - /* test exited normally */ - case 'x': - job->running = 0; - break; - /* cpu consumed time */ - case 'c': - read_timespec(job, &job->cpu_time); - break; - case 'C': - read_timespec(job, &job->cpu_time); - break; - /* benchmark data */ - case 'M': - read_timespec(job, &job->bench_mean); - break; - case 'V': - read_timespec(job, &job->bench_var); - break; - /* test message as generated by tst_report() */ - case 'm': - parent_read_msg(job); - break; - /* malloc stats */ - case 's': - parent_read(job, &job->malloc_stats, - sizeof(job->malloc_stats)); - break; - default: - tst_warn("parent: Invalid characters received"); - break; + return; + } + + /* Child exited => read returns end of file */ + if (ret == 0) { + if (errno == EAGAIN) { + tst_warn("job_read: read() returned EAGAIN"); + return; } + + job->running = 0; + + return; }
+ switch (ch) { + /* test exited normally */ + case 'x': + job->running = 0; + break; + /* cpu consumed time */ + case 'c': + read_timespec(job, &job->cpu_time); + break; + case 'C': + read_timespec(job, &job->cpu_time); + break; + /* benchmark data */ + case 'M': + read_timespec(job, &job->bench_mean); + break; + case 'V': + read_timespec(job, &job->bench_var); + break; + /* test message as generated by tst_report() */ + case 'm': + parent_read_msg(job); + break; + /* malloc stats */ + case 's': + parent_read(job, &job->malloc_stats, + sizeof(job->malloc_stats)); + break; + default: + tst_warn("parent: Invalid characters received"); + break; + } +} + +void tst_job_collect(struct tst_job *job) +{ + int status; + /* collect the test return status */ waitpid(job->pid, &status, 0);
@@ -578,7 +591,7 @@ void tst_job_wait(struct tst_job *job) job->result = TST_ABORTED; break; default: - printf("%in", WTERMSIG(status)); + tst_warn("Test signaled with %in", WTERMSIG(status)); job->result = TST_INTERR; } } @@ -588,3 +601,11 @@ void tst_job_wait(struct tst_job *job)
stop_test(job); } + +void tst_job_wait(struct tst_job *job) +{ + while (job->running) + tst_job_read(job); + + tst_job_collect(job); +}
http://repo.or.cz/w/gfxprim.git/commit/23876fbfc0681a3f3b8694316038679276c95...
commit 23876fbfc0681a3f3b8694316038679276c95d4e Author: Cyril Hrubis metan@ucw.cz Date: Fri Nov 2 14:41:16 2012 +0100
tests: framework: Change the test driver output.
The line was too long to fit to 80 chars even with reasonably short test names so this removes the line with CPU Time.
diff --git a/tests/framework/tst_job.c b/tests/framework/tst_job.c index 1266f9b..2c19c08 100644 --- a/tests/framework/tst_job.c +++ b/tests/framework/tst_job.c @@ -61,7 +61,7 @@ void tst_diff_timespec(int *sec, int *nsec, struct timespec *start, } }
-#define NAME_PADD 21 +#define NAME_PADD 35
static void stop_test(struct tst_job *job) { @@ -113,11 +113,8 @@ static void stop_test(struct tst_job *job) for (i = strlen(name); i < NAME_PADD; i++) fprintf(stderr, " ");
- fprintf(stderr, " finished (Time %3i.%03is, CPU %3i.%03is) %sn", - sec, nsec/1000000, - (int)job->cpu_time.tv_sec, - (int)job->cpu_time.tv_nsec/1000000, - result); + fprintf(stderr, " finished (Time %3i.%03is) %sn", + sec, nsec/1000000, result); if (job->bench_iter) { for (i = 0; i < NAME_PADD; i++)
-----------------------------------------------------------------------
Summary of changes: libs/filters/GP_Linear.c | 20 ++++++ tests/filters/LinearConvolution.c | 19 ++++-- tests/framework/tst_job.c | 126 +++++++++++++++++++++---------------- tests/framework/tst_test.c | 9 +++- 4 files changed, 114 insertions(+), 60 deletions(-)
repo.or.cz automatic notification. Contact project admin jiri.bluebear.dluhos@gmail.com if you want to unsubscribe, or site admin admin@repo.or.cz if you receive no reply.