We have test for debugging failed named primitive. And without template trick this test is not working. Debugging this test step by step shows what is really not working. We not got error code from prim call while doing step over it.
Beside your fix with method header not helps alone. I make all tests working with another change. But I am not really understand this code:
tryNamedPrimitiveIn: aCompiledMethod for: aReceiver withArgs: arguments
"Invoke the named primitive for aCompiledMethod, answering its result, or,
if the primiitve fails, answering the error code."
<primitive: 218 error: ec>
ec ifNotNil:
["If ec is an integer other than -1 there was a problem with primitive 218,
not with the external primitive itself. -1 indicates a generic failure (where
ec should be nil) but ec = nil means primitive 218 is not implemented. So
interpret -1 to mean the external primitive failed with a nil error code."
ec isInteger ifTrue:
[ec = -1
ifTrue: [ec := nil]
ifFalse: [^self class primitiveFailTokenFor: ec]]].
^"execute prim by template method"
So it is fixes Pharo tests problem. But I don't know what other issues it can produce.