Skip to content
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

fix: trying to fix real_gettimeofday on arm64 #2849

Merged
merged 6 commits into from
Feb 11, 2022

Conversation

STRRL
Copy link
Member

@STRRL STRRL commented Feb 7, 2022

Signed-off-by: STRRL str_ruiling@outlook.com

What problem does this PR solve?

close #2844

What's changed and how it works?

  • add parameter tz in real_gettimeofday

Related changes

  • Need to update chaos-mesh/website
  • Need to update Dashboard UI
  • Need to cheery-pick to release branches
    • release-2.1
    • release-2.0

Checklist

Tests

  • Unit test
  • E2E test
  • No code
  • Manual test (add steps below)

It could be compiled on my machine.

Side effects

  • Breaking backward compatibility

Release note

Please add a release note.

You can safely ignore this section if you don't think this PR needs a release note.

DCO

If you find the DCO check fails, please run commands like below (Depends on the actual situations. For example, if the failed commit isn't the most recent) to fix it:

git commit --amend --signoff
git push --force

Signed-off-by: STRRL <str_ruiling@outlook.com>
Signed-off-by: STRRL <str_ruiling@outlook.com>
@ti-chi-bot
Copy link
Member

ti-chi-bot commented Feb 7, 2022

[REVIEW NOTIFICATION]

This pull request has been approved by:

  • YangKeao
  • iguoyr

To complete the pull request process, please ask the reviewers in the list to review by filling /cc @reviewer in the comment.
After your PR has acquired the required number of LGTMs, you can assign this pull request to the committer in the list by filling /assign @committer in the comment to help you merge this pull request.

The full list of commands accepted by this bot can be found here.

Reviewer can indicate their review by submitting an approval review.
Reviewer can cancel approval by submitting a request changes review.

@STRRL
Copy link
Member Author

STRRL commented Feb 7, 2022

PTAL

/cc @ReigenDing @YangKeao @iguoyr

@ti-chi-bot
Copy link
Member

@STRRL: GitHub didn't allow me to request PR reviews from the following users: ReigenDing.

Note that only chaos-mesh members and repo collaborators can review this PR, and authors cannot review their own PRs.

In response to this:

PTAL

/cc @ReigenDing @YangKeao @iguoyr

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

Copy link
Member

@iguoyr iguoyr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rest LGTM

pkg/time/fakeclock/fake_gettimeofday.c Show resolved Hide resolved
Copy link
Member

@YangKeao YangKeao left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@STRRL
Copy link
Member Author

STRRL commented Feb 11, 2022

LGTM

What should I do with compiler warning?

@YangKeao
Copy link
Member

YangKeao commented Feb 11, 2022

LGTM

What should I do with compiler warning?

@STRRL As I have tried on my raspberry pi, it can be solved by adding a new register int w0 __asm__("w0"). The result assembly will be really simple:

mov x8, #0xa9
svc #0x0
ret

@STRRL
Copy link
Member Author

STRRL commented Feb 11, 2022

LGTM

What should I do with compiler warning?

@STRRL As I have tried on my raspberry pi, it can be solved by adding a new register int w0 __asm__("w0"). The result assembly will be really simple:

mov x8, #0xa9
svc #0x0
ret

I do not get the point, it seems it contains many conventions about syscall and assembly that I do not know. 🥲

Could you help me with doing that( by directly pushing codes to this PR)? :P

Signed-off-by: YangKeao <yangkeao@chunibyo.icu>
…rm64

Signed-off-by: YangKeao <yangkeao@chunibyo.icu>
@YangKeao
Copy link
Member

@STRRL Done.

I'm not sure whether it will actually work, because the ptrace related package doesn't provide an arm implementation, so I cannot verify this implementation through watchmaker.

@iguoyr
Copy link
Member

iguoyr commented Feb 11, 2022

@STRRL Done.

I'm not sure whether it will actually work, because the ptrace related package doesn't provide an arm implementation, so I cannot verify this implementation through watchmaker.

Right! Actually we can't execute timechaos experiments on arm64 right now, so in order to fix the CI ASAP, I thought I'd approve it first and fix this feature later.

Copy link
Member

@iguoyr iguoyr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@iguoyr
Copy link
Member

iguoyr commented Feb 11, 2022

/merge

@ti-chi-bot
Copy link
Member

This pull request has been accepted and is ready to merge.

Commit hash: edd1b06

@iguoyr
Copy link
Member

iguoyr commented Feb 11, 2022

/run-e2e-tests

@ti-chi-bot ti-chi-bot merged commit 4d3bfed into chaos-mesh:master Feb 11, 2022
@ti-srebot
Copy link
Contributor

cherry pick to release-2.1 failed

STRRL added a commit to STRRL/chaos-mesh that referenced this pull request Mar 21, 2022
* fix: trying to fix real_gettimeofday on arm64

Signed-off-by: STRRL <str_ruiling@outlook.com>

* chore: remove double underscore with variable tz

Signed-off-by: STRRL <str_ruiling@outlook.com>

* chore: make linters happy

Signed-off-by: STRRL <str_ruiling@outlook.com>

* use an extra w0 register

Signed-off-by: YangKeao <yangkeao@chunibyo.icu>

Co-authored-by: YangKeao <yangkeao@chunibyo.icu>
@STRRL
Copy link
Member Author

STRRL commented Mar 21, 2022

4d3bfed

It makes no sense, I could manually cherry-pick it with no conflict.

ti-chi-bot added a commit that referenced this pull request Mar 22, 2022
* fix: trying to fix real_gettimeofday on arm64 (#2849)

* fix: trying to fix real_gettimeofday on arm64

Signed-off-by: STRRL <str_ruiling@outlook.com>

* chore: remove double underscore with variable tz

Signed-off-by: STRRL <str_ruiling@outlook.com>

* chore: make linters happy

Signed-off-by: STRRL <str_ruiling@outlook.com>

* use an extra w0 register

Signed-off-by: YangKeao <yangkeao@chunibyo.icu>

Co-authored-by: YangKeao <yangkeao@chunibyo.icu>

* ci: fix `upload-image` action  (#2935)

* chore: move fake_image to linux_amd64

Signed-off-by: SiyuChen <ryougi201@gmail.com>

* chore: fix upload image

Signed-off-by: SiyuChen <ryougi201@gmail.com>

* fix: remove deafult project env

Signed-off-by: SiyuChen <ryougi201@gmail.com>

* chore: add FakeImage to fake_image

Signed-off-by: SiyuChen <ryougi201@gmail.com>

* chore: update e2e image name

Signed-off-by: SiyuChen <ryougi201@gmail.com>

* chore: fix e2e test

Signed-off-by: SiyuChen <ryougi201@gmail.com>

* chore: fix e2e test

Signed-off-by: SiyuChen <ryougi201@gmail.com>

Co-authored-by: Ti Chi Robot <ti-community-prow-bot@tidb.io>

Co-authored-by: YangKeao <yangkeao@chunibyo.icu>
Co-authored-by: Siyu Chen <ryougi201@gmail.com>
Co-authored-by: Ti Chi Robot <ti-community-prow-bot@tidb.io>
zhqqqy pushed a commit to zhqqqy/chaos-mesh that referenced this pull request Apr 10, 2022
* fix: trying to fix real_gettimeofday on arm64

Signed-off-by: STRRL <str_ruiling@outlook.com>

* chore: remove double underscore with variable tz

Signed-off-by: STRRL <str_ruiling@outlook.com>

* chore: make linters happy

Signed-off-by: STRRL <str_ruiling@outlook.com>

* use an extra w0 register

Signed-off-by: YangKeao <yangkeao@chunibyo.icu>

Co-authored-by: YangKeao <yangkeao@chunibyo.icu>
Signed-off-by: zhqqqy <zhqqqy@163.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

timechaos for gettimeofday has not been ported on arm64
5 participants