Bug 593 - [x86/aarch64]incorrect uptime/btime/start_time in container
Summary: [x86/aarch64]incorrect uptime/btime/start_time in container
Status: CONFIRMED
Alias: None
Product: ANCK 5.10 Dev
Classification: ANCK
Component: general/others (show other bugs) general/others
Version: unspecified
Hardware: All Linux
: P3-Medium S3-normal
Target Milestone: ---
Assignee: xunlei
QA Contact: shuming
URL:
Whiteboard:
Keywords: Bugfix
Depends on:
Blocks:
 
Reported: 2022-03-01 16:36 UTC by kangjiangbo
Modified: 2022-04-15 11:41 UTC (History)
1 user (show)

See Also:


Attachments
test (5.16 KB, text/plain)
2022-03-01 16:36 UTC, kangjiangbo
Details

Note You need to log in before you can comment on or make changes to this bug.
Description kangjiangbo 2022-03-01 16:36:02 UTC
Created attachment 160 [details]
test

Description of problem:
4.19/5.10 x86/aarch版本都存在问题,container中的uptime/btime/start_time值不正确


Version-Release number of selected component (if applicable):
# uname -a
Linux e18k01644.et15sqa 4.19.91-245.git.ac23e680a.an8.x86_64 #1 SMP Mon Feb 28 13:29:43 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux

# cat /etc/os-release
NAME="Anolis OS"
VERSION="8.2"
ID="anolis"
ID_LIKE="rhel fedora centos"
VERSION_ID="8.2"
PLATFORM_ID="platform:an8"
PRETTY_NAME="Anolis OS 8.2"
ANSI_COLOR="0;31"
HOME_URL="https://openanolis.cn/"


How reproducible:
1.git clone https://github.com/linux-test-project/ltp.git
cd ltp
make autotools
./configure
make
2.
cd testcases/kernel/controllers/cpuacct
将附件test.c放入此目录
make
3.
./test

Actual results:
./test
tst_test.c:1100: INFO: Timeout per run is 0h 05m 00s
test.c:97: INFO: [container] mypid: 1
test.c:98: INFO: [container] uptime: 17034.11
test.c:102: FAIL: incorrect /proc/uptime in container
test.c:105: INFO: [container] btime: 1646106687
test.c:106: INFO: [container] now: 1646123721
test.c:107: INFO: [host] now: 1646123714
test.c:111: FAIL: incorrect /proc/stat:btime in container
test.c:113: INFO: [container] process start_time: 17029
test.c:119: FAIL: incorrect process start_time (/proc/self/stat:22) in container
test.c:121: INFO: [container] cpu_idx0: 0
test.c:123: PASS: cpu index starts from 0 in container

Summary:
passed   1
failed   3
skipped  0
warnings 0

warnings 0

Expected results:


Additional info:

4.19/5.10 x86/aarch版本都存在问题