Re-using shared object in another unrelated test?

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Re-using shared object in another unrelated test?

tstuefe
Hi all,

I'd am writing a jtreg test which loads a native shared library. I do not actually need to do anything with the shared library, so loading and unloading again. I do not plan on resolving any exports, it just needs to be there and be valid, on all platforms.

There are a number of shared objects which would be a fit, e.g. JniVersion. Would it be okay to use this in a jtreg test or would this be considered bad form?

Thank you, Thomas
Reply | Threaded
Open this post in threaded view
|

Re: Re-using shared object in another unrelated test?

David Holmes
Hi Thomas,

On 7/09/2017 6:23 PM, Thomas Stüfe wrote:

> Hi all,
>
> I'd am writing a jtreg test which loads a native shared library. I do
> not actually need to do anything with the shared library, so loading and
> unloading again. I do not plan on resolving any exports, it just needs
> to be there and be valid, on all platforms.
>
> There are a number of shared objects which would be a fit, e.g.
> JniVersion. Would it be okay to use this in a jtreg test or would this
> be considered bad form?

Given the convention used to get the native parts of jtreg tests built
(when building test-image) I would think it simpler, and cleaner to just
define a trivial .c file and build the library from it.

Thanks,
David

> Thank you, Thomas
Reply | Threaded
Open this post in threaded view
|

Re: Re-using shared object in another unrelated test?

tstuefe


On Thu, Sep 7, 2017 at 10:29 AM, David Holmes <[hidden email]> wrote:
Hi Thomas,

On 7/09/2017 6:23 PM, Thomas Stüfe wrote:
Hi all,

I'd am writing a jtreg test which loads a native shared library. I do not actually need to do anything with the shared library, so loading and unloading again. I do not plan on resolving any exports, it just needs to be there and be valid, on all platforms.

There are a number of shared objects which would be a fit, e.g. JniVersion. Would it be okay to use this in a jtreg test or would this be considered bad form?

Given the convention used to get the native parts of jtreg tests built (when building test-image) I would think it simpler, and cleaner to just define a trivial .c file and build the library from it.

Thanks,
David


Thanks, David, I will do that.

..Thomas

 
Thank you, Thomas