34 Commits

Author SHA1 Message Date
gVisor bot 1d7b2b5c6f Correct getdents64 syscall number for arm64
PiperOrigin-RevId: 611216382
2024-02-28 13:50:35 -08:00
gVisor bot 119847abcf Define SYS_getdents64 for RISC-V
PiperOrigin-RevId: 608677185
2024-02-20 11:30:29 -08:00
gVisor bot 53d2b511e7 Change remaining test targets to use select_gtest() to choose the gtest target
Should be a no-op as select_gtest() returns the same target as before.

PiperOrigin-RevId: 607788473
2024-02-16 13:45:58 -08:00
Ghanan Gowripalan 15fdd74e5c Limit SelectAllEvents benchmark to 512 FDs
...since `select` only supports FD values up to 1024 and creating 1024
event FDs will result in FD values that are greater than 1024 because
of the initial set of FDs that exist for most programs (stdin, stdout,
stderr).

https://www.man7.org/linux/man-pages/man2/select.2.html

PiperOrigin-RevId: 573916775
2023-10-16 13:46:17 -07:00
Ghanan Gowripalan da90797f0c Zero fd_set in select_benchmark
This is fixing a bug that caused the test to fail on ARM64 when running
under Starnix on Fuchsia. https://ci.chromium.org/b/8767565962564011473
is an example failing run.

PiperOrigin-RevId: 573021699
2023-10-12 15:05:54 -07:00
Ghanan Gowripalan 12bc9994b4 Introduce select_benchmark
This benchmark performs similar measurements as epoll_benchmark.

PiperOrigin-RevId: 571972206
2023-10-09 10:18:13 -07:00
Ghanan Gowripalan 07b9077bfd Introduce poll_benchmark
This benchmark performs similar measurements as epoll_benchmark.

PiperOrigin-RevId: 571414062
2023-10-06 13:03:58 -07:00
Adin Scannell 1ceb814544 Add default_applicable_licenses rules to packages.
PiperOrigin-RevId: 513581243
2023-03-02 10:50:04 -08:00
Ayush Ranjan be38a15c16 Build everything and run unit tests on ARM in Buildkite.
PiperOrigin-RevId: 462228233
2022-07-20 14:19:09 -07:00
Nicolas Lacasse 1822dfa7ac Delete verityfs.
PiperOrigin-RevId: 454300799
2022-06-10 22:18:49 -07:00
Etienne Perot 4dcac904e1 Add all_benchmarks fileset containing all benchmark binaries.
PiperOrigin-RevId: 449573479
2022-05-18 14:13:37 -07:00
Andrei Vagin b286d1c1ba 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 Ranjan 7e8f4c3b3f Do not generate native variants for verity benchmarks.
PiperOrigin-RevId: 431006942
2022-02-25 12:38:30 -08:00
Ayush Ranjan ca697cfd2a Do not generate VFS1 tests.
Updates #1624

PiperOrigin-RevId: 429085588
2022-02-16 10:41:44 -08:00
Andrei Vagin 8f6c54c8c0 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 Cai 01cfe59528 Add verity stat benchmark test
PiperOrigin-RevId: 390284683
2021-08-11 21:17:10 -07:00
Chong Cai b9780f96be Add verity_randread benchmark test
PiperOrigin-RevId: 388819374
2021-08-04 17:18:02 -07:00
Chong Cai ceab3327c5 Add verity open_read_close benchmark test
PiperOrigin-RevId: 388494554
2021-08-03 10:56:32 -07:00
gVisor bot c9aac64e0f Merge pull request #6257 from zhlhahaha:2193-1
PiperOrigin-RevId: 387885663
2021-07-30 14:43:13 -07:00
Chong Cai 6bf7d0514b Add verity read benchmark tests
PiperOrigin-RevId: 387431049
2021-07-28 14:03:46 -07:00
Andrei Vagin 68cf8cc9a2 Don't create an extra fd bitmap to allocate a new fd. 2021-07-27 13:16:02 +08:00
Chong Cai d247938363 Add verity open benchmark test
PiperOrigin-RevId: 386533065
2021-07-23 14:35:42 -07:00
Rahat Mahmood c3c5c55d13 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 Gowripalan aa26981700 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 Voznika bf1e14cf8a 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