Merge tag 'linux-kselftest-next-6.2-rc1' of git://git.kernel.org/pub/scm/linux/kernel...
authorLinus Torvalds <torvalds@linux-foundation.org>
Tue, 13 Dec 2022 00:39:38 +0000 (16:39 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Tue, 13 Dec 2022 00:39:38 +0000 (16:39 -0800)
Pull Kselftest updates from Shuah Khan:
 "Several fixes and enhancements to existing tests and a few new tests:

   - add new amd-pstate tests and fix and enhance existing ones

   - add new watchdog tests and enhance existing ones to improve
     coverage

   - fixes to ftrace, splice_read, rtc, and efivars tests

   - fixes to handle egrep obsolescence in the latest grep release

   - miscellaneous spelling and SPDX fixes"

* tag 'linux-kselftest-next-6.2-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest: (24 commits)
  selftests/ftrace: Use long for synthetic event probe test
  selftests/tpm2: Split async tests call to separate shell script runner
  selftests: splice_read: Fix sysfs read cases
  selftests: ftrace: Use "grep -E" instead of "egrep"
  selftests: gpio: Use "grep -E" instead of "egrep"
  selftests: kselftest_deps: Use "grep -E" instead of "egrep"
  selftests/efivarfs: Add checking of the test return value
  cpufreq: amd-pstate: fix spdxcheck warnings for amd-pstate-ut.c
  selftests: rtc: skip when RTC is not present
  selftests/ftrace: event_triggers: wait longer for test_event_enable
  selftests/vDSO: Add riscv getcpu & gettimeofday test
  Documentation: amd-pstate: Add tbench and gitsource test introduction
  selftests: amd-pstate: Trigger gitsource benchmark and test cpus
  selftests: amd-pstate: Trigger tbench benchmark and test cpus
  selftests: amd-pstate: Split basic.sh into run.sh and basic.sh.
  selftests: amd-pstate: Rename amd-pstate-ut.sh to basic.sh.
  selftests/ftrace: Convert tracer tests to use 'requires' to specify program dependency
  selftests/ftrace: Add check for ping command for trigger tests
  selftests/watchdog: Fix spelling mistake "Temeprature" -> "Temperature"
  selftests/watchdog: add test for WDIOC_GETTEMP
  ...

1  2 
Documentation/admin-guide/pm/amd-pstate.rst
tools/testing/selftests/ftrace/test.d/trigger/inter-event/trigger-synthetic-eprobe.tc
tools/testing/selftests/lib.mk

index 06e23538f79c30a134f079e3f577c29702489027,29c50e96eb95d44896901f2034b3ffa727302644..5376d53faaa8e734f1e75c0a147a1b6122b65c02
@@@ -283,19 -283,23 +283,19 @@@ efficiency frequency management method 
  Kernel Module Options for ``amd-pstate``
  =========================================
  
 -.. _shared_mem:
 -
 -``shared_mem``
 -Use a module param (shared_mem) to enable related processors manually with
 -**amd_pstate.shared_mem=1**.
 -Due to the performance issue on the processors with `Shared Memory Support
 -<perf_cap_>`_, we disable it presently and will re-enable this by default
 -once we address performance issue with this solution.
 -
 -To check whether the current processor is using `Full MSR Support <perf_cap_>`_
 -or `Shared Memory Support <perf_cap_>`_ : ::
 -
 -  ray@hr-test1:~$ lscpu | grep cppc
 -  Flags:                           fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm constant_tsc rep_good nopl nonstop_tsc cpuid extd_apicid aperfmperf rapl pni pclmulqdq monitor ssse3 fma cx16 sse4_1 sse4_2 x2apic movbe popcnt aes xsave avx f16c rdrand lahf_lm cmp_legacy svm extapic cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw ibs skinit wdt tce topoext perfctr_core perfctr_nb bpext perfctr_llc mwaitx cpb cat_l3 cdp_l3 hw_pstate ssbd mba ibrs ibpb stibp vmmcall fsgsbase bmi1 avx2 smep bmi2 erms invpcid cqm rdt_a rdseed adx smap clflushopt clwb sha_ni xsaveopt xsavec xgetbv1 xsaves cqm_llc cqm_occup_llc cqm_mbm_total cqm_mbm_local clzero irperf xsaveerptr rdpru wbnoinvd cppc arat npt lbrv svm_lock nrip_save tsc_scale vmcb_clean flushbyasid decodeassists pausefilter pfthreshold avic v_vmsave_vmload vgif v_spec_ctrl umip pku ospke vaes vpclmulqdq rdpid overflow_recov succor smca fsrm
 -
 -If the CPU flags have ``cppc``, then this processor supports `Full MSR Support
 -<perf_cap_>`_. Otherwise, it supports `Shared Memory Support <perf_cap_>`_.
 +Passive Mode
 +------------
 +
 +``amd_pstate=passive``
 +
 +It will be enabled if the ``amd_pstate=passive`` is passed to the kernel in the command line.
 +In this mode, ``amd_pstate`` driver software specifies a desired QoS target in the CPPC
 +performance scale as a relative number. This can be expressed as percentage of nominal
 +performance (infrastructure max). Below the nominal sustained performance level,
 +desired performance expresses the average performance level of the processor subject
 +to the Performance Reduction Tolerance register. Above the nominal performance level,
 +processor must provide at least nominal performance requested and go higher if current
 +operating conditions allow.
  
  
  ``cpupower`` tool support for ``amd-pstate``
@@@ -405,37 -409,55 +405,55 @@@ Unit Tests for amd-pstat
  
  1. Test case decriptions
  
+     1). Basic tests
+         Test prerequisite and basic functions for the ``amd-pstate`` driver.
          +---------+--------------------------------+------------------------------------------------------------------------------------+
          | Index   | Functions                      | Description                                                                        |
          +=========+================================+====================================================================================+
-         | 0       | amd_pstate_ut_acpi_cpc_valid   || Check whether the _CPC object is present in SBIOS.                                |
+         | 1       | amd_pstate_ut_acpi_cpc_valid   || Check whether the _CPC object is present in SBIOS.                                |
          |         |                                ||                                                                                   |
          |         |                                || The detail refer to `Processor Support <processor_support_>`_.                    |
          +---------+--------------------------------+------------------------------------------------------------------------------------+
-         | 1       | amd_pstate_ut_check_enabled    || Check whether AMD P-State is enabled.                                             |
+         | 2       | amd_pstate_ut_check_enabled    || Check whether AMD P-State is enabled.                                             |
          |         |                                ||                                                                                   |
          |         |                                || AMD P-States and ACPI hardware P-States always can be supported in one processor. |
          |         |                                | But AMD P-States has the higher priority and if it is enabled with                 |
          |         |                                | :c:macro:`MSR_AMD_CPPC_ENABLE` or ``cppc_set_enable``, it will respond to the      |
          |         |                                | request from AMD P-States.                                                         |
          +---------+--------------------------------+------------------------------------------------------------------------------------+
-         | 2       | amd_pstate_ut_check_perf       || Check if the each performance values are reasonable.                              |
+         | 3       | amd_pstate_ut_check_perf       || Check if the each performance values are reasonable.                              |
          |         |                                || highest_perf >= nominal_perf > lowest_nonlinear_perf > lowest_perf > 0.           |
          +---------+--------------------------------+------------------------------------------------------------------------------------+
-         | 3       | amd_pstate_ut_check_freq       || Check if the each frequency values and max freq when set support boost mode       |
+         | 4       | amd_pstate_ut_check_freq       || Check if the each frequency values and max freq when set support boost mode       |
          |         |                                | are reasonable.                                                                    |
          |         |                                || max_freq >= nominal_freq > lowest_nonlinear_freq > min_freq > 0                   |
          |         |                                || If boost is not active but supported, this maximum frequency will be larger than  |
          |         |                                | the one in ``cpuinfo``.                                                            |
          +---------+--------------------------------+------------------------------------------------------------------------------------+
  
+     2). Tbench test
+         Test and monitor the cpu changes when running tbench benchmark under the specified governor.
+         These changes include desire performance, frequency, load, performance, energy etc.
+         The specified governor is ondemand or schedutil.
+         Tbench can also be tested on the ``acpi-cpufreq`` kernel driver for comparison.
+     3). Gitsource test
+         Test and monitor the cpu changes when running gitsource benchmark under the specified governor.
+         These changes include desire performance, frequency, load, time, energy etc.
+         The specified governor is ondemand or schedutil.
+         Gitsource can also be tested on the ``acpi-cpufreq`` kernel driver for comparison.
  #. How to execute the tests
  
     We use test module in the kselftest frameworks to implement it.
