Add WSL to test fleet

All tests pass now under WSL2. They should pass under WSL1 too, but only
WSL2 is integrated into the test fleet right now. This change also fills
in some gaps in the error numbers.

Fixes #665
This commit is contained in:
Justine Tunney 2022-11-02 06:49:42 -07:00
parent fae0c0286f
commit 14d036b68d
No known key found for this signature in database
GPG key ID: BE714B4575D6E328
43 changed files with 2867 additions and 214 deletions

View file

@ -126,8 +126,8 @@ TEST(sendfile, testPositioning) {
ASSERT_EQ(-1, sendfile(4, 5, 0, 6));
ASSERT_TRUE(errno == EINVAL || errno == EPIPE);
errno = 0;
// XXX: WSL clobbers file offset on failure!
if (!__is_wsl()) {
// XXX: WSL1 clobbers file offset on failure!
if (!IsWsl1()) {
ASSERT_EQ(12, GetFileOffset(5));
}
_Exit(0);