Skip to contentSkip to conversation

updating message_queue_test_02_*

LTP fixed-term.Oleksij.Rempel 2 participants 6 messages Jul 7, 2016 – Jul 13, 2016 2 messages not in the archive

lore
Share & tools
lore
#0 lore raw

Hallo all,

it is kind of a duplication of this case:
https://github.com/linux-test-project/ltp/issues/75

some of message_queue_test_02_* are fail on our configuration, it looks like the reason is hardcoded tmp path, which is different in our test setup.

Looks like this tests should be updated to use current ltp bindings.. which should also fix this issue. Do any one already working on it? If not, me or some of us will try to do it.

Signature · 4 lines
Best regards,
Oleksij Rempel
CM-AI/ECO3
Tel.: +49(5121)49-2962
#1 lore raw
Quoted 5 lines · fixed-term.Oleksij.Rempel

Hallo all,

it is kind of a duplication of this case:
https://github.com/linux-test-project/ltp/issues/75

Quoted 7 lines

some of message_queue_test_02_* are fail on our configuration, it looks like the reason is hardcoded tmp path, which is different in our test setup.

Looks like this tests should be updated to use current ltp bindings.. which should also fix this issue. Do any one already working on it? If not, me or some of us will try to do it.

hm...
to execute *message_queue_test_02_rcv* properly, first should be *message_queue_test_02_snd* executed. And most important, target should not be reseted after message_queue_test_02_snd. If this happens, message_queue_test_02_rcv will hang forever.
It is not looks like proper behaviour (it is not theoretical assumption.).

May be message_queue_test_02_rcv should be wrapped by a script which will start rcv in background and then send after short sleep? And some how make sure that message_queue_test_02_rcv wont wait forever?

Any comments?

#2 lore raw

Hi Oleksij,

Some observations from our side:
- In other to run message_queue_test_02_snd, message_queue_test_02_rcv, message_queue_test_02_ctl successfully, we need to run message_queue_test_02_get before.
Because message_queue_test_02_get will create file /tmp/message_queue_test as well as create generate message queue identifier which will be used in the other three.
- message_queue_test_02_snd, message_queue_test_02_rcv, message_queue_test_02_ctl doesn’t work with –f to specify another location for project name in case the message queue identifier not yet generated along with the file

message_queue_test_02_get.c

int main(int argc, char **argv),

{
        key_t key;              /* Unique key */
        int msqid;              /* Message queue identifier */
        int fd;                 /* Temp file descriptor */
        mode_t mode = 0777;     /* Default mode bits */

        /*
         * Parse command line options
         */
        parse_args(argc, argv);

        if ((fd = open(project_name, O_CREAT | O_RDWR, mode)) < 0)
                sys_error("open failed", __LINE__);

        if (close(fd) < 0)
                sys_error("close failed", __LINE__);

        if ((key = ftok(project_name, project_id)) < 0)
                sys_error("ftok failed", __LINE__);

        if ((msqid = msgget(key, IPC_CREAT | S_IRUSR | S_IWUSR)) < 0)
                sys_error("msgget failed", __LINE__);

        printf("%d\n", msqid);

        return (0);
}

Trân trọng / Best regards

Nga Hoang Thi Thuy
RBVH/ENG2

Tel. +49(711)8113624527

-----Original Message-----
From: FIXED-TERM Rempel Oleksij (CM/ESO3)
Sent: Thursday, July 07, 2016 8:05 PM
To: [email protected]; Le Cong Binh (RBVH/ENG2) <[email protected]>; Hoang Thi Thuy Nga (RBVH/ENG2) <[email protected]>
Subject: Re: [LTP] updating message_queue_test_02_*

Quoted 5 lines · fixed-term.Oleksij.Rempel

Hallo all,

it is kind of a duplication of this case:
https://github.com/linux-test-project/ltp/issues/75

Quoted 7 lines

some of message_queue_test_02_* are fail on our configuration, it looks like the reason is hardcoded tmp path, which is different in our test setup.

Looks like this tests should be updated to use current ltp bindings.. which should also fix this issue. Do any one already working on it? If not, me or some of us will try to do it.

hm...
to execute *message_queue_test_02_rcv* properly, first should be *message_queue_test_02_snd* executed. And most important, target should not be reseted after message_queue_test_02_snd. If this happens, message_queue_test_02_rcv will hang forever.
It is not looks like proper behaviour (it is not theoretical assumption.).

May be message_queue_test_02_rcv should be wrapped by a script which will start rcv in background and then send after short sleep? And some how make sure that message_queue_test_02_rcv wont wait forever?

Any comments?

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linux.it/pipermail/ltp/attachments/20160708/3bed48f4/attachment.html>

#3 lore raw

Hi Nga,

thank you.
Since this tests depend on each other, it makes sense to merge them to one. For example create:
./testcases/bin/message_queue_test_02.sh

