All of lore.kernel.org
 help / color / mirror / Atom feed
From: Arturo Borrero Gonzalez <arturo.borrero.glez@gmail.com>
To: Netfilter Development Mailing list <netfilter-devel@vger.kernel.org>
Cc: Pablo Neira Ayuso <pablo@netfilter.org>
Subject: Re: [PATCH 4/5] tests/shell: add tests for handles and comments
Date: Fri, 11 Dec 2015 14:29:39 +0100	[thread overview]
Message-ID: <CAOkSjBgTH0X2GZzd9adopiX_jijJRe4M0ysWkrfM=W04VF+w+g@mail.gmail.com> (raw)
In-Reply-To: <144982863023.31246.1243999908078428421.stgit@r2d2.cica.es>

> diff --git a/tests/shell/testcases/optionals/comments_handles_monitor_0 b/tests/shell/testcases/optionals/comments_handles_monitor_0
> new file mode 100755
> index 0000000..f1e2004
> --- /dev/null
> +++ b/tests/shell/testcases/optionals/comments_handles_monitor_0
> @@ -0,0 +1,29 @@
> +#!/bin/bash
> +
> +# handles and comments mix well in monitor
> +
> +MKTEMP=$(which mktemp)
> +if [ -x $MKTEMP ] ; then
> +       tmpfile=$(${MKTEMP})
> +else
> +       tmpfile=$(/tmp/${RANDOM})
> +fi
> +
> +if [ ! -w $tmpfile ] ; then
> +       echo "Failed to create tmp file" >&2
> +       exit 0
> +fi
> +
> +trap "rm -rf $tmpfile" EXIT # cleanup if aborted
> +
> +set -e
> +
> +$NFT add table test
> +$NFT add chain test test
> +$NFT monitor -a > $tmpfile &
> +$NFT add rule test test tcp dport 22 counter accept comment test_comment
> +# race :-(
> +sleep 1
> +kill $!
> +grep 'accept comment \"test_comment\" # handle '[[:digit:]]$ $tmpfile >/dev/null
> +rm -rf $tmpfile

This testcase is so bad designed, we should not include it now. Or fix it later.

-- 
Arturo Borrero González
--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  reply	other threads:[~2015-12-11 13:29 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-11 10:10 [PATCH 0/5] new testsuite for nft Arturo Borrero Gonzalez
2015-12-11 10:10 ` [PATCH 1/5] tests/: rearrange tests directory Arturo Borrero Gonzalez
2015-12-15 20:37   ` Pablo Neira Ayuso
2015-12-11 10:10 ` [PATCH 2/5] tests/: add shell test-suite Arturo Borrero Gonzalez
2015-12-11 10:10 ` [PATCH 3/5] tests/shell: add maps tests cases Arturo Borrero Gonzalez
2015-12-11 10:10 ` [PATCH 4/5] tests/shell: add tests for handles and comments Arturo Borrero Gonzalez
2015-12-11 13:29   ` Arturo Borrero Gonzalez [this message]
2015-12-11 10:10 ` [PATCH 5/5] tests/shell: add test case for cache bug Arturo Borrero Gonzalez
2015-12-18 13:08 ` [PATCH 0/5] new testsuite for nft Pablo Neira Ayuso

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='CAOkSjBgTH0X2GZzd9adopiX_jijJRe4M0ysWkrfM=W04VF+w+g@mail.gmail.com' \
    --to=arturo.borrero.glez@gmail.com \
    --cc=netfilter-devel@vger.kernel.org \
    --cc=pablo@netfilter.org \
    /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.