forked from Imagelibrary/littlefs
Changed test identifier separator # -> :
Compare: - test_dirs#reentrant_many_dir#1#ggg1ggg8#123456789abcdef - test_dirs:reentrant_many_dir:1:ggg1ggg8:123456789abcdef
This commit is contained in:
@@ -129,8 +129,8 @@ static void print_id(
|
|||||||
const lfs_testbd_powercycles_t *cycles,
|
const lfs_testbd_powercycles_t *cycles,
|
||||||
size_t cycle_count) {
|
size_t cycle_count) {
|
||||||
(void)suite;
|
(void)suite;
|
||||||
// suite[#case[#perm[#geometry[#powercycles]]]]
|
// suite[:case[:perm[:geometry[:powercycles]]]]
|
||||||
printf("%s#%zu#", case_->id, perm);
|
printf("%s:%zu:", case_->id, perm);
|
||||||
|
|
||||||
// reduce duplication in geometry, this is appended to every test
|
// reduce duplication in geometry, this is appended to every test
|
||||||
if (READ_SIZE != BLOCK_SIZE || PROG_SIZE != BLOCK_SIZE) {
|
if (READ_SIZE != BLOCK_SIZE || PROG_SIZE != BLOCK_SIZE) {
|
||||||
@@ -146,7 +146,7 @@ static void print_id(
|
|||||||
|
|
||||||
// only print power-cycles if any occured
|
// only print power-cycles if any occured
|
||||||
if (cycles) {
|
if (cycles) {
|
||||||
printf("#");
|
printf(":");
|
||||||
for (size_t i = 0; i < cycle_count; i++) {
|
for (size_t i = 0; i < cycle_count; i++) {
|
||||||
leb16_print(cycles[i]);
|
leb16_print(cycles[i]);
|
||||||
}
|
}
|
||||||
@@ -1038,7 +1038,7 @@ static void run_powerloss_linear(
|
|||||||
// power-loss!
|
// power-loss!
|
||||||
printf("powerloss ");
|
printf("powerloss ");
|
||||||
print_id(suite, case_, perm, NULL, 0);
|
print_id(suite, case_, perm, NULL, 0);
|
||||||
printf("#");
|
printf(":");
|
||||||
for (lfs_testbd_powercycles_t j = 1; j <= i; j++) {
|
for (lfs_testbd_powercycles_t j = 1; j <= i; j++) {
|
||||||
leb16_print(j);
|
leb16_print(j);
|
||||||
}
|
}
|
||||||
@@ -1125,7 +1125,7 @@ static void run_powerloss_exponential(
|
|||||||
// power-loss!
|
// power-loss!
|
||||||
printf("powerloss ");
|
printf("powerloss ");
|
||||||
print_id(suite, case_, perm, NULL, 0);
|
print_id(suite, case_, perm, NULL, 0);
|
||||||
printf("#");
|
printf(":");
|
||||||
for (lfs_testbd_powercycles_t j = 1; j <= i; j *= 2) {
|
for (lfs_testbd_powercycles_t j = 1; j <= i; j *= 2) {
|
||||||
leb16_print(j);
|
leb16_print(j);
|
||||||
}
|
}
|
||||||
@@ -1378,14 +1378,14 @@ static void run_powerloss_exhaustive(
|
|||||||
}
|
}
|
||||||
|
|
||||||
// run the test, increasing power-cycles as power-loss events occur
|
// run the test, increasing power-cycles as power-loss events occur
|
||||||
printf("running %s#%zu\n", case_->id, perm);
|
printf("running %s:%zu\n", case_->id, perm);
|
||||||
|
|
||||||
// recursively exhaust each layer of powerlosses
|
// recursively exhaust each layer of powerlosses
|
||||||
run_powerloss_exhaustive_layer(suite, case_, perm,
|
run_powerloss_exhaustive_layer(suite, case_, perm,
|
||||||
&cfg, &bdcfg, cycle_count,
|
&cfg, &bdcfg, cycle_count,
|
||||||
&(struct powerloss_exhaustive_cycles){NULL, 0, 0});
|
&(struct powerloss_exhaustive_cycles){NULL, 0, 0});
|
||||||
|
|
||||||
printf("finished %s#%zu\n", case_->id, perm);
|
printf("finished %s:%zu\n", case_->id, perm);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -1425,7 +1425,7 @@ static void list_powerlosses(void) {
|
|||||||
// a couple more options with special parsing
|
// a couple more options with special parsing
|
||||||
printf("%-24s %s\n", "1,2,3", builtin_powerlosses_help[i+0]);
|
printf("%-24s %s\n", "1,2,3", builtin_powerlosses_help[i+0]);
|
||||||
printf("%-24s %s\n", "{1,2,3}", builtin_powerlosses_help[i+1]);
|
printf("%-24s %s\n", "{1,2,3}", builtin_powerlosses_help[i+1]);
|
||||||
printf("%-24s %s\n", "#1248g1", builtin_powerlosses_help[i+2]);
|
printf("%-24s %s\n", ":1248g1", builtin_powerlosses_help[i+2]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -1471,7 +1471,7 @@ static void run_perms(
|
|||||||
|
|
||||||
// filter?
|
// filter?
|
||||||
if (case_->filter && !case_->filter()) {
|
if (case_->filter && !case_->filter()) {
|
||||||
printf("skipped %s#%zu\n", case_->id, k);
|
printf("skipped %s:%zu\n", case_->id, k);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1798,7 +1798,7 @@ invalid_define:
|
|||||||
}
|
}
|
||||||
|
|
||||||
// leb16-encoded read/prog/erase/count
|
// leb16-encoded read/prog/erase/count
|
||||||
if (*optarg == '#') {
|
if (*optarg == ':') {
|
||||||
lfs_size_t sizes[4];
|
lfs_size_t sizes[4];
|
||||||
size_t count = 0;
|
size_t count = 0;
|
||||||
|
|
||||||
@@ -1925,7 +1925,7 @@ geometry_next:
|
|||||||
}
|
}
|
||||||
|
|
||||||
// leb16-encoded permutation
|
// leb16-encoded permutation
|
||||||
if (*optarg == '#') {
|
if (*optarg == ':') {
|
||||||
lfs_testbd_powercycles_t *cycles = NULL;
|
lfs_testbd_powercycles_t *cycles = NULL;
|
||||||
size_t cycle_count = 0;
|
size_t cycle_count = 0;
|
||||||
size_t cycle_capacity = 0;
|
size_t cycle_capacity = 0;
|
||||||
@@ -2097,7 +2097,7 @@ getopt_done: ;
|
|||||||
|
|
||||||
// parse suite
|
// parse suite
|
||||||
char *suite = argv[optind];
|
char *suite = argv[optind];
|
||||||
char *case_ = strchr(suite, '#');
|
char *case_ = strchr(suite, ':');
|
||||||
if (case_) {
|
if (case_) {
|
||||||
*case_ = '\0';
|
*case_ = '\0';
|
||||||
case_ += 1;
|
case_ += 1;
|
||||||
@@ -2116,7 +2116,7 @@ getopt_done: ;
|
|||||||
|
|
||||||
if (case_) {
|
if (case_) {
|
||||||
// parse case
|
// parse case
|
||||||
char *perm_ = strchr(case_, '#');
|
char *perm_ = strchr(case_, ':');
|
||||||
if (perm_) {
|
if (perm_) {
|
||||||
*perm_ = '\0';
|
*perm_ = '\0';
|
||||||
perm_ += 1;
|
perm_ += 1;
|
||||||
@@ -2126,7 +2126,7 @@ getopt_done: ;
|
|||||||
|
|
||||||
if (perm_) {
|
if (perm_) {
|
||||||
// parse permutation
|
// parse permutation
|
||||||
char *geometry_ = strchr(perm_, '#');
|
char *geometry_ = strchr(perm_, ':');
|
||||||
if (geometry_) {
|
if (geometry_) {
|
||||||
*geometry_ = '\0';
|
*geometry_ = '\0';
|
||||||
geometry_ += 1;
|
geometry_ += 1;
|
||||||
@@ -2142,7 +2142,7 @@ getopt_done: ;
|
|||||||
|
|
||||||
if (geometry_) {
|
if (geometry_) {
|
||||||
// parse geometry
|
// parse geometry
|
||||||
char *cycles_ = strchr(geometry_, '#');
|
char *cycles_ = strchr(geometry_, ':');
|
||||||
if (cycles_) {
|
if (cycles_) {
|
||||||
*cycles_ = '\0';
|
*cycles_ = '\0';
|
||||||
cycles_ += 1;
|
cycles_ += 1;
|
||||||
|
|||||||
@@ -88,7 +88,7 @@ class TestCase:
|
|||||||
file=sys.stderr)
|
file=sys.stderr)
|
||||||
|
|
||||||
def id(self):
|
def id(self):
|
||||||
return '%s#%s' % (self.suite, self.name)
|
return '%s:%s' % (self.suite, self.name)
|
||||||
|
|
||||||
|
|
||||||
class TestSuite:
|
class TestSuite:
|
||||||
@@ -497,7 +497,7 @@ def find_cases(runner_, **args):
|
|||||||
expected_perms = 0
|
expected_perms = 0
|
||||||
total_perms = 0
|
total_perms = 0
|
||||||
pattern = re.compile(
|
pattern = re.compile(
|
||||||
'^(?P<id>(?P<case>(?P<suite>[^#]+)#[^\s#]+)[^\s]*)\s+'
|
'^(?P<id>(?P<case>(?P<suite>[^:]+):[^\s:]+)[^\s]*)\s+'
|
||||||
'[^\s]+\s+(?P<filtered>\d+)/(?P<perms>\d+)')
|
'[^\s]+\s+(?P<filtered>\d+)/(?P<perms>\d+)')
|
||||||
# skip the first line
|
# skip the first line
|
||||||
for line in it.islice(proc.stdout, 1, None):
|
for line in it.islice(proc.stdout, 1, None):
|
||||||
@@ -535,7 +535,7 @@ def find_path(runner_, id, **args):
|
|||||||
close_fds=False)
|
close_fds=False)
|
||||||
path = None
|
path = None
|
||||||
pattern = re.compile(
|
pattern = re.compile(
|
||||||
'^(?P<id>(?P<case>(?P<suite>[^#]+)#[^\s#]+)[^\s]*)\s+'
|
'^(?P<id>(?P<case>(?P<suite>[^:]+):[^\s:]+)[^\s]*)\s+'
|
||||||
'(?P<path>[^:]+):(?P<lineno>\d+)')
|
'(?P<path>[^:]+):(?P<lineno>\d+)')
|
||||||
# skip the first line
|
# skip the first line
|
||||||
for line in it.islice(proc.stdout, 1, None):
|
for line in it.islice(proc.stdout, 1, None):
|
||||||
@@ -630,7 +630,7 @@ def run_stage(name, runner_, **args):
|
|||||||
|
|
||||||
pattern = re.compile('^(?:'
|
pattern = re.compile('^(?:'
|
||||||
'(?P<op>running|finished|skipped|powerloss) '
|
'(?P<op>running|finished|skipped|powerloss) '
|
||||||
'(?P<id>(?P<case>(?P<suite>[^#]+)#[^\s#]+)[^\s]*)'
|
'(?P<id>(?P<case>(?P<suite>[^:]+):[^\s:]+)[^\s]*)'
|
||||||
'|' '(?P<path>[^:]+):(?P<lineno>\d+):(?P<op_>assert):'
|
'|' '(?P<path>[^:]+):(?P<lineno>\d+):(?P<op_>assert):'
|
||||||
' *(?P<message>.*)' ')$')
|
' *(?P<message>.*)' ')$')
|
||||||
locals = th.local()
|
locals = th.local()
|
||||||
|
|||||||
Reference in New Issue
Block a user