From: Daniel Salzman Date: Mon, 14 Jun 2021 13:46:19 +0000 (+0200) Subject: dthreads: add simple check that dt_online_cpus() returns a reasonable value X-Git-Tag: v3.1.0~65 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=262fb7ffa768c83d6ec397c1127191eb12e10721;p=thirdparty%2Fknot-dns.git dthreads: add simple check that dt_online_cpus() returns a reasonable value --- diff --git a/tests/knot/test_dthreads.c b/tests/knot/test_dthreads.c index c2c9da2c05..3bdfa3a718 100644 --- a/tests/knot/test_dthreads.c +++ b/tests/knot/test_dthreads.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2011 CZ.NIC, z.s.p.o. +/* Copyright (C) 2021 CZ.NIC, z.s.p.o. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -71,7 +71,10 @@ static void interrupt_handle(int s) /*! API: run tests. */ int main(int argc, char *argv[]) { - plan(8); + plan_lazy(); + + int cpus = dt_online_cpus(); + ok(cpus > 0, "dthread: online cpus is positive value"); // Register service and signal handler struct sigaction sa;