Skip to content

Commit 1b18f96

Browse files
Auto merge of #148322 - oxidecomputer:ea-flock-illumos, r=<try>
Enable file locking support in illumos try-job: arm-android
2 parents 23c7bad + 72ee3fd commit 1b18f96

File tree

2 files changed

+32
-0
lines changed

2 files changed

+32
-0
lines changed

library/std/src/fs/tests.rs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ use rand::RngCore;
55
target_os = "freebsd",
66
target_os = "linux",
77
target_os = "netbsd",
8+
target_os = "illumos",
9+
target_os = "android",
810
target_vendor = "apple",
911
))]
1012
use crate::assert_matches::assert_matches;
@@ -14,6 +16,8 @@ use crate::char::MAX_LEN_UTF8;
1416
target_os = "freebsd",
1517
target_os = "linux",
1618
target_os = "netbsd",
19+
target_os = "illumos",
20+
target_os = "android",
1721
target_vendor = "apple",
1822
))]
1923
use crate::fs::TryLockError;
@@ -227,6 +231,8 @@ fn file_test_io_seek_and_write() {
227231
target_os = "linux",
228232
target_os = "netbsd",
229233
target_os = "solaris",
234+
target_os = "illumos",
235+
target_os = "android",
230236
target_vendor = "apple",
231237
))]
232238
fn file_lock_multiple_shared() {
@@ -251,6 +257,8 @@ fn file_lock_multiple_shared() {
251257
target_os = "linux",
252258
target_os = "netbsd",
253259
target_os = "solaris",
260+
target_os = "illumos",
261+
target_os = "android",
254262
target_vendor = "apple",
255263
))]
256264
fn file_lock_blocking() {
@@ -276,6 +284,8 @@ fn file_lock_blocking() {
276284
target_os = "linux",
277285
target_os = "netbsd",
278286
target_os = "solaris",
287+
target_os = "illumos",
288+
target_os = "android",
279289
target_vendor = "apple",
280290
))]
281291
fn file_lock_drop() {
@@ -298,6 +308,8 @@ fn file_lock_drop() {
298308
target_os = "linux",
299309
target_os = "netbsd",
300310
target_os = "solaris",
311+
target_os = "illumos",
312+
target_os = "android",
301313
target_vendor = "apple",
302314
))]
303315
fn file_lock_dup() {

library/std/src/sys/fs/unix.rs

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1292,6 +1292,8 @@ impl File {
12921292
target_os = "netbsd",
12931293
target_os = "openbsd",
12941294
target_os = "cygwin",
1295+
target_os = "illumos",
1296+
target_os = "android",
12951297
target_vendor = "apple",
12961298
))]
12971299
pub fn lock(&self) -> io::Result<()> {
@@ -1316,6 +1318,8 @@ impl File {
13161318
target_os = "openbsd",
13171319
target_os = "cygwin",
13181320
target_os = "solaris",
1321+
target_os = "illumos",
1322+
target_os = "android",
13191323
target_vendor = "apple",
13201324
)))]
13211325
pub fn lock(&self) -> io::Result<()> {
@@ -1329,6 +1333,8 @@ impl File {
13291333
target_os = "netbsd",
13301334
target_os = "openbsd",
13311335
target_os = "cygwin",
1336+
target_os = "illumos",
1337+
target_os = "android",
13321338
target_vendor = "apple",
13331339
))]
13341340
pub fn lock_shared(&self) -> io::Result<()> {
@@ -1353,6 +1359,8 @@ impl File {
13531359
target_os = "openbsd",
13541360
target_os = "cygwin",
13551361
target_os = "solaris",
1362+
target_os = "illumos",
1363+
target_os = "android",
13561364
target_vendor = "apple",
13571365
)))]
13581366
pub fn lock_shared(&self) -> io::Result<()> {
@@ -1366,6 +1374,8 @@ impl File {
13661374
target_os = "netbsd",
13671375
target_os = "openbsd",
13681376
target_os = "cygwin",
1377+
target_os = "illumos",
1378+
target_os = "android",
13691379
target_vendor = "apple",
13701380
))]
13711381
pub fn try_lock(&self) -> Result<(), TryLockError> {
@@ -1406,6 +1416,8 @@ impl File {
14061416
target_os = "openbsd",
14071417
target_os = "cygwin",
14081418
target_os = "solaris",
1419+
target_os = "illumos",
1420+
target_os = "android",
14091421
target_vendor = "apple",
14101422
)))]
14111423
pub fn try_lock(&self) -> Result<(), TryLockError> {
@@ -1422,6 +1434,8 @@ impl File {
14221434
target_os = "netbsd",
14231435
target_os = "openbsd",
14241436
target_os = "cygwin",
1437+
target_os = "illumos",
1438+
target_os = "android",
14251439
target_vendor = "apple",
14261440
))]
14271441
pub fn try_lock_shared(&self) -> Result<(), TryLockError> {
@@ -1462,6 +1476,8 @@ impl File {
14621476
target_os = "openbsd",
14631477
target_os = "cygwin",
14641478
target_os = "solaris",
1479+
target_os = "illumos",
1480+
target_os = "android",
14651481
target_vendor = "apple",
14661482
)))]
14671483
pub fn try_lock_shared(&self) -> Result<(), TryLockError> {
@@ -1478,6 +1494,8 @@ impl File {
14781494
target_os = "netbsd",
14791495
target_os = "openbsd",
14801496
target_os = "cygwin",
1497+
target_os = "illumos",
1498+
target_os = "android",
14811499
target_vendor = "apple",
14821500
))]
14831501
pub fn unlock(&self) -> io::Result<()> {
@@ -1502,6 +1520,8 @@ impl File {
15021520
target_os = "openbsd",
15031521
target_os = "cygwin",
15041522
target_os = "solaris",
1523+
target_os = "illumos",
1524+
target_os = "android",
15051525
target_vendor = "apple",
15061526
)))]
15071527
pub fn unlock(&self) -> io::Result<()> {

0 commit comments

Comments
 (0)