mirror of
https://git.libssh.org/projects/libssh.git
synced 2026-02-06 18:29:50 +09:00
tests: Use torture_make_temp_dir() in torture_setup_socket_dir()
Signed-off-by: Anderson Toshiyuki Sasaki <ansasaki@redhat.com> Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
This commit is contained in:
committed by
Andreas Schneider
parent
65e16b8d9e
commit
31527d4105
@@ -500,11 +500,10 @@ void torture_setup_socket_dir(void **state)
|
||||
s = malloc(sizeof(struct torture_state));
|
||||
assert_non_null(s);
|
||||
|
||||
s->socket_dir = strdup(TORTURE_SOCKET_DIR);
|
||||
s->socket_dir = torture_make_temp_dir(TORTURE_SOCKET_DIR);
|
||||
assert_non_null(s->socket_dir);
|
||||
|
||||
p = mkdtemp(s->socket_dir);
|
||||
assert_non_null(p);
|
||||
p = s->socket_dir;
|
||||
|
||||
/* pcap file */
|
||||
len = strlen(p) + 1 + strlen(TORTURE_PCAP_FILE) + 1;
|
||||
|
||||
Reference in New Issue
Block a user