[poppler] unit test for GLib bindings
Carlos Garcia Campos
carlosgc at gnome.org
Sun Apr 12 04:21:29 PDT 2009
El lun, 30-03-2009 a las 22:10 +0900, Kouhei Sutou escribió:
> Hi Carlos,
>
> Thanks for trying.
>
> In <1238341726.4783.17.camel at charmaleon>
> "Re: [poppler] unit test for GLib bindings" on Sun, 29 Mar 2009 17:48:46 +0200,
> Carlos Garcia Campos <carlosgc at gnome.org> wrote:
>
> > I've just tried it out and I got a crash while testing:
> >
> > $ make check -s
> > Making check in goo
> > Making check in fofi
> > Making check in splash
> > Making check in poppler
> > Making check in utils
> > Making check in glib
> > Making check in .
> > Making check in reference
> > Making check in demo
> > Making check in test
> > Making check in lib
> > Making check in fixtures
> > Making check in pdf
> > ....................!
> > CRASH!!!
> >
> >
> > Finished in 2.799551 seconds (total: 0.087569 seconds)
> >
> > 21 test(s), 139 assertion(s), 0 failure(s), 0 error(s), 0 pending(s), 0 omission(s), 0 notification(s)
> > 95.2381% passed
>
> > The cutter documentation says that cutter tries to get a backtrace for
> > crashes, but it seems it couldn't in this case. How can I know which
> > test produced the crash?
>
> Please use '--verbose=verbose' (or '-v v') option. Cutter
> shows test names with the options:
hmm, the verbose mode should be enabled by default, the output looks
more useful to me.
> ---
> % glib/test/run-test.sh --verbose=verbose
> test-layer:
> test_nested: .: (0.008216)
> test_title: .: (0.000842)
> test_visible: .: (0.000457)
> test-page:
> test_index_multi_pages: .: (0.000428)
> test_get_size: .: (0.000296)
> test_render_pixbuf: .: (0.004779)
> test_transition: .: (0.000516)
> test_index_single_page: .: (0.000376)
> test_get_form_field_mapping: .: (0.001078)
> test_get_text: .: (0.002724)
> test-document:
> test_attachment: .: (0.000648)
> test_action: .: (0.000500)
> test_new_from_data: .: (0.000296)
> test_property: .: (0.000806)
> test_new_from_file: .: (0.000547)
> test_font: .: (0.001641)
> test_save_a_copy: .: (0.001072)
> test_attachment_save: .: (0.001803)
> test_no_attachment: .: (0.000329)
> test_save: .: (0.001117)
> test-form-field:
> test_multi_line_text: .: (0.001383)
> test_combo_choice: .: (0.001834)
> test_list_choice: .: (0.002096)
> test_check_button: .: (0.001182)
> test_radio_button: .: (0.001242)
> test_general: .: (0.001353)
> test_normal_text: .: (0.001482)
> test_file_select_text: .: (0.008652)
> test_push_button: .: (0.006131)
> test_normal_password_text: .: (0.002913)
>
> Finished in 0.150165 seconds (total: 0.056737 seconds)
>
> 30 test(s), 172 assertion(s), 0 failure(s), 0 error(s), 0 pending(s), 0 omission(s), 0 notification(s)
> 100% passed
> ---
ok, I get a different error now, I don't know whether is a problem in
the test itself or a poppler bug:
$ glib/test/run-test.sh --verbose=verbose
test-layer:
test_nested: .: (0.011687)
test_title: .: (0.000742)
test_visible: .: (0.000548)
test-form-field:
test_multi_line_text: .: (0.001826)
test_combo_choice: .: (0.001805)
test_list_choice: .: (0.001848)
test_check_button: .: (0.001720)
test_radio_button: .: (0.001820)
test_general: .: (0.001495)
test_normal_text: .: (0.001708)
test_file_select_text: .: (0.001698)
test_push_button: .: (0.001464)
test_normal_password_text: .: (0.001621)
test-page:
test_index_multi_pages: .: (0.000416)
test_get_size: .: (0.000335)
test_render_pixbuf: .: (0.004318)
test_transition: .: (0.000640)
test_index_single_page: .: (0.000311)
test_get_form_field_mapping: .: (0.003905)
test_get_text: .: (0.002655)
test-document:
test_attachment: F: (0.003755)
(cutter:23905): GLib-GObject-CRITICAL **: g_object_unref: assertion `G_IS_OBJECT (object)' failed
(cutter:23905): GLib-GObject-CRITICAL **: g_object_unref: assertion `G_IS_OBJECT (object)' failed
test_action: .: (0.000563)
test_new_from_data: .: (0.000389)
test_property:
(cutter:23905): GLib-CRITICAL **: g_regex_split_full: assertion `string != NULL' failed
(cutter:23905): GLib-CRITICAL **: g_regex_split_full: assertion `string != NULL' failed
!CRASH!!!
1) Failure: test_attachment
<attachment_equal(expected[i], actual[i]) == TRUE>
expected: <(#<PopplerAttachment name=<U�����u���]��c�����0�>, description=<�I>, size=<147580976>, mtime=<147581360>, ctime=<-1209563984>, checksum=<��>>, #<PopplerAttachment name=<U�����u���]��c�����0�>, description=<��>, size=<0>, mtime=<147241504>, ctime=<0>, checksum=< �>>)>
actual: <(#<PopplerAttachment name=<hello.html>, description=<hello.html>, size=<300>, mtime=<0>, ctime=<0>, checksum=<>>, #<PopplerAttachment name=<hello.txt>, description=<hello.txt>, size=<13>, mtime=<0>, ctime=<0>, checksum=<>>)>
glib/test/test-document.c:562: test_attachment(): gcut_assert_equal_list(expected, actual, attachment_equal, attachment_inspect, ((void *)0))
Finished in 0.597506 seconds (total: 0.047269 seconds)
24 test(s), 146 assertion(s), 1 failure(s), 0 error(s), 0 pending(s), 0 omission(s), 0 notification(s)
91.6667% passed
I've tried the attachment document and it works.
>
> Yes. Cutter tries to get a backtrace with
> g_on_error_stack_trace() but it may fail because some
> memories may be broekn on crash...
>
> It seems that Cutter should show crashed test name even if
> a backtrace can't be gotten. I'll improve Cutter in the next
> release. :)
great! :-)
>
> Thanks,
> --
> kou
>
--
Carlos Garcia Campos
elkalmail at yahoo.es
carlosgc at gnome.org
http://carlosgc.linups.org
PGP key: http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x523E6462
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Esta parte del mensaje =?ISO-8859-1?Q?est=E1?= firmada
digitalmente
Url : http://lists.freedesktop.org/archives/poppler/attachments/20090412/6c0d5070/attachment.pgp
More information about the poppler
mailing list