stellar-core
stellar-core copied to clipboard
Test fails on macOS 13 x86_64 (Version: v20.2.0)
Issue Description
When running tests from v20.2.0
(34d82fc00426643e16b7ad59c9fde169b778eb4b) on macOS 13 x86_64, a test fails.
Steps to Reproduce
- Build
- Run tests
See workflow:
- https://github.com/Homebrew/homebrew-core/actions/runs/7987264100/job/21809578743?pr=163521
Expected Result
Tests pass.
Actual Result
herder/test/UpgradesTests.cpp:3093: FAILED:
REQUIRE( upgradesJson == R"({
"configupgradeinfo" : {
"configupgradeset" : {
"updatedEntry" : [
{
"configSettingID" : 0,
"contractMaxSizeBytes" : 32768
}
]
},
"configupgradesetkey" : {
"data" : "A2X1x61JPcqp3xe1AxsI6w3fqehhW6iU16Tn5HV32eiPU4K5Q3ayQUPGrHt7nMSvsWFD86wQYI9P6fiJD9kI+w==",
"nullopt" : false
}
},
"fee" : {
"data" : 10000,
"nullopt" : false
},
"flags" : {
"nullopt" : true
},
"maxsorobantxsetsize" : {
"nullopt" : true
},
"maxtxsize" : {
"nullopt" : true
},
"reserve" : {
"nullopt" : true
},
"time" : 1666464812,
"version" : {
"data" : 20,
"nullopt" : false
}
}
)" )
with expansion:
"{
"configupgradeinfo" : {
"configupgradeset" : {
"updatedEntry" : [
{
"configSettingID" : "CONFIG_SETTING_CONTRACT_MAX_SIZE_BYTES",
"contractMaxSizeBytes" : 32768
}
]
},
"configupgradesetkey" : {
"data" :
"A2X1x61JPcqp3xe1AxsI6w3fqehhW6iU16Tn5HV32eiPU4K5Q3ayQUPGrHt7nMSvsWFD86wQYI9-
P6fiJD9kI+w==",
"nullopt" : false
}
},
"fee" : {
"data" : 10000,
"nullopt" : false
},
"flags" : {
"nullopt" : true
},
"maxsorobantxsetsize" : {
"nullopt" : true
},
"maxtxsize" : {
"nullopt" : true
},
"reserve" : {
"nullopt" : true
},
"time" : 1666464812,
"version" : {
"data" : 20,
"nullopt" : false
}
}
"
==
"{
"configupgradeinfo" : {
"configupgradeset" : {
"updatedEntry" : [
{
"configSettingID" : 0,
"contractMaxSizeBytes" : 32768
}
]
},
"configupgradesetkey" : {
"data" :
"A2X1x61JPcqp3xe1AxsI6w3fqehhW6iU16Tn5HV32eiPU4K5Q3ayQUPGrHt7nMSvsWFD86wQYI9-
P6fiJD9kI+w==",
"nullopt" : false
}
},
"fee" : {
"data" : 10000,
"nullopt" : false
},
"flags" : {
"nullopt" : true
},
"maxsorobantxsetsize" : {
"nullopt" : true
},
"maxtxsize" : {
"nullopt" : true
},
"reserve" : {
"nullopt" : true
},
"time" : 1666464812,
"version" : {
"data" : 20,
"nullopt" : false
}
}
"
Ref: https://github.com/Homebrew/homebrew-core/pull/163521#issuecomment-1963235605 Ref: https://github.com/Homebrew/homebrew-core/actions/runs/7987264100/job/21809578743?pr=163521#step:3:14051
Your Environment and Setup
stellar-core Version
v20.2.0
Environment
GitHub Runner:
Current runner version: '2.313.0'
Machine name: 'Ventura'
Supporting Files
N/A
Additional context
It looks to me like this test is failing due to the JSON being formatted slightly differently, due to a hard line wrap at 78 characters. This is a diff of the two outputs:
{
"configupgradeinfo" : {
"configupgradeset" : {
"updatedEntry" : [
{
"configSettingID" : 0,
"contractMaxSizeBytes" : 32768
}
]
},
"configupgradesetkey" : {
- "data" : "A2X1x61JPcqp3xe1AxsI6w3fqehhW6iU16Tn5HV32eiPU4K5Q3ayQUPGrHt7nMSvsWFD86wQYI9P6fiJD9kI+w==",
+ "data" :
+"A2X1x61JPcqp3xe1AxsI6w3fqehhW6iU16Tn5HV32eiPU4K5Q3ayQUPGrHt7nMSvsWFD86wQYI9-
+P6fiJD9kI+w==",
"nullopt" : false
}
},
"fee" : {
"data" : 10000,
"nullopt" : false
},
"flags" : {
"nullopt" : true
},
"maxsorobantxsetsize" : {
"nullopt" : true
},
"maxtxsize" : {
"nullopt" : true
},
"reserve" : {
"nullopt" : true
},
"time" : 1666464812,
"version" : {
"data" : 20,
"nullopt" : false
}
}
This is weird. First of all, why is there a -
at the end of that line after QYI9
? Is that because of the line break? Second, is that homebrew runner for that mac version running a formatter on the source code?
The homebrew runner is running the following commands to install it:
./autogen.sh
./configure --disable-silent-rules --enable-postgres --disable-debug --disable-dependency-tracking --prefix=#{prefix} --libdir=#{libdir}
make install
The test passes on macOS 14 x64 and arm64, and on macOS 13 arm64, and in all four cases the same install commands are executed afaict.
The line break isn't the only difference. The left side of the equality has "configSettingID" : "CONFIG_SETTING_CONTRACT_MAX_SIZE_BYTES"
while the right side has "configSettingID" : 0
. It looks like CONFIG_SETTING_CONTRACT_MAX_SIZE_BYTES
is an enum with value 0
, so it's still semantically equivalent.