Forums
serialization test failure - Printable Version

+- Forums (https://www.vdrift.net/Forum)
+-- Forum: Community (https://www.vdrift.net/Forum/forumdisplay.php?fid=3)
+--- Forum: Bugs (https://www.vdrift.net/Forum/forumdisplay.php?fid=7)
+--- Thread: serialization test failure (/showthread.php?tid=1411)



serialization test failure - thelusiv - 12-22-2010

Code:
[-------------- RUNNING UNIT TESTS --------------]
src/joeserialize.cpp(638): 'serialization_high_level_object_read_write_test' FAILED: value1 () should equal value2 (data/)
Results: 34 succeeded, 1 failed
[-------------- UNIT TESTS FINISHED -------------]
This didn't happen previously, so I would guess it is a recent regression.


- joevenzon - 12-23-2010

Unable to repro. Is it possible you don't have permission to write to test.txt in the folder where you're running vdrift -test from?


- thelusiv - 12-24-2010

I am still getting this from svn r3007 (data r779):
Code:
[-------------- RUNNING UNIT TESTS --------------]
src/joeserialize.cpp(639): 'serialization_high_level_object_read_write_test' FAILED: value1 () should equal value2 (data/)
Results: 34 succeeded, 1 failed
[-------------- UNIT TESTS FINISHED -------------]
Not sure why. I am able to write files in the current directory. Running build/vdrift-test from the source tree root.

Hmmm...however, when I run
Code:
build/vdrift -test
I get a different result. All the tests pass. Clearly there are differences, I'm guessing that there is some setup/init that needs to happen before JOESERIALIZE works properly? The unittest.cpp main() doesn't do any of that. Thoughts?


- joevenzon - 12-24-2010

No, there's no initialization required.


- thelusiv - 12-24-2010

So after a lot of investigation over chat, Joe & I determined that LoadObjectFromFileOrCreateDefault fails on my machine (but not his) when compiler optimizations are turned on. Since the function is unused in VDrift, I have commented it out, along with its test.