1 Star 0 Fork 49

AliOS Auto/systemd

forked from src-anolis-os/systemd 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
0341-test-replace-cursor-file-with-a-plain-cursor.patch 2.09 KB
一键复制 编辑 原始数据 按行查看 历史
张彬琛 提交于 2021-04-20 15:17 . update to systemd-239-31.el8_2.2
From 0bef8805c81eecfe3960bf00b6022837e4979198 Mon Sep 17 00:00:00 2001
From: Frantisek Sumsal <fsumsal@redhat.com>
Date: Tue, 3 Mar 2020 15:54:29 +0100
Subject: [PATCH] test: replace cursor file with a plain cursor
systemd in RHEL 8 doesn't support the --cursor-file option, so let's
fall back to a plain cursor string
Related: #1808940
rhel-only
---
test/TEST-36-NUMAPOLICY/test.sh | 2 +-
test/TEST-36-NUMAPOLICY/testsuite.sh | 6 +++---
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/test/TEST-36-NUMAPOLICY/test.sh b/test/TEST-36-NUMAPOLICY/test.sh
index 3b3b120423..7cc909765b 100755
--- a/test/TEST-36-NUMAPOLICY/test.sh
+++ b/test/TEST-36-NUMAPOLICY/test.sh
@@ -17,7 +17,7 @@ test_setup() {
eval $(udevadm info --export --query=env --name=${LOOPDEV}p2)
setup_basic_environment
- dracut_install mktemp
+ dracut_install mktemp awk
# mask some services that we do not want to run in these tests
ln -fs /dev/null $initdir/etc/systemd/system/systemd-hwdb-update.service
diff --git a/test/TEST-36-NUMAPOLICY/testsuite.sh b/test/TEST-36-NUMAPOLICY/testsuite.sh
index a5ac788178..bffac4ffe6 100755
--- a/test/TEST-36-NUMAPOLICY/testsuite.sh
+++ b/test/TEST-36-NUMAPOLICY/testsuite.sh
@@ -30,7 +30,7 @@ journalSleep=5
sleepAfterStart=1
# Journal cursor for easier navigation
-journalCursorFile="jounalCursorFile"
+journalCursor=""
startStrace() {
coproc strace -qq -p 1 -o $straceLog -e set_mempolicy -s 1024 $1
@@ -46,7 +46,7 @@ stopStrace() {
startJournalctl() {
# Save journal's cursor for later navigation
- journalctl --no-pager --cursor-file="$journalCursorFile" -n0 -ocat
+ journalCursor="$(journalctl --no-pager --show-cursor -n0 -ocat | awk '{print $3}')"
}
stopJournalctl() {
@@ -55,7 +55,7 @@ stopJournalctl() {
# the --sync wait until the synchronization is complete
echo "Force journald to write all queued messages"
journalctl --sync
- journalctl -u $unit --cursor-file="$journalCursorFile" > "$journalLog"
+ journalctl -u $unit --after-cursor="$journalCursor" > "$journalLog"
}
checkNUMA() {
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/banma-autoos/systemd.git
git@gitee.com:banma-autoos/systemd.git
banma-autoos
systemd
systemd
a8

搜索帮助

0d507c66 1850385 C8b1a773 1850385