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 9e00a730ea2ab2545b46298056b32841ad3500d4 (commit) from 2370df5de0e544ff861f5c18a9ddb430d306301e (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/9e00a730ea2ab2545b46298056b32841ad350...
commit 9e00a730ea2ab2545b46298056b32841ad3500d4 Author: Cyril Hrubis metan@ucw.cz Date: Wed Oct 3 16:44:29 2012 +0200
tests: framework: Fix typos & warnings.
diff --git a/tests/framework/tst_job.c b/tests/framework/tst_job.c index f483578..227edd5 100644 --- a/tests/framework/tst_job.c +++ b/tests/framework/tst_job.c @@ -116,7 +116,8 @@ static void stop_test(struct tst_job *job) /* Now print test message store */ tst_msg_print(&job->store); - fprintf(stderr, "------------------------------------------------------------------------------- n"); + fprintf(stderr, "------------------------------------------------------" + "------------------------- n"); }
/* @@ -129,14 +130,19 @@ static void remove_tmpdir(const char *path) */ if (!strncmp("/tmp/", path, sizeof("/tmp/"))) { tst_warn("Path '%s' doesn't start with /tmp/, " - "ommiting cleanup", path); + "omitting cleanup", path); return; }
//TODO: Cleaner solution? char buf[256]; + int ret; + snprintf(buf, sizeof(buf), "rm -rf '%s'", path); - (void)system(buf); + ret = system(buf); + + if (ret) + tst_warn("Failed to clean temp dir."); }
/* @@ -146,7 +152,7 @@ static void create_tmpdir(const char *name, char *template, size_t size) { char safe_name[256];
- /* Fix any funny characters in test name */ + /* Fix any funny characters in the test name */ snprintf(safe_name, sizeof(safe_name), "%s", name);
char *s = safe_name; @@ -160,7 +166,6 @@ static void create_tmpdir(const char *name, char *template, size_t size) /* Create template from test name */ snprintf(template, size, "/tmp/ctest_%s_XXXXXX", safe_name);
- if (mkdtemp(template) == NULL) { tst_warn("mkdtemp(%s) failed: %s", template, strerror(errno)); exit(TST_INTERR); @@ -227,13 +232,16 @@ int tst_report(int level, const char *fmt, ...) va_start(va, fmt); ret = vsnprintf(buf+3, sizeof(buf) - 3, fmt, va); va_end(va); + + ssize_t size = ret > 255 ? 255 : ret + 1;
buf[0] = 'm'; buf[1] = level; - ((unsigned char*)buf)[2] = ret > 255 ? 255 : ret + 1; + ((unsigned char*)buf)[2] = size;
if (my_job != NULL) - write(my_job->pipefd, buf, (int)buf[2] + 3); + if (write(my_job->pipefd, buf, size + 3) != size + 3) + tst_warn("Failed to write msg to pipe.");
return ret; } @@ -250,6 +258,7 @@ void tst_job_run(struct tst_job *job) /* Prepare the test message store */ tst_msg_init(&job->store);
+ /* marks test as started */ start_test(job);
if (pipe(pipefd)) { @@ -312,7 +321,8 @@ void tst_job_run(struct tst_job *job) tst_malloc_check_stop(); tst_malloc_check_report(&job->malloc_stats);
- child_write(job, 's', &job->malloc_stats, sizeof(job->malloc_stats)); + child_write(job, 's', &job->malloc_stats, + sizeof(job->malloc_stats));
if (job->malloc_stats.lost_chunks != 0 && ret == TST_SUCCESS) ret = TST_MEMLEAK; @@ -344,7 +354,7 @@ static void parent_read_msg(struct tst_job *job)
char buf[header[1]];
- if (read(job->pipefd, buf, sizeof(buf)) != sizeof(buf)) + if (read(job->pipefd, buf, sizeof(buf)) != (ssize_t)sizeof(buf)) tst_warn("parent: read(message) failed: %s", strerror(errno));
/* null-terminated the string, to be extra sure */
-----------------------------------------------------------------------
Summary of changes: tests/framework/tst_job.c | 28 +++++++++++++++++++--------- 1 files changed, 19 insertions(+), 9 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.