Skip to content

Commit 74bef17

Browse files
committed
tests: Do not generate pcap file by default
1 parent 1ac2d8e commit 74bef17

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

tests/torture.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -815,6 +815,7 @@ void torture_setup_socket_dir(void **state)
815815
struct torture_state *s;
816816
const char *p;
817817
size_t len;
818+
char *env = getenv("TORTURE_GENERATE_PCAP");
818819

819820
s = malloc(sizeof(struct torture_state));
820821
assert_non_null(s);
@@ -851,7 +852,9 @@ void torture_setup_socket_dir(void **state)
851852

852853
setenv("SOCKET_WRAPPER_DIR", p, 1);
853854
setenv("SOCKET_WRAPPER_DEFAULT_IFACE", "170", 1);
854-
setenv("SOCKET_WRAPPER_PCAP_FILE", s->pcap_file, 1);
855+
if (env != NULL && env[0] == '1') {
856+
setenv("SOCKET_WRAPPER_PCAP_FILE", s->pcap_file, 1);
857+
}
855858

856859
*state = s;
857860
}

0 commit comments

Comments
 (0)