-    We create amd-pstate-ut module and tie it into kselftest.(for
+    We create ``amd-pstate-ut`` module and tie it into kselftest.(for
     details refer to Linux Kernel Selftests [4]_).
  
-     1. Build
+     1). Build
  
          + open the :c:macro:`CONFIG_X86_AMD_PSTATE` configuration option.
          + set the :c:macro:`CONFIG_X86_AMD_PSTATE_UT` configuration option to M.
              $ cd linux
              $ make -C tools/testing/selftests
  
-     #. Installation & Steps ::
+         + make perf ::
+             $ cd tools/perf/
+             $ make
+     2). Installation & Steps ::
  
          $ make -C tools/testing/selftests install INSTALL_PATH=~/kselftest
+         $ cp tools/perf/perf /usr/bin/perf
          $ sudo ./kselftest/run_kselftest.sh -c amd-pstate
-         TAP version 13
-         1..1
-         # selftests: amd-pstate: amd-pstate-ut.sh
-         # amd-pstate-ut: ok
-         ok 1 selftests: amd-pstate: amd-pstate-ut.sh
-     #. Results ::
-          $ dmesg | grep "amd_pstate_ut" | tee log.txt
-          [12977.570663] amd_pstate_ut: 1    amd_pstate_ut_acpi_cpc_valid  success!
-          [12977.570673] amd_pstate_ut: 2    amd_pstate_ut_check_enabled   success!
-          [12977.571207] amd_pstate_ut: 3    amd_pstate_ut_check_perf      success!
-          [12977.571212] amd_pstate_ut: 4    amd_pstate_ut_check_freq      success!
+     3). Specified test case ::
+         $ cd ~/kselftest/amd-pstate
+         $ sudo ./run.sh -t basic
+         $ sudo ./run.sh -t tbench
+         $ sudo ./run.sh -t tbench -m acpi-cpufreq
+         $ sudo ./run.sh -t gitsource
+         $ sudo ./run.sh -t gitsource -m acpi-cpufreq
+         $ ./run.sh --help
+         ./run.sh: illegal option -- -
+         Usage: ./run.sh [OPTION...]
+                 [-h <help>]
+                 [-o <output-file-for-dump>]
+                 [-c <all: All testing,
+                      basic: Basic testing,
+                      tbench: Tbench testing,
+                      gitsource: Gitsource testing.>]
+                 [-t <tbench time limit>]
+                 [-p <tbench process number>]
+                 [-l <loop times for tbench>]
+                 [-i <amd tracer interval>]
+                 [-m <comparative test: acpi-cpufreq>]
+     4). Results
+         + basic
+          When you finish test, you will get the following log info ::
+           $ dmesg | grep "amd_pstate_ut" | tee log.txt
+           [12977.570663] amd_pstate_ut: 1    amd_pstate_ut_acpi_cpc_valid  success!
+           [12977.570673] amd_pstate_ut: 2    amd_pstate_ut_check_enabled   success!
+           [12977.571207] amd_pstate_ut: 3    amd_pstate_ut_check_perf      success!
+           [12977.571212] amd_pstate_ut: 4    amd_pstate_ut_check_freq      success!
+         + tbench
+          When you finish test, you will get selftest.tbench.csv and png images.
+          The selftest.tbench.csv file contains the raw data and the drop of the comparative test.
+          The png images shows the performance, energy and performan per watt of each test.
+          Open selftest.tbench.csv :
+          +-------------------------------------------------+--------------+----------+---------+----------+-------------+---------+----------------------+
+          + Governor                                        | Round        | Des-perf | Freq    | Load     | Performance | Energy  | Performance Per Watt |
+          +-------------------------------------------------+--------------+----------+---------+----------+-------------+---------+----------------------+
+          + Unit                                            |              |          | GHz     |          | MB/s        | J       | MB/J                 |
+          +=================================================+==============+==========+=========+==========+=============+=========+======================+
+          + amd-pstate-ondemand                             | 1            |          |         |          | 2504.05     | 1563.67 | 158.5378             |
+          +-------------------------------------------------+--------------+----------+---------+----------+-------------+---------+----------------------+
+          + amd-pstate-ondemand                             | 2            |          |         |          | 2243.64     | 1430.32 | 155.2941             |
+          +-------------------------------------------------+--------------+----------+---------+----------+-------------+---------+----------------------+
+          + amd-pstate-ondemand                             | 3            |          |         |          | 2183.88     | 1401.32 | 154.2860             |
+          +-------------------------------------------------+--------------+----------+---------+----------+-------------+---------+----------------------+
+          + amd-pstate-ondemand                             | Average      |          |         |          | 2310.52     | 1465.1  | 156.1268             |
+          +-------------------------------------------------+--------------+----------+---------+----------+-------------+---------+----------------------+
+          + amd-pstate-schedutil                            | 1            | 165.329  | 1.62257 | 99.798   | 2136.54     | 1395.26 | 151.5971             |
+          +-------------------------------------------------+--------------+----------+---------+----------+-------------+---------+----------------------+
+          + amd-pstate-schedutil                            | 2            | 166      | 1.49761 | 99.9993  | 2100.56     | 1380.5  | 150.6377             |
+          +-------------------------------------------------+--------------+----------+---------+----------+-------------+---------+----------------------+
+          + amd-pstate-schedutil                            | 3            | 166      | 1.47806 | 99.9993  | 2084.12     | 1375.76 | 149.9737             |
+          +-------------------------------------------------+--------------+----------+---------+----------+-------------+---------+----------------------+
+          + amd-pstate-schedutil                            | Average      | 165.776  | 1.53275 | 99.9322  | 2107.07     | 1383.84 | 150.7399             |
+          +-------------------------------------------------+--------------+----------+---------+----------+-------------+---------+----------------------+
+          + acpi-cpufreq-ondemand                           | 1            |          |         |          | 2529.9      | 1564.4  | 160.0997             |
+          +-------------------------------------------------+--------------+----------+---------+----------+-------------+---------+----------------------+
+          + acpi-cpufreq-ondemand                           | 2            |          |         |          | 2249.76     | 1432.97 | 155.4297             |
+          +-------------------------------------------------+--------------+----------+---------+----------+-------------+---------+----------------------+
+          + acpi-cpufreq-ondemand                           | 3            |          |         |          | 2181.46     | 1406.88 | 153.5060             |
+          +-------------------------------------------------+--------------+----------+---------+----------+-------------+---------+----------------------+
+          + acpi-cpufreq-ondemand                           | Average      |          |         |          | 2320.37     | 1468.08 | 156.4741             |
+          +-------------------------------------------------+--------------+----------+---------+----------+-------------+---------+----------------------+
+          + acpi-cpufreq-schedutil                          | 1            |          |         |          | 2137.64     | 1385.24 | 152.7723             |
+          +-------------------------------------------------+--------------+----------+---------+----------+-------------+---------+----------------------+
+          + acpi-cpufreq-schedutil                          | 2            |          |         |          | 2107.05     | 1372.23 | 152.0138             |
+          +-------------------------------------------------+--------------+----------+---------+----------+-------------+---------+----------------------+
+          + acpi-cpufreq-schedutil                          | 3            |          |         |          | 2085.86     | 1365.35 | 151.2433             |
+          +-------------------------------------------------+--------------+----------+---------+----------+-------------+---------+----------------------+
+          + acpi-cpufreq-schedutil                          | Average      |          |         |          | 2110.18     | 1374.27 | 152.0136             |
+          +-------------------------------------------------+--------------+----------+---------+----------+-------------+---------+----------------------+
+          + acpi-cpufreq-ondemand VS acpi-cpufreq-schedutil | Comprison(%) |          |         |          | -9.0584     | -6.3899 | -2.8506              |
+          +-------------------------------------------------+--------------+----------+---------+----------+-------------+---------+----------------------+
+          + amd-pstate-ondemand VS amd-pstate-schedutil     | Comprison(%) |          |         |          | 8.8053      | -5.5463 | -3.4503              |
+          +-------------------------------------------------+--------------+----------+---------+----------+-------------+---------+----------------------+
+          + acpi-cpufreq-ondemand VS amd-pstate-ondemand    | Comprison(%) |          |         |          | -0.4245     | -0.2029 | -0.2219              |
+          +-------------------------------------------------+--------------+----------+---------+----------+-------------+---------+----------------------+
+          + acpi-cpufreq-schedutil VS amd-pstate-schedutil  | Comprison(%) |          |         |          | -0.1473     | 0.6963  | -0.8378              |
+          +-------------------------------------------------+--------------+----------+---------+----------+-------------+---------+----------------------+
+         + gitsource
+          When you finish test, you will get selftest.gitsource.csv and png images.
+          The selftest.gitsource.csv file contains the raw data and the drop of the comparative test.
+          The png images shows the performance, energy and performan per watt of each test.
+          Open selftest.gitsource.csv :
+          +-------------------------------------------------+--------------+----------+----------+----------+-------------+---------+----------------------+
+          + Governor                                        | Round        | Des-perf | Freq     | Load     | Time        | Energy  | Performance Per Watt |
+          +-------------------------------------------------+--------------+----------+----------+----------+-------------+---------+----------------------+
+          + Unit                                            |              |          | GHz      |          | s           | J       | 1/J                  |
+          +=================================================+==============+==========+==========+==========+=============+=========+======================+
+          + amd-pstate-ondemand                             | 1            | 50.119   | 2.10509  | 23.3076  | 475.69      | 865.78  | 0.001155027          |
+          +-------------------------------------------------+--------------+----------+----------+----------+-------------+---------+----------------------+
+          + amd-pstate-ondemand                             | 2            | 94.8006  | 1.98771  | 56.6533  | 467.1       | 839.67  | 0.001190944          |
+          +-------------------------------------------------+--------------+----------+----------+----------+-------------+---------+----------------------+
+          + amd-pstate-ondemand                             | 3            | 76.6091  | 2.53251  | 43.7791  | 467.69      | 855.85  | 0.001168429          |
+          +-------------------------------------------------+--------------+----------+----------+----------+-------------+---------+----------------------+
+          + amd-pstate-ondemand                             | Average      | 73.8429  | 2.20844  | 41.2467  | 470.16      | 853.767 | 0.001171279          |
+          +-------------------------------------------------+--------------+----------+----------+----------+-------------+---------+----------------------+
+          + amd-pstate-schedutil                            | 1            | 165.919  | 1.62319  | 98.3868  | 464.17      | 866.8   | 0.001153668          |
+          +-------------------------------------------------+--------------+----------+----------+----------+-------------+---------+----------------------+
+          + amd-pstate-schedutil                            | 2            | 165.97   | 1.31309  | 99.5712  | 480.15      | 880.4   | 0.001135847          |
+          +-------------------------------------------------+--------------+----------+----------+----------+-------------+---------+----------------------+
+          + amd-pstate-schedutil                            | 3            | 165.973  | 1.28448  | 99.9252  | 481.79      | 867.02  | 0.001153375          |
+          +-------------------------------------------------+--------------+----------+----------+----------+-------------+---------+----------------------+
+          + amd-pstate-schedutil                            | Average      | 165.954  | 1.40692  | 99.2944  | 475.37      | 871.407 | 0.001147569          |
+          +-------------------------------------------------+--------------+----------+----------+----------+-------------+---------+----------------------+
+          + acpi-cpufreq-ondemand                           | 1            |          |          |          | 2379.62     | 742.96  | 0.001345967          |
+          +-------------------------------------------------+--------------+----------+----------+----------+-------------+---------+----------------------+
+          + acpi-cpufreq-ondemand                           | 2            |          |          |          | 441.74      | 817.49  | 0.001223256          |
+          +-------------------------------------------------+--------------+----------+----------+----------+-------------+---------+----------------------+
+          + acpi-cpufreq-ondemand                           | 3            |          |          |          | 455.48      | 820.01  | 0.001219497          |
+          +-------------------------------------------------+--------------+----------+----------+----------+-------------+---------+----------------------+
+          + acpi-cpufreq-ondemand                           | Average      |          |          |          | 425.613     | 793.487 | 0.001260260          |
+          +-------------------------------------------------+--------------+----------+----------+----------+-------------+---------+----------------------+
+          + acpi-cpufreq-schedutil                          | 1            |          |          |          | 459.69      | 838.54  | 0.001192548          |
+          +-------------------------------------------------+--------------+----------+----------+----------+-------------+---------+----------------------+
+          + acpi-cpufreq-schedutil                          | 2            |          |          |          | 466.55      | 830.89  | 0.001203528          |
+          +-------------------------------------------------+--------------+----------+----------+----------+-------------+---------+----------------------+
+          + acpi-cpufreq-schedutil                          | 3            |          |          |          | 470.38      | 837.32  | 0.001194286          |
+          +-------------------------------------------------+--------------+----------+----------+----------+-------------+---------+----------------------+
+          + acpi-cpufreq-schedutil                          | Average      |          |          |          | 465.54      | 835.583 | 0.001196769          |
+          +-------------------------------------------------+--------------+----------+----------+----------+-------------+---------+----------------------+
+          + acpi-cpufreq-ondemand VS acpi-cpufreq-schedutil | Comprison(%) |          |          |          | 9.3810      | 5.3051  | -5.0379              |
+          +-------------------------------------------------+--------------+----------+----------+----------+-------------+---------+----------------------+
+          + amd-pstate-ondemand VS amd-pstate-schedutil     | Comprison(%) | 124.7392 | -36.2934 | 140.7329 | 1.1081      | 2.0661  | -2.0242              |
+          +-------------------------------------------------+--------------+----------+----------+----------+-------------+---------+----------------------+
+          + acpi-cpufreq-ondemand VS amd-pstate-ondemand    | Comprison(%) |          |          |          | 10.4665     | 7.5968  | -7.0605              |
+          +-------------------------------------------------+--------------+----------+----------+----------+-------------+---------+----------------------+
+          + acpi-cpufreq-schedutil VS amd-pstate-schedutil  | Comprison(%) |          |          |          | 2.1115      | 4.2873  | -4.1110              |
+          +-------------------------------------------------+--------------+----------+----------+----------+-------------+---------+----------------------+
  
  Reference
  ===========
