Commit 4e503fb
committed
fix(mktemp): add wasi platform support for temporary directory handling
- Add conditional compilation for WASI target to avoid panics from `std::env::temp_dir()`
- Implement fallback logic in `Options` to read TMPDIR environment variable directly on WASI
- Update `get_tmpdir_env_or_default()` with WASI-specific handling for temp directory resolution
- Add `#[cfg_attr]` annotations to skip host path-dependent tests on WASI sandbox environment
- Ignore 14 tests that require host filesystem access when running under wasi_runner
- Ignore directory permission test on WASI due to lack of `chmod` support and mode parameter limitations1 parent 98dd261 commit 4e503fb
4 files changed
Lines changed: 49 additions & 4 deletions
File tree
- .github/workflows
- src/uu/mktemp/src
- tests/by-util
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
71 | 71 | | |
72 | 72 | | |
73 | 73 | | |
74 | | - | |
| 74 | + | |
75 | 75 | | |
76 | 76 | | |
77 | 77 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
143 | 143 | | |
144 | 144 | | |
145 | 145 | | |
146 | | - | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
147 | 153 | | |
148 | 154 | | |
149 | 155 | | |
| |||
629 | 635 | | |
630 | 636 | | |
631 | 637 | | |
| 638 | + | |
| 639 | + | |
| 640 | + | |
| 641 | + | |
| 642 | + | |
| 643 | + | |
| 644 | + | |
632 | 645 | | |
633 | 646 | | |
634 | 647 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
789 | 789 | | |
790 | 790 | | |
791 | 791 | | |
792 | | - | |
| 792 | + | |
| 793 | + | |
| 794 | + | |
| 795 | + | |
| 796 | + | |
| 797 | + | |
| 798 | + | |
| 799 | + | |
| 800 | + | |
793 | 801 | | |
794 | 802 | | |
795 | 803 | | |
| |||
830 | 838 | | |
831 | 839 | | |
832 | 840 | | |
833 | | - | |
| 841 | + | |
| 842 | + | |
| 843 | + | |
| 844 | + | |
| 845 | + | |
| 846 | + | |
| 847 | + | |
| 848 | + | |
| 849 | + | |
834 | 850 | | |
835 | 851 | | |
836 | 852 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
118 | 118 | | |
119 | 119 | | |
120 | 120 | | |
| 121 | + | |
121 | 122 | | |
122 | 123 | | |
123 | 124 | | |
| |||
399 | 400 | | |
400 | 401 | | |
401 | 402 | | |
| 403 | + | |
402 | 404 | | |
403 | 405 | | |
404 | 406 | | |
| |||
462 | 464 | | |
463 | 465 | | |
464 | 466 | | |
| 467 | + | |
465 | 468 | | |
466 | 469 | | |
467 | 470 | | |
| |||
482 | 485 | | |
483 | 486 | | |
484 | 487 | | |
| 488 | + | |
485 | 489 | | |
486 | 490 | | |
487 | 491 | | |
| |||
495 | 499 | | |
496 | 500 | | |
497 | 501 | | |
| 502 | + | |
498 | 503 | | |
499 | 504 | | |
500 | 505 | | |
| |||
599 | 604 | | |
600 | 605 | | |
601 | 606 | | |
| 607 | + | |
| 608 | + | |
| 609 | + | |
| 610 | + | |
| 611 | + | |
602 | 612 | | |
603 | 613 | | |
604 | 614 | | |
| |||
869 | 879 | | |
870 | 880 | | |
871 | 881 | | |
| 882 | + | |
872 | 883 | | |
873 | 884 | | |
874 | 885 | | |
| |||
967 | 978 | | |
968 | 979 | | |
969 | 980 | | |
| 981 | + | |
970 | 982 | | |
971 | 983 | | |
972 | 984 | | |
973 | 985 | | |
974 | 986 | | |
| 987 | + | |
975 | 988 | | |
976 | 989 | | |
977 | 990 | | |
| |||
987 | 1000 | | |
988 | 1001 | | |
989 | 1002 | | |
| 1003 | + | |
990 | 1004 | | |
991 | 1005 | | |
992 | 1006 | | |
| |||
1003 | 1017 | | |
1004 | 1018 | | |
1005 | 1019 | | |
| 1020 | + | |
1006 | 1021 | | |
1007 | 1022 | | |
1008 | 1023 | | |
| |||
1183 | 1198 | | |
1184 | 1199 | | |
1185 | 1200 | | |
| 1201 | + | |
1186 | 1202 | | |
1187 | 1203 | | |
1188 | 1204 | | |
| |||
0 commit comments