| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Currently, the pdf-mime-data check just fails for me with the following
output:
sh: 1: pdfimages: not found
pdf-mime-data: FAIL
pdf-mime-data.log contains:
pdfimages failed with exit status 32512
Since I do not have pdfimages installed... yeah.
This commit "fixes" that problem by skipping the test if pdfimages is
not available. No idea if it would pass if it were available, but I do
not feel like installing pdfimages just to test.
Signed-off-by: Uli Schlachter <psychon@znc.in>
|
|
|
|
|
|
|
|
| |
This makes the code use the existing helper for loading PNGs that also
considers the $srcdir environment variable. This makes it find the file
in out of tree builds.
Signed-off-by: Uli Schlachter <psychon@znc.in>
|
|
|
|
|
|
|
|
| |
I am not quite sure, but an if for "ignore this error if something
failed" seems wrong. Either this should have compared against status2 or
checked for success. This commit fixes the code for the latter.
Signed-off-by: Uli Schlachter <psychon@znc.in>
|
|
|
|
| |
Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=93152
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In read_file(), we see:
*data = malloc (*len);
...
if (fread(*data, *len, 1, fp) != 1) {
free(data);
...
The free call needs to be free(*data), to match the malloc call.
Matthias Clasen found this via Coverity and proposed the fix.
Signed-off-by: Bryce Harrington <bryce@osg.samsung.com>
Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=91381
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
cppcheck analysis tool reports the following issues when run on the
latest Cairo source.
$ grep "(error)" cppcheck_error_log.txt
[test/pdf-mime-data.c:58]: (error) Possible null pointer dereference: file - otherwise it is redundant to check if file is null at line 53
[test/pdf-mime-data.c:75]: (error) Resource leak: fp
$
The proposed changes fixes the above issues.
And also it does some refactoring to print the appropriate error messages
for each error condition in read_file() function and also to free the allocated
data buffer.
Signed-off-by: Ravi Nanjundappa <nravi.n@samsung.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
|
|
|
| |
Signed-off-by: Bryce Harrington <b.harrington@samsung.com>
Reviewed-by: Uli Schlachter <psychon@znc.in>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This change makes several tests behave more like ps-eps.c, et al by
making them attempt to mkdir "output", and in case of trouble use "."
instead. filenames are now allocated at runtime due to this change, so
ensure the corresponding free()'s are in place as well.
This should facilitate running the test suite with a relative path
outside cairo's source tree, such as when employing the CAIRO_REF_DIR
environment variable.
Signed-off-by: Bryce Harrington <b.harrington@samsung.com>
Signed-off-by: Uli Schlachter <psychon@znc.in>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The standard location for test output is cairo/test/output. The harness
itself was updated to write automatically generated images in this
directory, however a number of tests generate their own local output
files.
This patch updates these tests to write their output into
CAIRO_TEST_OUTPUT_DIR (which defaults to cairo/test/output) as well, in
the interest of decluttering the test directory.
Signed-off-by: Bryce Harrington <b.harrington@samsung.com>
Signed-off-by: Uli Schlachter <psychon@znc.in>
|
|
|
|
| |
Cleanup the allocated buffers on error.
|
|
|
|
|
|
|
|
| |
A limitation of the current API was that the destroy notifier was called
on the mime-data block. This prevents the user from passing in a pointer
to a managed block, for example a mime-data block belonging to a
ref-counted object. We can overcome this by allowing the user to specify
the closure to be used with the destroy notifier.
|
|
|
|
| |
Need to look for reference/input images from srcdir as well.
|
|
To test that images in PDF files correctly embedded the mime data.
|