libtests/shell01:add test empty and NULL usernames check

This commit is contained in:
shuhua hua
2024-09-12 02:36:13 +00:00
committed by Kinsey Moore
parent bcd4b83e16
commit c4f9759068

View File

@@ -239,6 +239,12 @@ static void test(void)
ok = rtems_shell_login_check("invchroot", NULL);
rtems_test_assert(!ok);
ok = rtems_shell_login_check("", NULL);
rtems_test_assert(!ok);
ok = rtems_shell_login_check(NULL, NULL);
rtems_test_assert(ok);
rtems_test_assert(getuid() == 0);
rtems_test_assert(geteuid() == 0);
rtems_test_assert(getgid() == 0);