And use message_queue_test_02.sh instead of message_queue_test_02_* in the test list.
This will still not fix the issue with custom tmp folder, but will not block testing on reset or random test execution.

LTP devs, any objections here?
If no, Nga, can you please provide a patch for it?

_____________________________________________
From: Hoang Thi Thuy Nga (RBVH/ENG2)
Sent: Friday, July 08, 2016 11:25 AM
To: FIXED-TERM Rempel Oleksij (CM/ESO3) <[email protected]>; [email protected]; Le Cong Binh (RBVH/ENG2) <[email protected]>
Cc: Tran Thanh Lam (RBVH/ENG2) <[email protected]>
Subject: RE: [LTP] updating message_queue_test_02_*

Hi Oleksij,

Some observations from our side:
- In other to run message_queue_test_02_snd, message_queue_test_02_rcv, message_queue_test_02_ctl successfully, we need to run message_queue_test_02_get before.
Because message_queue_test_02_get will create file /tmp/message_queue_test as well as create generate message queue identifier which will be used in the other three.
- message_queue_test_02_snd, message_queue_test_02_rcv, message_queue_test_02_ctl doesn’t work with –f to specify another location for project name in case the message queue identifier not yet generated along with the file

message_queue_test_02_get.c

int main(int argc, char **argv),
{
key_t key; /* Unique key */
int msqid; /* Message queue identifier */
int fd; /* Temp file descriptor */
mode_t mode = 0777; /* Default mode bits */

/*
* Parse command line options
*/
parse_args(argc, argv);

if ((fd = open(project_name, O_CREAT | O_RDWR, mode)) < 0)
sys_error("open failed", __LINE__);

if (close(fd) < 0)
sys_error("close failed", __LINE__);

if ((key = ftok(project_name, project_id)) < 0)
sys_error("ftok failed", __LINE__);

if ((msqid = msgget(key, IPC_CREAT | S_IRUSR | S_IWUSR)) < 0)
sys_error("msgget failed", __LINE__);

printf("%d\n", msqid);

return (0);
}

Trân trọng / Best regards

Nga Hoang Thi Thuy
RBVH/ENG2

Tel. +49(711)8113624527

-----Original Message-----
From: FIXED-TERM Rempel Oleksij (CM/ESO3)
Sent: Thursday, July 07, 2016 8:05 PM
To: [email protected]<mailto:[email protected]>; Le Cong Binh (RBVH/ENG2) <[email protected]<mailto:[email protected]>>; Hoang Thi Thuy Nga (RBVH/ENG2) <[email protected]<mailto:[email protected]>>
Subject: Re: [LTP] updating message_queue_test_02_*

On 07.07.2016 13:55, fixed-term.Oleksij.Rempel wrote:
> Hallo all,
>
> it is kind of a duplication of this case:
> https://github.com/linux-test-project/ltp/issues/75
>
> some of message_queue_test_02_* are fail on our configuration, it looks > like the reason is hardcoded tmp path, which is different in our test setup. >
> Looks like this tests should be updated to use current ltp bindings.. > which should also fix this issue. Do any one already working on it? If > not, me or some of us will try to do it.
>

hm...
to execute *message_queue_test_02_rcv* properly, first should be *message_queue_test_02_snd* executed. And most important, target should not be reseted after message_queue_test_02_snd. If this happens, message_queue_test_02_rcv will hang forever.
It is not looks like proper behaviour (it is not theoretical assumption.).

May be message_queue_test_02_rcv should be wrapped by a script which will start rcv in background and then send after short sleep? And some how make sure that message_queue_test_02_rcv wont wait forever?

Any comments?

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linux.it/pipermail/ltp/attachments/20160708/1633b955/attachment-0001.html>

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): [email protected]

#6 lore raw

Hi Oleksij and all,

Attachment is the patch file for adding message_queue_test_02.sh Please help me check

Regards,
Nga Hoang
_____________________________________________

Quoted 129 lines

*From:* FIXED-TERM Rempel Oleksij (CM/ESO3)
*Sent:* Friday, July 08, 2016 5:57 PM
*To:* Hoang Thi Thuy Nga (RBVH/ENG2) <[email protected]>; [email protected]; Le Cong Binh (RBVH/ENG2) <[email protected]> *Cc:* Tran Thanh Lam (RBVH/ENG2) <[email protected]>; Cyril Hrubis <[email protected]>
*Subject:* RE: [LTP] updating message_queue_test_02_*

Hi Nga,

thank you.
Since this tests depend on each other, it makes sense to merge them to one. For example create:
./testcases/bin/message_queue_test_02.sh

And use message_queue_test_02.sh instead of message_queue_test_02_* in the test list.
This will still not fix the issue with custom tmp folder, but will not block testing on reset or random test execution.

LTP devs, any objections here?
If no, Nga, can you please provide a patch for it?

_____________________________________________
*From:* Hoang Thi Thuy Nga (RBVH/ENG2)
*Sent:* Friday, July 08, 2016 11:25 AM
*To:* FIXED-TERM Rempel Oleksij (CM/ESO3) <[email protected]_ <mailto:[email protected]>>; [email protected]_ <mailto:[email protected]>; Le Cong Binh (RBVH/ENG2) <[email protected]_ <mailto:[email protected]>> *Cc:* Tran Thanh Lam (RBVH/ENG2) <[email protected]_ <mailto:[email protected]>>
*Subject:* RE: [LTP] updating message_queue_test_02_*

Hi Oleksij,

Some observations from our side:

* In other to run *message_queue_test_02_snd*, *message_queue_test_02_rcv*, *message_queue_test_02_ctl* successfully, we need to run *message_queue_test_02_get***before.

Because *message_queue_test_02_get***will create file */tmp/message_queue_test *as well as**create *generate message queue identifier* which will be used in the other three.

* *message_queue_test_02_snd*, *message_queue_test_02_rcv*, *message_queue_test_02_ctl* doesn’t work with –f to specify another location for project name *in case* the message queue identifier not yet generated along with the file

*message_queue_test_02_get.c*

        *int**main*(*int*argc, *char***argv),
{
        _key_t_key;              /* Unique key */
        *int*msqid;              /* Message queue identifier */
        *int*fd;                 /* _Temp_file descriptor */
        _mode_t_mode = 0777;     /* Default mode bits */

        /*
        * Parse command line options
        */
        parse_args(argc, argv);

        *i**f**((fd = open(**project_name**, **_O_CREAT_**|
**_O_RDWR_**, mode)) < 0)*
                *sys_error("open failed", __LINE__);*

        *if*(close(fd) < 0)
                sys_error("close failed", __LINE__);

        *if*((key = ftok(project_name, project_id)) < 0)
                sys_error("_ftok_failed", __LINE__);

        *if**((msqid = msgget(key, **_IPC_CREAT_**| **_S_IRUSR_**|
**_S_IWUSR_**)) < 0)*
                *sys_error("**_msgget_**failed", __LINE__);*

        printf("%d\n", msqid);

        *return*(0);
}

Trân trọng / Best regards

Nga Hoang Thi Thuy
RBVH/ENG2

Tel. +49(711)8113624527

-----Original Message-----
From: FIXED-TERM Rempel Oleksij (CM/ESO3)
Sent: Thursday, July 07, 2016 8:05 PM
To: [email protected]_ <mailto:[email protected]>; Le Cong Binh (RBVH/ENG2) <[email protected]_ <mailto:[email protected]>>; Hoang Thi Thuy Nga (RBVH/ENG2) <[email protected]_ <mailto:[email protected]>>
Subject: Re: [LTP] updating message_queue_test_02_*

Quoted 5 lines · fixed-term.Oleksij.Rempel

Hallo all,

it is kind of a duplication of this case:
https://github.com/linux-test-project/ltp/issues/75

Quoted 7 lines

some of message_queue_test_02_* are fail on our configuration, it looks like the reason is hardcoded tmp path, which is different in our test setup.

Looks like this tests should be updated to use current ltp bindings.. which should also fix this issue. Do any one already working on it? If not, me or some of us will try to do it.

hm...
to execute *message_queue_test_02_rcv* properly, first should be *message_queue_test_02_snd* executed. And most important, target should not be reseted after message_queue_test_02_snd. If this happens, message_queue_test_02_rcv will hang forever.
It is not looks like proper behaviour (it is not theoretical assumption.).

Quoted 6 lines

May be message_queue_test_02_rcv should be wrapped by a script which will start rcv in background and then send after short sleep? And some how make sure that message_queue_test_02_rcv wont wait forever?

Any comments?

-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch.diff
Type: text/x-patch
Size: 398 bytes
Desc: patch.diff
URL: <http://lists.linux.it/pipermail/ltp/attachments/20160713/4a17e0be/attachment.bin>

#7 lore raw

Hi Nga,

i'll paste the patch here for review, next time it need to be send with git send-mail...

+#!/bin/sh
+

if i see it correctly, message_queue_test_02_get will block execution so message_queue_test_02_snd should be done first with error checking.

+./message_queue_test_02_get
+./message_queue_test_02_snd

something like:

message_queue_test_02_snd || exit $?
message_queue_test_02_get || exit $?

since this tests depend on each other, probably each of them should be checked for return value.

+./message_queue_test_02_rcv
+./message_queue_test_02_ctl -r

Quoted 143 lines · On 13.07.2016 06:35, Hoang Thi Thuy Nga (RBVH/ENG2) wrote:

Hi Oleksij and all,

