1 Star 0 Fork 48

zhongling.h/systemd_1

forked from src-anolis-os/systemd 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
0274-test-cpu-set-util-add-simple-test-for-cpus_in_affini.patch 1.25 KB
一键复制 编辑 原始数据 按行查看 历史
张彬琛 提交于 2021-01-20 13:59 . import systemd-239-29.el8.src.rpm
From a1ed6bfc5a8c40377b9f1cab1acc3c67a9529427 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
Date: Tue, 21 May 2019 09:01:34 +0200
Subject: [PATCH] test-cpu-set-util: add simple test for
cpus_in_affinity_mask()
(cherry picked from commit 9d1345f0657c707df89b41b2738776efb40aec8e)
Related: #1734787
---
src/test/test-cpu-set-util.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/src/test/test-cpu-set-util.c b/src/test/test-cpu-set-util.c
index b9ec29af66..e87e0ca6e6 100644
--- a/src/test/test-cpu-set-util.c
+++ b/src/test/test-cpu-set-util.c
@@ -157,6 +157,14 @@ static void test_parse_cpu_set(void) {
cpu_set_reset(&c);
}
+static void test_cpus_in_affinity_mask(void) {
+ int r;
+
+ r = cpus_in_affinity_mask();
+ assert(r > 0);
+ log_info("cpus_in_affinity_mask: %d", r);
+}
+
int main(int argc, char *argv[]) {
log_info("CPU_ALLOC_SIZE(1) = %zu", CPU_ALLOC_SIZE(1));
log_info("CPU_ALLOC_SIZE(9) = %zu", CPU_ALLOC_SIZE(9));
@@ -167,6 +175,7 @@ int main(int argc, char *argv[]) {
log_info("CPU_ALLOC_SIZE(8191) = %zu", CPU_ALLOC_SIZE(8191));
test_parse_cpu_set();
+ test_cpus_in_affinity_mask();
return 0;
}
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/zhonglingh/systemd_1.git
git@gitee.com:zhonglingh/systemd_1.git
zhonglingh
systemd_1
systemd_1
a8

搜索帮助