X-Git-Url: https://git.lttng.org/?a=blobdiff_plain;f=tests%2Funit%2Ftest_get_max_cpuid_from_sysfs_cxx;h=2283a046aa48476fd208ff5ec3fc6d5a48d1e4f3;hb=HEAD;hp=886c065bef8db682f93f01e7fa8785579eaf55c2;hpb=4de89c1129d52f0f13b63ec037802e095c506875;p=urcu.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..2283a04 100755 --- a/tests/unit/test_get_max_cpuid_from_sysfs_cxx +++ b/tests/unit/test_get_max_cpuid_from_sysfs_cxx @@ -1,4 +1,7 @@ -#!/bin/bash +#!/usr/bin/env bash + +# SPDX-FileCopyrightText: 2023 EfficiOS Inc. +# # SPDX-License-Identifier: GPL-2.0-or-later if [ "x${URCU_TESTS_SRCDIR:-}" != "x" ]; then @@ -44,46 +47,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