-
Notifications
You must be signed in to change notification settings - Fork 91
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
utime() fails to assign current time to file #157
Comments
#121 is not fixed , cannot able to reopen the issue 121 . So created a new issue to track it. |
This is definitely broken on oe_port and would have been for a while from the looks of it. utime03 and a couple more of the utime tests pass on my ongoing in-enclave-time-source branch. However, at the moment, that branch is breaking a couple of other things. I'm trying to see if I can get a slightly abbreviated version of the "in-enclave time source" work to pass CI that would include the utime fixes which would, in theory, be mergeable before all the work is done. |
This is fixed as part of #134 work. I'll update this issue when those changes are merged. |
This has been addressed. The utime03 ltp test is now on as part of the changes and will run for CI for everything going forward. |
@vamsikrishna935 @hukoyu you are good to go. |
@SeanTAllen , Verified in latest code in oe_port branch, issue still presents. Please find debugging details below. |
@vamsikrishna935 are you saying that the ltp utime03 test doesn't pass for you? It passes for me both locally and it passes CI. |
Yes utime03 is failing for me. Just verified with latest code in oe_port branch. |
@vamsikrishna935 can you describe how you are building everything and your environment as it passes in CI on oe_port and locally for me. |
@vamsikrishna935 here is how I am testing locally:
then editing ../batch.mk to run off run-hw and run-sw running all tests so i can run one test followed by
I'm able to run the last command that runs the test repeatedly without any failures. I just ran it 10 times in a row without issue. Each time I get:
|
@SeanTAllen Let me verify with clean repo again and i will update you the status. |
@SeanTAllen are you using oe_port branch of sgx-lkl? In your steps you are not checking out oe_port branch, can you double check? |
Sorry, yes, I left that out. I am using that port. I will update the steps, my oversight in writing them up. Sorry for the confusion @hukoyu @vamsikrishna935. |
@SeanTAllen I checked utime03 and actually it is timing out and since we were not checking exit code, it was hiding timeouted tests. I submitted this PR : #220 |
@hukoyu it times out for you locally? |
@hukoyu : for me it is failing , i did not get any time out till now for utime03 |
@SeanTAllen it is failed in CI pipeline. Check this: https://dev.azure.com/sgx-lkl/sgx-lkl/_build/results?buildId=224&view=logs&j=0d1659af-9dce-5414-770d-ef96fb05931d&t=81d6e709-66cb-5bbd-8ebe-3e7ad763e195 |
@SeanTAllen @vamsikrishna935 I disabled utime03 test in my PR for now. FYI |
@SeanTAllen @vamsikrishna935 I got confused between utime03 and times03. I disabled test times03 in my PR not utime03. times03 is timing out after 5 minutes. I enabled back utime03. @vamsikrishna935 please investigate times03 for timeout. Issue with utime03 is not time out issue, it must be something else. |
@vamsikrishna935 I am unable in any environment to produce utime03 failing. If you can provide information on how I can do that, I'd appreciate it. All I get it passing results. |
@SeanTAllen , Verified in latest repo today, the test is passing. |
Utime03 is failing because of this issue. Please find the testcase details below.
https://github.com/linux-test-project/ltp/blob/master/testcases/kernel/syscalls/utime/utime03.c
utime syscall : http://man7.org/linux/man-pages/man2/utime.2.html
Analysis :
Temporary file is created while setup and test tries to test utime syscall.
TEST(utime(TEMP_FILE, NULL)); This will call utime on temp_file and changes modified and access times to current time (Expected Behavior of utime syscall)
But in actual it is not setting it to current time , because the system time is 00:00:00 UTC on 1 January 1970. Here are some findings.
TEST(utime(TEMP_FILE, NULL)) will return -1 on failure.
Verification step.
Actual behavior TEST(utime(TEMP_FILE, NULL))
$1 = 64
(gdb) p modf_time
$2 = 64
(gdb) p user_uid
$3 = 0
(gdb) p curr_time
$4 = 1587997633
(gdb) p pres_time
$5 = 1587997644
(gdb) p stat_buf
$6 = {st_dev = 65024, st_ino = 169, st_nlink = 1, st_mode = 33270, st_uid = 1, st_gid = 1, __pad0 = 0, st_rdev = 0,
st_size = 0, st_blksize = 4096, st_blocks = 0, st_atim = {tv_sec = 64, tv_nsec = 120000000}, st_mtim = {tv_sec = 64,
tv_nsec = 120000000}, st_ctim = {tv_sec = 64, tv_nsec = 120000000}, __unused = {140734238814168, 140734279192000,
140733199559282}}
The text was updated successfully, but these errors were encountered: