external/python3/UnpackedTarball_python3.mk | 1 external/python3/tsan.patch.0 | 10 framework/qa/complex/api_internal/api.lst | 1 qadevOOo/Jar_OOoRunner.mk | 1 qadevOOo/objdsc/sc/com.sun.star.comp.office.ScHeaderFieldObj.csv | 3 qadevOOo/tests/java/mod/_sc/ScHeaderFieldObj.java | 179 ---------- sc/qa/unoapi/sc_4.sce | 1 7 files changed, 11 insertions(+), 185 deletions(-)
New commits: commit 89aec8620034d9cbaa44275282fb3c56e8b3935e Author: Jens Carl <j.car...@gmx.de> AuthorDate: Thu Mar 3 22:45:16 2022 -0800 Commit: Jens Carl <j.car...@gmx.de> CommitDate: Fri Mar 4 17:16:06 2022 +0100 tdf#45904: Remove ScHeaderFieldObj Java test The ScHeaderFieldObj Java tests are implemented in ScEditFieldObj_Header. Change-Id: I45d3b17bd244090c491c85475f20bc06eb92908f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130953 Tested-by: Jenkins Reviewed-by: Jens Carl <j.car...@gmx.de> diff --git a/framework/qa/complex/api_internal/api.lst b/framework/qa/complex/api_internal/api.lst index 6854643155be..096e10dc81cb 100644 --- a/framework/qa/complex/api_internal/api.lst +++ b/framework/qa/complex/api_internal/api.lst @@ -73,7 +73,6 @@ job73=sc.ScAccessiblePreviewTable job74=sc.ScAccessibleSpreadsheet job78=sc.ScAutoFormatFieldObj job88=sc.ScDatabaseRangeObj -job98=sc.ScHeaderFieldObj job126=sc.ScSheetLinkObj job132=sc.ScStyleObj job140=sc.XMLContentExporter diff --git a/qadevOOo/Jar_OOoRunner.mk b/qadevOOo/Jar_OOoRunner.mk index 38a0b628ed4d..60e1df69111b 100644 --- a/qadevOOo/Jar_OOoRunner.mk +++ b/qadevOOo/Jar_OOoRunner.mk @@ -951,7 +951,6 @@ $(eval $(call gb_Jar_add_sourcefiles,OOoRunner,\ qadevOOo/tests/java/mod/_sc/ScDatabaseRangeObj \ qadevOOo/tests/java/mod/_sc/ScDataPilotItemObj \ qadevOOo/tests/java/mod/_sc/ScDocumentConfiguration \ - qadevOOo/tests/java/mod/_sc/ScHeaderFieldObj \ qadevOOo/tests/java/mod/_sc/ScHeaderFooterTextCursor \ qadevOOo/tests/java/mod/_sc/ScHeaderFooterTextObj \ qadevOOo/tests/java/mod/_sc/ScModelObj \ diff --git a/qadevOOo/objdsc/sc/com.sun.star.comp.office.ScHeaderFieldObj.csv b/qadevOOo/objdsc/sc/com.sun.star.comp.office.ScHeaderFieldObj.csv deleted file mode 100644 index e4f37d6e1016..000000000000 --- a/qadevOOo/objdsc/sc/com.sun.star.comp.office.ScHeaderFieldObj.csv +++ /dev/null @@ -1,3 +0,0 @@ -"ScHeaderFieldObj";"com::sun::star::lang::XComponent";"dispose()" -"ScHeaderFieldObj";"com::sun::star::lang::XComponent";"addEventListener()" -"ScHeaderFieldObj";"com::sun::star::lang::XComponent";"removeEventListener()" diff --git a/qadevOOo/tests/java/mod/_sc/ScHeaderFieldObj.java b/qadevOOo/tests/java/mod/_sc/ScHeaderFieldObj.java deleted file mode 100644 index 7cf49d47e207..000000000000 --- a/qadevOOo/tests/java/mod/_sc/ScHeaderFieldObj.java +++ /dev/null @@ -1,179 +0,0 @@ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ - -package mod._sc; - -import java.io.PrintWriter; - -import lib.TestCase; -import lib.TestEnvironment; -import lib.TestParameters; -import util.SOfficeFactory; - -import com.sun.star.beans.XPropertySet; -import com.sun.star.container.XNameAccess; -import com.sun.star.lang.XComponent; -import com.sun.star.lang.XMultiServiceFactory; -import com.sun.star.sheet.XHeaderFooterContent; -import com.sun.star.sheet.XSpreadsheetDocument; -import com.sun.star.style.XStyle; -import com.sun.star.style.XStyleFamiliesSupplier; -import com.sun.star.text.XText; -import com.sun.star.text.XTextContent; -import com.sun.star.text.XTextCursor; -import com.sun.star.uno.AnyConverter; -import com.sun.star.uno.Type; -import com.sun.star.uno.UnoRuntime; -import com.sun.star.uno.XInterface; - -/** -* Test for object which is represented by service -* <code>com.sun.star.text.TextField</code>. <p> -* Object implements the following interfaces : -* <ul> -* <li> <code>com::sun::star::lang::XComponent</code></li> -* <li> <code>com::sun::star::beans::XPropertySet</code></li> -* <li> <code>com::sun::star::text::XTextField</code></li> -* <li> <code>com::sun::star::text::XTextContent</code></li> -* <li> <code>com::sun::star::text::TextContent</code></li> -* </ul> -* @see com.sun.star.text.TextField -* @see com.sun.star.lang.XComponent -* @see com.sun.star.beans.XPropertySet -* @see com.sun.star.text.XTextField -* @see com.sun.star.text.XTextContent -* @see com.sun.star.text.TextContent -* @see ifc.lang._XComponent -* @see ifc.beans._XPropertySet -* @see ifc.text._XTextField -* @see ifc.text._XTextContent -* @see ifc.text._TextContent -*/ -public class ScHeaderFieldObj extends TestCase { - private XSpreadsheetDocument xSpreadsheetDoc; - - /** - * Creates Spreadsheet document. - */ - @Override - protected void initialize( TestParameters tParam, PrintWriter log ) throws Exception { - SOfficeFactory SOF = SOfficeFactory.getFactory( tParam.getMSF() ); - log.println( "creating a Spreadsheet document" ); - xSpreadsheetDoc = SOF.createCalcDoc(null); - } - - /** - * Disposes Spreadsheet document. - */ - @Override - protected void cleanup( TestParameters tParam, PrintWriter log ) { - log.println( " disposing xSheetDoc " ); - XComponent oComp = UnoRuntime.queryInterface (XComponent.class, xSpreadsheetDoc); - util.DesktopTools.closeDoc(oComp); - } - - /** - * Creating a TestEnvironment for the interfaces to be tested. - * Retrieves the collection of style families available in the document - * using the interface <code>XStyleFamiliesSupplier</code>. - * Obtains default style from the style family <code>'PageStyles'</code>. - * Retrieves the interface <code>XHeaderFooterContent</code> from the style - * using the property <code>'RightPageHeaderContent'</code>. Creates the - * instance of the service <code>com.sun.star.text.TextField.Time</code> and - * the instance of the service <code>com.sun.star.text.TextField.Date</code> - * Obtains the text (the interface <code>XText</code>) which is printed in - * the left part of the header or footer and inserts in its content - * the second created instance. - * Object relations created : - * <ul> - * <li> <code>'CONTENT'</code> for - * {@link ifc.text._XTextContent}(the interface <code>XTextContent</code> - * that was queried from the second created instance) </li> - * <li> <code>'TEXT'</code> for - * {@link ifc.text._XTextContent}(the text which is printed in the - * right part of the header or footer) </li> - * </ul> - * @see com.sun.star.style.XStyleFamiliesSupplier - * @see com.sun.star.sheet.XHeaderFooterContent - * @see com.sun.star.text.XText - * @see com.sun.star.text.XTextContent - */ - @Override - protected TestEnvironment createTestEnvironment(TestParameters tParam, PrintWriter log) throws Exception { - - XInterface oObj = null; - XPropertySet PropSet; - XNameAccess PageStyles = null; - XStyle StdStyle = null; - XTextContent oContent = null; - XInterface aField = null; - - XStyleFamiliesSupplier StyleFam = UnoRuntime.queryInterface( - XStyleFamiliesSupplier.class, - xSpreadsheetDoc ); - - XNameAccess StyleFamNames = StyleFam.getStyleFamilies(); - PageStyles = (XNameAccess) AnyConverter.toObject( - new Type(XNameAccess.class),StyleFamNames.getByName("PageStyles")); - StdStyle = (XStyle) AnyConverter.toObject( - new Type(XStyle.class),PageStyles.getByName("Default")); - - //get the property-set - PropSet = UnoRuntime.queryInterface(XPropertySet.class, StdStyle); - - XHeaderFooterContent RPHC = null; - // creation of testobject here - // first we write what we are intend to do to log file - log.println( "creating a test environment" ); - RPHC = (XHeaderFooterContent) AnyConverter.toObject( - new Type(XHeaderFooterContent.class), - PropSet.getPropertyValue("RightPageHeaderContent")); - - XText left = RPHC.getLeftText(); - - XMultiServiceFactory oDocMSF = UnoRuntime.queryInterface( - XMultiServiceFactory.class, - xSpreadsheetDoc ); - - XTextContent the_Field = null; - oObj = (XInterface) - oDocMSF.createInstance( "com.sun.star.text.TextField.Time" ); - - the_Field = UnoRuntime.queryInterface(XTextContent.class,oObj); - - aField = (XInterface) - oDocMSF.createInstance("com.sun.star.text.TextField.Date"); - - oContent = UnoRuntime.queryInterface(XTextContent.class, aField); - - XTextCursor the_Cursor = left.createTextCursor(); - - left.insertTextContent(the_Cursor,the_Field, false); - PropSet.setPropertyValue("RightPageHeaderContent", RPHC); - - TestEnvironment tEnv = new TestEnvironment(oObj); - - tEnv.addObjRelation("CONTENT",oContent); - tEnv.addObjRelation("TEXT", RPHC.getRightText()); - - return tEnv; - - } // finish method getTestEnvironment - -} // finish class ScHeaderFieldObj - diff --git a/sc/qa/unoapi/sc_4.sce b/sc/qa/unoapi/sc_4.sce index 2d221d1bad3a..d63aad00467b 100644 --- a/sc/qa/unoapi/sc_4.sce +++ b/sc/qa/unoapi/sc_4.sce @@ -18,7 +18,6 @@ -o sc.ScDataPilotItemObj -o sc.ScDatabaseRangeObj -o sc.ScDocumentConfiguration -# ported to cppunit -o sc.ScHeaderFieldObj # The two HeaderFooter tests seem to fail randomly # -o sc.ScHeaderFooterTextCursor # SHF_TextObj is composed of SHF_TextData, which has a weak reference to commit 4a804f87eba3a0e4cc8777a1e76d5f1fb06037c6 Author: Stephan Bergmann <sberg...@redhat.com> AuthorDate: Fri Mar 4 14:28:33 2022 +0100 Commit: Stephan Bergmann <sberg...@redhat.com> CommitDate: Fri Mar 4 17:15:54 2022 +0100 external/python3: Avoid "ThreadSanitizer: destroy of a locked mutex" ..when building ExternalProject_python3 with Clang -fsanitize=thread, > WARNING: ThreadSanitizer: destroy of a locked mutex (pid=973799) > #0 in AnnotateRWLockDestroy at /home/sbergman/github.com/llvm/llvm-project/compiler-rt/lib/tsan/rtl/tsan_interface_ann.cpp:184:3 (workdir/UnpackedTarball/python3/python +0x498460) > #1 in recreate_gil at workdir/UnpackedTarball/python3/Python/ceval_gil.h:138:5 (workdir/UnpackedTarball/python3/libpython3.8d.so.1.0 +0xe84aa9) > #2 in _PyEval_ReInitThreads at workdir/UnpackedTarball/python3/Python/ceval.c:350:5 (workdir/UnpackedTarball/python3/libpython3.8d.so.1.0 +0xe847c7) > #3 in PyOS_AfterFork_Child at workdir/UnpackedTarball/python3/./Modules/posixmodule.c:469:5 (workdir/UnpackedTarball/python3/libpython3.8d.so.1.0 +0x1163dbd) > #4 in os_fork_impl at workdir/UnpackedTarball/python3/./Modules/posixmodule.c:6253:9 (workdir/UnpackedTarball/python3/libpython3.8d.so.1.0 +0x11adcad) > #5 in os_fork at workdir/UnpackedTarball/python3/./Modules/clinic/posixmodule.c.h:2750:12 (workdir/UnpackedTarball/python3/libpython3.8d.so.1.0 +0x117b481) > #6 in cfunction_vectorcall_NOARGS at workdir/UnpackedTarball/python3/Objects/methodobject.c:463:24 (workdir/UnpackedTarball/python3/libpython3.8d.so.1.0 +0x9db7e1) > #7 in _PyObject_Vectorcall at workdir/UnpackedTarball/python3/./Include/cpython/abstract.h:127:11 (workdir/UnpackedTarball/python3/libpython3.8d.so.1.0 +0xf0225e) > #8 in call_function at workdir/UnpackedTarball/python3/Python/ceval.c:4963:13 (workdir/UnpackedTarball/python3/libpython3.8d.so.1.0 +0xef3f4a) > #9 in _PyEval_EvalFrameDefault at workdir/UnpackedTarball/python3/Python/ceval.c:3469:23 (workdir/UnpackedTarball/python3/libpython3.8d.so.1.0 +0xedc5d8) [...] > #143 in pymain_run_python at workdir/UnpackedTarball/python3/Modules/main.c:610:21 (workdir/UnpackedTarball/python3/libpython3.8d.so.1.0 +0x1149f6c) > #144 in Py_RunMain at workdir/UnpackedTarball/python3/Modules/main.c:689:5 (workdir/UnpackedTarball/python3/libpython3.8d.so.1.0 +0x11495e9) > #145 in pymain_main at workdir/UnpackedTarball/python3/Modules/main.c:719:12 (workdir/UnpackedTarball/python3/libpython3.8d.so.1.0 +0x114a299) > #146 in Py_BytesMain at workdir/UnpackedTarball/python3/Modules/main.c:743:12 (workdir/UnpackedTarball/python3/libpython3.8d.so.1.0 +0x114a30d) > #147 in main at workdir/UnpackedTarball/python3/./Programs/python.c:16:12 (workdir/UnpackedTarball/python3/python +0x4d00f8) Assuming that the GIL is always locked before the fork, better tell TSan about a fake RELEASED before telling it about a fake DESTROY, to keep TSan's model consistent. Change-Id: I6c68d7e415aa0ffc3047e5a5c4c4aca6b0cce8cb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130985 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sberg...@redhat.com> diff --git a/external/python3/UnpackedTarball_python3.mk b/external/python3/UnpackedTarball_python3.mk index 31b6a166e6ae..06c64d7d5688 100644 --- a/external/python3/UnpackedTarball_python3.mk +++ b/external/python3/UnpackedTarball_python3.mk @@ -28,6 +28,7 @@ $(eval $(call gb_UnpackedTarball_add_patches,python3,\ external/python3/python-3.5.tweak.strip.soabi.patch \ external/python3/darwin.patch.0 \ external/python3/macos-11.patch.0 \ + external/python3/tsan.patch.0 \ )) ifneq ($(filter DRAGONFLY FREEBSD LINUX NETBSD OPENBSD SOLARIS,$(OS)),) diff --git a/external/python3/tsan.patch.0 b/external/python3/tsan.patch.0 new file mode 100644 index 000000000000..d599ec046109 --- /dev/null +++ b/external/python3/tsan.patch.0 @@ -0,0 +1,10 @@ +--- Python/ceval_gil.h ++++ Python/ceval_gil.h +@@ -135,6 +135,7 @@ + + static void recreate_gil(struct _gil_runtime_state *gil) + { ++ _Py_ANNOTATE_RWLOCK_RELEASED(&gil->locked, 1); + _Py_ANNOTATE_RWLOCK_DESTROY(&gil->locked); + /* XXX should we destroy the old OS resources here? */ + create_gil(gil);