Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
systemd
Manage
Activity
Members
Plan
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Terraform modules
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
CodeLinaro
le
systemd
Commits
d710d363
Commit
d710d363
authored
12 years ago
by
Michal Schmidt
Browse files
Options
Downloads
Patches
Plain Diff
test: test irreversible jobs
parent
f948423b
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
test/TEST-03-JOBS/test-jobs.sh
+13
-0
13 additions, 0 deletions
test/TEST-03-JOBS/test-jobs.sh
test/TEST-03-JOBS/test.sh
+3
-2
3 additions, 2 deletions
test/TEST-03-JOBS/test.sh
test/unstoppable.service
+5
-0
5 additions, 0 deletions
test/unstoppable.service
with
21 additions
and
2 deletions
test/TEST-03-JOBS/test-jobs.sh
+
13
−
0
View file @
d710d363
...
...
@@ -24,5 +24,18 @@ grep 'hello\.service' /root/list-jobs.txt && exit 1
# TODO: add more job queueing/merging tests here.
# Test for irreversible jobs
systemctl start unstoppable.service
||
exit
1
# This is expected to fail with 'job cancelled'
systemctl stop unstoppable.service
&&
exit
1
# But this should succeed
systemctl stop
--irreversible
unstoppable.service
||
exit
1
# We're going to shutdown soon. Let's see if it succeeds when
# there's an active service that tries to be unstoppable.
# Shutdown of the container/VM will hang if not.
systemctl start unstoppable.service
||
exit
1
touch
/testok
exit
0
This diff is collapsed.
Click to expand it.
test/TEST-03-JOBS/test.sh
+
3
−
2
View file @
d710d363
#!/bin/bash
# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
# ex: ts=8 sw=4 sts=4 et filetype=sh
TEST_DESCRIPTION
=
"Job
merging
"
TEST_DESCRIPTION
=
"Job
-related tests
"
KVERSION
=
${
KVERSION
-
$(
uname
-r
)
}
KERNEL_VER
=
$(
uname
-r
)
...
...
@@ -138,7 +138,8 @@ Type=oneshot
EOF
# copy the units used by this test
cp
$TEST_BASE_DIR
/
{
hello.service,sleep.service,hello-after-sleep.target
}
$initdir
/etc/systemd/system
cp
$TEST_BASE_DIR
/
{
hello.service,sleep.service,hello-after-sleep.target,unstoppable.service
}
\
$initdir
/etc/systemd/system
cp
test-jobs.sh
$initdir
/
mkdir
-p
$initdir
/etc/systemd/system/testsuite.target.wants
...
...
This diff is collapsed.
Click to expand it.
test/unstoppable.service
0 → 100644
+
5
−
0
View file @
d710d363
[Service]
Type
=
oneshot
RemainAfterExit
=
yes
ExecStart
=
/bin/echo 'I'm unstoppable!'
ExecStop
=
/bin/systemctl start --no-block unstoppable.service
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment