Skip to content

Commit

Permalink
[libnozzle] improve set_down test
Browse files Browse the repository at this point in the history
Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
  • Loading branch information
fabbione committed Dec 18, 2018
1 parent 521d255 commit 4cb5a2e
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions libnozzle/tests/api_nozzle_set_down.c
Expand Up @@ -94,6 +94,13 @@ static int test(void)
goto out_clean;
}

printf("Try to DOWN the same interface twice\n");
if (nozzle_set_down(nozzle) < 0) {
printf("Interface was already DOWN, spurious error received from nozzle_set_down\n");
err = -1;
goto out_clean;
}

printf("Pass NULL to nozzle set_down\n");
errno = 0;
if ((nozzle_set_down(NULL) >= 0) || (errno != EINVAL)) {
Expand Down

0 comments on commit 4cb5a2e

Please sign in to comment.