<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Exchange Server">
<!-- converted from rtf -->
<style><!-- .EmailQuote { margin-left: 1pt; padding-left: 4pt; border-left: #800000 2px solid; } --></style>
</head>
<body>
<font face="Calibri" size="2"><span style="font-size:11pt;">
<div>Hi  Nga,</div>
<div> </div>
<div>thank you.</div>
<div>Since this tests depend on each other, it makes sense to merge them to one.</div>
<div>For example create:</div>
<div>./testcases/bin/message_queue_test_02.sh </div>
<div> </div>
<div>And use message_queue_test_02.sh instead of message_queue_test_02_* in the test list.</div>
<div>This will still not fix the issue with custom tmp folder, but will not block testing on reset or random test execution.</div>
<div> </div>
<div>LTP devs, any objections here?</div>
<div>If no, Nga, can you please provide a patch for it?</div>
<div> </div>
<div> </div>
<div style="padding-left:35.4pt;">_____________________________________________<br>

<b>From:</b> Hoang Thi Thuy Nga (RBVH/ENG2) <br>

<b>Sent:</b> Friday, July 08, 2016 11:25 AM<br>

<b>To:</b> FIXED-TERM Rempel Oleksij (CM/ESO3) <fixed-term.Oleksij.Rempel@de.bosch.com>; ltp@lists.linux.it; Le Cong Binh (RBVH/ENG2) <Binh.LeCong@vn.bosch.com><br>

<b>Cc:</b> Tran Thanh Lam (RBVH/ENG2) <Lam.TranThanh2@vn.bosch.com><br>

<b>Subject:</b> RE: [LTP] updating message_queue_test_02_*</div>
<div style="padding-left:35.4pt;"> </div>
<div style="padding-left:35.4pt;"> </div>
<div style="padding-left:35.4pt;"><font face="Arial" size="2"><span style="font-size:10pt;">Hi Oleksij, </span></font></div>
<div style="padding-left:35.4pt;"><font face="Arial" size="2"><span style="font-size:10pt;"> </span></font></div>
<div style="padding-left:35.4pt;"><font face="Arial" size="2"><span style="font-size:10pt;">Some observations from our side: </span></font></div>
<ul style="margin:0;padding-left:89.4pt;">
<font face="Arial" size="2"><span style="font-size:10pt;">
<li>In other to run <b>message_queue_test_02_snd</b>, <b>message_queue_test_02_rcv</b>, <b>message_queue_test_02_ctl</b> successfully, we need to run <font color="#0070C0"><b>message_queue_test_02_get</b></font><font color="#00B0F0"><b> </b></font>before. </li></span></font>
</ul>
<div style="text-indent:36pt;padding-left:35.4pt;"><font face="Arial" size="2"><span style="font-size:10pt;"> Because <font color="#0070C0"><b>message_queue_test_02_get</b></font><font color="#00B0F0"><b> </b></font>will create file <b>/tmp/message_queue_test
</b>as well as<b> </b>create <b>generate message queue identifier</b> which will be used in the other three.</span></font></div>
<ul style="margin:0;padding-left:89.4pt;">
<font face="Arial" size="2"><span style="font-size:10pt;">
<li><b>message_queue_test_02_snd</b>, <b>message_queue_test_02_rcv</b>, <b>message_queue_test_02_ctl</b> doesn’t work with –f to specify another location for project name <b>in case</b> the message queue identifier not yet generated along with the file</li></span></font>
</ul>
<div style="padding-left:35.4pt;"><font face="Arial" size="2"><span style="font-size:10pt;"> </span></font></div>
<div style="padding-left:35.4pt;"><font face="Arial" size="2" color="#0070C0"><span style="font-size:10pt;"><b>message_queue_test_02_get.c</b></span></font></div>
<div style="padding-left:35.4pt;"><font face="Arial" size="2"><span style="font-size:10pt;"> </span></font></div>
<div style="padding-left:35.4pt;">         <font face="Consolas" size="2" color="#7F0055"><span style="font-size:10pt;"><b>int</b></span></font><font face="Consolas" size="2"><span style="font-size:10pt;"> </span></font><font face="Consolas" size="2"><span style="font-size:10pt;"><b>main</b></span></font><font face="Consolas" size="2"><span style="font-size:10pt;">(</span></font><font face="Consolas" size="2" color="#7F0055"><span style="font-size:10pt;"><b>int</b></span></font><font face="Consolas" size="2"><span style="font-size:10pt;">
argc, </span></font><font face="Consolas" size="2" color="#7F0055"><span style="font-size:10pt;"><b>char</b></span></font><font face="Consolas" size="2"><span style="font-size:10pt;"> **argv),</span></font></div>
<div style="padding-left:35.4pt;"><font face="Consolas" size="2"><span style="font-size:10pt;">{</span></font></div>
<div style="padding-left:35.4pt;">        <font face="Consolas" size="2"><span style="font-size:10pt;"><u>key_t</u></span></font><font face="Consolas" size="2"><span style="font-size:10pt;"> key;              </span></font><font face="Consolas" size="2" color="#3F7F5F"><span style="font-size:10pt;">/*
Unique key */</span></font></div>
<div style="padding-left:35.4pt;">        <font face="Consolas" size="2" color="#7F0055"><span style="font-size:10pt;"><b>int</b></span></font><font face="Consolas" size="2"><span style="font-size:10pt;"> msqid;              </span></font><font face="Consolas" size="2" color="#3F7F5F"><span style="font-size:10pt;">/*
Message queue identifier */</span></font></div>
<div style="padding-left:35.4pt;">        <font face="Consolas" size="2" color="#7F0055"><span style="font-size:10pt;"><b>int</b></span></font><font face="Consolas" size="2"><span style="font-size:10pt;"> fd;                 </span></font><font face="Consolas" size="2" color="#3F7F5F"><span style="font-size:10pt;">/*
</span></font><font face="Consolas" size="2" color="#3F7F5F"><span style="font-size:10pt;"><u>Temp</u></span></font><font face="Consolas" size="2" color="#3F7F5F"><span style="font-size:10pt;"> file descriptor */</span></font></div>
<div style="padding-left:35.4pt;">        <font face="Consolas" size="2"><span style="font-size:10pt;"><u>mode_t</u></span></font><font face="Consolas" size="2"><span style="font-size:10pt;"> mode = 0777;     </span></font><font face="Consolas" size="2" color="#3F7F5F"><span style="font-size:10pt;">/*
Default mode bits */</span></font></div>
<div style="padding-left:35.4pt;"> </div>
<div style="padding-left:35.4pt;">        <font face="Consolas" size="2" color="#3F7F5F"><span style="font-size:10pt;">/*</span></font></div>
<div style="padding-left:35.4pt;"><font color="#3F7F5F">        <font face="Consolas" size="2"><span style="font-size:10pt;"> * Parse command line options</span></font></font></div>
<div style="padding-left:35.4pt;"><font color="#3F7F5F">        <font face="Consolas" size="2"><span style="font-size:10pt;"> */</span></font></font></div>
<div style="padding-left:35.4pt;">        <font face="Consolas" size="2"><span style="font-size:10pt;">parse_args(argc, argv);</span></font></div>
<div style="padding-left:35.4pt;"> </div>
<div style="padding-left:35.4pt;">        <font face="Consolas" size="2" color="#7F0055"><span style="font-size:10pt;"><b>i</b></span></font><font face="Consolas" size="2" color="#0070C0"><span style="font-size:10pt;"><b>f</b></span></font><font face="Consolas" size="2" color="#0070C0"><span style="font-size:10pt;"><b>
((fd = open(</b></span></font><font face="Consolas" size="2" color="#0070C0"><span style="font-size:10pt;background-color:silver;"><b>project_name</b></span></font><font face="Consolas" size="2" color="#0070C0"><span style="font-size:10pt;"><b>, </b></span></font><font face="Consolas" size="2" color="#0070C0"><span style="font-size:10pt;"><b><u>O_CREAT</u></b></span></font><font face="Consolas" size="2" color="#0070C0"><span style="font-size:10pt;"><b>
| </b></span></font><font face="Consolas" size="2" color="#0070C0"><span style="font-size:10pt;"><b><u>O_RDWR</u></b></span></font><font face="Consolas" size="2" color="#0070C0"><span style="font-size:10pt;"><b>, mode)) < 0)</b></span></font></div>
<div style="padding-left:35.4pt;"><font face="Consolas" size="2" color="#0070C0"><span style="font-size:10pt;">                <b>sys_error("open failed", __LINE__);</b></span></font></div>
<div style="padding-left:35.4pt;"> </div>
<div style="padding-left:35.4pt;">        <font face="Consolas" size="2" color="#7F0055"><span style="font-size:10pt;"><b>if</b></span></font><font face="Consolas" size="2"><span style="font-size:10pt;"> (close(fd) < 0)</span></font></div>
<div style="padding-left:35.4pt;">                <font face="Consolas" size="2"><span style="font-size:10pt;">sys_error(</span></font><font face="Consolas" size="2" color="#2A00FF"><span style="font-size:10pt;">"close failed"</span></font><font face="Consolas" size="2"><span style="font-size:10pt;">,
__LINE__);</span></font></div>
<div style="padding-left:35.4pt;"> </div>
<div style="padding-left:35.4pt;">        <font face="Consolas" size="2" color="#7F0055"><span style="font-size:10pt;"><b>if</b></span></font><font face="Consolas" size="2"><span style="font-size:10pt;"> ((key = ftok(</span></font><font face="Consolas" size="2"><span style="font-size:10pt;background-color:silver;">project_name</span></font><font face="Consolas" size="2"><span style="font-size:10pt;">,
project_id)) < 0)</span></font></div>
<div style="padding-left:35.4pt;">                <font face="Consolas" size="2"><span style="font-size:10pt;">sys_error(</span></font><font face="Consolas" size="2" color="#2A00FF"><span style="font-size:10pt;">"</span></font><font face="Consolas" size="2" color="#2A00FF"><span style="font-size:10pt;"><u>ftok</u></span></font><font face="Consolas" size="2" color="#2A00FF"><span style="font-size:10pt;">
failed"</span></font><font face="Consolas" size="2"><span style="font-size:10pt;">, __LINE__);</span></font></div>
<div style="padding-left:35.4pt;"> </div>
<div style="padding-left:35.4pt;">        <font face="Consolas" size="2" color="#0070C0"><span style="font-size:10pt;"><b>if</b></span></font><font face="Consolas" size="2" color="#0070C0"><span style="font-size:10pt;"><b> ((msqid = msgget(key, </b></span></font><font face="Consolas" size="2" color="#0070C0"><span style="font-size:10pt;"><b><u>IPC_CREAT</u></b></span></font><font face="Consolas" size="2" color="#0070C0"><span style="font-size:10pt;"><b>
| </b></span></font><font face="Consolas" size="2" color="#0070C0"><span style="font-size:10pt;"><b><u>S_IRUSR</u></b></span></font><font face="Consolas" size="2" color="#0070C0"><span style="font-size:10pt;"><b> | </b></span></font><font face="Consolas" size="2" color="#0070C0"><span style="font-size:10pt;"><b><u>S_IWUSR</u></b></span></font><font face="Consolas" size="2" color="#0070C0"><span style="font-size:10pt;"><b>))
< 0)</b></span></font></div>
<div style="padding-left:35.4pt;"><font face="Consolas" size="2" color="#0070C0"><span style="font-size:10pt;">                <b>sys_error("</b><b><u>msgget</u></b><b> failed", __LINE__);</b></span></font></div>
<div style="padding-left:35.4pt;"> </div>
<div style="padding-left:35.4pt;">        <font face="Consolas" size="2"><span style="font-size:10pt;">printf(</span></font><font face="Consolas" size="2" color="#2A00FF"><span style="font-size:10pt;">"%d\n"</span></font><font face="Consolas" size="2"><span style="font-size:10pt;">,
msqid);</span></font></div>
<div style="padding-left:35.4pt;"> </div>
<div style="padding-left:35.4pt;">        <font face="Consolas" size="2" color="#7F0055"><span style="font-size:10pt;"><b>return</b></span></font><font face="Consolas" size="2"><span style="font-size:10pt;"> (0);</span></font></div>
<div style="padding-left:35.4pt;"><font face="Consolas" size="2"><span style="font-size:10pt;">}</span></font></div>
<div style="padding-left:35.4pt;"><font face="Arial" size="2"><span style="font-size:10pt;"> </span></font></div>
<div style="padding-left:35.4pt;"><font face="Arial" size="2"><span style="font-size:10pt;"> </span></font></div>
<div style="padding-left:35.4pt;"><font face="Arial" size="2"><span style="font-size:10pt;">Trân trọng / Best regards</span></font></div>
<div style="padding-left:35.4pt;"><font face="Arial" size="2"><span style="font-size:10pt;"> </span></font></div>
<div style="padding-left:35.4pt;"><font face="Arial" size="2"><span style="font-size:10pt;">Nga Hoang Thi Thuy</span></font></div>
<div style="padding-left:35.4pt;"><font face="Arial" size="2"><span style="font-size:10pt;">RBVH/ENG2  </span></font></div>
<div style="padding-left:35.4pt;"><font face="Arial" size="2"><span style="font-size:10pt;"> </span></font></div>
<div style="padding-left:35.4pt;"><font face="Arial" size="2"><span style="font-size:10pt;">Tel. +49(711)8113624527 </span></font></div>
<div style="padding-left:35.4pt;"><font face="Arial" size="2"><span style="font-size:10pt;"> </span></font></div>
<div style="padding-left:35.4pt;"><font face="Arial" size="2"><span style="font-size:10pt;"> </span></font></div>
<div style="padding-left:35.4pt;"><font face="Arial" size="2"><span style="font-size:10pt;"> </span></font></div>
<div style="padding-left:35.4pt;"><font face="Arial" size="2"><span style="font-size:10pt;">-----Original Message-----<br>

From: FIXED-TERM Rempel Oleksij (CM/ESO3) <br>

Sent: Thursday, July 07, 2016 8:05 PM<br>

To: <a href="mailto:ltp@lists.linux.it"><font color="#0563C1"><u>ltp@lists.linux.it</u></font></a>; Le Cong Binh (RBVH/ENG2) <<a href="mailto:Binh.LeCong@vn.bosch.com"><font color="#0563C1"><u>Binh.LeCong@vn.bosch.com</u></font></a>>; Hoang Thi Thuy Nga (RBVH/ENG2)
<<a href="mailto:Nga.HoangThiThuy@vn.bosch.com"><font color="#0563C1"><u>Nga.HoangThiThuy@vn.bosch.com</u></font></a>><br>

Subject: Re: [LTP] updating message_queue_test_02_*</span></font></div>
<div style="padding-left:35.4pt;"><font face="Arial" size="2"><span style="font-size:10pt;"> </span></font></div>
<div style="padding-left:35.4pt;"><font face="Arial" size="2"><span style="font-size:10pt;">On 07.07.2016 13:55, fixed-term.Oleksij.Rempel wrote:</span></font></div>
<div style="padding-left:35.4pt;"><font face="Arial" size="2"><span style="font-size:10pt;">> Hallo all,</span></font></div>
<div style="padding-left:35.4pt;"><font face="Arial" size="2"><span style="font-size:10pt;">> </span></font></div>
<div style="padding-left:35.4pt;"><font face="Arial" size="2"><span style="font-size:10pt;">> it is kind of a duplication of this case:</span></font></div>
<div style="padding-left:35.4pt;"><font face="Arial" size="2"><span style="font-size:10pt;">> <a href="https://github.com/linux-test-project/ltp/issues/75">https://github.com/linux-test-project/ltp/issues/75</a></span></font></div>
<div style="padding-left:35.4pt;"><font face="Arial" size="2"><span style="font-size:10pt;">> </span></font></div>
<div style="padding-left:35.4pt;"><font face="Arial" size="2"><span style="font-size:10pt;">> some of message_queue_test_02_* are fail on our configuration, it looks</span></font></div>
<div style="padding-left:35.4pt;"><font face="Arial" size="2"><span style="font-size:10pt;">> like the reason is hardcoded tmp path, which is different in our test setup.</span></font></div>
<div style="padding-left:35.4pt;"><font face="Arial" size="2"><span style="font-size:10pt;">> </span></font></div>
<div style="padding-left:35.4pt;"><font face="Arial" size="2"><span style="font-size:10pt;">> Looks like this tests should be updated to use current ltp bindings..</span></font></div>
<div style="padding-left:35.4pt;"><font face="Arial" size="2"><span style="font-size:10pt;">> which should also fix this issue.  Do any one already working on it? If</span></font></div>
<div style="padding-left:35.4pt;"><font face="Arial" size="2"><span style="font-size:10pt;">> not, me or some of us will try to do it.</span></font></div>
<div style="padding-left:35.4pt;"><font face="Arial" size="2"><span style="font-size:10pt;">> </span></font></div>
<div style="padding-left:35.4pt;"><font face="Arial" size="2"><span style="font-size:10pt;"> </span></font></div>
<div style="padding-left:35.4pt;"><font face="Arial" size="2"><span style="font-size:10pt;">hm...</span></font></div>
<div style="padding-left:35.4pt;"><font face="Arial" size="2"><span style="font-size:10pt;">to execute *message_queue_test_02_rcv* properly, first should be</span></font></div>
<div style="padding-left:35.4pt;"><font face="Arial" size="2"><span style="font-size:10pt;">*message_queue_test_02_snd* executed. And most important, target should</span></font></div>
<div style="padding-left:35.4pt;"><font face="Arial" size="2"><span style="font-size:10pt;">not be reseted after message_queue_test_02_snd. If this happens,</span></font></div>
<div style="padding-left:35.4pt;"><font face="Arial" size="2"><span style="font-size:10pt;">message_queue_test_02_rcv will hang forever.</span></font></div>
<div style="padding-left:35.4pt;"><font face="Arial" size="2"><span style="font-size:10pt;">It is not looks like proper behaviour (it is not theoretical assumption.).</span></font></div>
<div style="padding-left:35.4pt;"><font face="Arial" size="2"><span style="font-size:10pt;"> </span></font></div>
<div style="padding-left:35.4pt;"><font face="Arial" size="2"><span style="font-size:10pt;">May be message_queue_test_02_rcv should be wrapped by a script which</span></font></div>
<div style="padding-left:35.4pt;"><font face="Arial" size="2"><span style="font-size:10pt;">will start rcv in background and then send after short sleep?</span></font></div>
<div style="padding-left:35.4pt;"><font face="Arial" size="2"><span style="font-size:10pt;">And some how make sure that message_queue_test_02_rcv wont wait forever?</span></font></div>
<div style="padding-left:35.4pt;"><font face="Arial" size="2"><span style="font-size:10pt;"> </span></font></div>
<div style="padding-left:35.4pt;"><font face="Arial" size="2"><span style="font-size:10pt;">Any comments?</span></font></div>
<div style="padding-left:35.4pt;"><font face="Arial" size="2"><span style="font-size:10pt;"> </span></font></div>
</span></font>
</body>
</html>