summaryrefslogtreecommitdiffhomepage
path: root/test/syscalls
AgeCommit message (Collapse)Author
2020-05-13Resolve remaining TODOs for tmpfs.Nicolas Lacasse
Closes #1197 PiperOrigin-RevId: 311438223
2020-05-11Internal change.gVisor bot
PiperOrigin-RevId: 310941717
2020-05-05gvisor/test: use RetryEINTR for connect()Andrei Vagin
connect() returns EINTR after S/R and usually we use RetryEINTR to workaround this. PiperOrigin-RevId: 310038525
2020-05-04Port eventfd to VFS2.Nicolas Lacasse
And move sys_timerfd.go to just timerfd.go for consistency. Updates #1475. PiperOrigin-RevId: 309835029
2020-05-04Deflake //third_party/gvisor/test/syscalls:proc_test_nativeAndrei Vagin
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-04-28Fix Unix socket permissions.Dean Deng
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-28Don't unlink named pipes in pipe test.Jamie Liu
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-22tcp: handle listen after shutdown properlyAndrei Vagin
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-21Restore euid upon test finishKevin Krakauer
PiperOrigin-RevId: 307638329
2020-04-20Merge pull request #2060 from xiaobo55x:rseqgVisor bot
PiperOrigin-RevId: 307453436
2020-04-17prlimit: don't check credentials on selfKevin Krakauer
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-17proc net test: Annotate disable-save test with NoRandomSave.Ting-Yu Wang
PiperOrigin-RevId: 307069884
2020-04-16Implement pipe(2) and pipe2(2) for VFS2.Jamie Liu
Updates #1035 PiperOrigin-RevId: 306968644
2020-04-16Reset pending connections on listener shutdown.Mithun Iyer
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-15Use if_nametoindex to get interface index.Ting-Yu Wang
Removed the TODO to use netlink. PiperOrigin-RevId: 306721468
2020-04-15Reset pending connections on listener closeMithun Iyer
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-14Merge pull request #2375 from lubinszARM:pr_exec_binarygVisor bot
PiperOrigin-RevId: 306432289
2020-04-13Don't allow read/write when offset+size overflows.Nicolas Lacasse
PiperOrigin-RevId: 306348346
2020-04-13Remove unnecessary threadsTamir Duberstein
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-13Merge pull request #2168 from xiaobo55x:ptrace_testgVisor bot
PiperOrigin-RevId: 306306809
2020-04-13Merge pull request #2288 from xiaobo55x:fork_testgVisor bot
PiperOrigin-RevId: 306306494
2020-04-13Merge pull request #2289 from xiaobo55x:syscall_cleanupgVisor bot
PiperOrigin-RevId: 306303148
2020-04-10Port extended attributes to VFS2.Dean Deng
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-10test: remove 1s delay after non-blocking socket pair acceptAndrei Vagin
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-10Enable syscall ptrace test on arm64.Haibo Xu
Signed-off-by: Haibo Xu <haibo.xu@arm.com> Change-Id: I5bb8fa7d580d173b1438d6465e1adb442216c8fa
2020-04-10Enable syscall fork_test on arm64.Haibo Xu
Signed-off-by: Haibo Xu <haibo.xu@arm.com> Change-Id: I033692bcf4f8139df29e369a12b150d10fccbe32
2020-04-09Remove TODOs from Async IOFabricio Voznika
Block and drain requests in io_destroy(2). Note the reason to create read-only mapping. PiperOrigin-RevId: 305786312
2020-04-09Make some functions in IfAddrHelper const.Ting-Yu Wang
PiperOrigin-RevId: 305782490
2020-04-09Dedup netlink utility functions in tests.Ting-Yu Wang
PiperOrigin-RevId: 305749697
2020-04-08splice: cap splice calls to MAX_RW_COUNTAndrei Vagin
The Linux does the same. Reported-by: syzbot+e81716e8956e92e9d56b@syzkaller.appspotmail.com PiperOrigin-RevId: 305625439
2020-04-08Bump proc_test's kRSSTolerance to 10MB.Jamie Liu
PiperOrigin-RevId: 305604557
2020-04-08Clean up TODOsFabricio Voznika
PiperOrigin-RevId: 305592245
2020-04-08Handle utimes correctly for shared gofer filesystems.Dean Deng
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-08file test: Remove FIXME about FIFO. It is already tested in mknod test.Ting-Yu Wang
PiperOrigin-RevId: 305546584
2020-04-08Enable SubprocessExited and SubprocessZombie for gVisorFabricio Voznika
Updates #164 PiperOrigin-RevId: 305544029
2020-04-08Enable exec_binary syscall test on Arm64Bin Lu
Signed-off-by: Bin Lu <bin.lu@arm.com>
2020-04-08tests: Specify NoRandomSave for PortReuse testsAndrei Vagin
SO_REUSEPORT is not properly restored: https://github.com/google/gvisor/issues/873 PiperOrigin-RevId: 305422775
2020-04-07mkdir test: Address TODOs and re-enable a test.Ting-Yu Wang
PiperOrigin-RevId: 305328184
2020-04-07Make gofer.dentry.destroyLocked idempotentFabricio Voznika
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-06Bump up acceptable sample count for flaky itimer test.Dean Deng
Running the test 1000x almost always produces 1+ test failures where the sample count is slightly more than 60. PiperOrigin-RevId: 305051754
2020-04-03Ensure EOF is handled propertly during splice.Adin Scannell
PiperOrigin-RevId: 304684417
2020-04-03Add missing newlineTamir Duberstein
PiperOrigin-RevId: 304659346
2020-04-03Internal change.gVisor bot
PiperOrigin-RevId: 304641990
2020-04-02Fix typo in TODO comments.Dean Deng
PiperOrigin-RevId: 304508083
2020-04-02Fix flaky TCPLinger2TimeoutAfterClose test.Bhasker Hariharan
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-03-31Add socket filesystem and global disconnected socket mount for VFS2.Dean Deng
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-04-01Enable rseq syscall test on arm64.Haibo Xu
Signed-off-by: Haibo Xu <haibo.xu@arm.com> Change-Id: If30154a2d73e98f211cfe589853b232019b9e130
2020-03-31Cleanup for syscall tests on arm64.Haibo Xu
Signed-off-by: Haibo Xu <haibo.xu@arm.com> Change-Id: I8008c0375fc7e23225a21026f359e78e691729e5
2020-03-26Merge pull request #2177 from xiaobo55x:sysret_testgVisor bot
PiperOrigin-RevId: 303158421
2020-03-25Merge pull request #2151 from xiaobo55x:seccomp_testgVisor bot
PiperOrigin-RevId: 302987344