v9:
- Add a new patch 1 to remove the child cpuset restriction on parent's
"cpuset.cpus".
- Relax initial root partition entry limitation to allow cpuset.cpus to
overlap that of parent's.
- An "isolated invalid" displayed type is added to
cpuset.cpus.partition.
- Resetting partition root to "member" will leave child partition root
as invalid.
- Update documentation and test accordingly.
v8:
- Reorganize the patch series and rationalize the features and
constraints of a partition.
- Update patch descriptions and documentation accordingly.
v7:
- Simplify the documentation patch (patch 5) as suggested by Tejun.
- Fix a typo in patch 2 and improper commit log in patch 3.
This patchset includes one bug fix and four enhancements to the cpuset v2 code.
Patch 1: Allow parent to set "cpuset.cpus" that may not be a superset
of children's "cpuset.cpus" for default hierarchy.
Patch 2: Enable partition with no task to have empty cpuset.cpus.effective.
Patch 3: Refining the features and constraints of a cpuset partition
clarifying what changes are allowed.
Patch 4: Add a new partition state "isolated" to create a partition
root without load balancing. This is for handling intermitten workloads
that have a strict low latency requirement.
Patch 5: Enable the "cpuset.cpus.partition" file to show the reason
that causes invalid partition like "root invalid (No cpu available
due to hotplug)".
Patch 6 updates the cgroup-v2.rst file accordingly. Patch 7 adds a new
cpuset test to test the new cpuset partition code.
Waiman Long (7):
cgroup/cpuset: Don't let child cpusets restrict parent in default
hierarchy
cgroup/cpuset: Allow no-task partition to have empty
cpuset.cpus.effective
cgroup/cpuset: Refining features and constraints of a partition
cgroup/cpuset: Add a new isolated cpus.partition type
cgroup/cpuset: Show invalid partition reason string
cgroup/cpuset: Update description of cpuset.cpus.partition in
cgroup-v2.rst
kselftest/cgroup: Add cpuset v2 partition root state test
Documentation/admin-guide/cgroup-v2.rst | 168 +++--
kernel/cgroup/cpuset.c | 440 +++++++-----
tools/testing/selftests/cgroup/Makefile | 5 +-
.../selftests/cgroup/test_cpuset_prs.sh | 667 ++++++++++++++++++
tools/testing/selftests/cgroup/wait_inotify.c | 87 +++
5 files changed, 1142 insertions(+), 225 deletions(-)
create mode 100755 tools/testing/selftests/cgroup/test_cpuset_prs.sh
create mode 100644 tools/testing/selftests/cgroup/wait_inotify.c
--
2.27.0
The timeout setting for the rtc kselftest is currently 90 seconds.
However, two of the tests set alarms, which take one minute to complete
each. So the timeout should be at least 120. Set it to 180, so that all
tests are able to complete and still have some slack.
Signed-off-by: Nícolas F. R. A. Prado <nfraprado(a)collabora.com>
---
This issue was discovered as part of adding the rtc kselftest to run on KernelCI
for the rk3399-gru-kevin device, which uses rtc-cros-ec as the RTC driver.
The output log with the current timeout is shown in [1]. As can be seen, the
whole test times out before the alarm_wkalm_set_minute test has had a chance to
complete:
# # RUN rtc.alarm_wkalm_set_minute ...
# # rtctest.c:294:alarm_wkalm_set_minute:Alarm time now set to 11/01/2022 23:03:00.
#
not ok 1 selftests: rtc: rtctest # TIMEOUT 90 seconds
With the increased timeout, as shown in [2], the alarm_wkalm_set_minute test
does complete its run:
# # RUN rtc.alarm_wkalm_set_minute ...
# # rtctest.c:294:alarm_wkalm_set_minute:Alarm time now set to 12/01/2022 15:54:00.
# # OK rtc.alarm_wkalm_set_minute
# ok 7 rtc.alarm_wkalm_set_minute
# # FAILED: 6 / 7 tests passed.
The fact that the alarm_alm_set_minute test times out on its own is probably an
issue with the rtc-cros-ec driver. Still, since the tests are independent, all
of them should be able to run regardless of how long each one takes (so,
assuming the worst case scenario).
[1] https://lava.collabora.co.uk/scheduler/job/5409783
[2] https://lava.collabora.co.uk/scheduler/job/5415176
tools/testing/selftests/rtc/settings | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/testing/selftests/rtc/settings b/tools/testing/selftests/rtc/settings
index ba4d85f74cd6..a953c96aa16e 100644
--- a/tools/testing/selftests/rtc/settings
+++ b/tools/testing/selftests/rtc/settings
@@ -1 +1 @@
-timeout=90
+timeout=180
--
2.34.1
Every KUNIT_ASSERT/EXPECT() invocation puts a `kunit_assert` object onto
the stack. The most common one is `kunit_binary_assert` which is 88
bytes on UML. So in the cases where the compiler doesn't optimize this
away, we can very quickly blow up the stack size.
This series implements Linus' suggestion in [1].
Namely, we split out the file, line number, and assert_type
(EXPECT/ASSERT) out of kunit_assert.
We can also drop the entirely unused `struct kunit *test` field, saving
a bit more space as well.
All together, sizeof(struct kunit_assert) went from 48 to 24 on UML.
Note: the other assert types are bigger, see [2].
This series also adds in an example test that uses all the base
KUNIT_EXPECT macros to both advertise their existence to new users and
serve as a smoketest for all these changes here.
[1] https://groups.google.com/g/kunit-dev/c/i3fZXgvBrfA/m/VULQg1z6BAAJ
[2] e.g. consider the most commonly used assert (also the biggest)
struct kunit_binary_assert {
struct kunit_assert assert;
const char *operation;
const char *left_text;
long long left_value;
const char *right_text;
long long right_value;
};
So sizeof(struct kunit_binary_assert) = went from 88 to 64.
I.e. only a 27% reduction instead of 50% in the most common case.
All 3 of the `const char*` could be split out into a `static` var as well,
but that's a bit trickier to do with how all the macros are written.
=== Changelog ===
v1 -> v2:
* made the new example test more focused on documenting the macros
rather than using them all as a smoketest
* s/kunit_failed_assertion()/kunit_do_failed_assertion()
* added `unlikely()` to `if(!(pass))` check in KUNIT_ASSERTION()
Daniel Latypov (6):
kunit: add example test case showing off all the expect macros
kunit: move check if assertion passed into the macros
kunit: drop unused kunit* field in kunit_assert
kunit: factor out kunit_base_assert_format() call into kunit_fail()
kunit: split out part of kunit_assert into a static const
kunit: drop unused assert_type from kunit_assert and clean up macros
include/kunit/assert.h | 88 +++++++++++-----------------------
include/kunit/test.h | 53 ++++++++++----------
lib/kunit/assert.c | 15 ++----
lib/kunit/kunit-example-test.c | 42 ++++++++++++++++
lib/kunit/test.c | 27 +++++------
5 files changed, 117 insertions(+), 108 deletions(-)
base-commit: ad659ccb5412874c6a89d3588cb18857c00e9d0f
--
2.34.1.575.g55b058a8bb-goog
Every KUNIT_ASSERT/EXPECT() invocation puts a `kunit_assert` object onto
the stack. The most common one is `kunit_binary_assert` which is 88
bytes on UML. So in the cases where the compiler doesn't optimize this
away, we can very quickly blow up the stack size.
This series implements Linus' suggestion in [1].
Namely, we split out the file, line number, and assert_type
(EXPECT/ASSERT) out of kunit_assert.
We can also drop the entirely unused `struct kunit *test` field, saving
a bit more space as well.
All together, sizeof(struct kunit_assert) went from 48 to 24 on UML.
Note: the other assert types are bigger, see [2].
This series also adds in an example test that uses all the KUNIT_EXPECT
macros to both advertise their existence to new users and serve as a
smoketest for all these changes here.
[1] https://groups.google.com/g/kunit-dev/c/i3fZXgvBrfA/m/VULQg1z6BAAJ
[2] e.g. consider the most commonly used assert (also the biggest)
struct kunit_binary_assert {
struct kunit_assert assert;
const char *operation;
const char *left_text;
long long left_value;
const char *right_text;
long long right_value;
};
So sizeof(struct kunit_binary_assert) = went from 88 to 64.
I.e. only a 27% reduction instead of 50% in the most common case.
All 3 of the `const char*` could be split out into a `static` var as well,
but that's a bit trickier to do with how all the macros are written.
Daniel Latypov (6):
kunit: add example test case showing off all the expect macros
kunit: move check if assertion passed into the macros
kunit: drop unused kunit* field in kunit_assert
kunit: factor out kunit_base_assert_format() call into kunit_fail()
kunit: split out part of kunit_assert into a static const
kunit: drop unused assert_type from kunit_assert and clean up macros
include/kunit/assert.h | 88 +++++++++++-----------------------
include/kunit/test.h | 52 ++++++++++----------
lib/kunit/assert.c | 15 ++----
lib/kunit/kunit-example-test.c | 46 ++++++++++++++++++
lib/kunit/test.c | 27 +++++------
5 files changed, 120 insertions(+), 108 deletions(-)
base-commit: ad659ccb5412874c6a89d3588cb18857c00e9d0f
--
2.34.1.575.g55b058a8bb-goog
Dzień dobry,
dostrzegam możliwość współpracy z Państwa firmą.
Świadczymy kompleksową obsługę inwestycji w fotowoltaikę, która obniża koszty energii elektrycznej nawet o 90%.
Czy są Państwo zainteresowani weryfikacją wstępnych propozycji?
Pozdrawiam,
Jakub Daroch
Hi Linus,
Please pull the following KUnit update for Linux 5.17-rc1.
This KUnit update for Linux 5.17-rc1 consists of several fixes and
enhancements. A few highlights:
- Option --kconfig_add option allows easily tweaking kunitconfigs
- make build subcommand can reconfigure if needed
- doesn't error on tests without test plans
- doesn't crash if no parameters are generated
- defaults --jobs to # of cups
- reports test parameter results as (K)TAP subtests
diff is attached.
thanks,
-- Shuah
----------------------------------------------------------------
The following changes since commit fa55b7dcdc43c1aa1ba12bca9d2dd4318c2a0dbf:
Linux 5.16-rc1 (2021-11-14 13:56:52 -0800)
are available in the Git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest tags/linux-kselftest-kunit-5.17-rc1
for you to fetch changes up to ad659ccb5412874c6a89d3588cb18857c00e9d0f:
kunit: tool: Default --jobs to number of CPUs (2021-12-15 16:44:55 -0700)
----------------------------------------------------------------
linux-kselftest-kunit-5.17-rc1
This KUnit update for Linux 5.17-rc1 consists of several fixes and
enhancements. A few highlights:
- Option --kconfig_add option allows easily tweaking kunitconfigs
- make build subcommand can reconfigure if needed
- doesn't error on tests without test plans
- doesn't crash if no parameters are generated
- defaults --jobs to # of cups
- reports test parameter results as (K)TAP subtests
----------------------------------------------------------------
Daniel Latypov (13):
kunit: tool: fix --json output for skipped tests
Documentation: kunit: remove claims that kunit is a mocking framework
kunit: add run_checks.py script to validate kunit changes
kunit: tool: print parsed test results fully incrementally
kunit: tool: move Kconfig read_from_file/parse_from_string to package-level
kunit: tool: add --kconfig_add to allow easily tweaking kunitconfigs
kunit: tool: revamp message for invalid kunitconfig
kunit: tool: reconfigure when the used kunitconfig changes
kunit: tool: suggest using decode_stacktrace.sh on kernel crash
kunit: tool: use dataclass instead of collections.namedtuple
kunit: tool: delete kunit_parser.TestResult type
kunit: tool: make `build` subcommand also reconfigure if needed
kunit: tool: fix newly introduced typechecker errors
David Gow (5):
kunit: tool: Do not error on tests without test plans
kunit: tool: Report an error if any test has no subtests
kunit: Don't crash if no parameters are generated
kunit: Report test parameter results as (K)TAP subtests
kunit: tool: Default --jobs to number of CPUs
Documentation/dev-tools/kunit/api/index.rst | 3 +-
Documentation/dev-tools/kunit/api/test.rst | 3 +-
Documentation/dev-tools/kunit/index.rst | 2 +-
Documentation/dev-tools/kunit/start.rst | 8 +-
lib/kunit/test.c | 25 +--
tools/testing/kunit/kunit.py | 182 ++++++++++++---------
tools/testing/kunit/kunit_config.py | 61 +++----
tools/testing/kunit/kunit_json.py | 8 +-
tools/testing/kunit/kunit_kernel.py | 76 ++++++---
tools/testing/kunit/kunit_parser.py | 57 ++++---
tools/testing/kunit/kunit_tool_test.py | 171 ++++++++++++++++---
tools/testing/kunit/run_checks.py | 81 +++++++++
.../test_is_test_passed-no_tests_no_plan.log | 7 +
13 files changed, 480 insertions(+), 204 deletions(-)
create mode 100755 tools/testing/kunit/run_checks.py
create mode 100644 tools/testing/kunit/test_data/test_is_test_passed-no_tests_no_plan.log
----------------------------------------------------------------