Skip to contentSkip to conversation

quotactl01 broken

LTP Paul Larson 1 participant 1 message Sep 23, 2009

lore
Share & tools
lore
#0 lore raw

quotactl01 appears to need some work. I'm not terribly familiar with this interface, but I spent a few minutes playing around with it this morning.

First problem I was seeing is that all tests within it return EFAULT due to a bad addr value (for ref, see man page [1]). This is not surprising since it is being passed (caddr_t)NULL for the address. I worked around this by simply creating a dummy struct dqblk for it to use instead.

Next problem is that it complained that the device it was being passed was not valid. Again, not a big surprise here since (const char *)NULL is being passed as the device. A possible workaround for this would be to create a dummy loop0 device and mount it as part of the test setup.

Next problem I was seeing is that the QCMDs passed to it were not correctly specified. I believe in the TEST() call, we should be passing QCMD(cmd[i],USRQUOTA) instead of just cmd[i].

I didn't get all the way to making it function correctly, but these 3 things alone got me to a point where several of the tests would pass at least. Before doing any of this, my output (running on x86_64, 2.6.31 based kernel) looked like:

quotactl01    1  TFAIL  :  quotactl01 failed, cmd=0x800002:
TEST_ERRNO=EFAULT(14): Bad address
quotactl01    2  TFAIL  :  quotactl01 failed, cmd=0x800003:
TEST_ERRNO=EFAULT(14): Bad address
quotactl01    3  TFAIL  :  quotactl01 failed, cmd=0x800007:
TEST_ERRNO=EFAULT(14): Bad address
quotactl01    4  TFAIL  :  quotactl01 failed, cmd=0x800008:
TEST_ERRNO=EFAULT(14): Bad address
quotactl01    5  TFAIL  :  quotactl01 failed, cmd=0x800005:
TEST_ERRNO=EFAULT(14): Bad address
quotactl01    6  TFAIL  :  quotactl01 failed, cmd=0x800006:
TEST_ERRNO=EFAULT(14): Bad address
quotactl01    7  TFAIL  :  quotactl01 failed, cmd=0x800004:
TEST_ERRNO=EFAULT(14): Bad address
quotactl01    8  TFAIL  :  quotactl01 failed, cmd=0x800001:
TEST_ERRNO=EFAULT(14): Bad address

I believe this test should be removed from the runtest file until it can be fixed properly.

Thanks,
Paul Larson

[1]
http://www.kernel.org/doc/man-pages/online/pages/man2/quotactl.2.html

------------------------------------------------------------------------------
Come build with us! The BlackBerry® Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9-12, 2009. Register now!
http://p.sf.net/sfu/devconf
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list