Page MenuHomeWickedGov Phorge

WfShellExecTest.php
No OneTemporary

Size
721 B
Referenced Files
None
Subscribers
None

WfShellExecTest.php

<?php
/**
* @group GlobalFunctions
* @covers ::wfShellExec
*/
class WfShellExecTest extends MediaWikiIntegrationTestCase {
public function testT69870() {
if ( wfIsWindows() ) {
// T209159: Anonymous pipe under Windows does not support asynchronous read and write,
// and the default buffer is too small (~4K), it is easy to be blocked.
$this->markTestSkipped(
'T209159: Anonymous pipe under Windows cannot withstand such a large amount of data'
);
}
// Test several times because it involves a race condition that may randomly succeed or fail
for ( $i = 0; $i < 10; $i++ ) {
$output = wfShellExec( 'printf "%-333333s" "*"' );
$this->assertEquals( 333333, strlen( $output ) );
}
}
}

File Metadata

Mime Type
text/x-php
Expires
Wed, Aug 19, 07:56 (2 w, 3 d ago)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
7c/db/62fb0cd9307d6e394f5ed4577a08
Default Alt Text
WfShellExecTest.php (721 B)

Event Timeline