patch for pummel tests, https leak test with large message

This commit is contained in:
jfdenise 2013-11-20 13:58:23 +01:00
parent ef5b0ad07d
commit ca90969e88
4 changed files with 23 additions and 5 deletions

View File

@ -342,9 +342,11 @@
<apply-diff src="test/pummel" mod="${test.dir}/crypto" name="test-crypto-dh.js"/>
<apply-diff src="test/pummel" mod="${test.dir}/pummel" name="test-dh-regr.js"/>
<apply-diff src="test/pummel" mod="${test.dir}/pummel" name="test-exec.js"/>
<apply-diff src="test/pummel" mod="${test.dir}/pummel" name="test-https-ci-reneg-attack.js"/>
<apply-diff src="test/pummel" mod="${test.dir}/pummel" name="test-net-pingpong.js"/>
<apply-diff src="test/pummel" mod="${test.dir}/pummel" name="test-net-throttle.js"/>
<apply-diff src="test/pummel" mod="${test.dir}/pummel" name="test-process-uptime.js"/>
<apply-diff src="test/pummel" mod="${test.dir}/pummel" name="test-tls-ci-reneg-attack.js"/>
</target>
<!-- keep sorted and synchronized with diff-source-files -->
@ -414,9 +416,11 @@
<!-- pummel -->
<apply-patch-file target="${test.dir}/pummel" dir="test/crypto" name="test-crypto-dh.js"/>
<apply-patch-file target="${test.dir}/pummel" dir="test/pummel" name="test-dh-regr.js"/>
<apply-patch-file target="${test.dir}/pummel" dir="test/pummel" name="test-https-ci-reneg-attack.js"/>
<apply-patch-file target="${test.dir}/pummel" dir="test/pummel" name="test-net-pingpong.js"/>
<apply-patch-file target="${test.dir}/pummel" dir="test/pummel" name="test-net-throttle.js"/>
<apply-patch-file target="${test.dir}/pummel" dir="test/pummel" name="test-process-uptime.js"/>
<apply-patch-file target="${test.dir}/pummel" dir="test/pummel" name="test-tls-ci-reneg-attack.js"/>
</target>
<target name="generate-policy-file" depends="init">

View File

@ -40,12 +40,15 @@ source.lib.modules = \
source.test.pummel.list = \
test-child-process-spawn-loop.js \
test-crypto-dh.js \
test-dh-regr.js \
test-exec.js \
test-fs-largefile.js \
test-fs-watch-file.js \
test-fs-watch-file-slow.js \
test-https-large-response.js \
test-http-upload-timeout.js \
test-https-ci-reneg-attack.js \
test-net-many-clients.js \
test-net-pause.js \
test-net-pingpong-delay.js \
@ -62,6 +65,7 @@ source.test.pummel.list = \
test-timers.js \
test-timer-wrap2.js \
test-timer-wrap.js \
test-tls-ci-reneg-attack.js \
test-tls-throttle.js \
test-watch-file.js

View File

@ -27,12 +27,12 @@ var body = '';
if(process.argv[2] === '-large') {
print('building large body...');
for (var i = 0; i < 1024 * 1024; i++) {
body += 'hello world\n';
body += 'hello worldçoié\uD83D\uDC4D\n';
}
print('done building body');
} else {
print('building small body.');
body = 'hello world\n';
body = 'hello worldçoié\uD83D\uDC4D\n';
}
var PORT = 9999;
@ -40,7 +40,7 @@ var server = http.createServer(function(req, res) {
res.writeHead(200, {
'content-type': 'text/plain'
});
res.end(body);
res.end(new Buffer(body));
});
server.listen(PORT, function() {
@ -54,7 +54,7 @@ function startClient() {
port: PORT
}, function(res) {
res.on('data', function(d) {
console.log(d.toString());
});
res.on('end', function(d) {
if (perf.canContinue()) {

View File

@ -29,8 +29,18 @@ var perf = require("../perf/common-perf");
var https = require('https');
var fs = require('fs');
var body = ""
if(process.argv[2] === '-large') {
print('building large body...');
for (var i = 0; i < 1024 * 1024; i++) {
body += 'hello worldçoié\uD83D\uDC4D\n';
}
print('done building body');
} else {
print('building small body.');
body = 'hello worldçoié\uD83D\uDC4D\n';
}
var body = 'hello world\n';
var PORT = 9999;
var options = {
key: fs.readFileSync(common.fixturesDir + '/keys/agent1-key.pem'),