Instead of "valid" and "invalid" tests types use "accept" and "reject"
because both these types are valid. Spell MTP2 for SIO and MTP3 for
DPC, OPC and SLS.
(004) ret #262144
EOF
}, # mtp3_dpc_ne
(004) ret #262144
EOF
}, # mtp3_dpc_ne
DLT => 'MTP2',
expr => 'dpc (0x1274 or 0x1275 or 0x1276)',
unopt => <<~'EOF',
DLT => 'MTP2',
expr => 'dpc (0x1274 or 0x1275 or 0x1276)',
unopt => <<~'EOF',
(009) ret #262144
(010) ret #0
EOF
(009) ret #262144
(010) ret #0
EOF
mtp3_opc => {
DLT => 'MTP2',
expr => 'opc 0x3b35',
mtp3_opc => {
DLT => 'MTP2',
expr => 'opc 0x3b35',
(003) ret #262144
EOF
}, # mtp2_hsio_ne
(003) ret #262144
EOF
}, # mtp2_hsio_ne
DLT => 'MTP2',
expr => 'hsio (0x42 or 0x43 or 0x44)',
opt => <<~'EOF',
DLT => 'MTP2',
expr => 'hsio (0x42 or 0x43 or 0x44)',
opt => <<~'EOF',
(004) ret #262144
(005) ret #0
EOF
(004) ret #262144
(005) ret #0
EOF
mtp3_hdpc => {
DLT => 'MTP2',
expr => 'hdpc 0x0ab5',
mtp3_hdpc => {
DLT => 'MTP2',
expr => 'hdpc 0x0ab5',
expr => 'sio 256',
errstr => 'too big',
},
expr => 'sio 256',
errstr => 'too big',
},
DLT => 'MTP2',
expr => 'dpc 16384',
errstr => 'too big',
},
DLT => 'MTP2',
expr => 'dpc 16384',
errstr => 'too big',
},
DLT => 'MTP2',
expr => 'opc 16384',
errstr => 'too big',
},
DLT => 'MTP2',
expr => 'opc 16384',
errstr => 'too big',
},
DLT => 'MTP2',
expr => 'sls 16',
errstr => 'too big',
DLT => 'MTP2',
expr => 'sls 16',
errstr => 'too big',
expr => 'hsio 256',
errstr => 'too big',
},
expr => 'hsio 256',
errstr => 'too big',
},
DLT => 'MTP2',
expr => 'hdpc 16384',
errstr => 'too big',
},
DLT => 'MTP2',
expr => 'hdpc 16384',
errstr => 'too big',
},
DLT => 'MTP2',
expr => 'hopc 16384',
errstr => 'too big',
},
DLT => 'MTP2',
expr => 'hopc 16384',
errstr => 'too big',
},
DLT => 'MTP2',
expr => 'hsls 16',
errstr => 'too big',
DLT => 'MTP2',
expr => 'hsls 16',
errstr => 'too big',
- return "valid_${name}_${type}";
+ return "accept_${name}_${type}";
+sub accept_alias_label {
my ($label, $index) = @_;
return "${label} (alias ${index})";
}
my ($label, $index) = @_;
return "${label} (alias ${index})";
}
-sub invalid_test_label {
- return "invalid_${name}";
+ return "reject_${name}";
}
# The characters are inspired by PHPUnit format, but are not exactly the same.
}
# The characters are inspired by PHPUnit format, but are not exactly the same.
}
foreach my $optunopt ('unopt', 'opt') {
defined $test->{$optunopt} || next;
}
foreach my $optunopt ('unopt', 'opt') {
defined $test->{$optunopt} || next;
- my $label = valid_test_label $testname, $optunopt;
+ my $label = accept_test_label $testname, $optunopt;
defined $only_one && $only_one ne $label && next;
if (defined $test->{skip} && $test->{skip} ne '') {
defined $only_one && $only_one ne $label && next;
if (defined $test->{skip} && $test->{skip} ne '') {
if (defined $test->{aliases}) {
foreach my $i (0 .. $test->{aliases}->$#*) {
push @ready_to_run, {
if (defined $test->{aliases}) {
foreach my $i (0 .. $test->{aliases}->$#*) {
push @ready_to_run, {
- label => valid_alias_label ($label, $i),
+ label => accept_alias_label ($label, $i),
func => \&run_skip_test,
skip => $test->{skip},
};
func => \&run_skip_test,
skip => $test->{skip},
};
if (defined $test->{aliases}) {
foreach my $i (0 .. $test->{aliases}->$#*) {
my $alias = {
if (defined $test->{aliases}) {
foreach my $i (0 .. $test->{aliases}->$#*) {
my $alias = {
- label => valid_alias_label ($label, $i),
+ label => accept_alias_label ($label, $i),
expr => $test->{aliases}[$i],
};
$alias->{$_} = $main->{$_} foreach ('DLT', 'func', 'optimize', 'expected', 'snaplen', 'linuxext');
expr => $test->{aliases}[$i],
};
$alias->{$_} = $main->{$_} foreach ('DLT', 'func', 'optimize', 'expected', 'snaplen', 'linuxext');
die "Internal error: reject test '$testname' does not define key '$_'";
}
}
die "Internal error: reject test '$testname' does not define key '$_'";
}
}
- my $label = invalid_test_label $testname;
+ my $label = reject_test_label $testname;
defined $only_one && $only_one ne $label && next;
if (defined $test->{skip} && $test->{skip} ne '') {
defined $only_one && $only_one ne $label && next;
if (defined $test->{skip} && $test->{skip} ne '') {