summaryrefslogtreecommitdiffhomepage
path: root/test
AgeCommit message (Collapse)Author
2021-09-07Conditionally use GetAbsoluteTestTmpdir() rather than hard-code "/tmp"Kevin Lindkvist
NewTempAbsPathInDir("/tmp") prevents the generated socket address from exceeding sizeof(addr.sun_path). However, existing systems that are built with the ANDROID configuration have their temp directory in a different location. This change allows those systems to run tests that depend on UniqueUnixAddr. PiperOrigin-RevId: 395336483
2021-09-02Merge pull request #6516 from slowy07:minor-changesgVisor bot
PiperOrigin-RevId: 394481127
2021-09-01Support sending with packet socketsGhanan Gowripalan
...through the loopback interface, only. This change only supports sending on packet sockets through the loopback interface as the loopback interface is the only interface used in packet socket syscall tests - the other link endpoints are not excercised with the existing test infrastructure. Support for sending on packet sockets through the other interfaces will be added as needed. BUG: https://fxbug.dev/81592 PiperOrigin-RevId: 394368899
2021-09-01unix: handle a case when a buffer is overflowedAndrei Vagin
Reported-by: syzbot+1aab6800bd14829609b8@syzkaller.appspotmail.com PiperOrigin-RevId: 394279838
2021-08-31Remove splice-to/from-weird-files tests.Jamie Liu
These tests are permanently broken on Linux after 36e2c7421f02 "fs: don't allow splice read/write without explicit ops". PiperOrigin-RevId: 394161079
2021-08-31Automated rollback of changelist 390405182gVisor bot
PiperOrigin-RevId: 394004809
2021-08-30[syserr] Fix SIGBUS on syserr.FromErrorZach Koopmans
Fix syzcaller panic SIGBUS on error handling. Done by adding an interface, errors.GuestError, which errors can implement in order to be compared against each other. PiperOrigin-RevId: 393867554
2021-08-30Internal change.gVisor bot
PiperOrigin-RevId: 393783192
2021-08-27fix: typo spelling grammarslowy07
2021-08-26fix tests in pty.ccgystemd
fixed and enabled SetForegroundProcessGroup and SetForegroundProcessGroupEmptyProcessGroup.
2021-08-24Merge pull request #6438 from gystemd:tcsetpgrp_SIGTTOUgVisor bot
PiperOrigin-RevId: 392774712
2021-08-24Fix uninitialized messages in MsgqueueTestFabricio Voznika
PiperOrigin-RevId: 392760305
2021-08-19Added a system call test for SetForegroundProcessGroupgystemd
-Added a test to check if the process in background is blocking SIGTTOU -Some minor formatting fixes
2021-08-17[op] Deflake SNMP Metric proc_net tests.Ayush Ranjan
Earlier the tests were checking for equality of system-wide metrics before and after some network related operations. That is inherently racy for native tests because depending on the testing infrastructure, multiple tests might run parallely hence trampling over each other's metrics. Tests should only compare metrics that are increasing in nature. The comparison should not be a hard comparison, instead a less-than/greater-than relation test. I have changed the checks and also removed tests for tcpCurrEstab metric which has "SYNTAX Gauge" and hence can not be tested reliably. PiperOrigin-RevId: 391460081
2021-08-17Merge pull request #6262 from sudo-sturbia:msgqueue/syscalls3gVisor bot
PiperOrigin-RevId: 391416650
2021-08-17added two system call tests for setForegroundProcessGroupgystemd
Test the correct sending of the SIGTTOU in setForegroundProcess
2021-08-17Deflake test/perf:randread_benchmarkAndrei Vagin
The test expects that pread reads the full buffer, it means that the pread offset has to be equal or less than file_size - buffer_size. PiperOrigin-RevId: 391356863
2021-08-17Implement stub for msgctl(2).Zyad A. Ali
Add support for msgctl and enable tests. Fixes #135
2021-08-17Add tests for msgctl(2).Zyad A. Ali
Updates #135
2021-08-16Internal change.gVisor bot
PiperOrigin-RevId: 391217339
2021-08-16test/syscalls/proc_net: /proc/net/snmp can contain system-wide statisticsAndrei Vagin
This is a new kernel feature that are controlled by the net.core.mibs_allocation sysctl. PiperOrigin-RevId: 391215784
2021-08-13[benchmarks] Update BenchmarkStartEmpty benchmark.Zach Koopmans
Update the start benchmark on empty to only "Start" a container, not wait for its completion. TL:DR only measure the actual start call for the empty container. Previously, we were measuring the completion of /bin/true in container alpine AND the cleanup. This was fine until profiling started failing all the time on ptrace. This is a cost that runc is not paying. These changes will reduce the over all timing of the benchmark, but it will give more sane results. Instead, use "Spawn" which is similar to `docker run --detach alpine /bin/sleep 100`. Call sleep so containers stick around long enough for the profiler to read profile data from them. PiperOrigin-RevId: 390705431
2021-08-12Automated rollback of changelist 390346783gVisor bot
PiperOrigin-RevId: 390405182
2021-08-12test/pipe: use futex() for sync with the signal handerAndrei Vagin
PiperOrigin-RevId: 390399815
2021-08-12Internal change.gVisor bot
PiperOrigin-RevId: 390346783
2021-08-12Add support for TCP send buffer auto tuning.Nayana Bidari
Send buffer size in TCP indicates the amount of bytes available for the sender to transmit. This change will allow TCP to update the send buffer size when - TCP enters established state. - ACK is received. The auto tuning is disabled when the send buffer size is set with the SO_SNDBUF option. PiperOrigin-RevId: 390312274
2021-08-11Add verity stat benchmark testChong Cai
PiperOrigin-RevId: 390284683
2021-08-11Run packet socket tests on FuchsiaGhanan Gowripalan
+ Do not check for CAP_NET_RAW on Fuchsia Fuchsia does not support capabilities the same way Linux does. Instead emulate the check for CAP_NET_RAW by checking if a packet socket may be created. Bug: https://fxbug.dev/79016, https://fxbug.dev/81592 PiperOrigin-RevId: 390263666
2021-08-11Initial cgroupfs support for subcontainersRahat Mahmood
Allow creation and management of subcontainers through cgroupfs directory syscalls. Also add a mechanism to specify a default root container to start new jobs in. This implements the filesystem support for subcontainers, but doesn't implement hierarchical resource accounting or task migration. PiperOrigin-RevId: 390254870
2021-08-11Fix FSSupportsMap checkAdam Barth
Previously, this check always failed because we did not provide MAP_SHARED or MAP_PRIVATE. PiperOrigin-RevId: 390251086
2021-08-11Wrap test queues in Queue object on creation.Rahat Mahmood
PiperOrigin-RevId: 390245901
2021-08-11Fix LinkTest.OldnameDoesNotExistAdam Barth
Previous, this test was the same as OldnameIsEmpty. This CL makes the test check what happens if the old name does not exist. PiperOrigin-RevId: 390243070
2021-08-09Run raw IP socket syscall tests on FuchsiaGhanan Gowripalan
+ Do not check for CAP_NET_RAW on Fuchsia Fuchsia does not support capabilities the same way Linux does. Instead emulate the check for CAP_NET_RAW by checking if a raw IP sockets may be created. PiperOrigin-RevId: 389663218
2021-08-05Correctly handle interruptions in blocking msgqueue syscalls.Rahat Mahmood
Reported-by: syzbot+63bde04529f701c76168@syzkaller.appspotmail.com Reported-by: syzbot+69866b9a16ec29993e6a@syzkaller.appspotmail.com PiperOrigin-RevId: 389084629
2021-08-05Replace unsafe use of fork() in msgqueue tests.Rahat Mahmood
Msgqueue tests were using fork() to run create a separate thread of execution for passing messages back and forth over a queue. However, the child process after a fork() may only use async-signal-safe functions, which at a minimum exclude gtest asserts. Instead, use threads. PiperOrigin-RevId: 389073744
2021-08-05Skip mmap test cases if underlying FS doesn't support maps.Rahat Mahmood
For file-based mmap tests, the underlying file system may not support mmaps depending on the sandbox configuration. This is case when caching is disabled for goferfs. PiperOrigin-RevId: 389052722
2021-08-04Implement PR_SET_CHILD_SUBREAPER when the calling task is PID 1.Nicolas Lacasse
In this case, the task is already a subreaper, so setting this bit is a noop. Updates #2323 PiperOrigin-RevId: 388828034
2021-08-04Add verity_randread benchmark testChong Cai
PiperOrigin-RevId: 388819374
2021-08-03Use GetAbsoluteTestTmpdir() rather than hard-code "/tmp"Adam Barth
This change makes these tests easier to run on systems that have their temp directory in another location. PiperOrigin-RevId: 388601202
2021-08-03Merge pull request #6171 from sudo-sturbia:msgqueue/syscalls2gVisor bot
PiperOrigin-RevId: 388497055
2021-08-03Add verity open_read_close benchmark testChong Cai
PiperOrigin-RevId: 388494554
2021-08-03Implement MSG_COPY option for msgrcv(2).Zyad A. Ali
Implement Queue.Copy and add more tests for it. Updates #135
2021-08-03Implement stubs for msgsnd(2) and msgrcv(2).Zyad A. Ali
Add support for msgsnd and msgrcv and enable syscall tests. Updates #135
2021-08-03Add blocking and general tests for msgsnd(2) and msgrcv(2).Zyad A. Ali
Updates #135
2021-08-03Add non-blocking tests for msgsnd(2) and msgrcv(2).Zyad A. Ali
Updates #135
2021-07-30Support RTM_DELLINKZeling Feng
This change will allow us to remove the default link in a packetimpact test so we can reduce indeterministic behaviors as required in https://fxbug.dev/78430. This will also help with testing #1388. Updates #578, #1388. PiperOrigin-RevId: 387896847
2021-07-30Merge pull request #6257 from zhlhahaha:2193-1gVisor bot
PiperOrigin-RevId: 387885663
2021-07-28Add Uid/Gid/Groups fields to VFS2 /proc/[pid]/status.Jamie Liu
For comparison: ``` $ docker run --rm -it ubuntu:focal bash -c 'cat /proc/self/status' Name: cat Umask: 0022 State: R (running) Tgid: 1 Ngid: 0 Pid: 1 PPid: 0 TracerPid: 0 Uid: 0 0 0 0 Gid: 0 0 0 0 FDSize: 64 Groups: NStgid: 1 NSpid: 1 NSpgid: 1 NSsid: 1 VmPeak: 2660 kB VmSize: 2660 kB VmLck: 0 kB VmPin: 0 kB VmHWM: 528 kB VmRSS: 528 kB ... $ docker run --runtime=runsc-vfs2 --rm -it ubuntu:focal bash -c 'cat /proc/self/status' Name: cat State: R (running) Tgid: 1 Pid: 1 PPid: 0 TracerPid: 0 Uid: 0 0 0 0 Gid: 0 0 0 0 FDSize: 4 Groups: VmSize: 10708 kB VmRSS: 3124 kB VmData: 316 kB ... ``` Fixes #6374 PiperOrigin-RevId: 387465655
2021-07-28Add verity read benchmark testsChong Cai
PiperOrigin-RevId: 387431049
2021-07-27Don't create an extra fd bitmap to allocate a new fd.Andrei Vagin