All of lore.kernel.org
 help / color / mirror / Atom feed
From: Wang Yong <wangyong2009@cn.fujitsu.com>
To: LTP <ltp-list@lists.sourceforge.net>
Subject: [LTP]  [PATCH] Fix failure of the utimes01 test
Date: Tue, 21 Jul 2009 10:55:56 +0800	[thread overview]
Message-ID: <4A652E3C.20402@cn.fujitsu.com> (raw)

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.

This patch fixed the problem.

Signed-off-by: WangYong <wangyong2009@cn.fujitsu.com>

diff -Nurp a/testcases/kernel/syscalls/utimes/utimes01.c b/testcases/kernel/syscalls/utimes/utimes01.c
--- a/testcases/kernel/syscalls/utimes/utimes01.c	2009-07-21 08:51:05.000000000 +0800
+++ b/testcases/kernel/syscalls/utimes/utimes01.c	2009-07-21 08:55:01.000000000 +0800
@@ -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
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

             reply	other threads:[~2009-07-21  2:55 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-21  2:55 Wang Yong [this message]
2009-07-21  4:24 ` [LTP] [PATCH] Fix failure of the utimes01 test Garrett Cooper
2009-07-21  6:16   ` Wang Yong
  -- strict thread matches above, loose matches on Subject: below --
2009-07-21  2:25 Wang Yong
2009-07-20  7:41 naresh kamboju
2009-07-09  7:35 Wang Yong
2009-07-10 10:46 ` Subrata Modak
2009-07-16  1:03   ` Wang Yong
2009-07-19  4:53     ` Garrett Cooper
2009-07-19  4:54       ` Garrett Cooper

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4A652E3C.20402@cn.fujitsu.com \
    --to=wangyong2009@cn.fujitsu.com \
    --cc=ltp-list@lists.sourceforge.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.