Public bug reported:
https://autopkgtest.ubuntu.com/results/autopkgtest-
jammy/jammy/s390x/n/node-nan/20220306_113841_a17b2@/log.gz
534 passing (12s)
1 failing
1) test/js/strings-test.js FromV8String should be equal:
Error: should be equal
+ expected - actual
-栀攀氀氀漀
+hello
at Test.<anonymous> (test/js/strings-test.js:36:5)
at Object.<anonymous> (test/js/strings-test.js:14:1)
Google translate says "栀攀氀氀漀" means "gardenia" in English. I'm guessing
instead the result is just garbage data. There's no indication from the
test that this could resolve to anything other than "hello". The test's
code is:
/* we check Buffer.alloc rather than Buffer.from because
* we don't want the base class Uint8Array.from */
if (typeof(Buffer.alloc) === "function") {
buf = Buffer.from('hello');
} else {
buf = new Buffer('hello');
}
t.equal(bindings.encodeHex(), buf.toString('hex'));
t.equal(bindings.encodeUCS2(), 'hello');
Upstream issues https://github.com/nodejs/nan/issues/481 and
https://github.com/nodejs/nan/issues/507, while fairly ancient and
unlikely to relate to this particular issue, do suggest that big endian
issues may not be as thoroughly tested. So perhaps this is an endian
issue with this usage of the Buffer class?
** Affects: node-nan
Importance: Unknown
Status: Unknown
** Affects: node-nan (Ubuntu)
Importance: Undecided
Status: New
** Tags: update-excuse
** Bug watch added: github.com/nodejs/nan/issues #935
https://github.com/nodejs/nan/issues/935
** Also affects: node-nan via
https://github.com/nodejs/nan/issues/935
Importance: Unknown
Status: Unknown
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1967589
Title:
strings-test.js fails on s390x
To manage notifications about this bug go to:
https://bugs.launchpad.net/node-nan/+bug/1967589/+subscriptions
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs