Commit Graph

541 Commits

Author SHA1 Message Date
Dean Deng ba2bf9fc13 Skip socket tests only if running on vfs1.
PiperOrigin-RevId: 312763249
2020-05-21 16:32:48 -07:00
Jay Zhuang 8298c5bd4d Avoid all caps FIONREAD as test name.
PiperOrigin-RevId: 312596169
2020-05-20 18:40:16 -07:00
Jamie Liu 064347afdf Skip itimer "fairness" tests on ptrace.
With additional logging, the issue described by the new comment looks like:

D0518 21:28:08.416810    6777 task_signals.go:459] [   8] Notified of signal 27
D0518 21:28:08.416852    6777 task_block.go:223] [   8] Interrupt queued
D0518 21:28:08.417013    6777 task_run.go:250] [   8] Switching to sentry
D0518 21:28:08.417033    6777 task_signals.go:220] [   8] Signal 27: delivering to handler
D0518 21:28:08.417127    6777 task_run.go:248] [   8] Switching to app
D0518 21:28:08.443765    6777 task_signals.go:519] [   8] Refusing masked signal 27 // ED: note the ~26ms elapsed since TID 8 "switched to app"
D0518 21:28:08.443814    6777 task_signals.go:465] [   6] Notified of group signal 27
D0518 21:28:08.443832    6777 task_block.go:223] [   6] Interrupt queued
D0518 21:28:08.443914    6777 task_block.go:223] [   6] Interrupt queued
D0518 21:28:08.443859    6777 task_run.go:250] [   8] Switching to sentry
I0518 21:28:08.443936    6777 strace.go:576] [   8] exe E rt_sigreturn()

Slow context switches on ptrace are probably due to kernel scheduling delays.
Slow context switches on KVM are less clear, so leave that bug and TODO open.

PiperOrigin-RevId: 312322782
2020-05-19 11:53:03 -07:00
Dean Deng d06de1bede Fix flaky udp tests by polling before reading.
On native Linux, calling recv/read right after send/write sometimes returns
EWOULDBLOCK, if the data has not made it to the receiving socket (even though
the endpoints are on the same host). Poll before reading to avoid this.

Making this change also uncovered a hostinet bug (gvisor.dev/issue/2726),
which is noted in this CL.

PiperOrigin-RevId: 312320587
2020-05-19 11:41:52 -07:00
Bin Lu 0b26f9aa0f passed the syscall test case 'fpsig_nested' on Arm64 platform
Some functions were added for Arm64 platform:
a, get_fp/set_fp
b, inline_tgkill

Test step:
bazel test //test/syscalls:fpsig_nested_test_runsc_ptrace

Signed-off-by: Bin Lu <bin.lu@arm.com>
2020-05-15 02:52:36 -04:00
Jamie Liu fb7e5f1676 Make utimes_test pass on VFS2.
PiperOrigin-RevId: 311657502
2020-05-14 20:09:55 -07:00
gVisor bot bdf7bb71d2 Merge pull request #2663 from lubinszARM:pr_sigfp_fork
PiperOrigin-RevId: 311573552
2020-05-14 11:38:57 -07:00
Bhasker Hariharan 8b8774d715 Stub support for TCP_SYNCNT and TCP_WINDOW_CLAMP.
This change adds support for TCP_SYNCNT and TCP_WINDOW_CLAMP options
in GetSockOpt/SetSockOpt. This change does not really change any
behaviour in Netstack and only stores/returns the stored value.

Actual honoring of these options will be added as required.

Fixes #2626, #2625

PiperOrigin-RevId: 311453777
2020-05-13 19:49:09 -07:00
Nicolas Lacasse db655f020e Resolve remaining TODOs for tmpfs.
Closes #1197

PiperOrigin-RevId: 311438223
2020-05-13 17:36:37 -07:00
gVisor bot af2bc1c72a Internal change.
PiperOrigin-RevId: 310941717
2020-05-11 10:31:02 -07:00
Bin Lu 257a6bf883 passed the syscall test case 'fpsig_fork' on Arm64 platform
Some functions were added for Arm64 platform:
a, get_fp/set_fp
b, inline_tgkill

Test step:
bazel test //test/syscalls:fpsig_fork_test_runsc_ptrace

Signed-off-by: Bin Lu <bin.lu@arm.com>
2020-05-11 01:57:16 -04:00
Andrei Vagin 9509c0b388 gvisor/test: use RetryEINTR for connect()
connect() returns EINTR after S/R and usually we
use RetryEINTR to workaround this.

PiperOrigin-RevId: 310038525
2020-05-05 16:01:00 -07:00
Nicolas Lacasse da71dc7fdd Port eventfd to VFS2.
And move sys_timerfd.go to just timerfd.go for consistency.

Updates #1475.

PiperOrigin-RevId: 309835029
2020-05-04 16:02:07 -07:00
Andrei Vagin 006f978829 Deflake //third_party/gvisor/test/syscalls:proc_test_native
There is the known issue of the linux procfs, that two consequent calls of
readdir can return the same entry twice if between these calls one or more
entries have been removed from this directory.

PiperOrigin-RevId: 309803066
2020-05-04 12:58:24 -07:00
Dean Deng ce19497c1c Fix Unix socket permissions.
Enforce write permission checks in BoundEndpointAt, which corresponds to the
permission checks in Linux (net/unix/af_unix.c:unix_find_other).
Also, create bound socket files with the correct permissions in VFS2.

Fixes #2324.

PiperOrigin-RevId: 308949084
2020-04-28 20:13:01 -07:00
Jamie Liu 4282260355 Don't unlink named pipes in pipe test.
TempPath's destructor runs at the end of the named pipe creation functions,
deleting the named pipe. If the named pipe is backed by a "non-virtual"
filesystem (!fs.Inode.IsVirtual()), this causes the following save attempt to
fail because there are FDs holding the deleted named pipe open.

PiperOrigin-RevId: 308861999
2020-04-28 11:28:44 -07:00
Andrei Vagin 37f863f628 tcp: handle listen after shutdown properly
Right now, sentry panics in this case:
panic: close of nil channel

goroutine 67 [running]:
pkg/tcpip/transport/tcp/tcp.(*endpoint).listen(0xc0000ce000, 0x9, 0x0)
        pkg/tcpip/transport/tcp/endpoint.go:2208 +0x170
pkg/tcpip/transport/tcp/tcp.(*endpoint).Listen(0xc0000ce000, 0x9, 0xc0003a1ad0)
        pkg/tcpip/transport/tcp/endpoint.go:2179 +0x50

Fixes #2468

PiperOrigin-RevId: 307896725
2020-04-22 14:17:11 -07:00
Kevin Krakauer 639c8dd808 Restore euid upon test finish
PiperOrigin-RevId: 307638329
2020-04-21 10:58:00 -07:00
gVisor bot 763d16f912 Merge pull request #2060 from xiaobo55x:rseq
PiperOrigin-RevId: 307453436
2020-04-20 12:31:22 -07:00
Kevin Krakauer e838290e67 prlimit: don't check credentials on self
prlimit was erroneously comparing UIDs and GIDs when getting/setting a process'
own limits. From the manpage:

To set or get the resources of a process other than itself, the caller must have
the CAP_SYS_RESOURCE capability, or the real, effective, and saved set user IDs
of the target process must match the real user ID of the caller and the real,
effective, and saved set group IDs of the target process must match the real
group ID of the caller.

PiperOrigin-RevId: 307127266
2020-04-17 15:33:05 -07:00
Ting-Yu Wang 4a818d6437 proc net test: Annotate disable-save test with NoRandomSave.
PiperOrigin-RevId: 307069884
2020-04-17 10:34:57 -07:00
Jamie Liu f03996c5e9 Implement pipe(2) and pipe2(2) for VFS2.
Updates #1035

