Skip to content
This repository was archived by the owner on Nov 1, 2018. It is now read-only.

Unit tests fail on CoreCLR on Linux #155

Closed
cesarblum opened this issue Oct 19, 2015 · 10 comments
Closed

Unit tests fail on CoreCLR on Linux #155

cesarblum opened this issue Oct 19, 2015 · 10 comments

Comments

@cesarblum
Copy link
Contributor

Most tests fail like shown below. libsqlite3 is installed on the machine. Tests pass on Mono.

This is related to aspnet/Universe#304.

Assert.Throws() Failure
      Expected: typeof(Microsoft.Data.Sqlite.SqliteException)
      Actual:   typeof(System.DllNotFoundException): Unable to load DLL 'sqlite3': The specified module could not be found.
       (Exception from HRESULT: 0x8007007E)
      Stack Trace:
           at Microsoft.Data.Sqlite.Interop.NativeMethods.sqlite3_open_v2(IntPtr filename, Sqlite3Handle& ppDb, Int32 flags, IntPtr vfs)
           at Microsoft.Data.Sqlite.Interop.NativeMethods.sqlite3_open_v2(String filename, Sqlite3Handle& ppDb, Int32 flags, String vfs)
           at Microsoft.Data.Sqlite.SqliteConnection.Open()
           at Microsoft.Data.Sqlite.SqliteConnectionTest.<>c__DisplayClass9_0.<Open_throws_when_error>b__0()
      System.DllNotFoundException : Unable to load DLL 'sqlite3': The specified module could not be found.
       (Exception from HRESULT: 0x8007007E)
@natemcmaster
Copy link
Contributor

Is libsqlite3-dev installed?

@cesarblum
Copy link
Contributor Author

After installing that package, I don't see the failures anymore.

But shouldn't the tests work having only the binaries installed? I don't see the same failures when running on Mono.

@cesarblum
Copy link
Contributor Author

This affects aspnet/Universe#304.

@natemcmaster
Copy link
Contributor

The underlying issue is still being discussed. (See https://github.com/dotnet/coreclr/issues/930). Mono's p/invoke interop works differently than CoreCLR. We can't compensate for this at the package level. Hence the requirement to use libsqlite3-dev on ubuntu.

@muratg
Copy link

muratg commented Oct 19, 2015

Should we manually install this on all agents until this is figured out?

@natemcmaster
Copy link
Contributor

@muratg Yes.

To be clear though, I believe the real problem is a quirk in Ubuntu's packaging of libsqlite3 vs libsqlite3-dev, not CoreCLR itself. Other version of Debian linux don't appear to have this issue.

@muratg
Copy link

muratg commented Oct 19, 2015

@CesarBS Can we add this to the agents?

@victorhurdugaci FYI. Do we have "steps to bring up a new agent" somewhere? If so, this should probably go in as well.

@rowanmiller
Copy link
Contributor

@natemcmaster is there anything we need to do on our side for this?

@natemcmaster
Copy link
Contributor

@rowanmiller No, the issue is external to this project. Unless DNX adds something like aspnet/dnvm#474 all we can do is explicitly list our native dependencies as we currently do in our README.

@cesarblum
Copy link
Contributor Author

@davidfowl

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants