| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 401837b commit 4c8fa3e
6 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -11,7 +11,7 @@ extern "C" { | |||
| 11 | 11 | ||
| 12 | 12 | #define UVWASI_VERSION_MAJOR 0 | |
| 13 | 13 | #define UVWASI_VERSION_MINOR 0 | |
| 14 | - #define UVWASI_VERSION_PATCH 19 | ||
| 14 | + #define UVWASI_VERSION_PATCH 20 | ||
| 15 | 15 | #define UVWASI_VERSION_HEX ((UVWASI_VERSION_MAJOR << 16) | \ | |
| 16 | 16 | (UVWASI_VERSION_MINOR << 8) | \ | |
| 17 | 17 | (UVWASI_VERSION_PATCH)) | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -31,6 +31,42 @@ static char* uvwasi__strchr_slash(const char* s) { | |||
| 31 | 31 | return NULL; | |
| 32 | 32 | } | |
| 33 | 33 | ||
| 34 | + static uvwasi_errno_t uvwasi__combine_paths(const uvwasi_t* uvwasi, | ||
| 35 | + const char* path1, | ||
| 36 | + uvwasi_size_t path1_len, | ||
| 37 | + const char* path2, | ||
| 38 | + uvwasi_size_t path2_len, | ||
| 39 | + char** combined_path, | ||
| 40 | + uvwasi_size_t* combined_len) { | ||
| 41 | + /* This function joins two paths with '/'. */ | ||
| 42 | + uvwasi_errno_t err; | ||
| 43 | + char* combined; | ||
| 44 | + int combined_size; | ||
| 45 | + int r; | ||
| 46 | + | ||
| 47 | + *combined_path = NULL; | ||
| 48 | + *combined_len = 0; | ||
| 49 | + | ||
| 50 | + /* The max combined size is the path1 length + the path2 length | ||
| 51 | + + 2 for a terminating NULL and a possible path separator. */ | ||
| 52 | + combined_size = path1_len + path2_len + 2; | ||
| 53 | + combined = uvwasi__malloc(uvwasi, combined_size); | ||
| 54 | + if (combined == NULL) return UVWASI_ENOMEM; | ||
| 55 | + | ||
| 56 | + r = snprintf(combined, combined_size, "%s/%s", path1, path2); | ||
| 57 | + if (r <= 0) { | ||
| 58 | + err = uvwasi__translate_uv_error(uv_translate_sys_error(errno)); | ||
| 59 | + goto exit; | ||
| 60 | + } | ||
| 61 | + | ||
| 62 | + err = UVWASI_ESUCCESS; | ||
| 63 | + *combined_path = combined; | ||
| 64 | + *combined_len = strlen(combined); | ||
| 65 | + | ||
| 66 | + exit: | ||
| 67 | + if (err != UVWASI_ESUCCESS) uvwasi__free(uvwasi, combined); | ||
| 68 | + return err; | ||
| 69 | + } | ||
| 34 | 70 | ||
| 35 | 71 | uvwasi_errno_t uvwasi__normalize_path(const char* path, | |
| 36 | 72 | uvwasi_size_t path_len, | |
@@ -234,39 +270,35 @@ static uvwasi_errno_t uvwasi__normalize_relative_path( | |||
| 234 | 270 | uvwasi_errno_t err; | |
| 235 | 271 | char* combined; | |
| 236 | 272 | char* normalized; | |
| 237 | - int combined_size; | ||
| 238 | - int fd_path_len; | ||
| 239 | - int norm_len; | ||
| 240 | - int r; | ||
| 273 | + uvwasi_size_t combined_len; | ||
| 274 | + uvwasi_size_t fd_path_len; | ||
| 275 | + uvwasi_size_t norm_len; | ||
| 241 | 276 | ||
| 242 | 277 | *normalized_path = NULL; | |
| 243 | 278 | *normalized_len = 0; | |
| 244 | 279 | ||
| 245 | - /* The max combined size is the path length + the file descriptor's path | ||
| 246 | - length + 2 for a terminating NULL and a possible path separator. */ | ||
| 247 | 280 | fd_path_len = strlen(fd->normalized_path); | |
| 248 | - combined_size = path_len + fd_path_len + 2; | ||
| 249 | - combined = uvwasi__malloc(uvwasi, combined_size); | ||
| 250 | - if (combined == NULL) | ||
| 251 | - return UVWASI_ENOMEM; | ||
| 252 | 281 | ||
| 253 | - normalized = uvwasi__malloc(uvwasi, combined_size); | ||
| 282 | + err = uvwasi__combine_paths(uvwasi, | ||
| 283 | + fd->normalized_path, | ||
| 284 | + fd_path_len, | ||
| 285 | + path, | ||
| 286 | + path_len, | ||
| 287 | + &combined, | ||
| 288 | + &combined_len); | ||
| 289 | + if (err != UVWASI_ESUCCESS) goto exit; | ||
| 290 | + | ||
| 291 | + normalized = uvwasi__malloc(uvwasi, combined_len + 1); | ||
| 254 | 292 | if (normalized == NULL) { | |
| 255 | 293 | err = UVWASI_ENOMEM; | |
| 256 | 294 | goto exit; | |
| 257 | 295 | } | |
| 258 | 296 | ||
| 259 | - r = snprintf(combined, combined_size, "%s/%s", fd->normalized_path, path); | ||
| 260 | - if (r <= 0) { | ||
| 261 | - err = uvwasi__translate_uv_error(uv_translate_sys_error(errno)); | ||
| 262 | - goto exit; | ||
| 263 | - } | ||
| 264 | - | ||
| 265 | 297 | /* Normalize the input path. */ | |
| 266 | 298 | err = uvwasi__normalize_path(combined, | |
| 267 | - combined_size - 1, | ||
| 299 | + combined_len, | ||
| 268 | 300 | normalized, | |
| 269 | - combined_size - 1); | ||
| 301 | + combined_len); | ||
| 270 | 302 | if (err != UVWASI_ESUCCESS) | |
| 271 | 303 | goto exit; | |
| 272 | 304 | ||
@@ -374,9 +406,14 @@ uvwasi_errno_t uvwasi__resolve_path(const uvwasi_t* uvwasi, | |||
| 374 | 406 | char* host_path; | |
| 375 | 407 | char* normalized_path; | |
| 376 | 408 | char* link_target; | |
| 409 | + char* normalized_parent; | ||
| 410 | + char* resolved_link_target; | ||
| 377 | 411 | uvwasi_size_t input_len; | |
| 378 | 412 | uvwasi_size_t host_path_len; | |
| 379 | 413 | uvwasi_size_t normalized_len; | |
| 414 | + uvwasi_size_t link_target_len; | ||
| 415 | + uvwasi_size_t normalized_parent_len; | ||
| 416 | + uvwasi_size_t resolved_link_target_len; | ||
| 380 | 417 | int follow_count; | |
| 381 | 418 | int r; | |
| 382 | 419 | ||
@@ -385,6 +422,8 @@ uvwasi_errno_t uvwasi__resolve_path(const uvwasi_t* uvwasi, | |||
| 385 | 422 | link_target = NULL; | |
| 386 | 423 | follow_count = 0; | |
| 387 | 424 | host_path = NULL; | |
| 425 | + normalized_parent = NULL; | ||
| 426 | + resolved_link_target = NULL; | ||
| 388 | 427 | ||
| 389 | 428 | start: | |
| 390 | 429 | normalized_path = NULL; | |
@@ -458,19 +497,47 @@ uvwasi_errno_t uvwasi__resolve_path(const uvwasi_t* uvwasi, | |||
| 458 | 497 | goto exit; | |
| 459 | 498 | } | |
| 460 | 499 | ||
| 461 | - input_len = strlen(req.ptr); | ||
| 500 | + link_target_len = strlen(req.ptr); | ||
| 462 | 501 | uvwasi__free(uvwasi, link_target); | |
| 463 | - link_target = uvwasi__malloc(uvwasi, input_len + 1); | ||
| 502 | + link_target = uvwasi__malloc(uvwasi, link_target_len + 1); | ||
| 464 | 503 | if (link_target == NULL) { | |
| 465 | 504 | uv_fs_req_cleanup(&req); | |
| 466 | 505 | err = UVWASI_ENOMEM; | |
| 467 | 506 | goto exit; | |
| 468 | 507 | } | |
| 469 | 508 | ||
| 470 | - memcpy(link_target, req.ptr, input_len + 1); | ||
| 471 | - input = link_target; | ||
| 472 | - uvwasi__free(uvwasi, normalized_path); | ||
| 509 | + memcpy(link_target, req.ptr, link_target_len + 1); | ||
| 473 | 510 | uv_fs_req_cleanup(&req); | |
| 511 | + | ||
| 512 | + if (1 == uvwasi__is_absolute_path(link_target, link_target_len)) { | ||
| 513 | + input = link_target; | ||
| 514 | + input_len = link_target_len; | ||
| 515 | + } else { | ||
| 516 | + uvwasi__free(uvwasi, normalized_parent); | ||
| 517 | + uvwasi__free(uvwasi, resolved_link_target); | ||
| 518 | + | ||
| 519 | + err = uvwasi__combine_paths(uvwasi, | ||
| 520 | + normalized_path, | ||
| 521 | + normalized_len, | ||
| 522 | + "..", | ||
| 523 | + 2, | ||
| 524 | + &normalized_parent, | ||
| 525 | + &normalized_parent_len); | ||
| 526 | + if (err != UVWASI_ESUCCESS) goto exit; | ||
| 527 | + err = uvwasi__combine_paths(uvwasi, | ||
| 528 | + normalized_parent, | ||
| 529 | + normalized_parent_len, | ||
| 530 | + link_target, | ||
| 531 | + link_target_len, | ||
| 532 | + &resolved_link_target, | ||
| 533 | + &resolved_link_target_len); | ||
| 534 | + if (err != UVWASI_ESUCCESS) goto exit; | ||
| 535 | + | ||
| 536 | + input = resolved_link_target; | ||
| 537 | + input_len = resolved_link_target_len; | ||
| 538 | + } | ||
| 539 | + | ||
| 540 | + uvwasi__free(uvwasi, normalized_path); | ||
| 474 | 541 | goto start; | |
| 475 | 542 | } | |
| 476 | 543 | ||
@@ -484,5 +551,8 @@ uvwasi_errno_t uvwasi__resolve_path(const uvwasi_t* uvwasi, | |||
| 484 | 551 | ||
| 485 | 552 | uvwasi__free(uvwasi, link_target); | |
| 486 | 553 | uvwasi__free(uvwasi, normalized_path); | |
| 554 | + uvwasi__free(uvwasi, normalized_parent); | ||
| 555 | + uvwasi__free(uvwasi, resolved_link_target); | ||
| 556 | + | ||
| 487 | 557 | return err; | |
| 488 | 558 | } | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -8,6 +8,8 @@ | |||
| 8 | 8 | # include <dirent.h> | |
| 9 | 9 | # include <time.h> | |
| 10 | 10 | #else | |
| 11 | + # define _CRT_INTERNAL_NONSTDC_NAMES 1 | ||
| 12 | + # include <sys/stat.h> | ||
| 11 | 13 | # include <io.h> | |
| 12 | 14 | #endif /* _WIN32 */ | |
| 13 | 15 | ||
@@ -17,6 +19,10 @@ | |||
| 17 | 19 | # define UVWASI_FD_READDIR_SUPPORTED 1 | |
| 18 | 20 | #endif | |
| 19 | 21 | ||
| 22 | + #if !defined(S_ISDIR) && defined(S_IFMT) && defined(S_IFDIR) | ||
| 23 | + #define S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR) | ||
| 24 | + #endif | ||
| 25 | + | ||
| 20 | 26 | #include "uvwasi.h" | |
| 21 | 27 | #include "uvwasi_alloc.h" | |
| 22 | 28 | #include "uv.h" | |
@@ -37,10 +43,13 @@ | |||
| 37 | 43 | ||
| 38 | 44 | #define VALIDATE_FSTFLAGS_OR_RETURN(flags) \ | |
| 39 | 45 | do { \ | |
| 40 | - if ((flags) & ~(UVWASI_FILESTAT_SET_ATIM | \ | ||
| 41 | - UVWASI_FILESTAT_SET_ATIM_NOW | \ | ||
| 42 | - UVWASI_FILESTAT_SET_MTIM | \ | ||
| 43 | - UVWASI_FILESTAT_SET_MTIM_NOW)) { \ | ||
| 46 | + uvwasi_fstflags_t f = flags; \ | ||
| 47 | + if (((f) & ~(UVWASI_FILESTAT_SET_ATIM | UVWASI_FILESTAT_SET_ATIM_NOW | \ | ||
| 48 | + UVWASI_FILESTAT_SET_MTIM | UVWASI_FILESTAT_SET_MTIM_NOW)) || \ | ||
| 49 | + ((f) & (UVWASI_FILESTAT_SET_ATIM | UVWASI_FILESTAT_SET_ATIM_NOW)) \ | ||
| 50 | + == (UVWASI_FILESTAT_SET_ATIM | UVWASI_FILESTAT_SET_ATIM_NOW) || \ | ||
| 51 | + ((f) & (UVWASI_FILESTAT_SET_MTIM | UVWASI_FILESTAT_SET_MTIM_NOW)) \ | ||
| 52 | + == (UVWASI_FILESTAT_SET_MTIM | UVWASI_FILESTAT_SET_MTIM_NOW)) { \ | ||
| 44 | 53 | return UVWASI_EINVAL; \ | |
| 45 | 54 | } \ | |
| 46 | 55 | } while (0) | |
@@ -624,9 +633,10 @@ uvwasi_errno_t uvwasi_fd_advise(uvwasi_t* uvwasi, | |||
| 624 | 633 | uvwasi_advice_t advice) { | |
| 625 | 634 | struct uvwasi_fd_wrap_t* wrap; | |
| 626 | 635 | uvwasi_errno_t err; | |
| 636 | + uv_fs_t req; | ||
| 637 | + int r; | ||
| 627 | 638 | #ifdef POSIX_FADV_NORMAL | |
| 628 | 639 | int mapped_advice; | |
| 629 | - int r; | ||
| 630 | 640 | #endif /* POSIX_FADV_NORMAL */ | |
| 631 | 641 | ||
| 632 | 642 | UVWASI_DEBUG("uvwasi_fd_advise(uvwasi=%p, fd=%d, offset=%"PRIu64", " | |
@@ -679,14 +689,27 @@ uvwasi_errno_t uvwasi_fd_advise(uvwasi_t* uvwasi, | |||
| 679 | 689 | if (err != UVWASI_ESUCCESS) | |
| 680 | 690 | return err; | |
| 681 | 691 | ||
| 692 | + r = uv_fs_fstat(NULL, &req, wrap->fd, NULL); | ||
| 693 | + if (r == -1) { | ||
| 694 | + err = uvwasi__translate_uv_error(r); | ||
| 695 | + goto exit; | ||
| 696 | + } | ||
| 697 | + | ||
| 698 | + if (S_ISDIR(req.statbuf.st_mode)) { | ||
| 699 | + err = UVWASI_EBADF; | ||
| 700 | + goto exit; | ||
| 701 | + } | ||
| 702 | + | ||
| 682 | 703 | err = UVWASI_ESUCCESS; | |
| 683 | 704 | ||
| 684 | 705 | #ifdef POSIX_FADV_NORMAL | |
| 685 | 706 | r = posix_fadvise(wrap->fd, offset, len, mapped_advice); | |
| 686 | 707 | if (r != 0) | |
| 687 | 708 | err = uvwasi__translate_uv_error(uv_translate_sys_error(r)); | |
| 688 | 709 | #endif /* POSIX_FADV_NORMAL */ | |
| 710 | + exit: | ||
| 689 | 711 | uv_mutex_unlock(&wrap->mutex); | |
| 712 | + uv_fs_req_cleanup(&req); | ||
| 690 | 713 | return err; | |
| 691 | 714 | } | |
| 692 | 715 | ||
@@ -1775,8 +1798,6 @@ uvwasi_errno_t uvwasi_path_filestat_set_times(uvwasi_t* uvwasi, | |||
| 1775 | 1798 | if (uvwasi == NULL || path == NULL) | |
| 1776 | 1799 | return UVWASI_EINVAL; | |
| 1777 | 1800 | ||
| 1778 | - VALIDATE_FSTFLAGS_OR_RETURN(fst_flags); | ||
| 1779 | - | ||
| 1780 | 1801 | err = uvwasi_fd_table_get(uvwasi->fds, | |
| 1781 | 1802 | fd, | |
| 1782 | 1803 | &wrap, | |
@@ -1785,6 +1806,8 @@ uvwasi_errno_t uvwasi_path_filestat_set_times(uvwasi_t* uvwasi, | |||
| 1785 | 1806 | if (err != UVWASI_ESUCCESS) | |
| 1786 | 1807 | return err; | |
| 1787 | 1808 | ||
| 1809 | + VALIDATE_FSTFLAGS_OR_RETURN(fst_flags); | ||
| 1810 | + | ||
| 1788 | 1811 | err = uvwasi__resolve_path(uvwasi, | |
| 1789 | 1812 | wrap, | |
| 1790 | 1813 | path, | |
@@ -2306,6 +2329,7 @@ uvwasi_errno_t uvwasi_path_symlink(uvwasi_t* uvwasi, | |||
| 2306 | 2329 | uvwasi_fd_t fd, | |
| 2307 | 2330 | const char* new_path, | |
| 2308 | 2331 | uvwasi_size_t new_path_len) { | |
| 2332 | + char* truncated_old_path; | ||
| 2309 | 2333 | char* resolved_new_path; | |
| 2310 | 2334 | struct uvwasi_fd_wrap_t* wrap; | |
| 2311 | 2335 | uvwasi_errno_t err; | |
@@ -2332,6 +2356,15 @@ uvwasi_errno_t uvwasi_path_symlink(uvwasi_t* uvwasi, | |||
| 2332 | 2356 | if (err != UVWASI_ESUCCESS) | |
| 2333 | 2357 | return err; | |
| 2334 | 2358 | ||
| 2359 | + truncated_old_path = uvwasi__malloc(uvwasi, old_path_len + 1); | ||
| 2360 | + if (truncated_old_path == NULL) { | ||
| 2361 | + uv_mutex_unlock(&wrap->mutex); | ||
| 2362 | + return UVWASI_ENOMEM; | ||
| 2363 | + } | ||
| 2364 | + | ||
| 2365 | + memcpy(truncated_old_path, old_path, old_path_len); | ||
| 2366 | + truncated_old_path[old_path_len] = '\0'; | ||
| 2367 | + | ||
| 2335 | 2368 | err = uvwasi__resolve_path(uvwasi, | |
| 2336 | 2369 | wrap, | |
| 2337 | 2370 | new_path, | |
@@ -2340,12 +2373,14 @@ uvwasi_errno_t uvwasi_path_symlink(uvwasi_t* uvwasi, | |||
| 2340 | 2373 | 0); | |
| 2341 | 2374 | if (err != UVWASI_ESUCCESS) { | |
| 2342 | 2375 | uv_mutex_unlock(&wrap->mutex); | |
| 2376 | + uvwasi__free(uvwasi, truncated_old_path); | ||
| 2343 | 2377 | return err; | |
| 2344 | 2378 | } | |
| 2345 | 2379 | ||
| 2346 | 2380 | /* Windows support may require setting the flags option. */ | |
| 2347 | - r = uv_fs_symlink(NULL, &req, old_path, resolved_new_path, 0, NULL); | ||
| 2381 | + r = uv_fs_symlink(NULL, &req, truncated_old_path, resolved_new_path, 0, NULL); | ||
| 2348 | 2382 | uv_mutex_unlock(&wrap->mutex); | |
| 2383 | + uvwasi__free(uvwasi, truncated_old_path); | ||
| 2349 | 2384 | uvwasi__free(uvwasi, resolved_new_path); | |
| 2350 | 2385 | uv_fs_req_cleanup(&req); | |
| 2351 | 2386 | if (r != 0) | |
@@ -2696,7 +2731,7 @@ uvwasi_errno_t uvwasi_sock_shutdown(uvwasi_t* uvwasi, | |||
| 2696 | 2731 | uvwasi_sdflags_t how) { | |
| 2697 | 2732 | struct uvwasi_fd_wrap_t* wrap; | |
| 2698 | 2733 | uvwasi_errno_t err = 0; | |
| 2699 | - shutdown_data_t shutdown_data; | ||
| 2734 | + shutdown_data_t shutdown_data = {0}; | ||
| 2700 | 2735 | ||
| 2701 | 2736 | if (how & ~UVWASI_SHUT_WR) | |
| 2702 | 2737 | return UVWASI_ENOTSUP; | |
@@ -2794,7 +2829,7 @@ uvwasi_errno_t uvwasi_sock_accept(uvwasi_t* uvwasi, | |||
| 2794 | 2829 | goto close_sock_and_error_exit; | |
| 2795 | 2830 | } | |
| 2796 | 2831 | ||
| 2797 | - int r = uv_accept((uv_stream_t*) wrap->sock, (uv_stream_t*) uv_connect_sock); | ||
| 2832 | + r = uv_accept((uv_stream_t*) wrap->sock, (uv_stream_t*) uv_connect_sock); | ||
| 2798 | 2833 | if (r == UV_EAGAIN) { | |
| 2799 | 2834 | // still no connection or error so run the loop again | |
| 2800 | 2835 | continue; | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -4,7 +4,7 @@ | |||
| 4 | 4 | #include <unistd.h> | |
| 5 | 5 | ||
| 6 | 6 | int main() { | |
| 7 | - const char* target = "./input.txt"; | ||
| 7 | + const char* target = "./input-in-subdir.txt"; | ||
| 8 | 8 | const char* linkpath = "/sandbox/subdir/test_link"; | |
| 9 | 9 | char readlink_result[128]; | |
| 10 | 10 | size_t result_size = sizeof(readlink_result); | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -42,6 +42,7 @@ if (process.argv[2] === 'wasi-child') { | |||
| 42 | 42 | const sandboxedFile = path.join(sandbox, 'input.txt'); | |
| 43 | 43 | const externalFile = tmpdir.resolve('outside.txt'); | |
| 44 | 44 | const sandboxedDir = path.join(sandbox, 'subdir'); | |
| 45 | + const sandboxedFileInSubdir = path.join(sandboxedDir, 'input-in-subdir.txt'); | ||
| 45 | 46 | const sandboxedSymlink = path.join(sandboxedDir, 'input_link.txt'); | |
| 46 | 47 | const escapingSymlink = path.join(sandboxedDir, 'outside.txt'); | |
| 47 | 48 | const loopSymlink1 = path.join(sandboxedDir, 'loop1'); | |
@@ -52,13 +53,14 @@ if (process.argv[2] === 'wasi-child') { | |||
| 52 | 53 | fs.mkdirSync(sandboxedDir); | |
| 53 | 54 | fs.mkdirSync(sandboxedTmp); | |
| 54 | 55 | fs.writeFileSync(sandboxedFile, 'hello from input.txt', 'utf8'); | |
| 56 | + fs.writeFileSync(sandboxedFileInSubdir, 'hello from input in subdir.txt', | ||
| 57 | + 'utf8'); | ||
| 55 | 58 | fs.writeFileSync(externalFile, 'this should be inaccessible', 'utf8'); | |
| 56 | - fs.symlinkSync(path.join('.', 'input.txt'), sandboxedSymlink, 'file'); | ||
| 57 | - fs.symlinkSync(path.join('..', 'outside.txt'), escapingSymlink, 'file'); | ||
| 58 | - fs.symlinkSync(path.join('subdir', 'loop2'), | ||
| 59 | - loopSymlink1, 'file'); | ||
| 60 | - fs.symlinkSync(path.join('subdir', 'loop1'), | ||
| 61 | - loopSymlink2, 'file'); | ||
| 59 | + fs.symlinkSync(path.join('.', 'input-in-subdir.txt'), | ||
| 60 | + sandboxedSymlink, 'file'); | ||
| 61 | + fs.symlinkSync(path.join('..', '..', 'outside.txt'), escapingSymlink, 'file'); | ||
| 62 | + fs.symlinkSync('loop2', loopSymlink1, 'file'); | ||
| 63 | + fs.symlinkSync('loop1', loopSymlink2, 'file'); | ||
| 62 | 64 | ||
| 63 | 65 | function runWASI(options) { | |
| 64 | 66 | console.log('executing', options.test); | |
@@ -76,8 +78,10 @@ if (process.argv[2] === 'wasi-child') { | |||
| 76 | 78 | assert.strictEqual(child.stdout.toString(), options.stdout || ''); | |
| 77 | 79 | } | |
| 78 | 80 | ||
| 79 | - runWASI({ test: 'create_symlink', stdout: 'hello from input.txt' }); | ||
| 80 | - runWASI({ test: 'follow_symlink', stdout: 'hello from input.txt' }); | ||
| 81 | + runWASI({ test: 'create_symlink', | ||
| 82 | + stdout: 'hello from input in subdir.txt' }); | ||
| 83 | + runWASI({ test: 'follow_symlink', | ||
| 84 | + stdout: 'hello from input in subdir.txt' }); | ||
| 81 | 85 | runWASI({ test: 'link' }); | |
| 82 | 86 | runWASI({ test: 'symlink_escape' }); | |
| 83 | 87 | runWASI({ test: 'symlink_loop' }); | |
| Back | FazBrowse Home | New Git URL |
0 commit comments