@@ -22,28 +22,28 @@ fn test_invalid_nanosleep() {
22
22
tv_nsec : 1_000_000_000 ,
23
23
} ) {
24
24
NanosleepRelativeResult :: Err ( io:: Errno :: INVAL ) => ( ) ,
25
- otherwise => panic ! ( "unexpected resut : {:?}" , otherwise) ,
25
+ otherwise => panic ! ( "unexpected result : {:?}" , otherwise) ,
26
26
}
27
27
match nanosleep ( & Timespec {
28
28
tv_sec : 0 ,
29
29
tv_nsec : !0 ,
30
30
} ) {
31
31
NanosleepRelativeResult :: Err ( io:: Errno :: INVAL ) => ( ) ,
32
- otherwise => panic ! ( "unexpected resut : {:?}" , otherwise) ,
32
+ otherwise => panic ! ( "unexpected result : {:?}" , otherwise) ,
33
33
}
34
34
match nanosleep ( & Timespec {
35
35
tv_sec : !0 ,
36
36
tv_nsec : 1_000_000_000 ,
37
37
} ) {
38
38
NanosleepRelativeResult :: Err ( io:: Errno :: INVAL ) => ( ) ,
39
- otherwise => panic ! ( "unexpected resut : {:?}" , otherwise) ,
39
+ otherwise => panic ! ( "unexpected result : {:?}" , otherwise) ,
40
40
}
41
41
match nanosleep ( & Timespec {
42
42
tv_sec : !0 ,
43
43
tv_nsec : !0 ,
44
44
} ) {
45
45
NanosleepRelativeResult :: Err ( io:: Errno :: INVAL ) => ( ) ,
46
- otherwise => panic ! ( "unexpected resut : {:?}" , otherwise) ,
46
+ otherwise => panic ! ( "unexpected result : {:?}" , otherwise) ,
47
47
}
48
48
}
49
49
@@ -56,6 +56,7 @@ fn test_invalid_nanosleep() {
56
56
target_os = "redox" ,
57
57
target_os = "wasi" ,
58
58
) ) ) ]
59
+ #[ cfg( not( target_os = "netbsd" ) ) ] // NetBSD doesn't seem to enforce valid timespecs.
59
60
#[ test]
60
61
fn test_invalid_nanosleep_absolute ( ) {
61
62
match clock_nanosleep_absolute (
@@ -66,7 +67,7 @@ fn test_invalid_nanosleep_absolute() {
66
67
} ,
67
68
) {
68
69
Err ( io:: Errno :: INVAL ) => ( ) ,
69
- otherwise => panic ! ( "unexpected resut : {:?}" , otherwise) ,
70
+ otherwise => panic ! ( "unexpected result : {:?}" , otherwise) ,
70
71
}
71
72
match clock_nanosleep_absolute (
72
73
ClockId :: Monotonic ,
@@ -76,7 +77,7 @@ fn test_invalid_nanosleep_absolute() {
76
77
} ,
77
78
) {
78
79
Err ( io:: Errno :: INVAL ) => ( ) ,
79
- otherwise => panic ! ( "unexpected resut : {:?}" , otherwise) ,
80
+ otherwise => panic ! ( "unexpected result : {:?}" , otherwise) ,
80
81
}
81
82
match clock_nanosleep_absolute (
82
83
ClockId :: Monotonic ,
@@ -86,7 +87,7 @@ fn test_invalid_nanosleep_absolute() {
86
87
} ,
87
88
) {
88
89
Err ( io:: Errno :: INVAL ) => ( ) ,
89
- otherwise => panic ! ( "unexpected resut : {:?}" , otherwise) ,
90
+ otherwise => panic ! ( "unexpected result : {:?}" , otherwise) ,
90
91
}
91
92
match clock_nanosleep_absolute (
92
93
ClockId :: Monotonic ,
@@ -96,7 +97,7 @@ fn test_invalid_nanosleep_absolute() {
96
97
} ,
97
98
) {
98
99
Err ( io:: Errno :: INVAL ) => ( ) ,
99
- otherwise => panic ! ( "unexpected resut : {:?}" , otherwise) ,
100
+ otherwise => panic ! ( "unexpected result : {:?}" , otherwise) ,
100
101
}
101
102
}
102
103
@@ -119,7 +120,7 @@ fn test_invalid_nanosleep_relative() {
119
120
} ,
120
121
) {
121
122
NanosleepRelativeResult :: Err ( io:: Errno :: INVAL ) => ( ) ,
122
- otherwise => panic ! ( "unexpected resut : {:?}" , otherwise) ,
123
+ otherwise => panic ! ( "unexpected result : {:?}" , otherwise) ,
123
124
}
124
125
match clock_nanosleep_relative (
125
126
ClockId :: Monotonic ,
@@ -129,7 +130,7 @@ fn test_invalid_nanosleep_relative() {
129
130
} ,
130
131
) {
131
132
NanosleepRelativeResult :: Err ( io:: Errno :: INVAL ) => ( ) ,
132
- otherwise => panic ! ( "unexpected resut : {:?}" , otherwise) ,
133
+ otherwise => panic ! ( "unexpected result : {:?}" , otherwise) ,
133
134
}
134
135
match clock_nanosleep_relative (
135
136
ClockId :: Monotonic ,
@@ -139,7 +140,7 @@ fn test_invalid_nanosleep_relative() {
139
140
} ,
140
141
) {
141
142
NanosleepRelativeResult :: Err ( io:: Errno :: INVAL ) => ( ) ,
142
- otherwise => panic ! ( "unexpected resut : {:?}" , otherwise) ,
143
+ otherwise => panic ! ( "unexpected result : {:?}" , otherwise) ,
143
144
}
144
145
match clock_nanosleep_relative (
145
146
ClockId :: Monotonic ,
@@ -149,7 +150,7 @@ fn test_invalid_nanosleep_relative() {
149
150
} ,
150
151
) {
151
152
NanosleepRelativeResult :: Err ( io:: Errno :: INVAL ) => ( ) ,
152
- otherwise => panic ! ( "unexpected resut : {:?}" , otherwise) ,
153
+ otherwise => panic ! ( "unexpected result : {:?}" , otherwise) ,
153
154
}
154
155
}
155
156
@@ -161,7 +162,7 @@ fn test_zero_nanosleep() {
161
162
tv_nsec : 0 ,
162
163
} ) {
163
164
NanosleepRelativeResult :: Ok => ( ) ,
164
- otherwise => panic ! ( "unexpected resut : {:?}" , otherwise) ,
165
+ otherwise => panic ! ( "unexpected result : {:?}" , otherwise) ,
165
166
}
166
167
}
167
168
@@ -184,7 +185,7 @@ fn test_zero_nanosleep_absolute() {
184
185
} ,
185
186
) {
186
187
Ok ( ( ) ) => ( ) ,
187
- otherwise => panic ! ( "unexpected resut : {:?}" , otherwise) ,
188
+ otherwise => panic ! ( "unexpected result : {:?}" , otherwise) ,
188
189
}
189
190
}
190
191
@@ -207,6 +208,6 @@ fn test_zero_nanosleep_relative() {
207
208
} ,
208
209
) {
209
210
NanosleepRelativeResult :: Ok => ( ) ,
210
- otherwise => panic ! ( "unexpected resut : {:?}" , otherwise) ,
211
+ otherwise => panic ! ( "unexpected result : {:?}" , otherwise) ,
211
212
}
212
213
}
0 commit comments