summaryrefslogtreecommitdiffstats
path: root/make/scripts/runtest.sh
Commit message (Collapse)AuthorAgeFilesLines
* Bug 758: Fix scripts and ant build files to work w/ Java7 (default now) ↵Sven Gothel2013-06-201-2/+2
| | | | producing Java6 bytecode ; Apply JAR Manifest tags: Sealed, Permissions and Codebase
* Fix Bug 757: Regression of URL to URI conversion (Encoded path not ↵Sven Gothel2013-06-191-9/+11
| | | | | | | | | | | | | | | | | | | | | | | | compatible w/ file scheme. Regression of (Bug 683, Commit b98825eb7cfb61aead4a7dff57471cd2d2c26823). The URI encoded path cannot be read by File I/O (if file scheme), since the latter requests an UTF8/16 name, not an URI encoded name (i.e. %20 for space). The encoded URL is produced if calling 'uri.toURL()' and hence the new 'IOUtil.toURL(URI)' provides a custom conversion recovering the UTF name via 'new File(uri).getPath()'. Tested w/ - synthetic URI/URL coposition (unit test) - manual w/ moving 'build' to 'build öä lala' for gluegen, joal and jogl. +++ Misc.: - 'URI JarUtil.getURIDirname(URI)' -> 'URI IOUtil.getDirname(URI)' ++
* GlueGen (Compile Time): Add 'CStruct' Annotation Processor (APT) to ↵Sven Gothel2013-06-141-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 'gluegen' C Structs on-the-fly (2-pass actually). Convenient annotation processing (APT) hooked to 'javac' (1.6) via gluegen.jar META-INF service provider 'javax.annotation.processing.Processor' -> 'com.jogamp.gluegen.structgen.CStructAnnotationProcessor'. Am implicit APT / JAVAC would be possible, however - to have a proper process the unit test utilizes an explicit 2 pass run: <!-- Annotation Processor Only - First --> <javac destdir="${build_t.java}"> <classpath refid="junit.compile.classpath"/> <compilerarg value="-proc:only"/> <compilerarg value="-J-Djogamp.gluegen.structgen.debug"/> <compilerarg value="-J-Djogamp.gluegen.structgen.output=${build_t.gen}/classes"/> <src path="${test.base.dir}/com/jogamp/gluegen/test/junit/structgen"/> </javac> <!-- Javac Only - Second --> <javac destdir="${build_t.java}"> <classpath refid="junit.compile.classpath"/> <compilerarg value="-proc:none"/> <src path="${test.base.dir}"/> <src path="${build_t.gen}" /> </javac> Original code from Michael Bien's 'superglue' git://github.com/mbien/superglue.git, finally merged to GlueGen (as once intended). Note: The APT javac pass requires to use 'gluegen.jar' instead of 'gluegen-rt.jar' ! The 2-pass process also alows using the runtime gluegen-rt.jar and hence ensures clean namespace check at compilation.
* Bug 752: Review Code Vulnerabilities (Permission Checks of new exposed code ↵Sven Gothel2013-06-111-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | and privileged access) This review focuses on how we perform permission checks, or better - do we circumvent some assuming full privileges ? Some native methods do need extra permission validation, i.e. loading native libraries. Further more AccessController.doPrivileged(..) shall not cover generic code exposing a critical feature to the user. Further more .. we should rely on the SecuritManager, i.e. AccessControlContext's 'checkPermission(Permission)' code to comply w/ fine grained permission access. It is also possible to have full permission w/o having any certificates (-> policy file). +++ We remove implicit AccessController.doPrivileged(..) from within our trusted code for generic methods, like Property access, temp. files. +++ SecurityUtil: - Remove 'getCommonAccessControlContext(Class<?> clz)', which returned a local AccessControlContext for later restriction if the passed class contains all certificates as the 'trusted' GlueGen class has. - Simply expose convenient permission check methods relying on SecurityManager / AccessControlContext. PropertyAccess: - 'protected static void addTrustedPrefix(..)' requires AllPermissions if SecurityManager is installed. - Remove implicit doPrivileged(..) triggered by passed AccessControlContext instance, only leave it for trusted prefixes. IOUtil: - Remove all doPrivileged(..) - Elevation shall be performed by caller. DynamicLinker: - 'public long openLibraryLocal(..)' and 'public long openLibraryGlobal(..)' may throw SecurityException, if a SecurityManager is installed and the dyn. link permission is not granted in the calling code. Implemented in their respective Unix, OSX and Windows manifestation. Caller has to elevate privileges via 'doPrivileged(..) {}' ! +++ Tests: - Property access - File access - Native library loading Manual Applet test (unsigned, but w/ SecurityManager and policy file): > gluegen/test/applet Applet has been tested w/ signed JAR w/ Firefox and Java7 on GNU/Linux as well. Manual Application test (unsigned, but w/ SecurityManager and policy file): com.jogamp.junit.sec.TestSecIOUtil01 - Run w/ SecurityManager and policy file: - gluegen/scripts/runtest-secmgr.sh - Run w/o SecurityManager: - gluegen/scripts/runtest.sh
* Fix Bug 683 part1: IOUtil, JarUtil, TempJarCache, .. uses URI instead of URL ↵Sven Gothel2013-06-091-2/+2
| | | | to remove DNS Lookups etc ..
* Enhance VersionNumber*: Use only RegExp and cache default (no wrapped ↵Sven Gothel2013-05-311-3/+3
| | | | whitespace tokenizer); String match: Store end-of-match and flag defined components.
* Modify linux-arm scripts for new toolchain (crosstools-ng) ; ↵Sven Gothel2013-04-231-3/+3
| | | | gluegen-cpptasks-linux-armv6hf.xml: Enable cc-arg '-mfloat-abi=hard' ; Add script make*all.sh
* Bug 715: Adding unit test w/ 'intArrayCopy(int *dest, int *src, int num)' to ↵Sven Gothel2013-04-131-2/+2
| | | | | | | | | | | | test array offset working correct. The 'carray' pointer returned from GetPrimitiveArrayCritical(..) is moved about the array offset and used in ReleasePrimitiveArrayCritical(..) to release the pinpointed memory. Even though this 'is' a bug by violating the _sparse_ specification, Hotspot impl. doesn't use the value at all (NOP) and hence this code didn't produce an error since .. (Same w/ Dalvik). A followup commit will fix this issue.
* Bug 588: Adding jogamp.version property, i.e. 2.0.2-rc-<TIMESTAMP> used for ↵Sven Gothel2013-03-281-2/+2
| | | | | | | | | | | | Manifest ; Common jogamp_int_version for Android. Until 2.0.2 gets released, the version string is 2.0.2-rc-<TIMESTAMP> and used in the Manifest for IMPLEMENTATION_VERSION. The previous build version name of IMPLEMENTATION_VERSION goes into the new tag IMPLEMENTATION_BUILD. Further more, we use a common jogamp_int_version for Android, to make life more easy.
* Fix intptr_t*, uintptr_t*, ptrdiff_t* and size_t* mapping, map them to ↵Sven Gothel2013-03-201-2/+2
| | | | | | PointerBuffer, since referenced memory-size is arch dependent Added extensive PointerBuffer unit tests w/ new mapping in generated test class.
* Fix Long*HashMap impl. of IntIntHashMap: Better 64bit hash value, using new ↵Sven Gothel2013-03-121-3/+3
| | | | | | HashUtil. Introduce markup: /*keyHash*/(.*)/*keyHash*/ allowing Long*HashMap to inject hash function for 64bit value.
* Unit Tests: OSX/Java7 w/o 32bit tests ; Reliable Test1p*JavaEmitter JNI ↵Sven Gothel2013-02-281-2/+2
| | | | | | | | | | | | | | binding initialization - OSX/Java7 w/o 32bit tests OSX/Java7 has no 32bit JVM, disable d32 tests for such, using property 'use.macosx32' - Reliable Test1p*JavaEmitter JNI binding initialization Load libs and init JNI binding statically w/ @BeforeClass, since OSX/Java7 for some reason gets confused (?) w/ init sequence. This is no issue for JOGL etc .. as far we have observed.
* Bug 681: Add Elf Parsing for other OS than Linux, if ARM and !ANDROID using ↵Sven Gothel2013-02-091-2/+4
| | | | | | | | /proc/self/exe (Linux) or a found java/jvm native lib. - PlatformPropsImpl.queryABITypeImpl: Check Elf Header for ARM + !ANDROID (i.e. add other OS than Linux, use native java/jmv lib) - NativeLibrary.enumerateLibraryPaths: Add 'sun.boot.library.path' to enumeration! - TestElfReader01: Add test for finding java/jvm native lib and parse it
* Bug 681: Use ELF Header + ARM EABI Section Parsing in PlatformPropsImpl to ↵Sven Gothel2013-02-081-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | to distinguish ARM soft-float/hard-float (part-2) + /** + * Returns the {@link ABIType} of the current platform using given {@link CPUType cpuType} + * and {@link OSType osType} as a hint. + * <p> + * Note the following queries are performed: + * <ul> + * <li> not {@link CPUFamily#ARM} -> {@link ABIType#GENERIC_ABI} </li> + * <li> else + * <ul> + * <li> not {@link OSType#LINUX} -> {@link ABIType#EABI_GNU_ARMEL} </li> + * <li> else + * <ul> + * <li> Elf ARM Tags -> {@link ABIType#EABI_GNU_ARMEL}, {@link ABIType#EABI_GNU_ARMHF} </li> + * </ul></li> + * </ul></li> + * </ul> + * </p> + * <p> + * Elf ARM Tags are read using {@link ElfHeader}, .. and {@link SectionArmAttributes#abiVFPArgsAcceptsVFPVariant(byte)}. + * </p> + * + * @param cpuType + * @param osType + * @return + */ + private static final ABIType queryABITypeImpl(CPUType cpuType, OSType osType) {
* Bug 681: Add Basic ELF Header + ARM EABI Section Parsing, allowing to ↵Sven Gothel2013-02-081-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | distinguish ARM soft-float/hard-float (part-1) https://jogamp.org/bugzilla/show_bug.cgi?id=681 + * References: + * <ul> + * <li>http://linux.die.net/man/5/elf</li> + * <li>http://www.sco.com/developers/gabi/latest/contents.html</li> + * <li>http://infocenter.arm.com/ + * <ul> + * <li>ARM IHI 0044E, current through ABI release 2.09</li> + * <li>ARM IHI 0045D, current through ABI release 2.09</li> + * </ul></li> Added self contained jogamp.common.os.elf package w/ entry point class ElfHeader to read a RandomAccessFile and parse it as an ELF file. ELF Parsing completness: - Header: OK - SectionHeader: OK - Section Type SHT_ARM_ATTRIBUTES: OK - Will be read into SectionArmAttributes - Used to distinguisgh soft/hard VFP float Tested manually on: - Linux intel 32bit / 64bit, arm soft-float and hard-float
* GlueGen: NativeLibrary Fix, JNILibLoaderBase EnhancementSven Gothel2013-01-301-3/+5
| | | | | | | | | | | | | | | | | | | - NativeLibrary Fix - enumerateLibraryPaths(..): - Properly iterate through all prefix _and_ suffix. - Make public for JNILibLoaderBase.loadLibraryInternal(..) - isValidNativeLibraryName(..): - Stop iterating through prefix, if previously found but suffix doesn't match. - JNILibLoaderBase.loadLibraryInternal(..) Enhancement - Mark customLibLoader FIXME: remove (we will get rid of jnlp.launcher.class) - If System.load(TempJarCache) and System.loadLibrary(plainLibName) fails, use NativeLibrary.enumerateLibraryPaths() w/ System.load(..) as last resort. Tested on Linux x86_64 Java6 and OSX Java7 manually, no regressions expected.
* Modified Java 1.5 Buffers patch 2b7d1b1d25cb2cd73311ec9159b465f0391bf5e0 - ↵Sven Gothel2013-01-191-1/+1
| | | | | | | | | | | | | | May break GCJ/ECJ .. needs to be revised. - Adding JAVA_6 in PlatformPropsImpl - Buffers.isDirect() chooses fast-path iff JAVA_6, otherwise using reflection (GCJ/ECJ) - Adding JAVA_6 info in VersionUtil - API doc: Refine JAVA_SE and JAVA_6 spec. TODO: In case GCJ etc is unable to compile the JAVA_6 code even though it uses a static condition (probably not), We have to wrap isStatic in an own class, one for JAVA_6 and one for <= 1.5. This will be a good exercise for further issues we may have w/ Java <= 1.5.
* test scriptSven Gothel2013-01-181-2/+2
|
* Add com.jogamp.common.util.PrimitiveStack (FloatStack and IntegerStack), a ↵Sven Gothel2012-12-301-1/+3
| | | | | | | | | | | | simple primitive stack implementation. Currently only FILO put/get operations are implemented using either primitive arrays as I/O itself or <Type>Buffer. Unit tests are included.. Note: Only FloatStack is implemented in a manual, where others (IntegerStack) is derived (generated) from it. Same goes w/ unit tests.
* Fix VersionNumber: Non digits cut off pattern was '\D.*' and cut off digits ↵Sven Gothel2012-10-241-1/+2
| | | | | | | | | | | | | | | | | | | in case leading non digits appear. '\D.*' matches a leading non-digit and then any character. First the string is tokenized by delim: "OpenGL ES GLSL ES 1.0.16" -> "OpenGL ES GLSL ES 1", "0", "16" Enhance pattern as follows and access collected group if matching: // group1: \D* == leading non digits, optional // group2: \d* == digits // group3: .* == any pending chars, optional final java.util.regex.Pattern nonDigitsCutOff = java.util.regex.Pattern.compile("(\\D*)(\\d*)(.*)"); Reorganized storage from atomic values to int[3] array, allowing simple pattern matching loop. Added unit test.
* Buffers: Add normalized put methods, i.e. incl. value range conversion; New ↵Sven Gothel2012-10-171-1/+2
| | | | util. ValueConv for primitive type value conversion
* SingletonInstanceServerSocket: serverSocket.setReuseAddress(true); // reuse ↵Sven Gothel2012-10-041-2/+1
| | | | same port w/ subsequent instance, i.e. overcome TO state when JVM crashed
* SingletonInstanceServerSocket: Add another (manual) unit tests for timeouts.Sven Gothel2012-09-211-5/+5
|
* SingletonInstanceServerSocket: Add kill @ JVM Shutdown _and_ if normal ↵Sven Gothel2012-09-211-1/+3
| | | | unlock fails ; Added unit tests.
* Fix Platform static initialization interdependencies w/ GlueGen native ↵Sven Gothel2012-06-181-3/+3
| | | | | | | | | | | | library loading Some Platform field declarations and it's static initialization has been delegated to it's new abstract super class PlatformPropsImpl to solve static initialization interdependencies w/ the GlueGen native library loading and it's derived information {@link #getMachineDescription()}, {@link #is32Bit()}, ..<br> This mechanism is preferred in this case to avoid synchronization and locking and allow better performance accessing the mentioned fields/methods.
* Fix Bug 587: Use alternative storage location if platform's temp directory ↵Sven Gothel2012-06-161-3/+4
| | | | | | | | | | | | | | | | | | | | | is mounted w/ noexec ; IOUtil API change! Test whether executable files can be launched in temporary folder by trying to run an empty executable file - if !( WINDOWS | OPENKODE ) TempDir: 1) ${java.io.tmpdir}/jogamp 2) $XDG_CACHE_HOME/jogamp - if !( ANDROID | MACOS | WINDOWS | OPENKODE ) 3) $HOME/.jogamp $XDG_CACHE_HOME defaults to $HOME/.cache - TempFileCache: ${TempDir}/file_cache -> ${java.io.tmpdir}/jogamp/file_cache - LauncherTempFileCache: ${TempDir}/file_cache -> ${java.io.tmpdir}/jogamp/file_cache +++ AndroidUtils*.getTempRoot(): Remove unused AccessControlContext param
* Fix IOUtil: Handle all '../' and './' cases by reducing the path.Sven Gothel2012-04-021-2/+2
|
* Test: Add dump of environment varsSven Gothel2012-03-281-2/+2
|
* Add support for armhf/gnueabihf resulting in new 'os.and.arch' := [ ↵Sven Gothel2012-03-281-3/+6
| | | | | | | | | | | | | | | | 'android-armv7hf' and 'linux-armv7hf' ] - Platform gets new ABIType [ GENERIC, ARMEL, ARMHF ] - Platform impl. needs to guess ABIType in case of ARM, since no Java system property ('os.arch' ..) reflects the new EABI. I consider this a bug, since this will also hinder JNLP to work. The latter also uses 'os.arch' sys property to determine the nativelib resource! (See Platform.guessABITypeImpl(..) for details how we guess the type.) - Adding symbolic links to ubuntu's gnueabihf cross tool chain - Adding armhf crossbuild script
* Fix 'NIOOnly' impl ; Use 'final' in gen. Java stubs ;Sven Gothel2012-03-221-3/+3
| | | | | | | | | | | | | | | | | | - Fix 'NIOOnly' impl - Use 'final' in gen. Java stubs ; - No null check for Buffers.isDirect(arrayArg) [required] - Clarify Buffer arg API doc (NIOOnly or NIODirectOnly) - cleaned up loop / branch (CMethodBindingEmitter) - remove unsued vars/code - Tests: - covers normal/NIOOnly/NIODirectOnly - covers passing null for array and NIO
* Add 'asset' URLConnection; IOUtil uses URLConnection / incr. effeciency; ↵Sven Gothel2012-03-171-1/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Android ClassLoaderUtil cleanup; - Add 'asset' URLConnection - Please read API doc 'PiggybackURLConnection' and 'AssetURLConnection' - Solves generic resource handling where platform locations may differ, ie ClassLoader lookup on Android in the 'assets/' subfolder. - New Android 'AssetDexClassLoader' uses 'assets/' folder for findResource(..) - aapt.signed (our APK ant task) - uses 'assets/' folder - adds the 'assetsdir' attribute allowing to copy other assets into the APK - IOUtil uses URLConnection / incr. effeciency - using URLConnection on all getResource(..) since URL is connected anyways for validation and URLConnection can be used by caller right away - String getRelativeOf(URL, String) -> URL getRelativeOf(URL, String) - preserves scheme, authority, etc - simple parentOf handling, more efficient - reusing new 'asset' protocol impl. - Android ClassLoaderUtil cleanup; - Use createClassLoader(..) impl for build-in static jogamp and user APKs, which removes code redundancy Tests: New code path, especially 'assets' are covered by new unit tests, no regressions on Linux.
* Further fix for bug 537 - Catch IllegalArgumentException in ↵Sven Gothel2012-01-051-2/+3
| | | | Platform.loadGlueGenRTImpl(), Reuse JarUtil (same methodology) to determine whether we run from JarURL
* junit.run: Add 32bit tests for OSX (fat binaries)v2.0-rc5Sven Gothel2011-12-181-4/+5
|
* JavaEmitter: Fix primitive StructEmitter for non-fixed-sized (size ↵Sven Gothel2011-12-181-2/+2
| | | | | | | | | conversion, ie. 32/64 bits) An opaque type still needs to be converted to the right size (32/64 bit). In case of a conversion, respect the pointer type. This fixes bug 536 .
* RecursiveThreadGroupLock: New recursive lock interface and impl, allowing ↵Sven Gothel2011-12-111-1/+2
| | | | | | | | | | | | 'spawn off' process to become the lock owner. To avoid complicated synchronization via synchronized, wait and notify between one thread and a 'spawn' off thread which temporarly requires the hold lock, RecursiveThreadGroupLock allows to add and remove other threads to become owners of the lock as if they were the original holder. This simplifies some rare locking use cases, eg. in JOGL's GLProfile initialization sequence where a SharedResourceRunner thread is taking over initialization of shared resources.
* Fix Test1p2ProcAddressEmitter (static var); Add TestTracerSven Gothel2011-12-021-2/+2
|
* TempJarCache/JNILibLoaderBase: Identify the Jar files by their URL within ↵Sven Gothel2011-12-011-2/+2
| | | | our lifecycle. JarFile's hash almost always differs.
* Add 'TestJarsInJar.jar' test JAR file for upcoming JarUtil tests (Jar in Jar).Sven Gothel2011-11-291-4/+8
|
* RunnableTask: Add documentation, incl. unit test. Add ↵Sven Gothel2011-11-221-1/+2
| | | | ReflectionUtil.MethodAccess, a convenient Method instance accessor.
* Fix VersionNumber cstr w/ string parsing: cutt-off non-digit-parts, suppress ↵Sven Gothel2011-10-271-3/+3
| | | | exceptions
* Enhance ReleasePrimitiveArrayCritical: Use mode-flag JNI_ABORT if array is ↵Sven Gothel2011-10-061-2/+3
| | | | | | | | | | | | | const, ie no write-back We shall consider the C header declaration as being correct and no modification shall happen on const arrays. Tested w/ unit tests and JOGL +++ Cleanup JavaType: final immutable fields, proper CVoidPointer name
* IOUtil's getTempRoot()'s Fix chicken-egg problem ; Adding proper API docSven Gothel2011-09-301-3/+3
| | | | | | IOUtil's getTempRoot(): - Fix chicken-egg problem w/ Platform init, using Android.isavailable;
* minor: test/build scriptsSven Gothel2011-09-271-3/+6
|
* Add boolean system property 'jogamp.gluegen.UseTempJarCache', defaults to ↵Sven Gothel2011-09-231-0/+3
| | | | 'true' - allowing to disable usage of TempJarCache.
* test scriptSven Gothel2011-09-221-4/+5
|
* Enhancement/GenericStyle:Sven Gothel2011-09-191-2/+5
| | | | | | | | | | | | | | | | | | - NativeLibrary: - add isValidNativeLibraryName(..) - generic style - Platform - add getOSAndArch(), getOSAndArch(..) - IOUtil - add getClassFileName(..) - add getBasename(..) - add getDirname(..) - added doc - ReflectionUtil - generic style
* Fix TestStructAccessorEndianSven Gothel2011-07-211-2/+2
| | | | | | | | | | | | - StructAccessor uses byteOffset now (since 8b3057585930357bb16546f584d998953b084034) Fix linux armv7l eabi: - build.xml arm7 -> armv7 - all tests passes Adding NativeSizeAlignment-linux-armv7l_eabi from passing test OK: linux 32/64/armv7l, windows 32/64
* - Moved most types and StructLayout to runtime package:Sven Gothel2011-07-181-2/+2
| | | | | | | | | | | | | | | | | | | | | com.jogamp.gluegen.cgram.types -> com.jogamp.gluegen.runtime.types This is required for desired runtime memory layout. - Split CompoundType to StructType + UnionType - StructLayout: - Utilizing SizeThunk alignment - Alignment 1) Natural type alignment 2) Add Size 3) Trailing padding w/ largest element alignment - Only perform memory layout once for type. Status: - Unit test passes w/ static MachineDescriptor64Bit - FIXME static 32bit is faulty, uses 64bit size/alignment - TODO runtime struct layout to please all platforms w/o worrying
* GlueGen proper size / alignment of primitive and compound types usage [1/2] ↵Sven Gothel2011-07-171-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Preparation. Currently GlueGen fails for type long (size) and some alignments (see package.html). - The size and alignment values shall be queried at runtime. - Compound alignment needs to follow the described natural alignment (also @runtime). - - Build - add Linux Arm7 (EABI) - junit test - added compound/struct tests, pointing out the shortcomings of current impl. - package.html - Added alignment documentation - remove intptr.cfg - add GluGen types int8_t, int16_t, uint8_t, uint16_t - move MachineDescription* into runtime - Platform - has runtime MachineDescription - moved size, .. to MachineDescription - use enums for OSType, CPUArch and CPUType defined by os.name/os.arch, triggering exception if os/arch is not supported. This avoids Java String comparison and conscious os/arch detection. - MachineDescription: - compile time instances MachineDescription32Bits, MachineDescription64Bits - runtime queried instance MachineDescriptionRuntime - correct size, alignment, page size, ..
* Fix HastMapTests - Clone: Use unique random pairs: key,valueSven Gothel2011-06-261-1/+2
|