Fix failure of the utimes01 test
PATCH 1/1 Fix failure of the utimes01 test
This patch also fixed the path which we pass to setup_file(). If progdir is not a absolute pathname of the working directory, the file open will fail.
Signed-off-by WangYong <[email protected]>
testcases/kernel/syscalls/utimes/utimes01.c +1 -4
@@ -138,7 +138,6 @@ void setup() {*/ static int opt_debug;static char *progname; -static char *progdir;enum test_type {NORMAL ,
@@ -232,7 +231,7 @@ static int do_test(struct test_case *tc)struct stat st;uid_t old_uid; -TEST (rc =setup_file (progdir,"test.file" , fpath)); +TEST (rc =setup_file (TESTDIR ,"test.file" , fpath));if (rc <0 )return 1 ;
@@ -339,8 +338,6 @@ int main(int ac, char **av) { progname =strchr (av[0 ],'/' ); progname = progname ? progname +1 : av[0 ]; - progdir =strdup (av[0 ]); - progdir =dirname (progdir);/* parse standard options */ if ((msg =parse_opts (ac, av, (option_t *)NULL ,NULL )) != (char *)NULL ){
------------------------------------------------------------------------------
Enter the BlackBerry Developer Challenge
This is your chance to win up to $100,000 in prizes! For a limited time, vendors submitting new applications to BlackBerry App World(TM) will have the opportunity to enter the BlackBerry Developer Challenge. See full prize details at: http://p.sf.net/sfu/Challenge
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list