summaryrefslogtreecommitdiff
path: root/test/common/index.js
diff options
context:
space:
mode:
Diffstat (limited to 'test/common/index.js')
-rw-r--r--test/common/index.js12
1 files changed, 4 insertions, 8 deletions
diff --git a/test/common/index.js b/test/common/index.js
index 75fe2e1548..492bb2f357 100644
--- a/test/common/index.js
+++ b/test/common/index.js
@@ -28,7 +28,6 @@ const assert = require('assert');
const os = require('os');
const { exec, execSync, spawnSync } = require('child_process');
const util = require('util');
-const { fixturesDir } = require('./fixtures');
const tmpdir = require('./tmpdir');
const {
bits,
@@ -174,13 +173,10 @@ function childShouldThrowAndAbort() {
});
}
-function ddCommand(filename, kilobytes) {
- if (isWindows) {
- const p = path.resolve(fixturesDir, 'create-file.js');
- return `"${process.argv[0]}" "${p}" "${filename}" ${kilobytes * 1024}`;
- } else {
- return `dd if=/dev/zero of="${filename}" bs=1024 count=${kilobytes}`;
- }
+function ddCommand(filename) {
+ const fd = fs.openSync(filename, 'w');
+ fs.ftruncateSync(fd, 10 * 1024 * 1024);
+ fs.closeSync(fd);
}