Page MenuHomePhabricator

Scribunto getfenv/setfenv tests failing
Closed, ResolvedPublic

Description

I'm seeing failures in the Scribunto test suite using php-luasandbox 2.0.14 (my package for PHP7, not Wikimedia's HHVM one), but not under 2.0.13:

1) LuaSandbox: SandboxTests[1]: setfenv invalid level
Failed asserting that two strings are identical.
--- Expected
+++ Actual
@@ @@
-ERROR: bad argument #1 to 'old_getfenv' (invalid level)
+ERROR: 'setfenv' cannot set the requested environment, it is protected
/home/km/projects/gerrit/mediawiki/extensions/Scribunto/tests/phpunit/engines/LuaCommon/LuaEngineTestBase.php:257
/home/km/projects/gerrit/mediawiki/core/tests/phpunit/MediaWikiTestCase.php:415
/home/km/projects/gerrit/mediawiki/core/maintenance/doMaintenance.php:92
2) LuaSandbox: SandboxTests[2]: getfenv invalid level
Failed asserting that two strings are identical.
--- Expected
+++ Actual
@@ @@
-ERROR: bad argument #1 to 'old_getfenv' (invalid level)
+{
+}

And on CI which is using the HHVM package: https://integration.wikimedia.org/ci/job/mwext-testextension-hhvm-jessie/16036/console
At least locally downgrading to 2.0.13 makes all the tests pass again.

Event Timeline

Anomie created this task.Sep 5 2017, 7:43 PM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptSep 5 2017, 7:43 PM

Change 376082 had a related patch set uploaded (by Anomie; owner: Anomie):
[mediawiki/extensions/Scribunto@master] Fix tests

https://gerrit.wikimedia.org/r/376082

Change 376082 merged by jenkins-bot:
[mediawiki/extensions/Scribunto@master] Fix tests

https://gerrit.wikimedia.org/r/376082

Anomie closed this task as Resolved.Sep 5 2017, 8:06 PM

Change 376157 had a related patch set uploaded (by Reedy; owner: Anomie):
[mediawiki/extensions/Scribunto@wmf/1.30.0-wmf.17] Fix tests

https://gerrit.wikimedia.org/r/376157

Change 376158 had a related patch set uploaded (by Reedy; owner: Anomie):
[mediawiki/extensions/Scribunto@wmf/1.30.0-wmf.16] Fix tests

https://gerrit.wikimedia.org/r/376158

Change 376157 merged by jenkins-bot:
[mediawiki/extensions/Scribunto@wmf/1.30.0-wmf.17] Fix tests

https://gerrit.wikimedia.org/r/376157

Change 376158 merged by jenkins-bot:
[mediawiki/extensions/Scribunto@wmf/1.30.0-wmf.16] Fix tests

https://gerrit.wikimedia.org/r/376158

Rical added a subscriber: Rical.Sep 6 2017, 1:37 PM

Change 409475 had a related patch set uploaded (by Legoktm; owner: Anomie):
[mediawiki/extensions/Scribunto@REL1_29] Fix tests

https://gerrit.wikimedia.org/r/409475

Change 409476 had a related patch set uploaded (by Legoktm; owner: Anomie):
[mediawiki/extensions/Scribunto@REL1_27] Fix tests

https://gerrit.wikimedia.org/r/409476

Change 409476 merged by jenkins-bot:
[mediawiki/extensions/Scribunto@REL1_27] Fix tests

https://gerrit.wikimedia.org/r/409476

Change 409475 merged by jenkins-bot:
[mediawiki/extensions/Scribunto@REL1_29] Fix tests

https://gerrit.wikimedia.org/r/409475