File tree Expand file tree Collapse file tree 5 files changed +8
-6
lines changed Expand file tree Collapse file tree 5 files changed +8
-6
lines changed Original file line number Diff line number Diff line change 231
231
logs
232
232
mtime
233
233
xapi-backtrace
234
- ( xapi-stdext-pervasives ( = :version ) )
235
- ( xapi-stdext-threads ( and :with -test ( = :version ) ) ) ) )
234
+ ( xapi-stdext-pervasives ( = :version ) ) ) )
236
235
237
236
( package
238
237
(name xapi-idl))
Original file line number Diff line number Diff line change 1
1
(executable
2
2
(name log_test)
3
- (libraries log xapi-stdext-threads threads.posix xapi-backtrace))
3
+ (libraries log threads.posix xapi-backtrace))
4
4
5
5
(cram
6
6
(package xapi-log)
Original file line number Diff line number Diff line change @@ -6,12 +6,16 @@ let a = [||]
6
6
7
7
let buggy () = a.(1 ) < - 0
8
8
9
+ let with_lock mutex f =
10
+ let finally () = Mutex. unlock mutex in
11
+ Mutex. lock mutex ; Fun. protect ~finally f
12
+
9
13
let () =
10
14
Printexc. record_backtrace true ;
11
15
Debug. log_to_stdout () ;
12
16
()
13
17
|> Debug. with_thread_associated " main" @@ fun () ->
14
- try Xapi_stdext_threads.Threadext.Mutex. execute m buggy
18
+ try with_lock m buggy
15
19
with e ->
16
20
D. log_backtrace e ;
17
21
D. warn " Got exception: %s" (Printexc. to_string e)
Original file line number Diff line number Diff line change 3
3
[|error||0 |main|backtrace] 1/4 log_test.exe Raised at file ocaml/libs/log/test/log_test.ml, line 7
4
4
[|error||0 |main|backtrace] 2/4 log_test.exe Called from file fun.ml, line 33
5
5
[|error||0 |main|backtrace] 3/4 log_test.exe Called from file fun.ml, line 38
6
- [|error||0 |main|backtrace] 4/4 log_test.exe Called from file ocaml/libs/log/test/log_test.ml, line 14
6
+ [|error||0 |main|backtrace] 4/4 log_test.exe Called from file ocaml/libs/log/test/log_test.ml, line 18
7
7
[|error||0 |main|backtrace]
8
8
[| warn||0 |main|log_test.ml] Got exception: Invalid_argument("index out of bounds")
9
9
Original file line number Diff line number Diff line change @@ -16,7 +16,6 @@ depends: [
16
16
"mtime"
17
17
"xapi-backtrace"
18
18
"xapi-stdext-pervasives" {= version}
19
- "xapi-stdext-threads" {with-test & = version}
20
19
"odoc" {with-doc}
21
20
]
22
21
build: [
You can’t perform that action at this time.
0 commit comments