已关闭
[sync] PR-14: rename spec and tar of memlink #18
openeuler-ci-bot创建于 5月21日关闭于 10 天前
[sync] PR-14: rename spec and tar of memlink #18
已关闭
openeuler-ci-bot创建于 5月21日关闭于 10 天前
7 个文件变更+32-260
@@ -1,36 +0,0 @@
1-# memlink
2- 
3-#### Description
4-A system enables the host to detect and reclaim idle memory inside guests, overcoming virtualization isolation to improve memory utilization.
5- 
6-#### Software Architecture
7-Software architecture description
8- 
9-#### Installation
10- 
11-1. xxxx
12-2. xxxx
13-3. xxxx
14- 
15-#### Instructions
16- 
17-1. xxxx
18-2. xxxx
19-3. xxxx
20- 
21-#### Contribution
22- 
23-1. Fork the repository
24-2. Create Feat_xxx branch
25-3. Commit your code
26-4. Create Pull Request
27- 
28- 
29-#### Gitee Feature
30- 
31-1. You can use Readme\_XXX.md to support different languages, such as Readme\_en.md, Readme\_zh.md
32-2. Gitee blog [blog.gitee.com](https://blog.gitee.com)
33-3. Explore open source project [https://gitee.com/explore](https://gitee.com/explore)
34-4. The most valuable open source project [GVP](https://gitee.com/gvp)
35-5. The manual of Gitee [https://gitee.com/help](https://gitee.com/help)
36-6. The most popular members [https://gitee.com/gitee-stars/](https://gitee.com/gitee-stars/)
DREADME.md+0-37
@@ -1,37 +0,0 @@
1-# memlink
2- 
3-#### 介绍
4-A system enables the host to detect and reclaim idle memory inside guests, overcoming virtualization isolation to improve memory utilization.
5- 
6-#### 软件架构
7-软件架构说明
8- 
9- 
10-#### 安装教程
11- 
12-1. xxxx
13-2. xxxx
14-3. xxxx
15- 
16-#### 使用说明
17- 
18-1. xxxx
19-2. xxxx
20-3. xxxx
21- 
22-#### 参与贡献
23- 
24-1. Fork 本仓库
25-2. 新建 Feat_xxx 分支
26-3. 提交代码
27-4. 新建 Pull Request
28- 
29- 
30-#### 特技
31- 
32-1. 使用 Readme\_XXX.md 来支持不同的语言,例如 Readme\_en.md, Readme\_zh.md
33-2. Gitee 官方博客 [blog.gitee.com](https://blog.gitee.com)
34-3. 你可以 [https://gitee.com/explore](https://gitee.com/explore) 这个地址来了解 Gitee 上的优秀开源项目
35-4. [GVP](https://gitee.com/gvp) 全称是 Gitee 最有价值开源项目,是综合评定出的优秀开源项目
36-5. Gitee 官方提供的使用手册 [https://gitee.com/help](https://gitee.com/help)
37-6. Gitee 封面人物是一档用来展示 Gitee 会员风采的栏目 [https://gitee.com/gitee-stars/](https://gitee.com/gitee-stars/)
@@ -1,6 +0,0 @@
1-1.0.0
2-Initial version
3-新特性:memlink balloon基础功能
4-api变更:不涉及
5-bugfix:不涉及
6-CVE漏洞:不涉及
@@ -1,138 +0,0 @@
1-From 0aa802f5f1f88c15afdb6f9e8def96745241b090 Mon Sep 17 00:00:00 2001
2-From: leizongkun <leizongkun@qq.com>
3-Date: Tue, 21 Apr 2026 17:06:32 +0800
4-Subject: [PATCH] feat: add integration test suite for memlinkd
5- 
6-Add integration test script for memlinkd service,
7-covering binary availability, config validation,
8-libvirtd status, and service lifecycle management.
9- 
10-Signed-off-by: leizongkun <leizongkun@qq.com>
11----
12- tests/integration/memlinkd_test.conf | 4 ++
13- tests/integration/test_memlinkd.sh | 103 +++++++++++++++++++++++++++
14- 2 files changed, 107 insertions(+)
15- create mode 100644 tests/integration/memlinkd_test.conf
16- create mode 100644 tests/integration/test_memlinkd.sh
17- 
18-diff --git a/tests/integration/memlinkd_test.conf b/tests/integration/memlinkd_test.conf
19-new file mode 100644
20-index 0000000..26808ec
21---- /dev/null
22-+++ b/tests/integration/memlinkd_test.conf
23-@@ -0,0 +1,4 @@
24-+# memlinkd integration test config
25-+# balloon configuration
26-+balloon_target_used_percent = 130
27-+balloon_target_max_total_percent = 50
28-diff --git a/tests/integration/test_memlinkd.sh b/tests/integration/test_memlinkd.sh
29-new file mode 100644
30-index 0000000..4d2014f
31---- /dev/null
32-+++ b/tests/integration/test_memlinkd.sh
33-@@ -0,0 +1,103 @@
34-+#!/bin/bash
35-+# memlinkd integration test script
36-+
37-+MEMLINKD_BIN="/usr/sbin/memlinkd"
38-+MEMLINKD_CONF="/etc/memlinkd.conf"
39-+MEMLINKD_SERVICE="memlinkd"
40-+
41-+PASSED=0
42-+FAILED=0
43-+
44-+pass() { echo " [PASS] $1"; ((PASSED++)); }
45-+fail() { echo " [FAIL] $1"; ((FAILED++)); }
46-+info() { echo " [INFO] $1"; }
47-+
48-+# Test 1: Check binary
49-+test_binary() {
50-+ echo -e "\n[TEST] Check memlinkd binary"
51-+ if [ -x "$MEMLINKD_BIN" ]; then
52-+ pass "$MEMLINKD_BIN exists"
53-+ else
54-+ fail "$MEMLINKD_BIN not found"
55-+ fi
56-+}
57-+
58-+# Test 2: Check config
59-+test_config() {
60-+ echo -e "\n[TEST] Check config file"
61-+ if [ -f "$MEMLINKD_CONF" ]; then
62-+ pass "$MEMLINKD_CONF exists"
63-+ info "Content:"
64-+ grep -v "^#" "$MEMLINKD_CONF" | grep -v "^$"
65-+ else
66-+ fail "$MEMLINKD_CONF not found"
67-+ fi
68-+}
69-+
70-+# Test 3: Check libvirtd
71-+test_libvirtd() {
72-+ echo -e "\n[TEST] Check libvirtd"
73-+ if systemctl is-active --quiet libvirtd 2>/dev/null; then
74-+ pass "libvirtd is running"
75-+ else
76-+ fail "libvirtd is not running"
77-+ fi
78-+}
79-+
80-+# Test 4: Check VM
81-+test_vm() {
82-+ echo -e "\n[TEST] Check running VMs"
83-+ if ! command -v virsh &>/dev/null; then
84-+ fail "virsh not available"; return
85-+ fi
86-+ local count
87-+ count=$(virsh list --name 2>/dev/null | wc -l)
88-+ if [ "$count" -gt 0 ]; then
89-+ pass "Found $count running VM(s)"
90-+ virsh list 2>/dev/null
91-+ else
92-+ fail "No running VMs"
93-+ fi
94-+}
95-+
96-+# Test 5: Service start/stop
97-+test_service() {
98-+ echo -e "\n[TEST] Service start/stop"
99-+ if [ ! -x "$MEMLINKD_BIN" ] || [ "$EUID" -ne 0 ]; then
100-+ info "Skip (need root and memlinkd installed)"; return
101-+ fi
102-+ systemctl stop $MEMLINKD_SERVICE 2>/dev/null || true
103-+ sleep 1
104-+
105-+ systemctl start $MEMLINKD_SERVICE 2>/dev/null || { fail "Start failed"; return; }
106-+ sleep 2
107-+
108-+ if systemctl is-active --quiet $MEMLINKD_SERVICE 2>/dev/null; then
109-+ pass "Service started"
110-+ else
111-+ fail "Service not active"; return
112-+ fi
113-+
114-+ systemctl stop $MEMLINKD_SERVICE 2>/dev/null || true
115-+ sleep 1
116-+ if ! systemctl is-active --quiet $MEMLINKD_SERVICE 2>/dev/null; then
117-+ pass "Service stopped"
118-+ else
119-+ fail "Stop failed"
120-+ fi
121-+}
122-+
123-+# Summary
124-+echo "========================================"
125-+echo " memlinkd Integration Test"
126-+echo "========================================"
127-+
128-+test_binary
129-+test_config
130-+test_libvirtd
131-+test_vm
132-+test_service
133-+
134-+echo -e "\n========================================"
135-+echo "Passed: $PASSED Failed: $FAILED"
136-+echo "========================================"
137---
138-2.52.0.windows.1
Binary files do not support preview
Rmemlink.specmemlinkd.spec+32-43
@@ -2,83 +2,72 @@
2%global systemctl_bin /usr/bin/systemctl2%global systemctl_bin /usr/bin/systemctl
3 3 
4Summary: UVP memory overcommit services for euleros4Summary: UVP memory overcommit services for euleros
5-Name: memlinkd5+Name: memlinkd
6-Version: 1.06+Version: 1.0.0
7-Release: 2097+Release: 210
8License: MulanPSL28License: MulanPSL2
9-ExclusiveArch: %ix86 x86_64 aarch649+ExclusiveArch: aarch64
10-Group: System Environment/Daemons10+Group: System Environment/Daemons
11-Source0: memlinkd.tar.bz211+Source0: memlinkd-1.0.0.tar.gz
12 12 
13-Patch0001: eat-add-integration-test-suite-for-memlinkd.patch13+BuildRequires: libvirt libvirt-devel libboundscheck
14- 14+BuildRequires: systemd-devel systemd-rpm-macros
15-BuildRequires: libvirt libvirt-devel libboundscheck systemd-units
16BuildRequires: gnutls gnutls-devel cmake CUnit-devel15BuildRequires: gnutls gnutls-devel cmake CUnit-devel
17-Requires: libvirt libboundscheck systemd-units
18-Requires(post): systemd-units
19 16 
20-%prep17+Requires: libvirt libboundscheck
21-%setup -q -n src18+Requires: systemd
22-%patch -P 1 -p1
23 19 
24%description20%description
25UVP memory overcommit services for euleros21UVP memory overcommit services for euleros
26 22 
23+%prep
24+%setup -q -n memlinkd-1.0.0
25+ 
27%build26%build
28rm -rf build27rm -rf build
29mkdir -p build28mkdir -p build
30cd build29cd build
31-%ifarch aarch6430+cmake ../src -DFIT_FOR_AARCH64:STRING=TRUE
32- cmake .. -DFIT_FOR_AARCH64:STRING=TRUE31+%make_build
33-%else
34- cmake ..
35-%endif
36-make clean
37-make VERBOSE=1
38 32 
39%install33%install
40-mkdir -p %{buildroot}%{_sbindir}34+mkdir -p %{buildroot}%{_sysconfdir}/
41-mkdir -p %{buildroot}%{_unitdir}35+mkdir -p %{buildroot}%{_sbindir}/
36+mkdir -p %{buildroot}%{_unitdir}/
42mkdir -p %{buildroot}/etc/sysmonitor/process/37mkdir -p %{buildroot}/etc/sysmonitor/process/
43 38 
44-install -p -m 644 memlinkd.service %{buildroot}%{_unitdir}/39+install -m 550 build/memlinkd %{buildroot}%{_sbindir}/memlinkd
45-install -p -m 640 memlinkd.conf %{buildroot}/etc/memlinkd.conf40+install -m 644 src/memlinkd.service %{buildroot}%{_unitdir}/
46-install -p -m 550 ./build/memlinkd %{buildroot}/usr/sbin/41+install -m 640 src/memlinkd.conf %{buildroot}%{_sysconfdir}/memlinkd.conf
47-install -p -m 600 ./sysmonitor/memlinkd-daemon %{buildroot}/etc/sysmonitor/process/memlinkd-daemon42+install -m 600 src/sysmonitor/memlinkd-daemon %{buildroot}/etc/sysmonitor/process/memlinkd-daemon
48 43 
49%files44%files
50%{_sbindir}/memlinkd45%{_sbindir}/memlinkd
51%{_unitdir}/memlinkd.service46%{_unitdir}/memlinkd.service
52-%config(noreplace) /etc/memlinkd.conf47+%config(noreplace) %{_sysconfdir}/memlinkd.conf
53/etc/sysmonitor/process/memlinkd-daemon48/etc/sysmonitor/process/memlinkd-daemon
54 49 
55%post50%post
56-if [ "$1" -eq 1 ]; then51+%systemd_post memlinkd.service
57- systemctl disable memlinkd.service &> /dev/null
58-fi
59- 
60-systemctl daemon-reload &> /dev/null
61 52 
62%preun53%preun
63-if [ "$1" -eq 0 ]; then54+%systemd_preun memlinkd.service
64- systemctl disable memlinkd.service &> /dev/null
65- systemctl stop memlinkd.service &> /dev/null
66-fi
67 55 
68%postun56%postun
69-if [ "$1" -ge 1 ]; then57+%systemd_postun_with_restart memlinkd.service
70- systemctl try-restart memlinkd.service &> /dev/null
71-fi
72 58 
73%changelog59%changelog
74-* Tue Apr 21 2026 Leizongkun<leizongkun@huawei.com> - 1.0-20960+* Thu May 21 2026 Leizongkun <leizongkun@huawei.com> - 1.0.0-210
61+- rename spec and replace tar
62+ 
63+* Tue Apr 21 2026 Leizongkun <leizongkun@huawei.com> - 1.0.0-209
75- Type:feature64- Type:feature
76- CVE:NA65- CVE:NA
77- SUG:NA66- SUG:NA
78- DESC:Add integration test suite for memlinkd67- DESC:Add integration test suite for memlinkd
79 68 
80-* Tue Aug 26 2025 Leizongkun<leizongkun@huawei.com> - 1.0-20869+* Tue Aug 26 2025 Leizongkun <leizongkun@huawei.com> - 1.0.0-208
81- Type:feature70- Type:feature
82- CVE:NA71- CVE:NA
83- SUG:NA72- SUG:NA
84-- DESC:Add init code of memlink73+- DESC:Add init code of memlinkd
Binary files do not support preview