File tree Expand file tree Collapse file tree 3 files changed +37
-7
lines changed
tmt/tests/booted/readonly Expand file tree Collapse file tree 3 files changed +37
-7
lines changed Original file line number Diff line number Diff line change 93
93
# tests to know we're doing upstream CI.
94
94
touch /usr/lib/.bootc-dev-stamp
95
95
# And test our own linting
96
+ # # Workaround for https://github.com/bootc-dev/bootc/issues/1546
97
+ rm -rf /root/buildinfo
96
98
bootc container lint --fatal-warnings
97
99
EORUN
Original file line number Diff line number Diff line change @@ -37,13 +37,9 @@ impl SysrootLock {
37
37
/// immediately, a status message will be printed to standard output.
38
38
/// The lock will be unlocked when this object is dropped.
39
39
pub async fn new_from_sysroot ( sysroot : & ostree:: Sysroot ) -> Result < Self > {
40
- if sysroot. try_lock ( ) ? {
41
- return Ok ( Self {
42
- sysroot : sysroot. clone ( ) ,
43
- unowned : false ,
44
- } ) ;
45
- }
46
- async_task_with_spinner ( "Waiting for sysroot lock..." , sysroot. lock_future ( ) ) . await ?;
40
+ let sysroot_clone = sysroot. clone ( ) ;
41
+ let locker = tokio:: task:: spawn_blocking ( move || sysroot_clone. lock ( ) ) ;
42
+ async_task_with_spinner ( "Waiting for sysroot lock..." , locker) . await ??;
47
43
Ok ( Self {
48
44
sysroot : sysroot. clone ( ) ,
49
45
unowned : false ,
Original file line number Diff line number Diff line change
1
+ # Verify we can spawn multiple bootc status at the same time
2
+ use std assert
3
+ use tap .nu
4
+
5
+ tap begin " concurrent bootc status"
6
+
7
+ # Fork via systemd-run
8
+ let n = 10
9
+ 0 .. $n | each { |v |
10
+ # Clean up prior runs
11
+ systemctl stop $" bootc-status-($v )" | complete
12
+ }
13
+ # Fork off a concurrent bootc status
14
+ 0 .. $n | each { |v |
15
+ systemd-run -- no-block - qr - u $" bootc-status-($v )" bootc status
16
+ }
17
+
18
+ # Await completion
19
+ 0 .. $n | each { |v |
20
+ loop {
21
+ let r = systemctl is-active $" bootc-status-($v )" | complete
22
+ if $r.exit_code == 0 {
23
+ break
24
+ }
25
+ # check status
26
+ systemctl status $" bootc-status-($v )" out> /dev/null
27
+ # Clean it up
28
+ systemctl reset-failed $" bootc-status-($v )"
29
+ }
30
+ }
31
+
32
+ tap ok
You can’t perform that action at this time.
0 commit comments