public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
* [LTP]  [PATCH] Unmap the mapped address region
@ 2013-05-27  6:29 shuang.qiu
  2013-05-27  7:17 ` Jan Stancek
  2013-05-27  7:22 ` Wanlong Gao
  0 siblings, 2 replies; 3+ messages in thread
From: shuang.qiu @ 2013-05-27  6:29 UTC (permalink / raw)
  To: ltp-list

From: Shuang Qiu <shuang.qiu@oracle.com>

It does not unmap the mapped address region,so we sometimes still get
such
warning when cleanup with nfs as TMPDIR although the file descriptor is
closed:
0  TWARN  :  tst_rmdir: rmobj(/mnt/nfsv3/ltp-MOeIFH7102/vma4FwRqb)
failed:
unlink(/mnt/nfsv3/ltp-MOeIFH7102/vma4FwRqb/.nfs000000000110cb3600000001)
failed; errno=16: Device or resource busy

Signed-off-by: Shuang Qiu <shuang.qiu@oracle.com>
---
 testcases/kernel/mem/vma/vma03.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/testcases/kernel/mem/vma/vma03.c b/testcases/kernel/mem/vma/vma03.c
index 54f605a..6af9960 100644
--- a/testcases/kernel/mem/vma/vma03.c
+++ b/testcases/kernel/mem/vma/vma03.c
@@ -101,8 +101,10 @@ int main(int argc, char *argv[])
 				tst_resm(TPASS, "mremap failed as expected.");
 			else
 				tst_resm(TFAIL | TERRNO, "mremap");
+			munmap(map, pgsz);
 		} else {
 			tst_resm(TFAIL, "mremap succeeded unexpectedly.");
+			munmap(remap, 2 * pgsz);
 		}
 
 		close(fd);
-- 
1.7.7


------------------------------------------------------------------------------
Try New Relic Now & We'll Send You this Cool Shirt
New Relic is the only SaaS-based application performance monitoring service 
that delivers powerful full stack analytics. Optimize and monitor your
browser, app, & servers with just a few lines of code. Try New Relic
and get this awesome Nerd Life shirt! http://p.sf.net/sfu/newrelic_d2d_may
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [LTP] [PATCH] Unmap the mapped address region
  2013-05-27  6:29 [LTP] [PATCH] Unmap the mapped address region shuang.qiu
@ 2013-05-27  7:17 ` Jan Stancek
  2013-05-27  7:22 ` Wanlong Gao
  1 sibling, 0 replies; 3+ messages in thread
From: Jan Stancek @ 2013-05-27  7:17 UTC (permalink / raw)
  To: shuang qiu; +Cc: ltp-list





----- Original Message -----
> From: "shuang qiu" <shuang.qiu@oracle.com>
> To: ltp-list@lists.sourceforge.net
> Sent: Monday, 27 May, 2013 8:29:42 AM
> Subject: [LTP]  [PATCH] Unmap the mapped address region
> 
> From: Shuang Qiu <shuang.qiu@oracle.com>
> 
> It does not unmap the mapped address region,so we sometimes still get
> such
> warning when cleanup with nfs as TMPDIR although the file descriptor is
> closed:
> 0  TWARN  :  tst_rmdir: rmobj(/mnt/nfsv3/ltp-MOeIFH7102/vma4FwRqb)
> failed:
> unlink(/mnt/nfsv3/ltp-MOeIFH7102/vma4FwRqb/.nfs000000000110cb3600000001)
> failed; errno=16: Device or resource busy
> 
> Signed-off-by: Shuang Qiu <shuang.qiu@oracle.com>

Looks good to me. Useful also when test loops.

Reviewed-by: Jan Stancek <jstancek@redhat.com>

> ---
>  testcases/kernel/mem/vma/vma03.c |    2 ++
>  1 files changed, 2 insertions(+), 0 deletions(-)
> 
> diff --git a/testcases/kernel/mem/vma/vma03.c
> b/testcases/kernel/mem/vma/vma03.c
> index 54f605a..6af9960 100644
> --- a/testcases/kernel/mem/vma/vma03.c
> +++ b/testcases/kernel/mem/vma/vma03.c
> @@ -101,8 +101,10 @@ int main(int argc, char *argv[])
>  				tst_resm(TPASS, "mremap failed as expected.");
>  			else
>  				tst_resm(TFAIL | TERRNO, "mremap");
> +			munmap(map, pgsz);
>  		} else {
>  			tst_resm(TFAIL, "mremap succeeded unexpectedly.");
> +			munmap(remap, 2 * pgsz);
>  		}
>  
>  		close(fd);
> --
> 1.7.7
> 
> 
> ------------------------------------------------------------------------------
> Try New Relic Now & We'll Send You this Cool Shirt
> New Relic is the only SaaS-based application performance monitoring service
> that delivers powerful full stack analytics. Optimize and monitor your
> browser, app, & servers with just a few lines of code. Try New Relic
> and get this awesome Nerd Life shirt! http://p.sf.net/sfu/newrelic_d2d_may
> _______________________________________________
> Ltp-list mailing list
> Ltp-list@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/ltp-list
> 

------------------------------------------------------------------------------
Try New Relic Now & We'll Send You this Cool Shirt
New Relic is the only SaaS-based application performance monitoring service 
that delivers powerful full stack analytics. Optimize and monitor your
browser, app, & servers with just a few lines of code. Try New Relic
and get this awesome Nerd Life shirt! http://p.sf.net/sfu/newrelic_d2d_may
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [LTP] [PATCH] Unmap the mapped address region
  2013-05-27  6:29 [LTP] [PATCH] Unmap the mapped address region shuang.qiu
  2013-05-27  7:17 ` Jan Stancek
@ 2013-05-27  7:22 ` Wanlong Gao
  1 sibling, 0 replies; 3+ messages in thread
From: Wanlong Gao @ 2013-05-27  7:22 UTC (permalink / raw)
  To: shuang.qiu; +Cc: ltp-list

On 05/27/2013 02:29 PM, shuang.qiu@oracle.com wrote:
> From: Shuang Qiu <shuang.qiu@oracle.com>
> 
> It does not unmap the mapped address region,so we sometimes still get
> such
> warning when cleanup with nfs as TMPDIR although the file descriptor is
> closed:
> 0  TWARN  :  tst_rmdir: rmobj(/mnt/nfsv3/ltp-MOeIFH7102/vma4FwRqb)
> failed:
> unlink(/mnt/nfsv3/ltp-MOeIFH7102/vma4FwRqb/.nfs000000000110cb3600000001)
> failed; errno=16: Device or resource busy
> 
> Signed-off-by: Shuang Qiu <shuang.qiu@oracle.com>

Applied, thank you.

Wanlong Gao


------------------------------------------------------------------------------
Try New Relic Now & We'll Send You this Cool Shirt
New Relic is the only SaaS-based application performance monitoring service 
that delivers powerful full stack analytics. Optimize and monitor your
browser, app, & servers with just a few lines of code. Try New Relic
and get this awesome Nerd Life shirt! http://p.sf.net/sfu/newrelic_d2d_may
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2013-05-27  7:23 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-05-27  6:29 [LTP] [PATCH] Unmap the mapped address region shuang.qiu
2013-05-27  7:17 ` Jan Stancek
2013-05-27  7:22 ` Wanlong Gao

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox