Commit 8b44259
committed
run-test262: handle scandir() results with DT_UNKNOWN d_type
In case the dirent items returned by scandir() have DT_UNKNOWN as
d_type it is not possible to assume they are "non directories", and
it is needed to stat() them to get the actual type.
Hence, tweak the existing bits to account for that:
- create an helper enum for file type to distinguish whether something
is for sure a file, whether it is for sure a directory, or it is not
known
- map d_type to the newly created enum
- adapt consider_test_file() to use the newly created enum, and case
the file type is not known also to stat() the file to get the actual
type1 parent 3d3b58d commit 8b44259
1 file changed
+27
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
| 34 | + | |
34 | 35 | | |
35 | 36 | | |
36 | 37 | | |
| |||
73 | 74 | | |
74 | 75 | | |
75 | 76 | | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
76 | 83 | | |
77 | 84 | | |
78 | 85 | | |
| |||
407 | 414 | | |
408 | 415 | | |
409 | 416 | | |
410 | | - | |
| 417 | + | |
411 | 418 | | |
412 | 419 | | |
413 | 420 | | |
| |||
418 | 425 | | |
419 | 426 | | |
420 | 427 | | |
421 | | - | |
| 428 | + | |
| 429 | + | |
| 430 | + | |
| 431 | + | |
| 432 | + | |
422 | 433 | | |
423 | 434 | | |
424 | 435 | | |
| |||
437 | 448 | | |
438 | 449 | | |
439 | 450 | | |
440 | | - | |
| 451 | + | |
441 | 452 | | |
442 | 453 | | |
443 | 454 | | |
| |||
448 | 459 | | |
449 | 460 | | |
450 | 461 | | |
451 | | - | |
| 462 | + | |
| 463 | + | |
| 464 | + | |
| 465 | + | |
| 466 | + | |
| 467 | + | |
| 468 | + | |
| 469 | + | |
| 470 | + | |
| 471 | + | |
| 472 | + | |
| 473 | + | |
| 474 | + | |
452 | 475 | | |
453 | 476 | | |
454 | 477 | | |
| |||
0 commit comments