public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
From: Subrata Modak <subrata@linux.vnet.ibm.com>
To: Henry Yei <hyei@mvista.com>
Cc: jpalecek@web.de, LTP Mailing List <ltp-list@lists.sourceforge.net>
Subject: Re: [LTP] [PATCH][openfile] file descriptors not cleaned up
Date: Tue, 13 Oct 2009 20:13:37 +0530	[thread overview]
Message-ID: <1255445017.8438.66.camel@subratamodak.linux.ibm.com> (raw)
In-Reply-To: <8368651DACC1964480F951191B94A0780153CC19@svexch01.mvista.com>

On Mon, 2009-10-05 at 14:33 -0700, Henry Yei wrote: 
> On Wednesday 04, October 2009 04:06:46 Jiri Palecek wrote:
> 
> Hello,
> 
> On Wednesday 30 September 2009 04:06:46 Henry Yei wrote:
> > This patch for openfile contains the following changes:
> > - test output to use tst_resm functions
> > - sets ups and cleans up tmp dir properly
> > - closes all opened file descriptors before thread exit(fixes nfs issues on removing tmp dir)
> > 
> > Signed-off-by: Henry Yei <hyei@mvista.com>
> > 
> > 
> > This test opens multiple file descriptors to the same file. Perhaps the author meant to open file handles for separate files?
> 
> This is suspicious, for me too. But maybe there is some logic behind opening the same file many times.
> 
> I just have a small remark about your patch: Shouldn't you call close_files() here, too? (With a partially full fd_list array handled, of course)
> 
> +void * threads(void* thread_id_) {
> +	int thread_id = (uintptr_t) thread_id_;
> +	char errmsg[80];
> +	FILE *fd_list[MAXFILES];
> +	int i;
> +
> +	/* Open files */
> +	for (i = 0; i < numfiles; i++) {
> +		if (debug)
> +			printf("Thread  %d : Opening file number %d \n", thread_id, i);
> +		if ((fd_list[i] = fopen(filename, "rw")) == NULL) {
> +			sprintf(errmsg, "FAIL - Couldn't open file #%d", i);
> +			perror(errmsg);
> 
> 
> 
> Jiri, 
> 
> Thanks for reviewing the patch. Yes, that was an omission on my part. I have attached an updated patch. Let me know if there are any more comments.
> 

Henry,

This patch is ineffective on the present Makefile(s). Please rebase them
over latest CVS and resend:

patching file testcases/kernel/fs/openfile/Makefile
Hunk #1 FAILED at 1.
1 out of 1 hunk FAILED -- saving rejects to file
testcases/kernel/fs/openfile/Makefile.rej
patching file testcases/kernel/fs/openfile/openfile.c

Regards--
Subrata

> 
> 
> Henry Yei
> 
> 
> 
> ------------------------------------------------------------------------------
> Come build with us! The BlackBerry&reg; Developer Conference in SF, CA
> is the only developer event you need to attend this year. Jumpstart your
> developing skills, take BlackBerry mobile applications to market and stay 
> ahead of the curve. Join us from November 9&#45;12, 2009. Register now&#33;
> http://p.sf.net/sfu/devconf
> _______________________________________________ Ltp-list mailing list Ltp-list@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/ltp-list


------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

  reply	other threads:[~2009-10-13 14:44 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-09-30  2:06 [LTP] [PATCH][openfile] file descriptors not cleaned up Henry Yei
2009-10-04 22:18 ` Jiri Palecek
2009-10-05  2:51   ` [LTP] GPL License in CrackerJack hisashi.hashimoto.wh
2009-10-13 14:43     ` Subrata Modak
2009-10-05 21:33   ` [LTP] [PATCH][openfile] file descriptors not cleaned up Henry Yei
2009-10-13 14:43     ` Subrata Modak [this message]
2009-10-13 19:20       ` Garrett Cooper
2009-10-13 19:21         ` Garrett Cooper
2009-10-14  2:25           ` Henry Yei
2009-10-14  2:30             ` Garrett Cooper
     [not found]               ` <8368651DACC1964480F951191B94A0780153D6A2@svexch01.mvista.com>
2009-10-15 22:03                 ` [LTP] autoconf files Garrett Cooper
2009-10-14 20:28             ` [LTP] [PATCH][openfile] file descriptors not cleaned up Subrata Modak

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=1255445017.8438.66.camel@subratamodak.linux.ibm.com \
    --to=subrata@linux.vnet.ibm.com \
    --cc=hyei@mvista.com \
    --cc=jpalecek@web.de \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox