test: rename common.ddCommand()
Change common.ddCommand() to common.createZeroFilledFile(). PR-URL: https://github.com/nodejs/node/pull/23411 Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: George Adams <george.adams@uk.ibm.com>
This commit is contained in:
parent
f897843359
commit
3d62d38ba4
@ -52,7 +52,7 @@ symlinks
|
|||||||
([SeCreateSymbolicLinkPrivilege](https://msdn.microsoft.com/en-us/library/windows/desktop/bb530716(v=vs.85).aspx)).
|
([SeCreateSymbolicLinkPrivilege](https://msdn.microsoft.com/en-us/library/windows/desktop/bb530716(v=vs.85).aspx)).
|
||||||
On non-Windows platforms, this always returns `true`.
|
On non-Windows platforms, this always returns `true`.
|
||||||
|
|
||||||
### ddCommand(filename)
|
### createZeroFilledFile(filename)
|
||||||
|
|
||||||
Creates a 10 MB file of all null characters.
|
Creates a 10 MB file of all null characters.
|
||||||
|
|
||||||
|
@ -173,7 +173,7 @@ function childShouldThrowAndAbort() {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function ddCommand(filename) {
|
function createZeroFilledFile(filename) {
|
||||||
const fd = fs.openSync(filename, 'w');
|
const fd = fs.openSync(filename, 'w');
|
||||||
fs.ftruncateSync(fd, 10 * 1024 * 1024);
|
fs.ftruncateSync(fd, 10 * 1024 * 1024);
|
||||||
fs.closeSync(fd);
|
fs.closeSync(fd);
|
||||||
@ -697,7 +697,7 @@ module.exports = {
|
|||||||
busyLoop,
|
busyLoop,
|
||||||
canCreateSymLink,
|
canCreateSymLink,
|
||||||
childShouldThrowAndAbort,
|
childShouldThrowAndAbort,
|
||||||
ddCommand,
|
createZeroFilledFile,
|
||||||
disableCrashOnUnhandledRejection,
|
disableCrashOnUnhandledRejection,
|
||||||
enoughTestCpu,
|
enoughTestCpu,
|
||||||
enoughTestMem,
|
enoughTestMem,
|
||||||
|
@ -22,7 +22,7 @@ const {
|
|||||||
PIPE,
|
PIPE,
|
||||||
hasIPv6,
|
hasIPv6,
|
||||||
childShouldThrowAndAbort,
|
childShouldThrowAndAbort,
|
||||||
ddCommand,
|
createZeroFilledFile,
|
||||||
platformTimeout,
|
platformTimeout,
|
||||||
allowGlobals,
|
allowGlobals,
|
||||||
mustCall,
|
mustCall,
|
||||||
@ -71,7 +71,7 @@ export {
|
|||||||
PIPE,
|
PIPE,
|
||||||
hasIPv6,
|
hasIPv6,
|
||||||
childShouldThrowAndAbort,
|
childShouldThrowAndAbort,
|
||||||
ddCommand,
|
createZeroFilledFile,
|
||||||
platformTimeout,
|
platformTimeout,
|
||||||
allowGlobals,
|
allowGlobals,
|
||||||
mustCall,
|
mustCall,
|
||||||
|
@ -63,7 +63,7 @@ function executeRequest(cb) {
|
|||||||
|
|
||||||
tmpdir.refresh();
|
tmpdir.refresh();
|
||||||
|
|
||||||
common.ddCommand(filename);
|
common.createZeroFilledFile(filename);
|
||||||
|
|
||||||
server = http.createServer(function(req, res) {
|
server = http.createServer(function(req, res) {
|
||||||
res.writeHead(200);
|
res.writeHead(200);
|
||||||
|
@ -56,7 +56,7 @@ const server = http.createServer(function(req, res) {
|
|||||||
server.listen(0);
|
server.listen(0);
|
||||||
|
|
||||||
server.on('listening', function() {
|
server.on('listening', function() {
|
||||||
common.ddCommand(filename);
|
common.createZeroFilledFile(filename);
|
||||||
makeRequest();
|
makeRequest();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user