X-Git-Url: http://git.liburcu.org/?a=blobdiff_plain;f=tests%2Funit%2Ftest_get_max_cpuid_from_sysfs_cxx;h=5532f9b545455ee676a88ffce08617b3e5305a02;hb=da56d5cad05a280a8171ef51f185e6d0d29610f0;hp=886c065bef8db682f93f01e7fa8785579eaf55c2;hpb=4de89c1129d52f0f13b63ec037802e095c506875;p=userspace-rcu.git diff --git a/tests/unit/test_get_max_cpuid_from_sysfs_cxx b/tests/unit/test_get_max_cpuid_from_sysfs_cxx index 886c065..5532f9b 100755 --- a/tests/unit/test_get_max_cpuid_from_sysfs_cxx +++ b/tests/unit/test_get_max_cpuid_from_sysfs_cxx @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # SPDX-License-Identifier: GPL-2.0-or-later if [ "x${URCU_TESTS_SRCDIR:-}" != "x" ]; then @@ -44,46 +44,50 @@ test_get_max_cpuid_from_sysfs_cxx() { rm -rf "$TESTDIR" } -plan_tests $NUM_TESTS +if [ "$URCU_TESTS_OS_TYPE" == "linux" ]; then + plan_tests $NUM_TESTS -diag "get_max_cpuid_from_sysfs_cxx" + diag "get_max_cpuid_from_sysfs_cxx" -test_data=(0 "cpu0") -test_get_max_cpuid_from_sysfs_cxx "${test_data[@]}" + test_data=(0 "cpu0") + test_get_max_cpuid_from_sysfs_cxx "${test_data[@]}" -test_data=(1 "cpu0" "cpu1") -test_get_max_cpuid_from_sysfs_cxx "${test_data[@]}" + test_data=(1 "cpu0" "cpu1") + test_get_max_cpuid_from_sysfs_cxx "${test_data[@]}" -test_data=(1 "cpu1" "cpu0") -test_get_max_cpuid_from_sysfs_cxx "${test_data[@]}" + test_data=(1 "cpu1" "cpu0") + test_get_max_cpuid_from_sysfs_cxx "${test_data[@]}" -test_data=(3 "cpu3") -test_get_max_cpuid_from_sysfs_cxx "${test_data[@]}" + test_data=(3 "cpu3") + test_get_max_cpuid_from_sysfs_cxx "${test_data[@]}" -test_data=(99 "cpu99") -test_get_max_cpuid_from_sysfs_cxx "${test_data[@]}" + test_data=(99 "cpu99") + test_get_max_cpuid_from_sysfs_cxx "${test_data[@]}" -test_data=(3 "cpu0" "cpu3") -test_get_max_cpuid_from_sysfs_cxx "${test_data[@]}" + test_data=(3 "cpu0" "cpu3") + test_get_max_cpuid_from_sysfs_cxx "${test_data[@]}" -test_data=(3 "cpufreq" "cpuidle" "cpu0" "cpu1" "cpu2" "cpu3") -test_get_max_cpuid_from_sysfs_cxx "${test_data[@]}" + test_data=(3 "cpufreq" "cpuidle" "cpu0" "cpu1" "cpu2" "cpu3") + test_get_max_cpuid_from_sysfs_cxx "${test_data[@]}" -test_data=(0 "cpu" "cpu0") -test_get_max_cpuid_from_sysfs_cxx "${test_data[@]}" + test_data=(0 "cpu" "cpu0") + test_get_max_cpuid_from_sysfs_cxx "${test_data[@]}" -test_data=(5 "cpu" "cpu5") -test_get_max_cpuid_from_sysfs_cxx "${test_data[@]}" + test_data=(5 "cpu" "cpu5") + test_get_max_cpuid_from_sysfs_cxx "${test_data[@]}" -test_data=(-1 "toto") -test_get_max_cpuid_from_sysfs_cxx "${test_data[@]}" + test_data=(-1 "toto") + test_get_max_cpuid_from_sysfs_cxx "${test_data[@]}" -test_data=(-1 "cpu") -test_get_max_cpuid_from_sysfs_cxx "${test_data[@]}" + test_data=(-1 "cpu") + test_get_max_cpuid_from_sysfs_cxx "${test_data[@]}" -test_data=(-1 "cpua" "cpud") -test_get_max_cpuid_from_sysfs_cxx "${test_data[@]}" + test_data=(-1 "cpua" "cpud") + test_get_max_cpuid_from_sysfs_cxx "${test_data[@]}" -test_data=(-1 "cpufreq" "cpuidle") -test_get_max_cpuid_from_sysfs_cxx "${test_data[@]}" + test_data=(-1 "cpufreq" "cpuidle") + test_get_max_cpuid_from_sysfs_cxx "${test_data[@]}" +else + plan_skip_all "Linux specific tests." +fi