1// SPDX-License-Identifier: GPL-2.0-or-later
2/*
3 * Copyright (c) Linux Test Project, 2001-2022
4 * Copyright (c) 2000 Silicon Graphics, Inc.  All Rights Reserved.
5 */
6
7/*\
8 * [Description]
9 *
10 * Testcase to check open() with O_RDWR | O_CREAT.
11 */
12
13#include "tst_test.h"
14
15#define TEST_FILE "testfile"
16
17static void verify_open(void)
18{
19	TST_EXP_FD(open(TEST_FILE, O_RDWR | O_CREAT, 0700));
20	SAFE_CLOSE(TST_RET);
21	SAFE_UNLINK(TEST_FILE);
22}
23
24
25
26static struct tst_test test = {
27	.needs_tmpdir = 1,
28	.test_all = verify_open,
29};
30