Attachment is the patch file for adding message_queue_test_02.sh Please help me check

Regards,
Nga Hoang
_____________________________________________

Quoted 135 lines

*From:* FIXED-TERM Rempel Oleksij (CM/ESO3)
*Sent:* Friday, July 08, 2016 5:57 PM
*To:* Hoang Thi Thuy Nga (RBVH/ENG2) <[email protected]>; [email protected]; Le Cong Binh (RBVH/ENG2) <[email protected]> *Cc:* Tran Thanh Lam (RBVH/ENG2) <[email protected]>; Cyril Hrubis <[email protected]>
*Subject:* RE: [LTP] updating message_queue_test_02_*

Hi Nga,

thank you.
Since this tests depend on each other, it makes sense to merge them to one. For example create:
./testcases/bin/message_queue_test_02.sh

And use message_queue_test_02.sh instead of message_queue_test_02_* in the test list.
This will still not fix the issue with custom tmp folder, but will not block testing on reset or random test execution.

LTP devs, any objections here?
If no, Nga, can you please provide a patch for it?

_____________________________________________
*From:* Hoang Thi Thuy Nga (RBVH/ENG2)
*Sent:* Friday, July 08, 2016 11:25 AM
*To:* FIXED-TERM Rempel Oleksij (CM/ESO3) <[email protected]_ <mailto:[email protected]>>; [email protected]_ <mailto:[email protected]>; Le Cong Binh (RBVH/ENG2) <[email protected]_ <mailto:[email protected]>> *Cc:* Tran Thanh Lam (RBVH/ENG2) <[email protected]_ <mailto:[email protected]>>
*Subject:* RE: [LTP] updating message_queue_test_02_*

Hi Oleksij,

Some observations from our side:

* In other to run *message_queue_test_02_snd*, *message_queue_test_02_rcv*, *message_queue_test_02_ctl* successfully, we need to run *message_queue_test_02_get***before.

Because *message_queue_test_02_get***will create file */tmp/message_queue_test *as well as**create *generate message queue identifier* which will be used in the other three.

* *message_queue_test_02_snd*, *message_queue_test_02_rcv*, *message_queue_test_02_ctl* doesn’t work with –f to specify another location for project name *in case* the message queue identifier not yet generated along with the file

*message_queue_test_02_get.c*

        *int**main*(*int*argc, *char***argv),
{
        _key_t_key;              /* Unique key */
        *int*msqid;              /* Message queue identifier */
        *int*fd;                 /* _Temp_file descriptor */
        _mode_t_mode = 0777;     /* Default mode bits */

        /*
        * Parse command line options
        */
        parse_args(argc, argv);

        *i**f**((fd = open(**project_name**, **_O_CREAT_**|
**_O_RDWR_**, mode)) < 0)*
                *sys_error("open failed", __LINE__);*

        *if*(close(fd) < 0)
                sys_error("close failed", __LINE__);

        *if*((key = ftok(project_name, project_id)) < 0)
                sys_error("_ftok_failed", __LINE__);

        *if**((msqid = msgget(key, **_IPC_CREAT_**| **_S_IRUSR_**|
**_S_IWUSR_**)) < 0)*
                *sys_error("**_msgget_**failed", __LINE__);*

        printf("%d\n", msqid);

        *return*(0);
}

Trân trọng / Best regards

Nga Hoang Thi Thuy
RBVH/ENG2

Tel. +49(711)8113624527

-----Original Message-----
From: FIXED-TERM Rempel Oleksij (CM/ESO3)
Sent: Thursday, July 07, 2016 8:05 PM
To: [email protected]_ <mailto:[email protected]>; Le Cong Binh (RBVH/ENG2) <[email protected]_ <mailto:[email protected]>>; Hoang Thi Thuy Nga (RBVH/ENG2) <[email protected]_ <mailto:[email protected]>>
Subject: Re: [LTP] updating message_queue_test_02_*

Quoted 5 lines · fixed-term.Oleksij.Rempel

Hallo all,

it is kind of a duplication of this case:
https://github.com/linux-test-project/ltp/issues/75

Quoted 7 lines

some of message_queue_test_02_* are fail on our configuration, it looks like the reason is hardcoded tmp path, which is different in our test setup.

Looks like this tests should be updated to use current ltp bindings.. which should also fix this issue. Do any one already working on it? If not, me or some of us will try to do it.

hm...
to execute *message_queue_test_02_rcv* properly, first should be *message_queue_test_02_snd* executed. And most important, target should not be reseted after message_queue_test_02_snd. If this happens, message_queue_test_02_rcv will hang forever.
It is not looks like proper behaviour (it is not theoretical assumption.).

May be message_queue_test_02_rcv should be wrapped by a script which will start rcv in background and then send after short sleep? And some how make sure that message_queue_test_02_rcv wont wait forever?

Any comments?