Issue #13642 has been updated by MSP-Greg (Greg L).


Thanks for reviewing.  Added the patch, removed my copy command, and test passed in `make test-all`.

Maybe change
```
path = ::File.dirname(so) + ::File::PATH_SEPARATOR + path
```
to
```
path = path + ::File::PATH_SEPARATOR + ::File.dirname(so)
```


----------------------------------------
Bug #13642: MinGW - Bug::Win32::TestDln#test_check_imported & misc
https://bugs.ruby-lang.org/issues/13642#change-66627

* Author: MSP-Greg (Greg L)
* Status: Open
* Priority: Normal
* Assignee: 
* Target version: 
* ruby -v: ruby 2.5.0dev (2017-06-08 trunk 59046) [x64-mingw32]
* Backport: 2.2: UNKNOWN, 2.3: UNKNOWN, 2.4: UNKNOWN
----------------------------------------
First of all, this is all windows specific.  My current MinGW build system is now showing five failures in [`test-all`](https://msp-greg.github.io/file.mingw_test-all.html#test-all-5-failures).  I am comfortable with having repeatable results, so I now hope to investigate and help fix the failures.

The following failure is due the fact that `dlntest.dll` cannot be found when requiring `dln.so`.  If I copy it to a location in the path at the time of testing, the test will pass.

```
 87) Failure:
Bug::Win32::TestDln#test_check_imported [E:/GitHub/ruby/test/-ext-/win32/test_dln.rb:15]:
[Bug #6303].

1. [2/2] Assertion for "stderr"
   | <[]> expected but was
   | <["E:/GitHub/ruby/lib/rubygems/core_ext/kernel_require.rb:60:in `require': 126: The specified module could not be found.   - E:/GitHub/ruby-loco/src/build-x86_64/.ext/x64-mingw32/-test-/win32/dln.so (LoadError)",
   |  "\tfrom E:/GitHub/ruby/lib/rubygems/core_ext/kernel_require.rb:60:in `require'"]>.
```

I have done a few mswin builds using usa's (Usaku NAKAMURA) [mswin-build](https://github.com/unak/mswin-build) repo.  I have gotten different results for both `test-all` and `test-rubyspec`/`test-spec` versus MinGW builds.  I have had mswin failures that do not show up on [http://rubyci.org/](http://rubyci.org/), but have also appeared in my MinGW builds.

In some recent threads the issue of install before test, differing folder structure between build systems, etc has been addressed.  Additionally, there may be issues with what *nix commands/exe's are available during testing.  I think for the spec tests, I had to change the path to include some more *nix commands/exe's to minimize the number of failed/errored tests.  FWIW, I have tried to keep my  build system as close to windows as possible, and my tests are not run in a bash shell.

So now that I've stated some of the things I'm wondering about, two questions:

1. The above failure.  I'll add a copy to my testing code.  Is this something that can be changed in the build system source?

2. Given the odd differences between mswin and MinGW builds, might there be places where something is set for mswin only, but should also be set for MinGW also?  I have not looked, but am willing to do so.  I say this simply because public facing MinGW build systems have not previously run tests.

Reminder - I don't do c.  Hence, I can read c source and get an idea as to how it works, and I can read the build files in the same manner.   But that's it, I could never create them.



-- 
https://bugs.ruby-lang.org/

Unsubscribe: <mailto:ruby-core-request / ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>