[LTP] [COMMITTED] [PATCH 07/23] syscalls/dup3_01: Small cleanup
Cyril Hrubis
chrubis@suse.cz
Tue Feb 28 12:11:29 CET 2017
* Get rid of useless comments
* Make use of tst_parse_opts()
Signed-off-by: Cyril Hrubis <chrubis@suse.cz>
---
testcases/kernel/syscalls/dup3/dup3_01.c | 40 ++------------------------------
1 file changed, 2 insertions(+), 38 deletions(-)
diff --git a/testcases/kernel/syscalls/dup3/dup3_01.c b/testcases/kernel/syscalls/dup3/dup3_01.c
index 2472fb2..be3f4d8 100644
--- a/testcases/kernel/syscalls/dup3/dup3_01.c
+++ b/testcases/kernel/syscalls/dup3/dup3_01.c
@@ -65,51 +65,13 @@
char *TCID = "dup3_01";
int TST_TOTAL = 1;
-/* Extern Global Functions */
-/******************************************************************************/
-/* */
-/* Function: cleanup */
-/* */
-/* Description: Performs all one time clean up for this test on successful */
-/* completion, premature exit or failure. Closes all temporary */
-/* files, removes all temporary directories exits the test with */
-/* appropriate return code by calling tst_exit() function. */
-/* */
-/* Input: None. */
-/* */
-/* Output: None. */
-/* */
-/* Return: On failure - Exits calling tst_exit(). Non '0' return code. */
-/* On success - Exits calling tst_exit(). With '0' return code. */
-/* */
-/******************************************************************************/
void cleanup(void)
{
tst_rmdir();
}
-/* Local Functions */
-/******************************************************************************/
-/* */
-/* Function: setup */
-/* */
-/* Description: Performs all one time setup for this test. This function is */
-/* typically used to capture signals, create temporary dirs */
-/* and temporary files that may be used in the course of this */
-/* test. */
-/* */
-/* Input: None. */
-/* */
-/* Output: None. */
-/* */
-/* Return: On failure - Exits by calling cleanup(). */
-/* On success - returns 0. */
-/* */
-/******************************************************************************/
void setup(void)
{
- /* Capture signals if any */
- /* Create temporary directories */
TEST_PAUSE;
tst_tmpdir();
}
@@ -118,6 +80,8 @@ int main(int argc, char *argv[])
{
int fd, coe;
+ tst_parse_opts(argc, argv, NULL, NULL);
+
if ((tst_kvercmp(2, 6, 27)) < 0)
tst_brkm(TCONF, NULL,
"This test can only run on kernels that are 2.6.27 and higher");
--
2.10.2
More information about the ltp
mailing list