mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-02-28 19:10:31 +01:00
platform/tests: check errno on failure to umount() in test_netns_bind_to_path()
The umount() call failed in a test. Rework the assertion, so we might see the errno of the problem. (cherry picked from commit1a0fa85397) (cherry picked from commitc66ae93415) (cherry picked from commitedf23f434e) (cherry picked from commit01134c6fe8) (cherry picked from commit526f701bcc)
This commit is contained in:
parent
2f3c9bae72
commit
68eda515cb
1 changed files with 10 additions and 3 deletions
|
|
@ -3207,9 +3207,11 @@ test_netns_bind_to_path(gpointer fixture, gconstpointer test_data)
|
|||
gs_unref_object NMPlatform *platform_1 = NULL;
|
||||
gs_unref_object NMPlatform *platform_2 = NULL;
|
||||
nm_auto_pop_netns NMPNetns *netns_pop = NULL;
|
||||
NMPlatform * platforms[3];
|
||||
NMPNetns * netns;
|
||||
NMPlatform *platforms[3];
|
||||
NMPNetns *netns;
|
||||
int errsv;
|
||||
int i;
|
||||
int r;
|
||||
|
||||
if (_test_netns_check_skip())
|
||||
return;
|
||||
|
|
@ -3252,7 +3254,12 @@ test_netns_bind_to_path(gpointer fixture, gconstpointer test_data)
|
|||
!=,
|
||||
0);
|
||||
|
||||
g_assert_cmpint(umount(P_VAR_RUN), ==, 0);
|
||||
r = umount(P_VAR_RUN);
|
||||
if (r != 0) {
|
||||
errsv = errno;
|
||||
g_assert_cmpint(errsv, ==, 0);
|
||||
g_assert_cmpint(r, ==, 0);
|
||||
}
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue