File: test_get_possible_cpus_array_len.c

package info (click to toggle)
liburcu 0.15.6-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 8,356 kB
  • sloc: ansic: 23,370; xml: 23,227; sh: 6,480; makefile: 1,045; cpp: 15
file content (30 lines) | stat: -rw-r--r-- 517 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
/*
 * SPDX-License-Identifier: GPL-2.0-or-later
 *
 * Copyright (C) 2022 Michael Jeanson <mjeanson@efficios.com>
 */

#include <stdio.h>

#include "tap.h"

#include "compat-smp.h"

int main(void)
{
	int ret;

	plan_tests(2);

	ret = get_possible_cpus_array_len();
	ok(ret > 0, "get_possible_cpus_array_len (%d > 0)", ret);

#ifdef __linux__
	ret = get_num_possible_cpus_fallback();
	ok(ret > 0, "get_num_possible_cpus_fallback (%d > 0)", ret);
#else
	skip(1, "Linux specific test.");
#endif

	return exit_status();
}