index 6461c375694f0279c506d26bf9e289152a2230ed,a5c117e80ae0f2f124432ba0c7404fb7a05a5203..c2a8ab01e13b2ac2a1ff4a40772386aaa8b08144
@@@ -1,7 -1,7 +1,7 @@@
  #!/bin/sh
  # SPDX-License-Identifier: GPL-2.0
  # description: event trigger - test inter-event histogram trigger eprobe on synthetic event
 -# requires: dynamic_events synthetic_events events/syscalls/sys_enter_openat/hist "e[:[<group>/]<event>] <attached-group>.<attached-event> [<args>]":README
 +# requires: dynamic_events synthetic_events events/syscalls/sys_enter_openat/hist "e[:[<group>/][<event>]] <attached-group>.<attached-event> [<args>]":README
  
  echo 0 > events/enable
  
@@@ -14,7 -14,7 +14,7 @@@ FIELD="filename
  SYNTH="synth_open"
  EPROBE="eprobe_open"
  
- echo "$SYNTH u64 filename; s64 ret;" > synthetic_events
+ echo "$SYNTH unsigned long filename; long ret;" > synthetic_events
  echo "hist:keys=common_pid:__arg__1=$FIELD" > events/$SYSTEM/$START/trigger
  echo "hist:keys=common_pid:filename=\$__arg__1,ret=ret:onmatch($SYSTEM.$START).trace($SYNTH,\$filename,\$ret)" > events/$SYSTEM/$END/trigger
  
