* Delete some useless commtents. * Some cleanup.
Signed-off-by: Zeng Linggang <[email protected]> --- testcases/kernel/syscalls/statvfs/statvfs01.c | 49 +++++++-------------------- 1 file changed, 12 insertions(+), 37 deletions(-) diff --git a/testcases/kernel/syscalls/statvfs/statvfs01.c b/testcases/kernel/syscalls/statvfs/statvfs01.c index 306ca00..0ea882a 100644 --- a/testcases/kernel/syscalls/statvfs/statvfs01.c +++ b/testcases/kernel/syscalls/statvfs/statvfs01.c @@ -1,5 +1,6 @@ /* * Copyright (c) Wipro Technologies Ltd, 2005. All Rights Reserved. + * AUTHOR: Prashant P Yendigeri <[email protected]> * * This program is free software; you can redistribute it and/or modify it * under the terms of version 2 of the GNU General Public License as @@ -14,25 +15,12 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * */ -/********************************************************** - * - * TEST IDENTIFIER : statvfs01 - * - * EXECUTED BY : root / superuser - * - * TEST TITLE : Basic tests for statvfs(2) - * - * TEST CASE TOTAL : 1 - * - * AUTHOR : Prashant P Yendigeri - * <[email protected]> - * +/* * DESCRIPTION * This is a Phase I test for the statvfs(2) system call. * It is intended to provide a limited exposure of the system call. * This call behaves similar to statfs. - * - **********************************************************/ + */ #include <stdio.h> #include <unistd.h> @@ -43,15 +31,15 @@ #include "test.h" #include "usctest.h" -#define TEST_PATH "/" /* Should be a mounted FS */ +#define TEST_PATH "/" -void setup(); -void cleanup(); +static void setup(void); +static void cleanup(void); char *TCID = "statvfs01"; int TST_TOTAL = 1; -int exp_enos[] = { 0 }; /* must be a 0 terminated list */ +int exp_enos[] = { 0 }; int main(int ac, char **av) { @@ -64,7 +52,6 @@ int main(int ac, char **av) setup(); - /* set the expected errnos... */ TEST_EXP_ENOS(exp_enos); for (lc = 0; TEST_LOOPING(lc); lc++) { @@ -73,11 +60,12 @@ int main(int ac, char **av) TEST(statvfs(TEST_PATH, &buf)); - if (TEST_RETURN == -1) + if (TEST_RETURN == -1) { tst_resm(TFAIL | TERRNO, "statvfs(%s, ...) failed", TEST_PATH); - else + } else { tst_resm(TPASS, "statvfs(%s, ...) passed", TEST_PATH); + } } @@ -96,30 +84,17 @@ int main(int ac, char **av) tst_resm(TINFO, "file system max filename length = %lu", buf.f_namemax); cleanup(); - tst_exit(); } -/*************************************************************** - * setup() - performs all ONE TIME setup for this test. - ***************************************************************/ -void setup(void) +static void setup(void) { - tst_sig(NOFORK, DEF_HANDLER, cleanup); TEST_PAUSE; } -/*************************************************************** - * cleanup() - performs all ONE TIME cleanup for this test at - * completion or premature exit. - ***************************************************************/ -void cleanup(void) +static void cleanup(void) { - /* - * print timing stats if that option was specified. - * print errno log if that option was specified. - */ TEST_CLEANUP; } -- 1.8.4.2 ------------------------------------------------------------------------------ Time is money. Stop wasting it! Get your web API in 5 minutes. www.restlet.com/download http://p.sf.net/sfu/restlet _______________________________________________ Ltp-list mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/ltp-list
