Skip to content

Commit

Permalink
Bug 1334106 - fuzzing targets on TC, r=ttaubert
Browse files Browse the repository at this point in the history
Differential Revision: https://nss-review.dev.mozaws.net/D200

--HG--
extra : rebase_source : 1d7ae12c308810ee8069ed4f6d144945b11acad2
extra : histedit_source : 63c21b4b4329d2c07ab8d25dfe97ac65eaafc708
  • Loading branch information
franziskuskiefer committed Feb 8, 2017
1 parent 45ad819 commit 825362a
Showing 1 changed file with 28 additions and 51 deletions.
79 changes: 28 additions & 51 deletions automation/taskcluster/graph/src/extend.js
Expand Up @@ -251,6 +251,23 @@ async function scheduleLinux(name, base) {

/*****************************************************************************/

function scheduleFuzzingRun(base, name, target, max_len, symbol = null) {
const MAX_FUZZ_TIME = 300;

queue.scheduleTask(merge(base, {
name,
command: [
"/bin/bash",
"-c",
"bin/checkout.sh && nss/automation/taskcluster/scripts/fuzz.sh " +
`${target} nss/fuzz/corpus/${target} ` +
`-max_total_time=${MAX_FUZZ_TIME} ` +
`-max_len=${max_len}`
],
symbol: symbol || name
}));
}

async function scheduleFuzzing() {
let base = {
env: {
Expand Down Expand Up @@ -307,57 +324,17 @@ async function scheduleFuzzing() {
kind: "test"
}));

queue.scheduleTask(merge(base, {
parent: task_build,
name: "Hash",
command: [
"/bin/bash",
"-c",
"bin/checkout.sh && nss/automation/taskcluster/scripts/fuzz.sh " +
"hash nss/fuzz/corpus/hash -max_total_time=300 -max_len=4096"
],
symbol: "Hash",
kind: "test"
}));

queue.scheduleTask(merge(base, {
parent: task_build,
name: "QuickDER",
command: [
"/bin/bash",
"-c",
"bin/checkout.sh && nss/automation/taskcluster/scripts/fuzz.sh " +
"quickder nss/fuzz/corpus/quickder -max_total_time=300 -max_len=10000"
],
symbol: "QuickDER",
kind: "test"
}));

queue.scheduleTask(merge(base, {
parent: task_build,
name: "MPI",
command: [
"/bin/bash",
"-c",
"bin/checkout.sh && nss/automation/taskcluster/scripts/fuzz.sh " +
"mpi nss/fuzz/corpus/mpi -max_total_time=300 -max_len=2048"
],
symbol: "MPI",
kind: "test"
}));

queue.scheduleTask(merge(base, {
parent: task_build,
name: "CertDN",
command: [
"/bin/bash",
"-c",
"bin/checkout.sh && nss/automation/taskcluster/scripts/fuzz.sh " +
"certDN nss/fuzz/corpus/certDN -max_total_time=300 -max_len=4096"
],
symbol: "CertDN",
kind: "test"
}));
// Schedule fuzzing runs.
let run_base = merge(base, {parent: task_build, kind: "test"});
let mpi_base = merge(run_base, {groupSymbol: "MPI"});
scheduleFuzzingRun(run_base, "CertDN", "certDN", 4096);
scheduleFuzzingRun(run_base, "Hash", "hash", 4096);
scheduleFuzzingRun(run_base, "QuickDER", "quickder", 10000);
for (let mpi_name of ["add", "addmod", "div", "expmod", "mod", "mulmod",
"sqr", "sqrmod", "sub", "submod"]) {
scheduleFuzzingRun(mpi_base, `MPI (${mpi_name})`, `mpi-${mpi_name}`,
4096, mpi_name);
}

return queue.submit();
}
Expand Down

0 comments on commit 825362a

Please sign in to comment.