Add more unit tests for possible_cpus_array_len
authorMichael Jeanson <mjeanson@efficios.com>
Thu, 28 Jul 2022 14:17:48 +0000 (10:17 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Fri, 29 Jul 2022 14:33:10 +0000 (10:33 -0400)
Change-Id: If0b7fb9183936f00ac90349fb32f1db57f124602
Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
12 files changed:
.gitignore
src/common/smp.c
src/common/smp.h
tests/Makefile.am
tests/unit/libcommon/Makefile.am
tests/unit/libcommon/get_cpu_mask_from_sysfs.c [new file with mode: 0644]
tests/unit/libcommon/get_max_cpuid_from_sysfs.c [new file with mode: 0644]
tests/unit/libcommon/test_get_cpu_mask_from_sysfs [new file with mode: 0755]
tests/unit/libcommon/test_get_max_cpuid_from_mask.c [new file with mode: 0644]
tests/unit/libcommon/test_get_max_cpuid_from_sysfs [new file with mode: 0755]
tests/unit/libcommon/test_get_possible_cpus_array_len.c [new file with mode: 0644]
tests/unit/libcommon/test_smp.c [deleted file]

index bde22085633d187e42b78eed61910fafce529c73..6cc8fb246a45aa1fcf4d4d7c11e357dac9b16a88 100644 (file)
@@ -113,7 +113,10 @@ cscope.*
 /tests/regression/abi0-conflict/app_ust_indirect_abi0_abi1
 /tests/regression/abi0-conflict/app_ust_indirect_abi1
 /tests/unit/gcc-weak-hidden/test_gcc_weak_hidden
-/tests/unit/libcommon/test_smp
+/tests/unit/libcommon/get_cpu_mask_from_sysfs
+/tests/unit/libcommon/get_max_cpuid_from_sysfs
+/tests/unit/libcommon/test_get_max_cpuid_from_mask
+/tests/unit/libcommon/test_get_possible_cpus_array_len
 /tests/unit/libmsgpack/test_msgpack
 /tests/unit/libringbuffer/test_shm
 /tests/unit/pthread_name/test_pthread_name
index 8bbf9f6f1f0441ab94e4f9c271fa3e5097231d3e..8c742028039a10395b099202a741f490bc72fe2d 100644 (file)
 static int possible_cpus_array_len_cache;
 
 /*
- * As a fallback to parsing the CPU mask in "/sys/devices/system/cpu/possible",
- * iterate on all the folders in "/sys/devices/system/cpu" that start with
+ * Get the highest CPU id from sysfs.
+ *
+ * Iterate on all the folders in "/sys/devices/system/cpu" that start with
  * "cpu" followed by an integer, keep the highest CPU id encountered during
  * this iteration and add 1 to get a number of CPUs.
  *
- * Then get the value from sysconf(_SC_NPROCESSORS_CONF) as a fallback and
- * return the highest one.
- *
- * On Linux, using the value from sysconf can be unreliable since the way it
- * counts CPUs varies between C libraries and even between versions of the same
- * library. If we used it directly, getcpu() could return a value greater than
- * this sysconf, in which case the arrays indexed by processor would overflow.
- *
- * As another example, the MUSL libc implementation of the _SC_NPROCESSORS_CONF
- * sysconf does not return the number of configured CPUs in the system but
- * relies on the cpu affinity mask of the current task.
- *
- * Returns 0 or less on error.
+ * Returns the highest CPU id, or -1 on error.
  */
-int get_num_possible_cpus_fallback(void)
+int get_max_cpuid_from_sysfs(void)
+{
+       return _get_max_cpuid_from_sysfs("/sys/devices/system/cpu");
+}
+
+int _get_max_cpuid_from_sysfs(const char *path)
 {
        long max_cpuid = -1;
 
        DIR *cpudir;
        struct dirent *entry;
 
-       cpudir = opendir("/sys/devices/system/cpu");
+       assert(path);
+
+       cpudir = opendir(path);
        if (cpudir == NULL)
                goto end;
 
@@ -85,10 +81,35 @@ int get_num_possible_cpus_fallback(void)
                max_cpuid = -1;
 
 end:
+       return max_cpuid;
+}
+
+/*
+ * As a fallback to parsing the CPU mask in "/sys/devices/system/cpu/possible",
+ * iterate on all the folders in "/sys/devices/system/cpu" that start with
+ * "cpu" followed by an integer, keep the highest CPU id encountered during
+ * this iteration and add 1 to get a number of CPUs.
+ *
+ * Then get the value from sysconf(_SC_NPROCESSORS_CONF) as a fallback and
+ * return the highest one.
+ *
+ * On Linux, using the value from sysconf can be unreliable since the way it
+ * counts CPUs varies between C libraries and even between versions of the same
+ * library. If we used it directly, getcpu() could return a value greater than
+ * this sysconf, in which case the arrays indexed by processor would overflow.
+ *
+ * As another example, the MUSL libc implementation of the _SC_NPROCESSORS_CONF
+ * sysconf does not return the number of configured CPUs in the system but
+ * relies on the cpu affinity mask of the current task.
+ *
+ * Returns 0 or less on error.
+ */
+int get_num_possible_cpus_fallback(void)
+{
        /*
         * Get the sysconf value as a last resort. Keep the highest number.
         */
-       return __max(sysconf(_SC_NPROCESSORS_CONF), max_cpuid + 1);
+       return __max(sysconf(_SC_NPROCESSORS_CONF), get_max_cpuid_from_sysfs() + 1);
 }
 
 /*
@@ -100,15 +121,32 @@ end:
  * Returns the number of bytes read or -1 on error.
  */
 int get_possible_cpu_mask_from_sysfs(char *buf, size_t max_bytes)
+{
+       return get_cpu_mask_from_sysfs(buf, max_bytes,
+                       "/sys/devices/system/cpu/possible");
+}
+
+/*
+ * Get a CPU mask string from sysfs.
+ *
+ * buf: the buffer where the mask will be read.
+ * max_bytes: the maximum number of bytes to write in the buffer.
+ * path: file path to read the mask from.
+ *
+ * Returns the number of bytes read or -1 on error.
+ */
+int get_cpu_mask_from_sysfs(char *buf, size_t max_bytes, const char *path)
 {
        ssize_t bytes_read = 0;
        size_t total_bytes_read = 0;
        int fd = -1, ret = -1;
 
+       assert(path);
+
        if (buf == NULL)
                goto end;
 
-       fd = open("/sys/devices/system/cpu/possible", O_RDONLY);
+       fd = open(path, O_RDONLY);
        if (fd < 0)
                goto end;
 
index f908b6c6ef39c5e9f8868ec15b19a78f80b54d83..0a8433f3dc08222e287e79cab4ed7ce7ec3eed2a 100644 (file)
@@ -9,6 +9,18 @@
 
 #define LTTNG_UST_CPUMASK_SIZE 4096
 
+/*
+ * Get a CPU mask string from sysfs.
+ *
+ * buf: the buffer where the mask will be read.
+ * max_bytes: the maximum number of bytes to write in the buffer.
+ * path: file path to read the mask from.
+ *
+ * Returns the number of bytes read or -1 on error.
+ */
+int get_cpu_mask_from_sysfs(char *buf, size_t max_bytes, const char *path)
+       __attribute__((visibility("hidden")));
+
 /*
  * Get the CPU possible mask string from sysfs.
  *
 int get_possible_cpu_mask_from_sysfs(char *buf, size_t max_bytes)
        __attribute__((visibility("hidden")));
 
+/*
+ * Get the highest CPU id from sysfs.
+ *
+ * Iterate on all the folders in "/sys/devices/system/cpu" that start with
+ * "cpu" followed by an integer, keep the highest CPU id encountered during
+ * this iteration and add 1 to get a number of CPUs.
+ *
+ * Returns the highest CPU id, or -1 on error.
+ */
+int get_max_cpuid_from_sysfs(void)
+       __attribute__((visibility("hidden")));
+
+int _get_max_cpuid_from_sysfs(const char *path)
+       __attribute__((visibility("hidden")));
+
 /*
  * Get the number of possible CPUs in the system from either
  * sysconf(_SC_NPROCESSORS_CONF) or some other mechanism depending on the libc.
index 29cfa814263f65593d5228e6b797a0379ead43de..ac4d1cc9bde4182409a2ed51c254290815b6554e 100644 (file)
@@ -13,7 +13,10 @@ LOG_DRIVER = env AM_TAP_AWK='$(AWK)' \
 TESTS = \
        unit/libringbuffer/test_shm \
        unit/gcc-weak-hidden/test_gcc_weak_hidden \
-       unit/libcommon/test_smp \
+       unit/libcommon/test_get_cpu_mask_from_sysfs \
+       unit/libcommon/test_get_max_cpuid_from_mask \
+       unit/libcommon/test_get_max_cpuid_from_sysfs \
+       unit/libcommon/test_get_possible_cpus_array_len \
        unit/libmsgpack/test_msgpack \
        unit/pthread_name/test_pthread_name \
        unit/snprintf/test_snprintf \
index 05b894e89eb9b423504791bede270af124124fc2..77f3b852ae89954db71c0f22dd6a4e65390630a9 100644 (file)
@@ -2,8 +2,30 @@
 
 AM_CPPFLAGS += -I$(top_srcdir)/tests/utils
 
-noinst_PROGRAMS = test_smp
-test_smp_SOURCES = test_smp.c
-test_smp_LDADD = \
+noinst_PROGRAMS = \
+       get_cpu_mask_from_sysfs \
+       get_max_cpuid_from_sysfs \
+       test_get_max_cpuid_from_mask \
+       test_get_possible_cpus_array_len
+
+dist_noinst_SCRIPTS = \
+       test_get_cpu_mask_from_sysfs \
+       test_get_max_cpuid_from_sysfs
+
+get_cpu_mask_from_sysfs_SOURCES = get_cpu_mask_from_sysfs.c
+get_cpu_mask_from_sysfs_LDADD = \
+       $(top_builddir)/src/common/libcommon.la
+
+get_max_cpuid_from_sysfs_SOURCES = get_max_cpuid_from_sysfs.c
+get_max_cpuid_from_sysfs_LDADD = \
+       $(top_builddir)/src/common/libcommon.la
+
+test_get_max_cpuid_from_mask_SOURCES = test_get_max_cpuid_from_mask.c
+test_get_max_cpuid_from_mask_LDADD = \
+       $(top_builddir)/src/common/libcommon.la \
+       $(top_builddir)/tests/utils/libtap.a
+
+test_get_possible_cpus_array_len_SOURCES = test_get_possible_cpus_array_len.c
+test_get_possible_cpus_array_len_LDADD = \
        $(top_builddir)/src/common/libcommon.la \
        $(top_builddir)/tests/utils/libtap.a
diff --git a/tests/unit/libcommon/get_cpu_mask_from_sysfs.c b/tests/unit/libcommon/get_cpu_mask_from_sysfs.c
new file mode 100644 (file)
index 0000000..e4dd039
--- /dev/null
@@ -0,0 +1,30 @@
+/*
+ * SPDX-License-Identifier: LGPL-2.1-only
+ *
+ * Copyright (C) 2022 Michael Jeanson <mjeanson@efficios.com>
+ */
+
+#include <stdio.h>
+#include <stdlib.h>
+
+#include "common/smp.h"
+
+int main(int argc, char *argv[])
+{
+       int ret;
+       char buf[LTTNG_UST_CPUMASK_SIZE];
+
+       if( argc < 2 ) {
+               fprintf(stderr, "Missing argument.\n");
+               return EXIT_FAILURE;
+       }
+
+       ret = get_cpu_mask_from_sysfs((char *) &buf, LTTNG_UST_CPUMASK_SIZE, argv[1]);
+
+       printf("%s", buf);
+
+       if (ret >= 0)
+               return EXIT_SUCCESS;
+       else
+               return EXIT_FAILURE;
+}
diff --git a/tests/unit/libcommon/get_max_cpuid_from_sysfs.c b/tests/unit/libcommon/get_max_cpuid_from_sysfs.c
new file mode 100644 (file)
index 0000000..cc856c6
--- /dev/null
@@ -0,0 +1,29 @@
+/*
+ * SPDX-License-Identifier: LGPL-2.1-only
+ *
+ * Copyright (C) 2022 Michael Jeanson <mjeanson@efficios.com>
+ */
+
+#include <stdio.h>
+#include <stdlib.h>
+
+#include "common/smp.h"
+
+int main(int argc, char *argv[])
+{
+       int ret;
+
+       if( argc < 2 ) {
+               fprintf(stderr, "Missing argument.\n");
+               return EXIT_FAILURE;
+       }
+
+       ret = _get_max_cpuid_from_sysfs(argv[1]);
+
+       printf("%d\n", ret);
+
+       if (ret >= 0)
+               return EXIT_SUCCESS;
+       else
+               return EXIT_FAILURE;
+}
diff --git a/tests/unit/libcommon/test_get_cpu_mask_from_sysfs b/tests/unit/libcommon/test_get_cpu_mask_from_sysfs
new file mode 100755 (executable)
index 0000000..528ace2
--- /dev/null
@@ -0,0 +1,51 @@
+#!/bin/bash
+# SPDX-License-Identifier: LGPL-2.1-only
+
+if [ "x${UST_TESTS_SRCDIR:-}" != "x" ]; then
+       UTILSSH="$UST_TESTS_SRCDIR/utils/utils.sh"
+else
+       UTILSSH="$(dirname "$0")/../../utils/utils.sh"
+fi
+
+# shellcheck source=../../utils/utils.sh
+source "$UTILSSH"
+
+# shellcheck source=../../utils/tap.sh
+source "$UST_TESTS_SRCDIR/utils/tap.sh"
+
+CURDIR="${UST_TESTS_BUILDDIR}/unit/libcommon"
+
+NUM_TESTS=8
+
+TESTFILE=$(mktemp)
+
+populate_testfile() {
+       local cpumask="$1"
+
+       # shellcheck disable=SC2059
+       printf "$cpumask" > "$TESTFILE"
+}
+
+test_test_get_cpu_mask_from_sysfs() {
+       local cpumask="$1"
+       local result
+
+       # Without '\n'
+       populate_testfile "$cpumask"
+       result=$("${CURDIR}/get_cpu_mask_from_sysfs" "$TESTFILE")
+       test "$cpumask" == "$result"
+       ok $? "test_get_cpu_mask_from_sysfs - without '\n' expected: '$cpumask', result: '$result'"
+
+       # With '\n'
+       populate_testfile "$cpumask\n"
+       result=$("${CURDIR}/get_cpu_mask_from_sysfs" "$TESTFILE")
+       test "$cpumask" == "$result"
+       ok $? "test_get_cpu_mask_from_sysfs - with '\n' expected: '$cpumask', result: '$result'"
+}
+
+plan_tests $NUM_TESTS
+
+test_test_get_cpu_mask_from_sysfs ""
+test_test_get_cpu_mask_from_sysfs "0"
+test_test_get_cpu_mask_from_sysfs "0-3"
+test_test_get_cpu_mask_from_sysfs "0,3-7,9"
diff --git a/tests/unit/libcommon/test_get_max_cpuid_from_mask.c b/tests/unit/libcommon/test_get_max_cpuid_from_mask.c
new file mode 100644 (file)
index 0000000..b1bd868
--- /dev/null
@@ -0,0 +1,77 @@
+/*
+ * SPDX-License-Identifier: LGPL-2.1-only
+ *
+ * Copyright (C) 2022 Michael Jeanson <mjeanson@efficios.com>
+ */
+
+#include <string.h>
+
+#include "tap.h"
+
+#include "common/smp.h"
+
+struct parse_test_data {
+       const char *buf;
+       int expected;
+};
+
+static struct parse_test_data parse_test_data[] = {
+       { "", -1 },
+       { "abc", -1 },
+       { ",,,", -1 },
+       { "--", -1 },
+       { ",", -1 },
+       { "-", -1 },
+       { "2147483647", -1 },
+       { "18446744073709551615", -1 },
+       { "0-2147483647", -1 },
+       { "0-18446744073709551615", -1 },
+       { "0", 0 },
+       { "1", 1 },
+       { "0-1", 1 },
+       { "1-3", 3 },
+       { "0,2", 2 },
+       { "1,2", 2 },
+       { "0,4-6,127", 127 },
+       { "0-4095", 4095 },
+
+       { "\n", -1 },
+       { "abc\n", -1 },
+       { ",,,\n", -1 },
+       { "--\n", -1 },
+       { ",\n", -1 },
+       { "-\n", -1 },
+       { "2147483647\n", -1 },
+       { "18446744073709551615\n", -1 },
+       { "0-2147483647\n", -1 },
+       { "0-18446744073709551615\n", -1 },
+       { "0\n", 0 },
+       { "1\n", 1 },
+       { "0-1\n", 1 },
+       { "1-3\n", 3 },
+       { "0,2\n", 2 },
+       { "1,2\n", 2 },
+       { "0,4-6,127\n", 127 },
+       { "0-4095\n", 4095 },
+};
+
+static int parse_test_data_len = sizeof(parse_test_data) / sizeof(parse_test_data[0]);
+
+int main(void)
+{
+       int ret, i;
+
+       plan_tests(parse_test_data_len);
+
+       diag("Testing smp helpers");
+
+       for (i = 0; i < parse_test_data_len; i++) {
+               ret = get_max_cpuid_from_mask(parse_test_data[i].buf,
+                               strlen(parse_test_data[i].buf));
+               ok(ret == parse_test_data[i].expected,
+                       "get_max_cpuid_from_mask '%s', expected: '%d', result: '%d'",
+                       parse_test_data[i].buf, parse_test_data[i].expected, ret);
+       }
+
+       return exit_status();
+}
diff --git a/tests/unit/libcommon/test_get_max_cpuid_from_sysfs b/tests/unit/libcommon/test_get_max_cpuid_from_sysfs
new file mode 100755 (executable)
index 0000000..1d344ba
--- /dev/null
@@ -0,0 +1,89 @@
+#!/bin/bash
+# SPDX-License-Identifier: LGPL-2.1-only
+
+if [ "x${UST_TESTS_SRCDIR:-}" != "x" ]; then
+       UTILSSH="$UST_TESTS_SRCDIR/utils/utils.sh"
+else
+       UTILSSH="$(dirname "$0")/../../utils/utils.sh"
+fi
+
+# shellcheck source=../../utils/utils.sh
+source "$UTILSSH"
+
+# shellcheck source=../../utils/tap.sh
+source "$UST_TESTS_SRCDIR/utils/tap.sh"
+
+CURDIR="${UST_TESTS_BUILDDIR}/unit/libcommon"
+
+STD_OUTPUT="/dev/null"
+STD_ERROR="/dev/null"
+
+NUM_TESTS=13
+
+TESTDIR=$(mktemp -d)
+
+populate_testdir() {
+       local cpus=("$@")
+
+       mkdir "$TESTDIR"
+
+       for i in "${cpus[@]}"; do
+               mkdir "$TESTDIR/$i"
+       done
+}
+
+test_get_max_cpuid_from_sysfs() {
+       local num_cpus=$1
+       shift
+       local current_cpus=("$@")
+       local result
+
+       populate_testdir "${current_cpus[@]}" >"$STD_OUTPUT" 2>"$STD_ERROR"
+       result=$("${CURDIR}/get_max_cpuid_from_sysfs" "$TESTDIR")
+       is "$result" "$num_cpus" "get_max_cpuid_from_sysfs - cpu set: '${current_cpus[*]}', expected: '$num_cpus', result: '$result'"
+       rm -rf "$TESTDIR"
+}
+
+plan_tests $NUM_TESTS
+
+diag "get_max_cpuid_from_sysfs"
+
+test_data=(0 "cpu0")
+test_get_max_cpuid_from_sysfs "${test_data[@]}"
+
+test_data=(1 "cpu0" "cpu1")
+test_get_max_cpuid_from_sysfs "${test_data[@]}"
+
+test_data=(1 "cpu1" "cpu0")
+test_get_max_cpuid_from_sysfs "${test_data[@]}"
+
+test_data=(3 "cpu3")
+test_get_max_cpuid_from_sysfs "${test_data[@]}"
+
+test_data=(99 "cpu99")
+test_get_max_cpuid_from_sysfs "${test_data[@]}"
+
+test_data=(3 "cpu0" "cpu3")
+test_get_max_cpuid_from_sysfs "${test_data[@]}"
+
+test_data=(3 "cpufreq" "cpuidle" "cpu0" "cpu1" "cpu2" "cpu3")
+test_get_max_cpuid_from_sysfs "${test_data[@]}"
+
+test_data=(0 "cpu" "cpu0")
+test_get_max_cpuid_from_sysfs "${test_data[@]}"
+
+test_data=(5 "cpu" "cpu5")
+test_get_max_cpuid_from_sysfs "${test_data[@]}"
+
+
+test_data=(-1 "toto")
+test_get_max_cpuid_from_sysfs "${test_data[@]}"
+
+test_data=(-1 "cpu")
+test_get_max_cpuid_from_sysfs "${test_data[@]}"
+
+test_data=(-1 "cpua" "cpud")
+test_get_max_cpuid_from_sysfs "${test_data[@]}"
+
+test_data=(-1 "cpufreq" "cpuidle")
+test_get_max_cpuid_from_sysfs "${test_data[@]}"
diff --git a/tests/unit/libcommon/test_get_possible_cpus_array_len.c b/tests/unit/libcommon/test_get_possible_cpus_array_len.c
new file mode 100644 (file)
index 0000000..621f42a
--- /dev/null
@@ -0,0 +1,26 @@
+/*
+ * SPDX-License-Identifier: LGPL-2.1-only
+ *
+ * Copyright (C) 2022 Michael Jeanson <mjeanson@efficios.com>
+ */
+
+#include <stdio.h>
+
+#include "tap.h"
+
+#include "common/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);
+
+       ret = get_num_possible_cpus_fallback();
+       ok(ret > 0, "get_num_possible_cpus_fallback (%d > 0)", ret);
+
+       return exit_status();
+}
diff --git a/tests/unit/libcommon/test_smp.c b/tests/unit/libcommon/test_smp.c
deleted file mode 100644 (file)
index 7180076..0000000
+++ /dev/null
@@ -1,84 +0,0 @@
-/*
- * SPDX-License-Identifier: LGPL-2.1-only
- *
- * Copyright (C) 2020 Francis Deslauriers <francis.deslauriers@efficios.com>
- */
-
-#include <assert.h>
-#include <limits.h>
-#include <stdint.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
-#include "tap.h"
-
-#include "common/smp.h"
-
-struct parse_test_data {
-       const char *buf;
-       int expected;
-};
-
-static struct parse_test_data parse_test_data[] = {
-       { "", -1 },
-       { "abc", -1 },
-       { ",,,", -1 },
-       { "--", -1 },
-       { ",", -1 },
-       { "-", -1 },
-       { "2147483647", -1 },
-       { "18446744073709551615", -1 },
-       { "0-2147483647", -1 },
-       { "0-18446744073709551615", -1 },
-       { "0", 0 },
-       { "1", 1 },
-       { "0-1", 1 },
-       { "1-3", 3 },
-       { "0,2", 2 },
-       { "1,2", 2 },
-       { "0,4-6,127", 127 },
-       { "0-4095", 4095 },
-
-       { "\n", -1 },
-       { "abc\n", -1 },
-       { ",,,\n", -1 },
-       { "--\n", -1 },
-       { ",\n", -1 },
-       { "-\n", -1 },
-       { "2147483647\n", -1 },
-       { "18446744073709551615\n", -1 },
-       { "0-2147483647\n", -1 },
-       { "0-18446744073709551615\n", -1 },
-       { "0\n", 0 },
-       { "1\n", 1 },
-       { "0-1\n", 1 },
-       { "1-3\n", 3 },
-       { "0,2\n", 2 },
-       { "1,2\n", 2 },
-       { "0,4-6,127\n", 127 },
-       { "0-4095\n", 4095 },
-};
-
-static int parse_test_data_len = sizeof(parse_test_data) / sizeof(parse_test_data[0]);
-
-int main(void)
-{
-       int ret, i;
-
-       plan_tests(parse_test_data_len + 1);
-
-       diag("Testing smp helpers");
-
-       for (i = 0; i < parse_test_data_len; i++) {
-               ret = get_max_cpuid_from_mask(parse_test_data[i].buf,
-                               strlen(parse_test_data[i].buf));
-               ok(ret == parse_test_data[i].expected,
-                       "get_max_cpuid_from_mask '%s', expected: '%d', result: '%d'",
-                       parse_test_data[i].buf, parse_test_data[i].expected, ret);
-       }
-
-       ok(get_possible_cpus_array_len() > 0, "get_possible_cpus_array_len (%d > 0)", get_possible_cpus_array_len());
-
-       return exit_status();
-}
This page took 0.033725 seconds and 4 git commands to generate.