All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Daniel Sangorrin" <daniel.sangorrin@toshiba.co.jp>
To: "'Li, Xiaoming'" <lixm.fnst@cn.fujitsu.com>,
	fuego@lists.linuxfoundation.org
Subject: Re: [Fuego] [PATCH] LTP_Smack: add a new job to test "smack" module
Date: Fri, 6 Jul 2018 17:30:52 +0900	[thread overview]
Message-ID: <000701d41503$a6911c40$f3b354c0$@toshiba.co.jp> (raw)
In-Reply-To: <62079D2F712F7747B0BDCC6821B8DF0D013CF2F1@G08CNEXMBPEKD02.g08.fujitsu.local>

Hi Li, Tim

> -----Original Message-----
> From: fuego-bounces@lists.linuxfoundation.org
> <fuego-bounces@lists.linuxfoundation.org> On Behalf Of Li, Xiaoming
[...]
> diff --git a/engine/tests/Functional.LTP_Smack/test_mount.sh
> b/engine/tests/Functional.LTP_Smack/test_mount.sh
> new file mode 100644
> index 0000000..9d78154
> --- /dev/null
> +++ b/engine/tests/Functional.LTP_Smack/test_mount.sh
> @@ -0,0 +1,28 @@
> +#!/bin/sh
> +
> +if [ "$1" == "start" ]; then
> +    touch test_mount.log
> +    mount | grep -v /sys/fs/smackfs | grep /smack > /dev/null
> +    if [ $? -eq 0 ]; then
> +        exit 0
> +    fi
> +
> +    if [ ! -d /smack ]; then
> +        mkdir /smack > /dev/null
> +        echo "NEW_DIR" >> test_mount.log
> +    fi
> +
> +    mount -t smackfs smackfs /smack
> +    echo "NEW_MOUNT" >> test_mount.log
> +fi
> +
> +
> +if [ "$1" == "end" ]; then
> +    if grep "NEW_MOUNT" test_mount.log > /dev/null; then
> +        umount /smack
> +    fi
> +
> +    if grep "NEW_DIR" test_mount.log > /dev/null; then
> +        rmdir /smack
> +    fi
> +fi

This could be added as prechecks in LTP (note that it requires root permissions). 
But I think we don't need to mount it for the user, just check that smack is ready and report otherwise should be fine.
Additionally, checking the SMACK Kconfig values in the target board's kernel configuration would be helpful.
What do you think Tim?

Best regards,
Daniel




  parent reply	other threads:[~2018-07-06  8:30 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1530708469-14477-1-git-send-email-lixm.fnst@cn.fujitsu.com>
2018-07-06  5:50 ` [Fuego] [PATCH] LTP_Smack: add a new job to test "smack" module Li, Xiaoming
2018-07-06  8:03   ` Daniel Sangorrin
2018-07-13 17:14     ` Tim.Bird
2018-07-18  2:54       ` Daniel Sangorrin
2018-07-06  8:30   ` Daniel Sangorrin [this message]
2018-07-13 20:03     ` Tim.Bird
2018-07-13 17:05   ` Tim.Bird

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='000701d41503$a6911c40$f3b354c0$@toshiba.co.jp' \
    --to=daniel.sangorrin@toshiba.co.jp \
    --cc=fuego@lists.linuxfoundation.org \
    --cc=lixm.fnst@cn.fujitsu.com \
    /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.