Exemplo n.º 1
0
Arquivo: access01.c Projeto: kraj/ltp
static void access_test(struct tcase *tc, const char *user)
{
	TEST(access(tc->fname, tc->mode));

	if (tc->exp_errno)
		verify_failure(tc, user);
	else
		verify_success(tc, user);
}
Exemplo n.º 2
0
static void test_umount2(int i)
{
	/* a new access removes the expired mark of the mount point */
	if (test_cases[i].do_access) {
		if (access(MNTPOINT, F_OK) == -1)
			tst_brkm(TBROK | TERRNO, cleanup, "access(2) failed");
	}

	TEST(umount2(MNTPOINT, test_cases[i].flag));

	if (test_cases[i].exp_errno != 0)
		verify_failure(i);
	else
		verify_success(i);
}
Exemplo n.º 3
0
static void test_umount2(int i)
{
	SAFE_MOUNT(cleanup, device, MNTPOINT, fs_type, 0, NULL);
	mount_flag = 1;

	TEST(umount2_retry(test_cases[i].mntpoint, UMOUNT_NOFOLLOW));

	if (test_cases[i].exp_errno != 0)
		verify_failure(i);
	else
		verify_success(i);

	if (mount_flag) {
		if (tst_umount(MNTPOINT))
			tst_brkm(TBROK, cleanup, "umount() failed");
		mount_flag = 0;
	}
}