Add basic testing for update-in-place flag#1230
Add basic testing for update-in-place flag#1230davidlattimore merged 1 commit intowild-linker:mainfrom
Conversation
davidlattimore
left a comment
There was a problem hiding this comment.
Thanks for this! Looks good. I've started investigating the spots were the file isn't being written. I'll hopefully finish that tomorrow at which point the test will hopefully pass.
I think it makes sense to do this as one PR, then once this one is done, do the switching to default, fallback etc as a second PR. That being the case, this PR won't close the linked issue.
| "(no differences found - this shouldn't happen)".to_string() | ||
| }; | ||
|
|
||
| bail!( |
There was a problem hiding this comment.
Adding the filename of the binary would be useful, since the next thing someone would want to do is look at the binary to see what's at the specified offset in the file - e.g. what section it's in.
There was a problem hiding this comment.
Yeah, I think in case of error it's better to have both files to debug and print the respective path
| ); | ||
| } | ||
|
|
||
| println!("Update-in-place test passed for {}", self.source_file); |
There was a problem hiding this comment.
Probably no need to print output when it succeeds
|
I've fixed missing zero-fill bugs - #1237. If you rebase your change, then I think the tests should now pass. |
Cool! |
The new test mode actually breaks, but I'm not sure if I'm testing it right. The test pass when random bytes overwrite section is commented out.