summaryrefslogtreecommitdiffhomepage
path: root/test
AgeCommit message (Collapse)Author
2020-03-26Support owner matching for iptables.Nayana Bidari
This feature will match UID and GID of the packet creator, for locally generated packets. This match is only valid in the OUTPUT and POSTROUTING chains. Forwarded packets do not have any socket associated with them. Packets from kernel threads do have a socket, but usually no owner.
2020-03-26Merge pull request #2177 from xiaobo55x:sysret_testgVisor bot
PiperOrigin-RevId: 303158421
2020-03-26Check error in DropTCP*Port tests and fix comment.Kevin Krakauer
PiperOrigin-RevId: 303147253
2020-03-25Merge pull request #2151 from xiaobo55x:seccomp_testgVisor bot
PiperOrigin-RevId: 302987344
2020-03-25Fix race in TestRunEnvHasHomeFabricio Voznika
It's possible to execute the command that checks user's $HOME dir before the user is created. Move the code that creates the user inside exec so it can be serialized. PiperOrigin-RevId: 302986184
2020-03-25Misc fixes to make stat_test pass (almost)Fabricio Voznika
The only test failing now requires socket which is not available in VFS2 yet. Updates #1198 PiperOrigin-RevId: 302976572
2020-03-25Fix futex_benchmark.Jamie Liu
- Fix definitions of Futex* wrappers. - Correctly handle glibc syscall() (which returns -1 and sets errno instead of returning the raw syscall return value). - De-parameterize FutexWaitBitset, which was apparently intended to test with deadlines of between 0 and 100000 nanoseconds after the Unix epoch, but was broken due to the preceding two issues. - Use wall time to measure the durations of tests that are expected to block (and thus stop accumulating CPU time). - Require 5s for all tests to improve robustness in the presence of sentry GC. - Remove FutexContend and FutexContendDeadline; it's unclear what these are supposed to measure, given that (1) FutexLock is unrealistically inefficient and (2) the benchmark rewards slow scheduling (since this reduces contention). PiperOrigin-RevId: 302925246
2020-03-24Open a temp directory before changing capabilities and user ID-sAndrei Vagin
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-23Support basic /proc/net/dev metrics for netstackIan Lewis
Fixes #506 PiperOrigin-RevId: 302540404
2020-03-20test: Create a separate /tmp mount only for tests with the shared tagAndrei Vagin
The root mount is not shared by default, but all other mounts are shared. So if we create the /tmp mount, this means that we run tests on a shared mount even if tests run without the --shared option. PiperOrigin-RevId: 302130790
2020-03-19Add packetimpact tests to presubmit and CI testingEyal Soha
PiperOrigin-RevId: 301872161
2020-03-18Merge pull request #2187 from kevinGC:deflake-connectTCPgVisor bot
PiperOrigin-RevId: 301716568
2020-03-18iptables: deflake DropTCP*Port testsKevin Krakauer
These tests could timeout because net.DialTCP didn't respect the timeout.
2020-03-18iptables: skip tests for not-yet-supported featuresKevin Krakauer
PiperOrigin-RevId: 301686266
2020-03-18Automated rollback of changelist 301476456Kevin Krakauer
PiperOrigin-RevId: 301650898
2020-03-18Send the ACK later to stabilize the test.Eyal Soha
PiperOrigin-RevId: 301614096
2020-03-18Enable syscall sysret_test on arm64.Haibo Xu
Fixes #2058 Signed-off-by: Haibo Xu <haibo.xu@arm.com> Change-Id: I05750d238a6425d3a47fae15720901f4dd924a32
2020-03-17iptables: fix type in script name, mark some new tests as skippedKevin Krakauer
PiperOrigin-RevId: 301476456
2020-03-17Packetimpact in Go with c++ stubEyal Soha
PiperOrigin-RevId: 301382690
2020-03-16Enable ARP resolution in TAP devices.Ting-Yu Wang
PiperOrigin-RevId: 301208471
2020-03-16Merge pull request #1943 from kevinGC:ipt-filter-ipgVisor bot
PiperOrigin-RevId: 301197007
2020-03-14Plumb VFS2 imported fds into virtual filesystem.Dean Deng
- 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-13Skip process if it has exitedFabricio Voznika
PiperOrigin-RevId: 300802159
2020-03-13Enable syscall seccomp test on arm64.Haibo Xu
Signed-off-by: Haibo Xu <haibo.xu@arm.com> Change-Id: Ibc926c917d98b31fc92bbf8d82d6818c39b0f93c
2020-03-12Remove flaky network namespace test that uses clone().Ting-Yu Wang
PiperOrigin-RevId: 300626011
2020-03-12Kill sandbox process when parent process terminatesFabricio Voznika
When the sandbox runs in attached more, e.g. runsc do, runsc run, the sandbox lifetime is controlled by the parent process. This wasn't working in all cases because PR_GET_PDEATHSIG doesn't propagate through execve when the process changes uid/gid. So it was getting dropped when the sandbox execve's to change to user nobody. PiperOrigin-RevId: 300601247
2020-03-11iptables: ready tests to be enabled in kokoroKevin Krakauer
Fixed flakes (tested via --runs_per_test=100) and added skips for not-yet-implemented features. Once submitted, the iptables tests will be ready to enable in kokoro.
2020-03-11Merge pull request #1975 from nybidari:iptablesgVisor bot
PiperOrigin-RevId: 300362789
2020-03-10Make checkpoint/restore e2e test less flakyIan Lewis
PiperOrigin-RevId: 300171916
2020-03-09Move /proc/net to /proc/PID/net, and make /proc/net -> /proc/self/net.Ting-Yu Wang
Issue #1833 PiperOrigin-RevId: 299998105
2020-03-09perf/signal: rewrite code in assembly to avoid compiler optimizationsAndrei Vagin
Without this change, the assembly code of this test compiled without optimizations: mov -0x150(%rbp),%rax movl $0x77777777,(%rax) lea -0x128(%rbp),%rax with optimizations: movl $0x77777777,0x0 This code doesn't work properly, because the test changes rax in the segv handler. PiperOrigin-RevId: 299896117
2020-03-06shutdown(s, SHUT_WR) in TIME-WAIT returns ENOTCONNEyal Soha
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-06Move packetdrill tests to open-sourceEyal Soha
PiperOrigin-RevId: 299396286
2020-03-05Stub oom_score_adj and oom_score.Ian Lewis
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-05Merge pull request #2036 from xiaobo55x:syscall_testgVisor bot
PiperOrigin-RevId: 299151227
2020-03-04Merge pull request #2054 from avagin:gvisor-testgVisor bot
PiperOrigin-RevId: 298951909
2020-03-04test/runner: use proper filters for test casesAndrei Vagin
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-04Use shuf instead of $RANDOM everywhere.Eyal Soha
$RANDOM can cause collisions but shuf uses /dev/urandom so it ought to cause fewer. PiperOrigin-RevId: 298786344
2020-03-03Merge pull request #2008 from lubinszARM:pr_skip_vsyscallgVisor bot
PiperOrigin-RevId: 298683693
2020-03-03Merge pull request #2043 from lubinszARM:pr_clean1gVisor bot
PiperOrigin-RevId: 298683502
2020-03-03Move temp_umask to test/util.Adin Scannell
PiperOrigin-RevId: 298667595
2020-03-03code clean: minor changes to compatible with ubuntu18.04Bin Lu
Signed-off-by: Bin Lu <bin.lu@arm.com>
2020-03-02Fix panic caused by invalid address for Bind in packet sockets.Nayana Bidari
PiperOrigin-RevId: 298476533
2020-03-02Fix data-race when reading/writing e.amss.Bhasker Hariharan
PiperOrigin-RevId: 298451319
2020-03-02Fix syscall test build error on arm64.Haibo Xu
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-02-28Mark gettid and getdents as nogotsanZach Koopmans
PiperOrigin-RevId: 297915815
2020-02-28Hide /dev/net/tun when using hostinet.Ting-Yu Wang
/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-28skip vsyscall test cases on Arm64Bin Lu
Signed-off-by: Bin Lu <bin.lu@arm.com>
2020-02-27Internal change.Nayana Bidari
PiperOrigin-RevId: 297638665
2020-02-26Add getsockopt tests for SO_SNDTIMEO and SO_RCVTIMEOJay Zhuang
PiperOrigin-RevId: 297485310