1
0
mirror of https://git.libssh.org/projects/libssh.git synced 2025-07-31 00:03:07 +03:00

tests: Use /tmp for tmpdirs that contain sockets

Socket paths have a length limit, and depending on the working directory of the
source code, these tests occasionally fail if the path is too long. Avoid this
by using a template string that is absolute and in /tmp, which should avoid the
socket path length issues.

This fixes building libssh with pkcs11 provider support in 'fedpkg mockbuild'.

Signed-off-by: Clemens Lang <cllang@redhat.com>
Reviewed-by: Jakub Jelen <jjelen@redhat.com>
This commit is contained in:
Clemens Lang
2024-01-19 11:37:40 +00:00
committed by Jakub Jelen
parent 1176a71d61
commit 2c918aad67
3 changed files with 3 additions and 3 deletions

View File

@ -40,7 +40,7 @@
#define LIBSSH_ECDSA_384_TESTKEY "id_pkcs11_ecdsa_384" #define LIBSSH_ECDSA_384_TESTKEY "id_pkcs11_ecdsa_384"
#define LIBSSH_ECDSA_521_TESTKEY "id_pkcs11_ecdsa_521" #define LIBSSH_ECDSA_521_TESTKEY "id_pkcs11_ecdsa_521"
const char template[] = "temp_dir_XXXXXX"; const char template[] = "/tmp/temp_dir_XXXXXX";
struct pki_st { struct pki_st {
char *temp_dir; char *temp_dir;

View File

@ -27,7 +27,7 @@
#define PUB_URI_FMT_384_INVALID_TOKEN "pkcs11:token=ecdsa521;object=ecdsa384;type=public" #define PUB_URI_FMT_384_INVALID_TOKEN "pkcs11:token=ecdsa521;object=ecdsa384;type=public"
#define PUB_URI_FMT_521_INVALID_OBJECT "pkcs11:token=ecdsa521;object=ecdsa384;type=public" #define PUB_URI_FMT_521_INVALID_OBJECT "pkcs11:token=ecdsa521;object=ecdsa384;type=public"
const char template[] = "temp_dir_XXXXXX"; const char template[] = "/tmp/temp_dir_XXXXXX";
const unsigned char INPUT[] = "1234567890123456789012345678901234567890" const unsigned char INPUT[] = "1234567890123456789012345678901234567890"
"123456789012345678901234"; "123456789012345678901234";
struct pki_st { struct pki_st {

View File

@ -16,7 +16,7 @@
#define PUB_URI_FMT "pkcs11:token=%s;object=%s;type=public" #define PUB_URI_FMT "pkcs11:token=%s;object=%s;type=public"
#define PRIV_URI_FMT "pkcs11:token=%s;object=%s;type=private?pin-value=%s" #define PRIV_URI_FMT "pkcs11:token=%s;object=%s;type=private?pin-value=%s"
const char template[] = "temp_dir_XXXXXX"; const char template[] = "/tmp/temp_dir_XXXXXX";
const unsigned char INPUT[] = "1234567890123456789012345678901234567890" const unsigned char INPUT[] = "1234567890123456789012345678901234567890"
"123456789012345678901234"; "123456789012345678901234";
struct pki_st { struct pki_st {