PiperOrigin-RevId: 306968644
2020-04-16 19:27:03 -07:00
Mithun Iyer 3b05f576d7 Reset pending connections on listener shutdown.
When the listening socket is read shutdown, we need to reset all pending
and incoming connections. Ensure that the endpoint is not cleaned up
from the demuxer and subsequent bind to same port does not go through.

PiperOrigin-RevId: 306958038
2020-04-16 17:58:08 -07:00
Ting-Yu Wang ea5b8e9633 Use if_nametoindex to get interface index.
Removed the TODO to use netlink.

PiperOrigin-RevId: 306721468
2020-04-15 14:31:36 -07:00
Mithun Iyer 9c918340e4 Reset pending connections on listener close
Attempt to redeliver TCP segments that are enqueued into a closing
TCP endpoint. This was being done for Established endpoints but not
for those that are listening or performing connection handshake.

Fixes #2417

PiperOrigin-RevId: 306598155
2020-04-15 01:11:44 -07:00
gVisor bot 82530e4c30 Merge pull request #2375 from lubinszARM:pr_exec_binary
PiperOrigin-RevId: 306432289
2020-04-14 07:12:06 -07:00
Nicolas Lacasse 71e6ac3e1f Don't allow read/write when offset+size overflows.
PiperOrigin-RevId: 306348346
2020-04-13 18:00:17 -07:00
Tamir Duberstein d303684d7a Remove unnecessary threads
The work being done in these threads is not asynchronous with respect to
the test; that is, it is equivalent to issue non-blocking `connect`
calls serially, since the work is done asynchronously with respect to
the caller. Futhermore, this test was added to test closing a listener
with completed but not delivered connections, which never required
threading in the first place.

PiperOrigin-RevId: 306339486
2020-04-13 17:00:51 -07:00
gVisor bot 7e5d67ee90 Merge pull request #2168 from xiaobo55x:ptrace_test
PiperOrigin-RevId: 306306809
2020-04-13 14:17:53 -07:00
gVisor bot 3f4e826fb3 Merge pull request #2288 from xiaobo55x:fork_test
PiperOrigin-RevId: 306306494
2020-04-13 14:13:28 -07:00
gVisor bot 7ec2397235 Merge pull request #2289 from xiaobo55x:syscall_cleanup
PiperOrigin-RevId: 306303148
2020-04-13 13:57:23 -07:00
Dean Deng 09ddb5a426 Port extended attributes to VFS2.
As in VFS1, we only support the user.* namespace. Plumbing is added to tmpfs
and goferfs.
Note that because of the slightly different order of checks between VFS2 and
Linux, one of the xattr tests needs to be relaxed slightly.

Fixes #2363.

PiperOrigin-RevId: 305985121
2020-04-10 19:02:55 -07:00
Andrei Vagin 935007937c test: remove 1s delay after non-blocking socket pair accept
It was added in cl/201419897 to deflake
socket_ip_tcp_loopback_non_blocking_test_gvisor.
It seems we don't need this hack, because the origin issue isn't
reproducible without this hack.

PiperOrigin-RevId: 305871748
2020-04-10 07:14:35 -07:00
Haibo Xu 7aa5caae71 Enable syscall ptrace test on arm64.
Signed-off-by: Haibo Xu <haibo.xu@arm.com>
Change-Id: I5bb8fa7d580d173b1438d6465e1adb442216c8fa
2020-04-10 10:00:26 +08:00
Haibo Xu 35e6b6bf1a Enable syscall fork_test on arm64.
Signed-off-by: Haibo Xu <haibo.xu@arm.com>
Change-Id: I033692bcf4f8139df29e369a12b150d10fccbe32
2020-04-10 09:39:50 +08:00
Fabricio Voznika 9f87502b46 Remove TODOs from Async IO
Block and drain requests in io_destroy(2).
Note the reason to create read-only mapping.

