Commit Graph
27 Commits
Author SHA1 Message Date
Adin ScannellandgVisor bot 2911d8c3b8 Add default_applicable_licenses rules to packages.
PiperOrigin-RevId: 513581243
2023-03-02 10:50:04 -08:00
Ayush RanjanandgVisor bot 027830387d Build everything and run unit tests on ARM in Buildkite.
PiperOrigin-RevId: 462228233
2022-07-20 14:19:09 -07:00
Nicolas LacasseandgVisor bot ab8b222f96 Delete verityfs.
PiperOrigin-RevId: 454300799
2022-06-10 22:18:49 -07:00
Etienne PerotandgVisor bot d03b9bd9bd Add all_benchmarks fileset containing all benchmark binaries.
PiperOrigin-RevId: 449573479
2022-05-18 14:13:37 -07:00
Andrei VaginandgVisor bot ca1012c047 tests: fix compile time warnings
test/syscalls/linux/futex.cc:
In member function 'virtual void gvisor::testing::
{anonymous}::PrivateAndSharedFutexTest_PIWaiters_Test::TestBody()':

test/syscalls/linux/futex.cc:697:19:
warning: comparison of integer expressions of different signedness:
'std::__atomic_base<int>::__int_type' {aka 'int'} and 'unsigned int'
[-Wsign-compare]

  697 |   while (a.load() != (FUTEX_WAITERS | gettid())) {
      |          ~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~

test/syscalls/linux/proc_pid_uid_gid_map.cc:207:64:
warning: comparison of integer expressions of different signedness: 'size_t'
{aka 'long unsigned int'} and 'int' [-Wsign-compare]

  207 |         TEST_PCHECK((n = write(fd, line.c_str(), line.size())) != -1);
      |                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~
test/syscalls/linux/socket_inet_loopback.cc:964:21:
warning: comparison of integer expressions of different signedness: 'int' and
'std::array<gvisor::testing::FileDescriptor, 1>::size_type' {aka 'long
unsigned int'} [-Wsign-compare]

  964 |   for (int i = 0; i < std::size(established_clients); i++) {
      |                   ~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

test/syscalls/linux/socket_inet_loopback.cc:974:21:
warning: comparison of integer expressions of different signedness: 'int' and
'std::array<gvisor::testing::FileDescriptor, 1>::size_type' {aka 'long
unsigned int'} [-Wsign-compare]

  974 |   for (int i = 0; i < std::size(waiting_clients); i++) {
      |                   ~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~

test/syscalls/linux/udp_socket.cc:869:6:
warning: suggest explicit braces to avoid ambiguous 'else' [-Wdangling-else]

  869 |if (!IsRunningWithHostinet() || GvisorPlatform() == Platform::kPtrace ||
      |   ^

test/syscalls/linux/socket_unix_unbound_abstract.cc:93:9:
warning: variable 'orig_opts' set but not used [-Wunused-but-set-variable]

   93 |     int orig_opts;
      |         ^~~~~~~~~

test/syscalls/linux/socket_unix_unbound_abstract.cc:107:9:
warning: variable 'orig_opts' set but not used [-Wunused-but-set-variable]

  107 |     int orig_opts;
      |         ^~~~~~~~~

PiperOrigin-RevId: 445545240
2022-04-29 17:59:14 -07:00
Ayush RanjanandgVisor bot 6e4b110592 Do not generate native variants for verity benchmarks.
PiperOrigin-RevId: 431006942
2022-02-25 12:38:30 -08:00
Ayush RanjanandgVisor bot 821e6a0af4 Do not generate VFS1 tests.
Updates #1624

PiperOrigin-RevId: 429085588
2022-02-16 10:41:44 -08:00
Andrei VaginandgVisor bot f4b29fd551 Deflake test/perf:randread_benchmark
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-17 12:58:37 -07:00
Chong CaiandgVisor bot b0a0a33dd2 Add verity stat benchmark test
PiperOrigin-RevId: 390284683
2021-08-11 21:17:10 -07:00
Chong CaiandgVisor bot b70cfb0f74 Add verity_randread benchmark test
PiperOrigin-RevId: 388819374
2021-08-04 17:18:02 -07:00
Chong CaiandgVisor bot d3e6afd7de Add verity open_read_close benchmark test
PiperOrigin-RevId: 388494554
2021-08-03 10:56:32 -07:00
gVisor bot f6878c663e Merge pull request #6257 from zhlhahaha:2193-1
PiperOrigin-RevId: 387885663
2021-07-30 14:43:13 -07:00
Chong CaiandgVisor bot d753e9d6c6 Add verity read benchmark tests
PiperOrigin-RevId: 387431049
2021-07-28 14:03:46 -07:00
Andrei VaginandHoward Zhang a09e50f45c Don't create an extra fd bitmap to allocate a new fd. 2021-07-27 13:16:02 +08:00
Chong CaiandgVisor bot 1b70a5f282 Add verity open benchmark test
PiperOrigin-RevId: 386533065
2021-07-23 14:35:42 -07:00
Rahat MahmoodandgVisor bot d522c5d13d Handle EINTR from socket syscalls in send/recv benchmark.
The benchmark check fails if any of the socket syscalls fail with
EINTR. We see this manifest in S/R lifecycles since S/R has a high
probability of aborting these syscalls with EINTR.

PiperOrigin-RevId: 386480365
2021-07-23 10:24:39 -07:00
Ghanan GowripalanandgVisor bot 129cc47c63 Move socket_test_util to //test/util
...and rename the library to socket_util.

PiperOrigin-RevId: 386348306
2021-07-22 16:37:15 -07:00
Fabricio VoznikaandgVisor bot c11e8606de Speed up O_APPEND with remote revalidating
Remote revalidating requires to update file size on every write
on a file opened with O_APPEND. If host FD exists, it can be
used to update the size and skip round trip to the gofer. With
this change, O_APPEND writes with remote revalidating is almost
as fast as exclusive mode:

              BM_Append
VFS1           60.7us
VFS2           56.8us
VFS2 exclusive 14.2us
This change    15.8us

Updates #1792

PiperOrigin-RevId: 369486801
2021-04-20 11:48:48 -07:00
Andrei VaginandgVisor bot 2a3de9cbd7 perf/getpid: add a case when syscalls are executed via mov $XXX, %eax; syscall
This is the most often pattern of calling system calls in real applications.

PiperOrigin-RevId: 367320048
2021-04-07 16:25:02 -07:00
Nicolas LacasseandgVisor bot 14b8971599 Run gentdents_benchmark with fewer files.
This test regularly times out when "shared" filesystem is enabled.

PiperOrigin-RevId: 329950622
2020-09-03 10:54:01 -07:00
Fabricio VoznikaandgVisor bot a5e99e28dc Implement setattr+clunk in 9P
This is to cover the common pattern: open->read/write->close,
where SetAttr needs to be called to update atime/mtime before
the file is closed.

Benchmark results:

BM_OpenReadClose/10240 CPU
setattr+clunk: 63783 ns
VFS2:          68109 ns
VFS1:          72507 ns

Updates #1198

PiperOrigin-RevId: 329628461
2020-09-01 19:22:12 -07:00
gVisor bot 651fac76da Internal change.
PiperOrigin-RevId: 317941748
2020-06-23 14:42:15 -07:00
Andrei VaginandgVisor bot 7118f5afd7 Deflake //third_party/gvisor/test/perf:getdents_benchmark_runsc_ptrace
* Increase a buffer size for getdents64
* Increase a number of shards

PiperOrigin-RevId: 304670004
2020-04-03 12:29:03 -07:00
Jamie LiuandgVisor bot f08ae4f476 Fix futex_benchmark.
- 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-25 10:59:39 -07:00
Andrei VaginandgVisor bot c7c81bb668 perf/signal: rewrite code in assembly to avoid compiler optimizations
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-09 11:53:28 -07:00
Adin ScannellandgVisor bot 61e9a27ce3 Add default behavior for gtest runner.
PiperOrigin-RevId: 297009116
2020-02-24 17:29:34 -08:00
Adin ScannellandCopybara-Service 412a92112f Add basic microbenchmarks.
PiperOrigin-RevId: 296104390
2020-02-19 18:21:54 -08:00