[lldb][yaml2macho-core] Address bug when run on Windows
The two API tests I converted to use yaml2macho-core were failing on windows. I was writing the output corefile with fopen(filename, "w"), and it turns out there was some newline conversion happening on Windows if a linefeed character was present. Charles Zablit helped to identify the issue and confirm the fix. Re-enabling the two tests on all platforms. https://github.com/llvm/llvm-project/pull/153911
This commit is contained in:
parent
50b0c34dfb
commit
693146dcc0
@ -13,7 +13,6 @@ from lldbsuite.test import lldbutil
|
||||
class TestArmMachoCorefileRegctx(TestBase):
|
||||
NO_DEBUG_INFO_TESTCASE = True
|
||||
|
||||
@skipUnlessDarwin # CI fail on Windows, lr has value 0x0F000000?
|
||||
def test_armv7_corefile(self):
|
||||
### Create corefile
|
||||
corefile = self.getBuildArtifact("core")
|
||||
|
||||
@ -13,7 +13,6 @@ from lldbsuite.test import lldbutil
|
||||
class TestRV32MachOCorefile(TestBase):
|
||||
NO_DEBUG_INFO_TESTCASE = True
|
||||
|
||||
@skipUnlessDarwin # windows CI failure, says only 1 thread in corefile
|
||||
@no_debug_info_test
|
||||
def test_riscv32_gpr_corefile_registers(self):
|
||||
corefile = self.getBuildArtifact("core")
|
||||
|
||||
@ -198,7 +198,7 @@ int main(int argc, char **argv) {
|
||||
if (lc_note_payload_bytes.size() > 0)
|
||||
payload_fileoff = (payload_fileoff + 4096 - 1) & ~(4096 - 1);
|
||||
|
||||
FILE *f = fopen(OutputFilename.c_str(), "w");
|
||||
FILE *f = fopen(OutputFilename.c_str(), "wb");
|
||||
if (f == nullptr) {
|
||||
fprintf(stderr, "Unable to open file %s for writing\n",
|
||||
OutputFilename.c_str());
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user