[igt-dev] [PATCH i-g-t 1/3] lib/aux: Use igt_assert_eq() in igt_drop_root()

Lyude lyude at redhat.com
Wed May 8 20:15:10 UTC 2019


From: Lyude Paul <lyude at redhat.com>

Signed-off-by: Lyude Paul <lyude at redhat.com>
---
 lib/igt_aux.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/lib/igt_aux.c b/lib/igt_aux.c
index 1a70edcc..caed1fed 100644
--- a/lib/igt_aux.c
+++ b/lib/igt_aux.c
@@ -957,13 +957,13 @@ int igt_get_autoresume_delay(enum igt_suspend_state state)
  */
 void igt_drop_root(void)
 {
-	igt_assert(getuid() == 0);
+	igt_assert_eq(getuid(), 0);
 
-	igt_assert(setgid(2) == 0);
-	igt_assert(setuid(2) == 0);
+	igt_assert_eq(setgid(2), 0);
+	igt_assert_eq(setuid(2), 0);
 
-	igt_assert(getgid() == 2);
-	igt_assert(getuid() == 2);
+	igt_assert_eq(getgid(), 2);
+	igt_assert_eq(getuid(), 2);
 }
 
 /**
-- 
2.20.1



More information about the igt-dev mailing list