PiperOrigin-RevId: 305786312
2020-04-09 16:41:27 -07:00
Ting-Yu Wang ace90f823c Make some functions in IfAddrHelper const.
PiperOrigin-RevId: 305782490
2020-04-09 16:22:02 -07:00
Ting-Yu Wang 64c2b49067 Dedup netlink utility functions in tests.
PiperOrigin-RevId: 305749697
2020-04-09 13:34:31 -07:00
Andrei Vagin a10389e783 splice: cap splice calls to MAX_RW_COUNT
The Linux does the same.

Reported-by: syzbot+e81716e8956e92e9d56b@syzkaller.appspotmail.com
PiperOrigin-RevId: 305625439
2020-04-08 23:03:12 -07:00
Jamie Liu 7297fd7238 Bump proc_test's kRSSTolerance to 10MB.
PiperOrigin-RevId: 305604557
2020-04-08 19:41:43 -07:00
Fabricio Voznika 6dd5a1f3fe Clean up TODOs
PiperOrigin-RevId: 305592245
2020-04-08 17:58:13 -07:00
Dean Deng 357f136e42 Handle utimes correctly for shared gofer filesystems.
Determine system time from within the sentry rather than relying on the remote
filesystem to prevent inconsistencies.
Resolve related TODOs; the time discrepancies in question don't exist anymore.

PiperOrigin-RevId: 305557099
2020-04-08 14:39:25 -07:00
Ting-Yu Wang 2907e6da5e file test: Remove FIXME about FIFO. It is already tested in mknod test.
PiperOrigin-RevId: 305546584
2020-04-08 13:48:09 -07:00
Fabricio Voznika b30130567d Enable SubprocessExited and SubprocessZombie for gVisor
Updates #164

PiperOrigin-RevId: 305544029
2020-04-08 13:34:44 -07:00
Bin Lu a86ffefd3f Enable exec_binary syscall test on Arm64
Signed-off-by: Bin Lu <bin.lu@arm.com>
2020-04-08 04:23:11 -04:00
Andrei Vagin c7d841ac6e tests: Specify NoRandomSave for PortReuse tests
SO_REUSEPORT is not properly restored:
https://github.com/google/gvisor/issues/873

PiperOrigin-RevId: 305422775
2020-04-08 00:26:28 -07:00
Ting-Yu Wang 71770e5662 mkdir test: Address TODOs and re-enable a test.
PiperOrigin-RevId: 305328184
2020-04-07 13:28:33 -07:00
Fabricio Voznika 94319a8241 Make gofer.dentry.destroyLocked idempotent
gofer operations accumulate dentries touched in a slice to call
checkCachingLocked on them when the operation is over. In case
the same dentry is touched multiple times during the operation,
checkCachingLocked, and consequently destroyLocked, may be called
more than once for the same dentry.

Updates #1198

PiperOrigin-RevId: 305276819
2020-04-07 09:41:58 -07:00
Dean Deng 4baa7e7079 Bump up acceptable sample count for flaky itimer test.
Running the test 1000x almost always produces 1+ test failures where
the sample count is slightly more than 60.

PiperOrigin-RevId: 305051754
2020-04-06 09:51:26 -07:00
Adin Scannell a94309628e Ensure EOF is handled propertly during splice.
PiperOrigin-RevId: 304684417
2020-04-03 13:40:51 -07:00
Tamir Duberstein ea98693d91 Add missing newline
PiperOrigin-RevId: 304659346
2020-04-03 11:38:37 -07:00
gVisor bot 1921c246a9 Internal change.
PiperOrigin-RevId: 304641990
2020-04-03 10:20:55 -07:00
Dean Deng 5b2396d244 Fix typo in TODO comments.
PiperOrigin-RevId: 304508083
2020-04-02 17:07:13 -07:00
Bhasker Hariharan c6d5742c21 Fix flaky TCPLinger2TimeoutAfterClose test.
The test is flaky in cooperative S/R mode because TCP timers are not restored
across a S/R. This can cause the TCPLinger2 timer to not fire. This change
disables S/R before setting the TCP_LINGER2 timeout.

PiperOrigin-RevId: 304430536
2020-04-02 10:41:12 -07:00
Dean Deng 639d94f9f7 Add socket filesystem and global disconnected socket mount for VFS2.
A socket mount where anonymous sockets will reside is added to the
VirtualFilesystem. Socketfs is built on top of kernfs.

Updates #1476, #1478, #1484, #1485.

PiperOrigin-RevId: 304095251
2020-03-31 19:17:12 -07:00
Haibo Xu c71e97784c Enable rseq syscall test on arm64.
Signed-off-by: Haibo Xu <haibo.xu@arm.com>
Change-Id: If30154a2d73e98f211cfe589853b232019b9e130
2020-04-01 09:50:49 +08:00
Haibo Xu 8ce5b56971 Cleanup for syscall tests on arm64.
Signed-off-by: Haibo Xu <haibo.xu@arm.com>
Change-Id: I8008c0375fc7e23225a21026f359e78e691729e5
2020-03-31 13:39:38 +08:00
gVisor bot f5fbe859ed Merge pull request #2177 from xiaobo55x:sysret_test
PiperOrigin-RevId: 303158421
2020-03-26 11:37:45 -07:00
gVisor bot 3afbe5461a Merge pull request #2151 from xiaobo55x:seccomp_test
PiperOrigin-RevId: 302987344
2020-03-25 15:59:53 -07:00
Fabricio Voznika e541ebec2f Misc fixes to make stat_test pass (almost)
The only test failing now requires socket which is not
available in VFS2 yet.

Updates #1198

PiperOrigin-RevId: 302976572
2020-03-25 14:59:15 -07:00
Andrei Vagin f97858011f Open a temp directory before changing capabilities and user ID-s
In cl/302130790, we started using a temp directory which is provided by bazel.

By default, a test process has enough permissions to open it, but there is not
any guarantee that it still will be able to do this after changing credentials.

PiperOrigin-RevId: 302702337
2020-03-24 10:58:51 -07:00
Ian Lewis a730d74b32 Support basic /proc/net/dev metrics for netstack
Fixes #506

PiperOrigin-RevId: 302540404
2020-03-23 16:12:58 -07:00
Haibo Xu 9c35d7eb1f Enable syscall sysret_test on arm64.
Fixes #2058

Signed-off-by: Haibo Xu <haibo.xu@arm.com>
Change-Id: I05750d238a6425d3a47fae15720901f4dd924a32
2020-03-18 09:27:19 +00:00
Ting-Yu Wang 69da42885a Enable ARP resolution in TAP devices.
PiperOrigin-RevId: 301208471
2020-03-16 12:03:27 -07:00
Dean Deng 5e413cad10 Plumb VFS2 imported fds into virtual filesystem.
- When setting up the virtual filesystem, mount a host.filesystem to contain
  all files that need to be imported.
- Make read/preadv syscalls to the host in cases where preadv2 may not be
  supported yet (likewise for writing).
- Make save/restore functions in kernel/kernel.go return early if vfs2 is
  enabled.

PiperOrigin-RevId: 300922353
2020-03-14 07:14:33 -07:00
Haibo Xu 333b74dc28 Enable syscall seccomp test on arm64.
Signed-off-by: Haibo Xu <haibo.xu@arm.com>
Change-Id: Ibc926c917d98b31fc92bbf8d82d6818c39b0f93c
2020-03-13 05:40:13 +00:00
Ting-Yu Wang bbf86003bf Remove flaky network namespace test that uses clone().
PiperOrigin-RevId: 300626011
2020-03-12 14:35:25 -07:00
gVisor bot 2c2622b942 Merge pull request #1975 from nybidari:iptables
PiperOrigin-RevId: 300362789
2020-03-11 11:02:04 -07:00
Ting-Yu Wang b36de6e7be Move /proc/net to /proc/PID/net, and make /proc/net -> /proc/self/net.
Issue #1833

PiperOrigin-RevId: 299998105
2020-03-09 19:59:09 -07:00
Eyal Soha d5dbe366bf shutdown(s, SHUT_WR) in TIME-WAIT returns ENOTCONN
From RFC 793 s3.9 p61 Event Processing:

CLOSE Call during TIME-WAIT: return with "error: connection closing"

Fixes #1603

PiperOrigin-RevId: 299401353
2020-03-06 11:42:34 -08:00
Ian Lewis da48fc6cca Stub oom_score_adj and oom_score.
Adds an oom_score_adj and oom_score proc file stub. oom_score_adj accepts
writes of values -1000 to 1000 and persists the value with the task. New tasks
inherit the parent's oom_score_adj.

oom_score is a read-only stub that always returns the value '0'.

Issue #202

PiperOrigin-RevId: 299245355
2020-03-05 18:23:01 -08:00
gVisor bot b1576e5332 Merge pull request #2036 from xiaobo55x:syscall_test
PiperOrigin-RevId: 299151227
2020-03-05 11:34:09 -08:00
Andrei Vagin 504c9e14d6 test/runner: use proper filters for test cases
The benchmark_filter options accepts regex-s, but
the gtest-filter option accepts shell-like wildcards.

Fixes #2034

Signed-off-by: Andrei Vagin <avagin@gmail.com>
2020-03-04 12:52:13 -08:00
gVisor bot ba8b8154e8 Merge pull request #2008 from lubinszARM:pr_skip_vsyscall
PiperOrigin-RevId: 298683693
2020-03-03 13:48:00 -08:00
gVisor bot 3aa97c893d Merge pull request #2043 from lubinszARM:pr_clean1
PiperOrigin-RevId: 298683502
2020-03-03 13:46:54 -08:00
Adin Scannell b3c549d839 Move temp_umask to test/util.
PiperOrigin-RevId: 298667595
2020-03-03 12:38:00 -08:00
Bin Lu fc3a09cd3c code clean: minor changes to compatible with ubuntu18.04
Signed-off-by: Bin Lu <bin.lu@arm.com>
2020-03-03 17:45:59 +08:00
Nayana Bidari 43abb24657 Fix panic caused by invalid address for Bind in packet sockets.
PiperOrigin-RevId: 298476533
2020-03-02 16:31:52 -08:00
Bhasker Hariharan 3310175250 Fix data-race when reading/writing e.amss.
PiperOrigin-RevId: 298451319
2020-03-02 14:45:03 -08:00
Haibo Xu 36b193b1db Fix syscall test build error on arm64.
The error was introduced in the merge of PR #1471.
Some codes are missing when adding bazel select_arch
command to the test/syscall/linux/BUILD file.

Signed-off-by: Haibo Xu <haibo.xu@arm.com>
Change-Id: I8cae3f4ae78c2e14671f3ac6e7361dc2806d9305
2020-03-02 07:35:30 +00:00
Ting-Yu Wang 6b4d36e325 Hide /dev/net/tun when using hostinet.
/dev/net/tun does not currently work with hostinet. This has caused some
program starts failing because it thinks the feature exists.

PiperOrigin-RevId: 297876196
2020-02-28 10:39:12 -08:00
Bin Lu dd1ed5c789 skip vsyscall test cases on Arm64
Signed-off-by: Bin Lu <bin.lu@arm.com>
2020-02-28 14:47:50 +08:00
Nayana Bidari abf7ebcd38 Internal change.
PiperOrigin-RevId: 297638665
2020-02-27 11:00:41 -08:00
Jay Zhuang de0b2ebf86 Add getsockopt tests for SO_SNDTIMEO and SO_RCVTIMEO
PiperOrigin-RevId: 297485310
2020-02-26 18:17:23 -08:00
gVisor bot 93626a28e4 Merge pull request #1886 from avagin:arm64-travis-ci
PiperOrigin-RevId: 296975376
2020-02-24 14:34:13 -08:00
Andrei Vagin 75d7f76a6c arm64: add a travis build ci
Build runsc and run "runsc do ls".