index a3ea3d4a206d05733540e00f334ce29e65c6d933,f4196832b82382e7b7a2ea0be3d0da100240c5b0..291144c284fbcb4139549ea470402d84a206af23
@@@ -70,7 -70,7 +70,7 @@@ ende
  run_tests: all
  ifdef building_out_of_srctree
        @if [ "X$(TEST_PROGS)$(TEST_PROGS_EXTENDED)$(TEST_FILES)" != "X" ]; then \
 -              rsync -aq $(TEST_PROGS) $(TEST_PROGS_EXTENDED) $(TEST_FILES) $(OUTPUT); \
 +              rsync -aLq $(TEST_PROGS) $(TEST_PROGS_EXTENDED) $(TEST_FILES) $(OUTPUT); \
        fi
        @if [ "X$(TEST_PROGS)" != "X" ]; then \
                $(call RUN_TESTS, $(TEST_GEN_PROGS) $(TEST_CUSTOM_PROGS) \
@@@ -84,7 -84,7 +84,7 @@@ endi
  
  define INSTALL_SINGLE_RULE
        $(if $(INSTALL_LIST),@mkdir -p $(INSTALL_PATH))
 -      $(if $(INSTALL_LIST),rsync -a $(INSTALL_LIST) $(INSTALL_PATH)/)
 +      $(if $(INSTALL_LIST),rsync -aL $(INSTALL_LIST) $(INSTALL_PATH)/)
  endef
  
  define INSTALL_RULE
@@@ -123,6 -123,11 +123,11 @@@ ende
  clean:
        $(CLEAN)
  
+ # Enables to extend CFLAGS and LDFLAGS from command line, e.g.
+ # make USERCFLAGS=-Werror USERLDFLAGS=-static
+ CFLAGS += $(USERCFLAGS)
+ LDFLAGS += $(USERLDFLAGS)
  # When make O= with kselftest target from main level
  # the following aren't defined.
  #