GNOME Bugzilla – Bug 705967
Don't pass non-checksums to ostree_repo_has_object()
Last modified: 2013-08-14 17:43:24 UTC
The following command causes an assertion: ** ERROR:src/libostree/ostree-core.c:1059:ostree_get_relative_object_path: assertion failed: (strlen (checksum) == 64) Aborted (core dumped) Stack trace: at ../nptl/sysdeps/unix/sysv/linux/raise.c:56 file=file@entry=0x7ffff7dd8bb5 "src/libostree/ostree-core.c", line=line@entry=1059, func=func@entry=0x7ffff7dd9360 <__PRETTY_FUNCTION__.24360> "ostree_get_relative_object_path", message=<optimized out>) at gtestutils.c:1912 file=0x7ffff7dd8bb5 "src/libostree/ostree-core.c", line=1059, func=0x7ffff7dd9360 <__PRETTY_FUNCTION__.24360> "ostree_get_relative_object_path", expr=<optimized out>) at gtestutils.c:1923 checksum=0x7fffffffe693 "fedora-19/x86_64", type=OSTREE_OBJECT_TYPE_COMMIT, compressed=0) at src/libostree/ostree-core.c:1059 checksum=0x7fffffffe693 "fedora-19/x86_64", type=OSTREE_OBJECT_TYPE_COMMIT) at src/libostree/ostree-repo.c:1276 objtype=OSTREE_OBJECT_TYPE_COMMIT, checksum=0x7fffffffe693 "fedora-19/x86_64", out_stored_path=0x7fffffffe0e0, cancellable=0x0, error=0x7fffffffe250) at src/libostree/ostree-repo.c:2180 objtype=OSTREE_OBJECT_TYPE_COMMIT, checksum=0x7fffffffe693 "fedora-19/x86_64", out_have_object=0x7fffffffe148, cancellable=0x0, error=0x7fffffffe250) at src/libostree/ostree-repo.c:2211 objtype=OSTREE_OBJECT_TYPE_COMMIT, rev=0x7fffffffe693 "fedora-19/x86_64", inout_was_found=0x7fffffffe1cc, cancellable=0x0, error=0x7fffffffe250) at src/ostree/ot-builtin-show.c:157 repo_path=0x66be40, cancellable=0x0, error=0x7fffffffe250) ---Type <return> to continue, or q <return> to quit--- at src/ostree/ot-builtin-show.c:238 commands=0x641c20 <commands>, res_error=0x7fffffffe2e0) at src/ostree/ot-main.c:249 at src/ostree/main.c:67 (gdb) up
Created attachment 251575 [details] [review] Don't pass non-checksums to ostree_repo_has_object() The 'ostree show' command passed non-checksum arguments to the ostree_repo_has_object() function which led to an assertion.
Review of attachment 251575 [details] [review]: Looks good. BTW it should be a matter of adding 3 lines to tests/test-basic.sh to add test coverage for this, if you're up for it. But I'm planning to add some test coverage with your fixes here for the xattr stuff at least here soon myself.
Done. By the way 'make check' doesn't work. I vaguely you remember talking about installed tests, but coming from someone who's into things like Build API [1] this is inconsistent and surprising. Just saying :P [1] http://people.gnome.org/~walters/docs/build-api.txt
Attachment 251575 [details] pushed as 1904e3e - Don't pass non-checksums to ostree_repo_has_object()
(In reply to comment #3) > Done. > > By the way 'make check' doesn't work. > > I vaguely you remember talking about installed tests, but coming from someone > who's into things like Build API [1] this is inconsistent and surprising. Just > saying :P check isn't in the build API. I just use installed tests for ostree at the moment. Basically: $ jhbuild buildone ostree $ gnome-desktop-testing-runner -p 0 ostree/