Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mq_open01 fail #1163

Open
KingingWang opened this issue Jul 1, 2024 · 1 comment
Open

mq_open01 fail #1163

KingingWang opened this issue Jul 1, 2024 · 1 comment

Comments

@KingingWang
Copy link

SELinux mode: unknown
no big block device was specified on commandline.
Tests which require a big block device are disabled.
You can specify it with option -z
COMMAND:    /userdata/wzh/ltp/bin/ltp-pan   -e -S   -a 24195     -n 24195 -p -f /tmp/ltp-LT56OlZ0qM/alltests -l /userdata/wzh/ltp/results/LTP_RUN_ON-2024_06_20-08h_55m_08s.log  -C /userdata/wzh/ltp/output/LTP_RUN_ON-2024_06_20-08h_55m_08s.failed -T /userdata/wzh/ltp/output/LTP_RUN_ON-2024_06_20-08h_55m_08s.tconf
INFO: Restricted to mq_open01
LOG File: /userdata/wzh/ltp/results/LTP_RUN_ON-2024_06_20-08h_55m_08s.log
FAILED COMMAND File: /userdata/wzh/ltp/output/LTP_RUN_ON-2024_06_20-08h_55m_08s.failed
TCONF COMMAND File: /userdata/wzh/ltp/output/LTP_RUN_ON-2024_06_20-08h_55m_08s.tconf
Running tests.......
<<<test_start>>>
tag=mq_open01 stime=1718873708
cmdline="mq_open01"
contacts=""
analysis=exit
<<<test_output>>>
incrementing stop
tst_test.c:1690: TINFO: LTP version: 20230929
tst_test.c:1576: TINFO: Timeout per run is 0h 00m 30s
mq_open01.c:226: TINFO: queue name "/test_mqueue"
mq_open01.c:253: TFAIL: NORMAL wrong return code: -1: EMFILE (24)

I changed the testcase, and it was passable after that.

static struct test_case tcase[] = {
    {
        .desc = "NORMAL",
        .qname = QUEUE_NAME,
        .oflag = O_CREAT,
        .rq = &(struct mq_attr){.mq_maxmsg = 10, .mq_msgsize = 8192},
        .ret = 0,
        .err = 0,
    }
};

But when I change mq_maxmsg and mq_maxsize, it doesn't pass the test, it seems that the changes don't take effect.

root@c3b:/userdata/wzh/output# cat /proc/sys/fs/mqueue/msgsize_max
1024
root@c3b:/userdata/wzh/output# cat /proc/sys/fs/mqueue/queues_max
256
root@c3b:/userdata/wzh/output# cat /proc/sys/fs/mqueue/msg_max
10
root@c3b:/userdata/wzh/output# cat /proc/sys/fs/mqueue/msgsize_max
8192
root@c3b:/userdata/wzh/output# echo 10240 > /proc/sys/fs/mqueue/queues_max
root@c3b:/userdata/wzh/output# echo 100 > /proc/sys/fs/mqueue/msg_max
root@c3b:/userdata/wzh/output# echo 16384 > /proc/sys/fs/mqueue/msgsize_max
@pevik
Copy link
Member

pevik commented Jul 9, 2024

You are using old LTP. Although mq_open01.c was not modified since (20230929), generally it's recommended to use the latest release or current master branch.

It's hard knowing without the details about the system to see whether it's a test failure or kernel failure.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants