Ensure all looms have at least one CPU
This commit is contained in:
parent
3d957f444c
commit
f22d9084ba
@ -183,6 +183,14 @@ create_system(struct system *sys, struct trace *trace)
|
||||
stream_data_set(s, lpt);
|
||||
}
|
||||
|
||||
/* Ensure all looms have at least one CPU */
|
||||
for (struct loom *l = sys->looms; l; l = l->next) {
|
||||
if (l->ncpus == 0) {
|
||||
err("loom %s has no physical CPUs", l->id);
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
# Copyright (c) 2022 Barcelona Supercomputing Center (BSC)
|
||||
# Copyright (c) 2022-2023 Barcelona Supercomputing Center (BSC)
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
# Only run performance sensitive tests on Release builds
|
||||
@ -16,3 +16,4 @@ ovni_test(mp-simple.c MP)
|
||||
ovni_test(version-good.c)
|
||||
ovni_test(version-bad.c SHOULD_FAIL REGEX "version mismatch")
|
||||
ovni_test(clockgate.c MP SHOULD_FAIL REGEX "detected large clock gate")
|
||||
ovni_test(no-cpus.c SHOULD_FAIL REGEX "loom .* has no physical CPUs")
|
||||
|
13
test/emu/ovni/no-cpus.c
Normal file
13
test/emu/ovni/no-cpus.c
Normal file
@ -0,0 +1,13 @@
|
||||
/* Copyright (c) 2023 Barcelona Supercomputing Center (BSC)
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later */
|
||||
|
||||
#include "instr_ovni.h"
|
||||
|
||||
int
|
||||
main(void)
|
||||
{
|
||||
instr_start(0, 0);
|
||||
instr_end();
|
||||
|
||||
return 0;
|
||||
}
|
Loading…
Reference in New Issue
Block a user