#include #include #include #include #include #include static void _ft_sysstat_stat_switch(ft_test *t) { struct stat st; int rc; DO_E(rc, stat("@MainMem", &st), t, "%d"); ft_assert(t, rc == 0 && S_ISDIR(st.st_mode)); #ifdef FX9860G DO_E(rc, stat("FxLibcT.g1a", &st), t, "%d"); #else DO_E(rc, stat("FxLibcT.g3a", &st), t, "%d"); #endif ft_assert(t, rc == 0 && S_ISREG(st.st_mode)); } static void _ft_sysstat_stat(ft_test *t) { gint_world_switch(GINT_CALL(_ft_sysstat_stat_switch, (void *)t)); } ft_test ft_sysstat_stat = { .name = "stat() function", .function = _ft_sysstat_stat, };