All of lore.kernel.org
 help / color / mirror / Atom feed
From: Wanlong Gao <gaowanlong@cn.fujitsu.com>
To: Om Prakash PAL <omprakash.pal@stericsson.com>
Cc: "ltp-list@lists.sourceforge.net" <ltp-list@lists.sourceforge.net>
Subject: Re: [LTP] Regarding shmat01 syscall test
Date: Tue, 23 Oct 2012 17:37:18 +0800	[thread overview]
Message-ID: <5086654E.1010303@cn.fujitsu.com> (raw)
In-Reply-To: <3ED83A9DB3B6D94CA68BF7C03F2981D35D01C266B4@EXDCVYMBSTM006.EQ1STM.local>

On 10/23/2012 05:24 PM, Om Prakash PAL wrote:
> Hi,
> 
> I am working on syscall test:  shmat01.c
> 
> I have some confusion:
> 
>  
> 
> In setup() : it is  allocating shared memory by shmget() and then attaching by shmat() and after  that detaching the attached address (i.e. shmdt())   
> 
>  
> 
>         if (shmdt((const void *)base_addr) == -1) {
> 
>                 tst_brkm(TBROK, cleanup, "Couldn't detach shared memory");
> 
>         }
> 
>  
> 
> And again in main function it is using same “base_addr” as attaching address,
> 
>  
> 
> addr = shmat(*(TC[i].shmid), base_addr+TC[i].offset,
> 
>                                      TC[i].flags);
> 
> how can we ensure(100%) that base_addr (virtual) will be free till this point for attaching?.

Maybe we can't, but I didn't see any fail on this. Did you see any testing failure here?

Thanks,
Wanlong Gao

> 
> there is possibility that this address(base_addr) will be used, so in that case this shmat() will fail.
> 
> Please correct me if I am wrong.
> 
> Thanks in advance.
> 
>  
> 
> Best Regards,
> 
> Om Prakash Pal   
> 
> 
> 
> ------------------------------------------------------------------------------
> Everyone hates slow websites. So do we.
> Make your web apps faster with AppDynamics
> Download AppDynamics Lite for free today:
> http://p.sf.net/sfu/appdyn_sfd2d_oct
> 
> 
> 
> _______________________________________________
> Ltp-list mailing list
> Ltp-list@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/ltp-list
> 


------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_sfd2d_oct
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

  reply	other threads:[~2012-10-23 10:00 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-23  9:24 [LTP] Regarding shmat01 syscall test Om Prakash PAL
2012-10-23  9:37 ` Wanlong Gao [this message]
2012-10-23 10:05   ` Om Prakash PAL
2012-10-24  0:45     ` Wanlong Gao
2012-10-24  6:43       ` Jan Stancek
2012-10-24  7:03         ` Wanlong Gao
2012-10-24  7:49           ` Jan Stancek
2012-10-24  7:51             ` Wanlong Gao
2012-10-24  8:20               ` Jan Stancek
2012-10-26  1:45                 ` Wanlong Gao
2012-10-26  8:01                   ` Jan Stancek
2012-10-26  8:03                     ` Wanlong Gao

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=5086654E.1010303@cn.fujitsu.com \
    --to=gaowanlong@cn.fujitsu.com \
    --cc=ltp-list@lists.sourceforge.net \
    --cc=omprakash.pal@stericsson.com \
    /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.