forked from torvalds/linux
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge tag 'linux-kselftest-4.11-rc1' of git://git.kernel.org/pub/scm/…
…linux/kernel/git/shuah/linux-kselftest Pull Kselftest update from Shuah Khan: "This update consists of: - fixes to several existing tests from Stafford Horne - cpufreq tests from Viresh Kumar - Selftest build and install fixes from Bamvor Jian Zhang and Michael Ellerman - Fixes to protection-keys tests from Dave Hansen - Warning fixes from Shuah Khan" * tag 'linux-kselftest-4.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest: (28 commits) selftests/powerpc: Fix remaining fallout from recent changes selftests/powerpc: Fix the clean rule since recent changes selftests: Fix the .S and .S -> .o rules selftests: Fix the .c linking rule selftests: Fix selftests build to just build, not run tests selftests, x86, protection_keys: fix wrong offset in siginfo selftests, x86, protection_keys: fix uninitialized variable warning selftest: cpufreq: Update MAINTAINERS file selftest: cpufreq: Add special tests selftest: cpufreq: Add support to test cpufreq modules selftest: cpufreq: Add suspend/resume/hibernate support selftest: cpufreq: Add support for cpufreq tests selftests: Add intel_pstate to TARGETS selftests/intel_pstate: Update makefile to match new style selftests/intel_pstate: Fix warning on loop index overflow cpupower: Restore format of frequency-info limit selftests/futex: Add headers to makefile dependencies selftests/futex: Add stdio used for logging selftests: x86 protection_keys remove dead code selftests: x86 protection_keys fix unused variable compile warnings ...
- Loading branch information
Showing
59 changed files
with
1,325 additions
and
402 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3452,6 +3452,7 @@ B: https://bugzilla.kernel.org | |
F: Documentation/cpu-freq/ | ||
F: drivers/cpufreq/ | ||
F: include/linux/cpufreq.h | ||
F: tools/testing/selftests/cpufreq/ | ||
|
||
CPU FREQUENCY DRIVERS - ARM BIG LITTLE | ||
M: Viresh Kumar <[email protected]> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,8 @@ | ||
TEST_FILES := validate_cap | ||
TEST_PROGS := test_execve | ||
|
||
BINARIES := $(TEST_FILES) $(TEST_PROGS) | ||
TEST_GEN_FILES := validate_cap | ||
TEST_GEN_PROGS := test_execve | ||
|
||
CFLAGS += -O2 -g -std=gnu99 -Wall | ||
LDLIBS += -lcap-ng -lrt -ldl | ||
|
||
all: $(BINARIES) | ||
|
||
clean: | ||
$(RM) $(BINARIES) | ||
|
||
include ../lib.mk | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
all: | ||
|
||
TEST_PROGS := main.sh | ||
TEST_FILES := cpu.sh cpufreq.sh governor.sh module.sh special-tests.sh | ||
|
||
include ../lib.mk | ||
|
||
clean: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,84 @@ | ||
#!/bin/bash | ||
# | ||
# CPU helpers | ||
|
||
# protect against multiple inclusion | ||
if [ $FILE_CPU ]; then | ||
return 0 | ||
else | ||
FILE_CPU=DONE | ||
fi | ||
|
||
source cpufreq.sh | ||
|
||
for_each_cpu() | ||
{ | ||
cpus=$(ls $CPUROOT | grep "cpu[0-9].*") | ||
for cpu in $cpus; do | ||
$@ $cpu | ||
done | ||
} | ||
|
||
for_each_non_boot_cpu() | ||
{ | ||
cpus=$(ls $CPUROOT | grep "cpu[1-9].*") | ||
for cpu in $cpus; do | ||
$@ $cpu | ||
done | ||
} | ||
|
||
#$1: cpu | ||
offline_cpu() | ||
{ | ||
printf "Offline $1\n" | ||
echo 0 > $CPUROOT/$1/online | ||
} | ||
|
||
#$1: cpu | ||
online_cpu() | ||
{ | ||
printf "Online $1\n" | ||
echo 1 > $CPUROOT/$1/online | ||
} | ||
|
||
#$1: cpu | ||
reboot_cpu() | ||
{ | ||
offline_cpu $1 | ||
online_cpu $1 | ||
} | ||
|
||
# Reboot CPUs | ||
# param: number of times we want to run the loop | ||
reboot_cpus() | ||
{ | ||
printf "** Test: Running ${FUNCNAME[0]} for $1 loops **\n\n" | ||
|
||
for i in `seq 1 $1`; do | ||
for_each_non_boot_cpu offline_cpu | ||
for_each_non_boot_cpu online_cpu | ||
printf "\n" | ||
done | ||
|
||
printf "\n%s\n\n" "------------------------------------------------" | ||
} | ||
|
||
# Prints warning for all CPUs with missing cpufreq directory | ||
print_unmanaged_cpus() | ||
{ | ||
for_each_cpu cpu_should_have_cpufreq_directory | ||
} | ||
|
||
# Counts CPUs with cpufreq directories | ||
count_cpufreq_managed_cpus() | ||
{ | ||
count=0; | ||
|
||
for cpu in `ls $CPUROOT | grep "cpu[0-9].*"`; do | ||
if [ -d $CPUROOT/$cpu/cpufreq ]; then | ||
let count=count+1; | ||
fi | ||
done | ||
|
||
echo $count; | ||
} |
Oops, something went wrong.