Bug 9427 - Anolis23环境,chrt --all-tasks --pid ${non-existent PID},显示命令执行成功,且无任务错误提示
Summary: Anolis23环境,chrt --all-tasks --pid ${non-existent PID},显示命令执行成功,且无任务错误提示
Status: NEW
Alias: None
Product: Anolis OS 23
Classification: Anolis OS
Component: BaseOS Packages (show other bugs) BaseOS Packages
Version: 23.0
Hardware: All Linux
: P3-Medium S3-normal
Target Milestone: ---
Assignee: yunmeng365524
QA Contact: bolong_tbl
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-06-26 11:25 UTC by wb-qtt862918
Modified: 2024-06-26 11:26 UTC (History)
1 user (show)

See Also:


Attachments
测试执行结果 (92.08 KB, image/jpeg)
2024-06-26 11:25 UTC, wb-qtt862918
Details

Note You need to log in before you can comment on or make changes to this bug.
Description wb-qtt862918 2024-06-26 11:25:27 UTC
Created attachment 1195 [details]
测试执行结果

[问题描述]:
Anolis23环境,chrt --all-tasks --pid ${non-existent PID},显示命令执行成功

[环境信息]:
机器类型:ECS

[内核信息]:
uname -r
5.10.134-14.1.an23.x86_64


[操作系统信息]:
cat /etc/os-release
NAME="Anolis OS"
VERSION="23"
ID="anolis"
VERSION_ID="23"
PLATFORM_ID="platform:an23"
PRETTY_NAME="Anolis OS 23"
ANSI_COLOR="0;31"
HOME_URL="https://openanolis.cn/"
BUG_REPORT_URL="https://bugzilla.openanolis.cn/"


[重现步骤]:
前置条件: 
- 执行命令sleep 1000 &,创建一个进程
- 执行ps aux | grep "sleep 1000" | grep -v grep| awk "{print \$2}"|head -1,获取该进程的pid
测试步骤:
- 执行chrt --all-tasks --pid PID,PID为前置条件传入
- 执行kill -9 PID,PID为前置条件传入
- 执行chrt --all-tasks --pid PID,PID为前置条件传入
期望结果:
- 命令执行成功,输出该进程的调度策略和优先级
- 命令执行成功,杀死该进程
- 命令执行失败,报cannot obtain the list of tasks错

执行结果:
- 测试步骤三中执行chrt --all-tasks --pid PID命令后,命令显示执行成功,且无任何错误提示