I needed a WIN32 API based file-appending solution to fix a bug (http://bugs.winehq.org/show_bug.cgi?id=21394) and using the example code http://msdn.microsoft.com/en-us/library/aa363778%28VS.85%29.aspx as reference, I have got a somewhat working solution, except if I follow the code, the WriteFile part for appending fails.
Then I have cross-gcc compiling that example source code standard-alone, and the resulting executable won't append under wine cmd either. So it looks like either the example code is wrong, or wine's implementation of WriteFile() is a bit broken sometimes. I have determined the ReadFile succceeds and the SetFilePointer() also work)
So I have two questions - (1) can somebody tell if there is something obviously wrong with the example, (2) can somebody say if it is because wine is not working e.g. SetPointer doesn't work?
On a general question: what's the policy of patches based on MSDN example code like this? I mean, assuming the example does the job, it is quite difficult to write file-appending code which isn't quite similiar to that.
"Hin-Tak" == Hin-Tak Leung hintak_leung@yahoo.co.uk writes:
Hin-Tak> I needed a WIN32 API based file-appending solution to fix a bug Hin-Tak> (http://bugs.winehq.org/show_bug.cgi?id=21394) and using the Hin-Tak> example code Hin-Tak> http://msdn.microsoft.com/en-us/library/aa363778%28VS.85%29.aspx Hin-Tak> as reference, I have got a somewhat working solution, except if Hin-Tak> I follow the code, the WriteFile part for appending fails.
Hin-Tak> Then I have cross-gcc compiling that example source code Hin-Tak> standard-alone, and the resulting executable won't append under Hin-Tak> wine cmd either. So it looks like either the example code is Hin-Tak> wrong, or wine's implementation of WriteFile() is a bit broken Hin-Tak> sometimes. I have determined the ReadFile succceeds and the Hin-Tak> SetFilePointer() also work)
Hin-Tak> So I have two questions - (1) can somebody tell if there is Hin-Tak> something obviously wrong with the example, (2) can somebody Hin-Tak> say if it is because wine is not working e.g. SetPointer Hin-Tak> doesn't work?
Register with the winetestbot, upload your test exe and compare the test output
...
--- On Tue, 19/1/10, Uwe Bonnes bon@elektron.ikp.physik.tu-darmstadt.de wrote:
Register with the winetestbot, upload your test exe and compare the test output
Thanks for the pointer. I'll bear that in mind. ATM I have a patch for one bug which does not work, possibly because it uncovers another bug in wine - I can verify the latter by trying out the stand-alone version of the patch on a genuine windows. So I'll possibly try a genuine windows, and if it works out, file a 2nd bug, make the first one depending on the 2nd and attach my patch to the first. I'll just need to find a time to reboot to windows...
"Hin-Tak" == Hin-Tak Leung hintak_leung@yahoo.co.uk writes:
Hin-Tak> --- On Tue, 19/1/10, Uwe Bonnes Hin-Tak> bon@elektron.ikp.physik.tu-darmstadt.de wrote: >> Register with the winetestbot, upload your test exe and compare the >> test output
Hin-Tak> Thanks for the pointer. I'll bear that in mind. ATM I have a Hin-Tak> patch for one bug which does not work, possibly because it Hin-Tak> uncovers another bug in wine - I can verify the latter by Hin-Tak> trying out the stand-alone version of the patch on a genuine Hin-Tak> windows. So I'll possibly try a genuine windows, and if it Hin-Tak> works out, file a 2nd bug, make the first one depending on the Hin-Tak> 2nd and attach my patch to the first. I'll just need to find a Hin-Tak> time to reboot to windows...
Dear Hin-Tak,
try to write test for the test suite. And for trying genuine windows, use the winetsetbot. No need to reboot.
Test in the test suite fingerpoint at errors and help to not introduce regressions.
Bye
--- On Wed, 20/1/10, Uwe Bonnes bon@elektron.ikp.physik.tu-darmstadt.de wrote:
Dear Hin-Tak,
try to write test for the test suite. And for trying genuine windows, use the winetsetbot. No need to reboot.
Test in the test suite fingerpoint at errors and help to not introduce regressions.
I finally got round to reboot to Vista - and found indeed the example works in Vista but not in wine so I filed a 2nd bug (http://bugs.winehq.org/show_bug.cgi?id=21434 ) and make the first one (bug 21394, cmd copy "+" syntax for joining files) depends on it.
ATM it isn't a regression - it is simply unimplemented/incompletely-implemented functionality in wine...
--- On Wed, 20/1/10, Uwe Bonnes bon@elektron.ikp.physik.tu-darmstadt.de wrote:
Dear Hin-Tak,
try to write test for the test suite. And for trying genuine windows, use the winetsetbot. No need to reboot.
Test in the test suite fingerpoint at errors and help to not introduce regressions.
Hmm, I can see how winetsetbot might be useful - I have two questions:
- how does one work with binaries which needs specific input fies? one of the wine bugs is about not being able to append to a file with some specific sequence of API, which works on windows; I guess one way to do it is to create such files within the test binary, before the actual test, but that introduces a lot more variable...
- the other bug is cmd's built-in - does winetestbot support running *.bat ?
Thanks for the good work (although I haven't made use of it yet; just started reading up on it).
Hin-Tak