Signed-off-by: Andrei Vagin <avagin@gmail.com>
2020-02-21 22:44:19 -08:00
Ting-Yu Wang b8f56c79be Implement tap/tun device in vfs.
PiperOrigin-RevId: 296526279
2020-02-21 15:42:56 -08:00
gVisor bot 4a73bae269 Initial network namespace support.
TCP/IP will work with netstack networking. hostinet doesn't work, and sockets
will have the same behavior as it is now.

Before the userspace is able to create device, the default loopback device can
be used to test.

/proc/net and /sys/net will still be connected to the root network stack; this
is the same behavior now.

Issue #1833

PiperOrigin-RevId: 296309389
2020-02-20 15:20:40 -08:00
Adin Scannell 30794512d3 Add basic microbenchmarks.
PiperOrigin-RevId: 296104390
2020-02-19 18:21:54 -08:00
gVisor bot 55c99ce106 Include more test files in exports_files
So that they can be included by Fuchsia's syscall tests

PiperOrigin-RevId: 296030383
2020-02-19 12:32:44 -08:00
gVisor bot 56fd9504aa Enable IPV6_RECVTCLASS socket option for datagram sockets
Added the ability to get/set the IP_RECVTCLASS socket option on UDP endpoints.
If enabled, traffic class from the incoming Network Header passed as ancillary
data in the ControlMessages.

Adding Get/SetSockOptBool to decrease the overhead of getting/setting simple
options. (This was absorbed in a CL that will be landing before this one).

Test:
* Added unit test to udp_test.go that tests getting/setting as well as
verifying that we receive expected TOS from incoming packet.
* Added a syscall test for verifying getting/setting
* Removed test skip for existing syscall test to enable end to end test.
PiperOrigin-RevId: 295840218
2020-02-18 15:45:36 -08:00
gVisor bot c841373013 Deflake fallocate syscall test.
- Retry if fallocate returns EINTR.

- If fallocate fails, don't try to fstat and confirm the result.

PiperOrigin-RevId: 295789790
2020-02-18 12:02:05 -08:00
gVisor bot 69bf39e8a4 Internal change.
PiperOrigin-RevId: 294952610
2020-02-13 10:59:52 -08:00
gVisor bot 46a36b64d5 Include more test files in exports_files
So that they can be included by Fuchsia's syscall tests

PiperOrigin-RevId: 294654890
2020-02-12 06:36:43 -08:00
Zach Koopmans 75412ed9f5 Internal change.
PiperOrigin-RevId: 294250370
2020-02-10 10:29:57 -08:00
Dean Deng 17b9f5e662 Support listxattr and removexattr syscalls.
Note that these are only implemented for tmpfs, and other impls will still
return EOPNOTSUPP.

PiperOrigin-RevId: 293899385
2020-02-07 14:47:13 -08:00
Jay Zhuang 6de49546cb Refactor syscall tests
- Move shared helpers V4Multicast and V4Broadcast to socket_test_util
- Add unnamed namespace so socket_ipv4_tcp_unbound_external_networking_test.cc
  and socket_ipv4_udp_unbound_external_networking_test.cc can be compiled
  together
- Add test files to "exports_files" so they can be included by Fuchsia's syscall
  test setup

PiperOrigin-RevId: 293880429
2020-02-07 13:19:18 -08:00
Adin Scannell 0e96fcafd4 Fix test case on AMD.
When ignored, the trap should be executed which generates
a SIGSEGV as in the above case.

PiperOrigin-RevId: 293618489
2020-02-06 10:12:16 -08:00
Adin Scannell 1b6a12a768 Add notes to relevant tests.
These were out-of-band notes that can help provide additional context
and simplify automated imports.

PiperOrigin-RevId: 293525915
2020-02-05 22:46:35 -08:00
Eyal Soha f3d9560703 recv() on a closed TCP socket returns ENOTCONN
From RFC 793 s3.9 p58 Event Processing:

If RECEIVE Call arrives in CLOSED state and the user has access to such a
connection, the return should be "error: connection does not exist"

Fixes #1598

PiperOrigin-RevId: 293494287
2020-02-05 17:56:42 -08:00