From: Petr Vorel <pvorel@suse.cz>
To: ltp@lists.linux.it
Subject: [LTP] [PATCH] lib: Add fifo library
Date: Tue, 10 Dec 2019 08:38:09 +0100 [thread overview]
Message-ID: <20191210073808.GA4143@dell5510> (raw)
In-Reply-To: <79cfa9ef-b122-b2e1-4051-e16eff04d6be@jv-coder.de>
Hi Joerg,
> > > +#ifndef PATH_MAX
> > > +#ifdef MAXPATHLEN
> > > +#define PATH_MAX MAXPATHLEN
> > > +#else
> > > +#define PATH_MAX 1024
> > > +#endif
> > > +#endif
> > Hm, this is copy paste from old tests (all use test.h, even quite new and clean tests/tst_tmpdir_test.c).
> > I wonder if this is still relevant, can't we use #include <limits.h>?
> Right, if there is nothing against using limits.h, I'll change it. I just
> used other code for reference for my code.
I don't know the purpose of this code (anybody knows?), but unless there is good
reason for it, I'd be for using <limits.h>.
> > > +++ b/testcases/Makefile
> > > @@ -28,7 +28,7 @@ include $(top_srcdir)/include/mk/env_pre.mk
> > > # 1. kdump shouldn't be compiled by default, because it's runtime based and
> > > # WILL crash the build host (the tests need to be fixed to just build, not
> > > # run).
> > > -FILTER_OUT_DIRS := kdump
> > > +FILTER_OUT_DIRS := kdump open_posix_testsuite realtime kernel network misc
> > I guess this is unrelated change for your debug.
> Damn... This happens to me all the time, it's time for configure switches ;)
Yep, I have it on my todo list, but haven't forced to do it. Feel free to
implement it.
https://github.com/linux-test-project/ltp/issues/617
> > > +[ "$TST_NEEDS_TMPDIR" != 1 ] && tst_brk TCONF "fifo library requires TST_NEEDS_TMPDIR=1"
> > If we apply https://patchwork.ozlabs.org/patch/1206399/, it should be
> > $TST_NEEDS_TMPDIR=1
> I don't get it? The path you linked seems unrelated to me and did you mean
> [? "$TST_NEEDS_TMPDIR" = 1 ] || ... ?
> > + [ "$TST_NEEDS_FIFO" = 1 ] && . tst_fifo.sh
> > I'd load it at the top, just below
> > . tst_ansi_color.sh
> > . tst_security.sh
> The way I implemented it, I can't load it at the top, because tst_fifo.sh
> requires
> TST_TMPDIR to be already set, when it is included.
Right, sorry. BTW, am I missing something or you don't use this variable in
shell? I see it ony defined in tst_fifo.sh, then you use $TST_TMPDIR.
(+ defined and used in tst_fifo.c)
+ local _tst_path_req="${TST_TMPDIR}/tst_fifo_$1.req"
So what is the purpose of the variable in shell?
And maybe the test for $TST_TMPDIR might not be needed (it's not supposed to be
used without tst_test.sh, but there is no harm to have it (maybe the error
message should be something like "tst_test.sh is part of shell API and shouldn't
be loaded separately").
Kind regards,
Petr
next prev parent reply other threads:[~2019-12-10 7:38 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-12-09 6:41 [LTP] [PATCH] lib: Add fifo library Joerg Vehlow
2019-12-09 22:25 ` Petr Vorel
2019-12-10 5:53 ` Joerg Vehlow
2019-12-10 7:38 ` Petr Vorel [this message]
2019-12-10 14:32 ` Cyril Hrubis
2019-12-11 14:43 ` Joerg Vehlow
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=20191210073808.GA4143@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox