Re: testListLabelPDFExport segfaulting

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 9/14/23 09:44, Dan Horák wrote:
On Thu, 14 Sep 2023 09:16:38 +0200
Stephan Bergmann <sbergman@xxxxxxxxxx> wrote:
I'd suggest to rather make execution of the test dependent on
$(ENABLE_PDFIUM), or on PDFIUM in $(BUILD_TYPE) (cf. configure.ac).
(Otherwise, you would silently hide errors when parsePDFExport()
erroneously returns null.)

if I read
https://opengrok.libreoffice.org/xref/core/test/source/unoapi_test.cxx?r=58ab2f00#213
right, then parsePDFExport() can return NULL only when built without
pdfium. There is an assert checking NULL value returned from
pPDFium->openDocument(). Thus we shouldn't be hiding anything, I
believe.

Yeah, it can only return null when vcl::pdf::PDFiumLibrary::get() returns null. Which in turn can only happen when that uses vcl/source/pdf/DummyPDFiumLibrary.cxx rather than vcl/source/pdf/PDFiumLibrary.cxx. A bit of an indirection, so I guess I would still use the explicit $(ENABLE_PDFIUM) way, but of course leave it up to you.

But I wonder why all the other tests that call parsePDFExport() don't
appear to be conditional on $(ENABLE_PDFIUM), either.




[Index of Archives]     [LARTC]     [Bugtraq]     [Yosemite Forum]     [Photo]

  Powered by Linux