search for: nbd_get_socket_activation_nam

Displaying 1 result from an estimated 1 matches for "nbd_get_socket_activation_nam".

2023 May 07
2
[PATCH libnbd] tests: Add a test of nbd_{set, get}_socket_activation_name
...ue 2>&1 | " + "grep -sq 'debug.*libnbd_sentinel=42'"); + + nbd = nbd_create (); + if (nbd == NULL) { + fprintf (stderr, "%s\n", nbd_get_error ()); + exit (EXIT_FAILURE); + } + + /* Check firstly that it defaults to empty string. */ + r = nbd_get_socket_activation_name (nbd); + assert (r != NULL); + assert (strcmp (r, "") == 0); + free (r); + + /* Check we can set it to something and read that back. */ + assert (nbd_set_socket_activation_name (nbd, "hello") == 0); + r = nbd_get_socket_activation_name (nbd); + assert (r != NULL); + ass...