Fix some Windows bugs in 4.x - #301
Conversation
1f80a33 to
32b8edd
Compare
|
@GitMensch Note that at least two more tests could be easily fixed (opinion needed).
Difference in error message : This is because
Any preference ?
The error is as follows: This should already be taken care of by this definition in However, |
86438d9 to
248d0db
Compare
|
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## gitside-master #301 +/- ##
=================================================
Coverage ? 62.94%
=================================================
Files ? 40
Lines ? 72837
Branches ? 20312
=================================================
Hits ? 45849
Misses ? 19799
Partials ? 7189 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
bb5e488 to
798d9c6
Compare
GitMensch
left a comment
There was a problem hiding this comment.
Wouldn't be the changes to build_windows be relevant for 3.x already (or did we just not merge them yet)?
Can you please commit https://github.com/OCamlPro/gnucobol/pull/300/changes upstream? I guess that will fix at least part of the MSVC issues here as well, no?
... why don't we have that much failures on MSYS2 also on 3.x? (the fileio parts are clear, these are new in 4.x and not that well tested on Windows)
| fflush ((FILE *)f->file); | ||
| } | ||
| if (f->fd >= 0) { | ||
| if (f->fd >= 0 && f->open_mode != COB_OPEN_INPUT) { |
There was a problem hiding this comment.
switch this condition, please, same below
There was a problem hiding this comment.
What do you mean by "switching" ?
Note that an identical condition already exists in cob_file_close to protect a call to fdcobsync - I merely copied that.
There was a problem hiding this comment.
if (f->open_mode != COB_OPEN_INPUT
&& f->fd >= 0) {| #include <libcob.h> | ||
|
|
||
| COB_EXT_EXPORT int | ||
| dump (unsigned char *data) |
There was a problem hiding this comment.
If possible at all, we should prefer replacing most dump calls to execute CBL_OC_DUMP instead...
are those tests fixed in 3.x (possibly just in a different place there?
There was a problem hiding this comment.
All the tests in 3.x that use C functions correctly use COB_EXT_EXPORT. Some tests specific to 4.x did not, hence the fixes here.
As for CBL_OC_DUMP, note that it "does not work yet" in 4.x (cf tests "LINE SEQUENTIAL" (run_file.at) failing because CBL_OC_DUMP can not be found). I'd have to dig into that, but since I'm going for vacation this afternoon, it's unlikely I'll have time to tackle this issue before.
Yes, I'm already preparing a PR for that - just my focus was on 4.x for now (takes time to context-switch my brain between the two branches). It will also include the fixes that also apply to 3.x (protecting the call to
Yes, will do that right now. And this has to be merged in 4.x too (I'll add it to the GC3/GC4 merge PR).
Many failures were just because of new code in 4.x. Also, some new tests in 4.x "accidentally" revealed bugs that are present in 3.x but not triggered. P.S : any suggestion regarding the two bugs mentionned in #301 (comment) ? |
dd921fd to
d002ef1
Compare
d002ef1 to
02c2865
Compare
that's reasonable for [_WIN32] - but then this should likely include /c -> [cC]: (I tend to not ignore file case, as FAT32 and NTFS case-sensitive exists on both Windows and Linux)... This should already be taken care of by this definition in common.h.... in cobinternal.h OK, that's a "new" bug in GC4 then; I understand Ron's idea with cobinternal.h, but ... am not 100% sure what to do with this and other headers splits. Please think about the general approach and then share your thoughts. For that specific test where a C test file is compiled: do we need snprintf there in first case? |
I hope we get testcases for those together with the bugfix to 3.x :-) |
02c2865 to
94d267f
Compare
This PR fixes 19 failing tests in the Windows MSVC CI (8 tests under MSYS2).