gvisor.dev/gvisor@v0.0.0-20240520182842-f9d4d51c7e0f/pkg/tcpip/transport/tcp/test/e2e/BUILD (about)

     1  load("//tools:defs.bzl", "go_library", "go_test", "more_shards")
     2  
     3  package(
     4      default_applicable_licenses = ["//:license"],
     5      licenses = ["notice"],
     6  )
     7  
     8  go_test(
     9      name = "tcp_test",
    10      size = "large",
    11      srcs = ["tcp_test.go"],
    12      shard_count = more_shards,
    13      deps = [
    14          ":e2e",
    15          "//pkg/buffer",
    16          "//pkg/rand",
    17          "//pkg/refs",
    18          "//pkg/sync",
    19          "//pkg/tcpip",
    20          "//pkg/tcpip/checker",
    21          "//pkg/tcpip/faketime",
    22          "//pkg/tcpip/header",
    23          "//pkg/tcpip/link/loopback",
    24          "//pkg/tcpip/link/sniffer",
    25          "//pkg/tcpip/network/ipv4",
    26          "//pkg/tcpip/network/ipv6",
    27          "//pkg/tcpip/seqnum",
    28          "//pkg/tcpip/stack",
    29          "//pkg/tcpip/testutil",
    30          "//pkg/tcpip/transport/tcp",
    31          "//pkg/tcpip/transport/tcp/testing/context",
    32          "//pkg/test/testutil",
    33          "//pkg/waiter",
    34          "@com_github_google_go_cmp//cmp:go_default_library",
    35      ],
    36  )
    37  
    38  go_test(
    39      name = "dual_stack_test",
    40      size = "small",
    41      srcs = ["dual_stack_test.go"],
    42      deps = [
    43          ":e2e",
    44          "//pkg/refs",
    45          "//pkg/tcpip",
    46          "//pkg/tcpip/checker",
    47          "//pkg/tcpip/header",
    48          "//pkg/tcpip/network/ipv4",
    49          "//pkg/tcpip/seqnum",
    50          "//pkg/tcpip/transport/tcp",
    51          "//pkg/tcpip/transport/tcp/testing/context",
    52          "//pkg/waiter",
    53          "@com_github_google_go_cmp//cmp:go_default_library",
    54      ],
    55  )
    56  
    57  go_library(
    58      name = "e2e",
    59      testonly = 1,
    60      srcs = ["e2e.go"],
    61      deps = [
    62          "//pkg/tcpip",
    63          "//pkg/tcpip/checker",
    64          "//pkg/tcpip/header",
    65          "//pkg/tcpip/seqnum",
    66          "//pkg/tcpip/transport/tcp",
    67          "//pkg/tcpip/transport/tcp/testing/context",
    68          "//pkg/waiter",
    69          "@com_github_google_go_cmp//cmp:go_default_library",
    70      ],
    71  )
    72  
    73  go_test(
    74      name = "forwarder_test",
    75      size = "small",
    76      srcs = ["forwarder_test.go"],
    77      deps = [
    78          ":e2e",
    79          "//pkg/atomicbitops",
    80          "//pkg/refs",
    81          "//pkg/tcpip",
    82          "//pkg/tcpip/checker",
    83          "//pkg/tcpip/header",
    84          "//pkg/tcpip/seqnum",
    85          "//pkg/tcpip/transport/tcp",
    86          "//pkg/tcpip/transport/tcp/testing/context",
    87      ],
    88  )
    89  
    90  go_test(
    91      name = "rcv_test",
    92      size = "small",
    93      srcs = ["rcv_test.go"],
    94      deps = [
    95          "//pkg/tcpip/header",
    96          "//pkg/tcpip/seqnum",
    97      ],
    98  )
    99  
   100  go_test(
   101      name = "sack_scoreboard_test",
   102      size = "small",
   103      srcs = ["sack_scoreboard_test.go"],
   104      deps = [
   105          "//pkg/refs",
   106          "//pkg/tcpip/header",
   107          "//pkg/tcpip/seqnum",
   108          "//pkg/tcpip/transport/tcp",
   109      ],
   110  )
   111  
   112  go_test(
   113      name = "tcp_timestamp_test",
   114      size = "small",
   115      srcs = ["tcp_timestamp_test.go"],
   116      deps = [
   117          ":e2e",
   118          "//pkg/refs",
   119          "//pkg/tcpip",
   120          "//pkg/tcpip/checker",
   121          "//pkg/tcpip/header",
   122          "//pkg/tcpip/transport/tcp",
   123          "//pkg/tcpip/transport/tcp/testing/context",
   124          "//pkg/waiter",
   125          "@com_github_google_go_cmp//cmp:go_default_library",
   126      ],
   127  )
   128  
   129  go_test(
   130      name = "tcp_rack_test",
   131      size = "small",
   132      srcs = ["tcp_rack_test.go"],
   133      deps = [
   134          ":e2e",
   135          "//pkg/buffer",
   136          "//pkg/refs",
   137          "//pkg/tcpip",
   138          "//pkg/tcpip/header",
   139          "//pkg/tcpip/seqnum",
   140          "//pkg/tcpip/stack",
   141          "//pkg/tcpip/transport/tcp/testing/context",
   142          "//pkg/test/testutil",
   143      ],
   144  )
   145  
   146  go_test(
   147      name = "tcp_sack_test",
   148      size = "small",
   149      srcs = ["tcp_sack_test.go"],
   150      deps = [
   151          ":e2e",
   152          "//pkg/buffer",
   153          "//pkg/refs",
   154          "//pkg/tcpip",
   155          "//pkg/tcpip/checker",
   156          "//pkg/tcpip/header",
   157          "//pkg/tcpip/seqnum",
   158          "//pkg/tcpip/stack",
   159          "//pkg/tcpip/transport/tcp",
   160          "//pkg/tcpip/transport/tcp/testing/context",
   161          "//pkg/test/testutil",
   162      ],
   163  )
   164  
   165  go_test(
   166      name = "tcp_noracedetector_test",
   167      size = "small",
   168      srcs = ["tcp_noracedetector_test.go"],
   169      # These tests can be extremely slow/flaky when run under gotsan,
   170      # so exclude them from gotsan runs.
   171      tags = ["nogotsan"],
   172      deps = [
   173          ":e2e",
   174          "//pkg/refs",
   175          "//pkg/tcpip",
   176          "//pkg/tcpip/header",
   177          "//pkg/tcpip/transport/tcp",
   178          "//pkg/tcpip/transport/tcp/testing/context",
   179          "//pkg/test/testutil",
   180      ],
   181  )