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 38c6f46dd0901638b9a91ea0bce3c0b98c9b426a (commit) via 75c43f675ff09ada0f6ff804a43a74e743b87b1b (commit) via 0fc5c8f5c814c67b358c9cab1f019cc34fb4e150 (commit) via 9dd2b6a1c757b73d58da9aa1c5b2af59b98c6adb (commit) via d33f1e300065869146bc57be16c1696b04946803 (commit) from cfa164fc6f9a5e7e97bd501dce67b6d7665504ec (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/38c6f46dd0901638b9a91ea0bce3c0b98c9b4...
commit 38c6f46dd0901638b9a91ea0bce3c0b98c9b426a Author: Cyril Hrubis metan@ucw.cz Date: Sun Dec 22 22:32:20 2013 +0100
tests: Generate html report by default.
Signed-off-by: Cyril Hrubis metan@ucw.cz
diff --git a/tests/framework/log2html.py b/tests/framework/log2html.py index 2263373..c1dac38 100755 --- a/tests/framework/log2html.py +++ b/tests/framework/log2html.py @@ -54,7 +54,7 @@ class MallocStats: print(' <td bgcolor="#ffffcc" colspan="3">') print(' <center>') print(' <table>') - + # Table header print(' <tr>')
@@ -300,13 +300,11 @@ class TestSuite: if (test_ok < test_all): bg_color = html_colors['Failed'] else: - bg_color = '#ccccee' - - + bg_color = html_colors['Success']
print(' <td bgcolor="#ccccee">%s</td>' % (self.suite_name)) print(' <td bgcolor="%s">%i</td>' % (bg_color, test_all - test_ok)) - + test_skipped = res_dict['Skipped']
if (test_skipped > 0): diff --git a/tests/runtests.py b/tests/runtests.py index 8cd1477..5bac628 100755 --- a/tests/runtests.py +++ b/tests/runtests.py @@ -106,13 +106,16 @@ def run_tests(resdir, testsdir): run_test(curresdir, path, runtest)
def main(): - now = datetime.datetime.now() + now = datetime.datetime.now() resdir = '%s_%i-%02i-%02i_%02i-%02i-%02i' % (results_dir, now.year, now.month, now.day, now.hour, now.minute, now.second) print('Creating result directory "%s"' % resdir) os.mkdir(resdir)
run_tests(resdir, tests_dir) + os.system('cd framework && ./res2html.sh "../%s"' % resdir) + + print('nPoint your browser to "%s/index.html"n' % resdir)
if __name__ == '__main__': main()
http://repo.or.cz/w/gfxprim.git/commit/75c43f675ff09ada0f6ff804a43a74e743b87...
commit 75c43f675ff09ada0f6ff804a43a74e743b87b1b Author: Cyril Hrubis metan@ucw.cz Date: Sun Dec 22 22:25:02 2013 +0100
tests: PNG: Add RGBA8888 save test.
Signed-off-by: Cyril Hrubis metan@ucw.cz
diff --git a/tests/loaders/PNG.c b/tests/loaders/PNG.c index 0803e98..5cee605 100644 --- a/tests/loaders/PNG.c +++ b/tests/loaders/PNG.c @@ -228,6 +228,11 @@ const struct tst_suite tst_suite = { .data = (void*)GP_PIXEL_RGB888, .flags = TST_CHECK_MALLOC},
+ {.name = "PNG Save 100x100 RGBA8888", + .tst_fn = test_save_PNG, + .data = (void*)GP_PIXEL_RGBA8888, + .flags = TST_CHECK_MALLOC}, + {.name = "PNG Save 100x100 BGR888", .tst_fn = test_save_PNG, .data = (void*)GP_PIXEL_BGR888,
http://repo.or.cz/w/gfxprim.git/commit/0fc5c8f5c814c67b358c9cab1f019cc34fb4e...
commit 0fc5c8f5c814c67b358c9cab1f019cc34fb4e150 Author: Cyril Hrubis metan@ucw.cz Date: Sun Dec 22 22:12:26 2013 +0100
test: Two fixes for malloc canaries.
* Make use of real_free() instead of free() (this fixes posible infinite loop)
* Fix special case for canary_right when size is multiple of page size.
Signed-off-by: Cyril Hrubis metan@ucw.cz
diff --git a/tests/framework/tst_malloc_canaries.c b/tests/framework/tst_malloc_canaries.c index 40f16c9..ec1fbca 100644 --- a/tests/framework/tst_malloc_canaries.c +++ b/tests/framework/tst_malloc_canaries.c @@ -20,10 +20,12 @@ * * *****************************************************************************/
+#define _GNU_SOURCE #include <stdio.h> #include <sys/mman.h> #include <stdlib.h> #include <unistd.h> +#include <dlfcn.h>
#include "tst_malloc_canaries.h"
@@ -33,6 +35,9 @@ void *tst_malloc_canary_right(size_t size) size_t pages = size/pagesize + !!(size%pagesize) + 1; char *buf;
+ if (size == 0) + return NULL; + if (posix_memalign((void*)&buf, pagesize, pages * pagesize)) return NULL;
@@ -47,21 +52,28 @@ void *tst_malloc_canary_right(size_t size) return NULL; }
- return buf + (pagesize - size%pagesize); + if (size%pagesize) + return buf + (pagesize - size%pagesize); + + return buf; }
+static void (*real_free)(void *) = NULL; + void tst_free_canary_right(void *ptr, size_t size) { size_t pagesize = sysconf(_SC_PAGESIZE); size_t pages = size/pagesize + !!(size%pagesize); - void *start = (char*)ptr - (pagesize - size%pagesize); + void *start = size%pagesize ? (char*)ptr - (pagesize - size%pagesize) : ptr;
/* Reset the memory protection back to RW */ - if (mprotect(start + pagesize * pages, pagesize, PROT_READ | PROT_WRITE)) { + if (mprotect(start + pagesize * pages, pagesize, PROT_READ | PROT_WRITE)) perror("mprotect"); - }
- free(start); + if (!real_free) + real_free = dlsym(RTLD_NEXT, "free"); + + real_free(start); }
void *tst_malloc_canary_left(size_t size) @@ -69,6 +81,9 @@ void *tst_malloc_canary_left(size_t size) size_t pagesize = sysconf(_SC_PAGESIZE); size_t pages = size/pagesize + !!(size%pagesize) + 1;
+ if (size == 0) + return NULL; + char *buf;
if (posix_memalign((void*)&buf, pagesize, pages * pagesize)) @@ -94,8 +109,12 @@ void tst_free_canary_left(void *ptr, size_t size __attribute__((unused)))
/* Reset the memory protection back to RW */ if (mprotect(start, pagesize, PROT_READ | PROT_WRITE)) { + printf("%p size %zun", ptr, size); perror("mprotect"); }
- free(start); + if (!real_free) + real_free = dlsym(RTLD_NEXT, "free"); + + real_free(start); }
http://repo.or.cz/w/gfxprim.git/commit/9dd2b6a1c757b73d58da9aa1c5b2af59b98c6...
commit 9dd2b6a1c757b73d58da9aa1c5b2af59b98c6adb Author: Cyril Hrubis metan@ucw.cz Date: Sun Dec 22 22:09:44 2013 +0100
tst_preload: Fix realloc(NULL, size) case.
In case the realloc() was called with NULL optr the code wrongly searched for the old chunk and caused crash.
The fix is to return malloc(size) in this case instead.
Signed-off-by: Cyril Hrubis metan@ucw.cz
diff --git a/tests/framework/tst_preload.c b/tests/framework/tst_preload.c index 9436c2c..42457aa 100644 --- a/tests/framework/tst_preload.c +++ b/tests/framework/tst_preload.c @@ -235,6 +235,9 @@ void *realloc(void *optr, size_t size) if (!real_realloc) real_realloc = dlsym(RTLD_NEXT, "realloc");
+ if (!optr) + return malloc(size); + switch (malloc_canary) { case MALLOC_CANARY_OFF: ptr = real_realloc(optr, size);
http://repo.or.cz/w/gfxprim.git/commit/d33f1e300065869146bc57be16c1696b04946...
commit d33f1e300065869146bc57be16c1696b04946803 Author: Cyril Hrubis metan@ucw.cz Date: Sun Dec 22 21:18:00 2013 +0100
doc: Add screenshot to spiv page.
Signed-off-by: Cyril Hrubis metan@ucw.cz
diff --git a/doc/images/spiv/spiv_tux.png b/doc/images/spiv/spiv_tux.png new file mode 100644 index 0000000..258216c Binary files /dev/null and b/doc/images/spiv/spiv_tux.png differ diff --git a/doc/spiv.txt b/doc/spiv.txt index 0b36e17..0a0b6ba 100644 --- a/doc/spiv.txt +++ b/doc/spiv.txt @@ -1,14 +1,10 @@ spiv ---- - -'spiv' - Simple yet Powerful Image Viewer. +.Simple yet Powerful Image Viewer.
Spiv is a fast, lightweight and minimalistic image viewer build on the top of the GFXprim library.
-Spiv is optimized for keyboard control and although you can use your mouse for -some of the actions, everything could be done from the keyboard as well. - Spiv supports wide range of image formats, currently supported are JPEG, PNG, GIF, BMP, TIFF, PSP, PPM, JP2 and CBZ (as well general ZIP archives with images), and more will come in the near future. @@ -29,3 +25,6 @@ printf-like modifiers. The modifiers are substituted to current image path, name, etc. and executed by pressing function keys).
See 'spiv(1)' man page for more information. + +.Spiv running in X11 +image::images/spiv/spiv_tux.png[Spiv in X11]
-----------------------------------------------------------------------
Summary of changes: doc/images/spiv/spiv_tux.png | Bin 0 -> 90878 bytes doc/spiv.txt | 9 ++++----- tests/framework/log2html.py | 8 +++----- tests/framework/tst_malloc_canaries.c | 31 +++++++++++++++++++++++++------ tests/framework/tst_preload.c | 3 +++ tests/loaders/PNG.c | 5 +++++ tests/runtests.py | 5 ++++- 7 files changed, 44 insertions(+), 17 deletions(-) create mode 100644 doc/images/spiv/spiv_tux.png
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.