-
Notifications
You must be signed in to change notification settings - Fork 617
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
Enhanced Timer Handling and Testing for One Shot Timer #2562
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
hckuo
changed the title
Fix one shot itimer
Enhanced Timer Handling and Testing for One Shot Timer
Jan 8, 2025
- Modify itimer_armed macro in restorer.c to consider it_value - Simplify decode_itimer function in timer.c to use provided it_value - Remove conditional logic that set it_value to interval Signed-off-by: Austin Kuo <hsuanchikuo@gmail.com>
This commit improves the timers test in ZDTM (Zero Downtime Migration) by introducing multiple timer configurations. The changes include: - Refactoring setup_timers() to accept a timer configuration parameter. - Adding a one-shot timer configuration alongside the existing periodic timer. - Running the test twice with different timer configurations. Signed-off-by: Austin Kuo <hsuanchikuo@gmail.com>
hckuo
force-pushed
the
fix-one-shot-itimer
branch
from
January 10, 2025 04:47
d5ca42b
to
c20a4cf
Compare
The test passes without the fix:
I think the intention was to introduce the regression test, wasn't it? |
I think it has something to do with how the test is setup. If I only test
the ones hot timers it would fail as expected. I can duplicate the test
file so one for regular timers and one for one shot timers. However this
is something that I want to avoid to not have duplicate code. Please
instruct on a better way if any. Or I can just duplicate the test file and
make it two tests.
…On Fri, Jan 10, 2025 at 18:32 Andrei Vagin ***@***.***> wrote:
The test passes without the fix:
$ git log HEAD~3... --pretty=oneline
36bf4a056f3c153baf2b130cac6df8f62835e3b4 (HEAD) Revert "Update timer handling to properly respect the it_value field"
c20a4cf test: zdtm: Enhance timers test with multiple timer configurations
3249a83 Update timer handling to properly respect the it_value field
$ make -j 4
$ python test/zdtm.py run -t zdtm/static/timers --ignore-taint -f h
userns is supported
The kernel is tainted: '12352'
=== Run 1/1 ================ zdtm/static/timers
========================= Run zdtm/static/timers in h ==========================
Start test
./timers --pidfile=timers.pid --outfile=timers.out
Run criu dump
Run criu restore
Send the 15 signal to 52
Wait for zdtm/static/timers(52) to die for 0.100000
Wait for zdtm/static/timers(52) to die for 0.200000
Wait for zdtm/static/timers(52) to die for 0.400000
Wait for zdtm/static/timers(52) to die for 0.800000
Wait for zdtm/static/timers(52) to die for 1.600000
Removing dump/zdtm/static/timers/52
========================= Test zdtm/static/timers PASS =========================
I think the intention was to introduce the regression test, wasn't it?
—
Reply to this email directly, view it on GitHub
<#2562 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AZADMJQ6IGNARJYKK5QBZHD2KB7FPAVCNFSM6AAAAABU25D5QGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDKOBVGAZDANBUGQ>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
|
avagin
reviewed
Jan 17, 2025
avagin
reviewed
Jan 17, 2025
avagin
reviewed
Jan 17, 2025
Signed-off-by: Austin Kuo <hsuanchikuo@gmail.com>
…tions" This reverts commit c20a4cf. Signed-off-by: Austin Kuo <hsuanchikuo@gmail.com>
It creates a few timers with log expiration intervals, waites for C/R and check that timers are armed and their intervals have been restored. Signed-off-by: Austin Kuo <hsuanchikuo@gmail.com>
Merged. Thanks. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request introduces improvements to timer handling and testing:
Timer Handling Updates
ZDTM Test Enhancements