From: Petr Vorel <pvorel@suse.cz>
To: ltp@lists.linux.it
Subject: [LTP] [PATCH v3 2/2] syscalls/mq_open: fix old tests + convert to use new API
Date: Thu, 15 Dec 2016 15:34:15 +0100 [thread overview]
Message-ID: <20161215143415.i75dfl2ltcpprmpi@dell5510> (raw)
In-Reply-To: <20161215135234.GA16771@rei.lan>
Hi Cyril!
Thank you for your review, ideas, examples!
> > + SAFE_GETRLIMIT(RLIMIT_NOFILE, &rlim);
> We can get the rlimit once in the test setup.
> > + SAFE_FILE_SCANF(PROC_MAX_QUEUES, "%d", &max_queues);
> Here as well, we can read the max_queues fil,e once in the test setup.
I thought it would be safer to read it before test to get actual value. I still think too
complicatedly about tests :-(.
> Why can't we just do setup() and cleanup() for each of the
> testcases, instead of this trickery?
I didn't like it either, I just didn't come up with simple function pointer idea.
> Or do I miss something and there is a reason why we can't write the test
> this way?
No you don't, I just haven't achieved the zen of programming yet :-(. How nice and simple,
I'll use it.
Kind regards,
Petr
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.linux.it/pipermail/ltp/attachments/20161215/543a0c85/attachment.sig>
prev parent reply other threads:[~2016-12-15 14:34 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-12-10 20:29 [LTP] [PATCH v3 1/2] lib: add FILE_PRINTF Petr Vorel
2016-12-10 20:29 ` [LTP] [PATCH v3 2/2] syscalls/mq_open: fix old tests + convert to use new API Petr Vorel
2016-12-15 13:52 ` Cyril Hrubis
2016-12-15 14:34 ` Petr Vorel [this message]
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=20161215143415.i75dfl2ltcpprmpi@dell5510 \
--to=pvorel@suse.cz \
--cc=ltp@lists.linux.it \
/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.