* [PATCH] xfstests: Don't require to set $TEST_DEV and $TEST_DIR when creating new script
@ 2012-07-30 12:03 Tomas Racek
2012-07-30 21:56 ` Dave Chinner
0 siblings, 1 reply; 3+ messages in thread
From: Tomas Racek @ 2012-07-30 12:03 UTC (permalink / raw)
To: xfs; +Cc: lczerner, Tomas Racek
Signed-off-by: Tomas Racek <tracek@redhat.com>
---
common.config | 26 ++++++++++++++------------
1 files changed, 14 insertions(+), 12 deletions(-)
diff --git a/common.config b/common.config
index 7bed1c5..b92c025 100644
--- a/common.config
+++ b/common.config
@@ -201,9 +201,9 @@ known_hosts()
# Mandatory Config values.
MC=""
- [ -z "$EMAIL" ] && MC="$MC EMAIL"
- [ -z "$TEST_DIR" ] && MC="$MC TEST_DIR"
- [ -z "$TEST_DEV" ] && MC="$MC TEST_DEV"
+ [ -z "$EMAIL" ] && MC="$MC EMAIL"
+ [ -z "$TEST_DIR" ] && [ "$iam" != "new" ] && MC="$MC TEST_DIR"
+ [ -z "$TEST_DEV" ] && [ "$iam" != "new" ] && MC="$MC TEST_DEV"
if [ -n "$MC" ]; then
echo "Warning: need to define parameters for host $HOST"
@@ -219,15 +219,17 @@ else
known_hosts
fi
-echo $TEST_DEV | grep -q ":" > /dev/null 2>&1
-if [ ! -b "$TEST_DEV" -a "$?" != "0" ]; then
- echo "common.config: Error: \$TEST_DEV ($TEST_DEV) is not a block device or a NFS filesystem"
- exit 1
-fi
-
-if [ ! -d "$TEST_DIR" ]; then
- echo "common.config: Error: \$TEST_DIR ($TEST_DIR) is not a directory"
- exit 1
+if [ "$iam" != "new" ]; then
+ echo $TEST_DEV | grep -q ":" > /dev/null 2>&1
+ if [ ! -b "$TEST_DEV" -a "$?" != "0" ]; then
+ echo "common.config: Error: \$TEST_DEV ($TEST_DEV) is not a block device or a NFS filesystem"
+ exit 1
+ fi
+
+ if [ ! -d "$TEST_DIR" ]; then
+ echo "common.config: Error: \$TEST_DIR ($TEST_DIR) is not a directory"
+ exit 1
+ fi
fi
# a btrfs tester will set only SCRATCH_DEV_POOL, we will put first of its dev
--
1.7.7.6
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [PATCH] xfstests: Don't require to set $TEST_DEV and $TEST_DIR when creating new script
2012-07-30 12:03 [PATCH] xfstests: Don't require to set $TEST_DEV and $TEST_DIR when creating new script Tomas Racek
@ 2012-07-30 21:56 ` Dave Chinner
2012-07-31 10:41 ` Tomas Racek
0 siblings, 1 reply; 3+ messages in thread
From: Dave Chinner @ 2012-07-30 21:56 UTC (permalink / raw)
To: Tomas Racek; +Cc: lczerner, xfs
On Mon, Jul 30, 2012 at 02:03:31PM +0200, Tomas Racek wrote:
>
> Signed-off-by: Tomas Racek <tracek@redhat.com>
> ---
> common.config | 26 ++++++++++++++------------
> 1 files changed, 14 insertions(+), 12 deletions(-)
>
> diff --git a/common.config b/common.config
> index 7bed1c5..b92c025 100644
> --- a/common.config
> +++ b/common.config
> @@ -201,9 +201,9 @@ known_hosts()
>
> # Mandatory Config values.
> MC=""
> - [ -z "$EMAIL" ] && MC="$MC EMAIL"
> - [ -z "$TEST_DIR" ] && MC="$MC TEST_DIR"
> - [ -z "$TEST_DEV" ] && MC="$MC TEST_DEV"
> + [ -z "$EMAIL" ] && MC="$MC EMAIL"
> + [ -z "$TEST_DIR" ] && [ "$iam" != "new" ] && MC="$MC TEST_DIR"
> + [ -z "$TEST_DEV" ] && [ "$iam" != "new" ] && MC="$MC TEST_DEV"
Given that I'm currently in the process of killing $iam as I
rework the structure of xfstests, I really don't like the idea of
introducing new dependencies on it.
Also, I prefer to know that someone writing a new test is developing
it in a configured, working test environment. After all, you have to
test your new test as you write it... :p
Cheers,
Dave.
--
Dave Chinner
david@fromorbit.com
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] xfstests: Don't require to set $TEST_DEV and $TEST_DIR when creating new script
2012-07-30 21:56 ` Dave Chinner
@ 2012-07-31 10:41 ` Tomas Racek
0 siblings, 0 replies; 3+ messages in thread
From: Tomas Racek @ 2012-07-31 10:41 UTC (permalink / raw)
To: Dave Chinner; +Cc: lczerner, xfs
> >
> > # Mandatory Config values.
> > MC=""
> > - [ -z "$EMAIL" ] && MC="$MC EMAIL"
> > - [ -z "$TEST_DIR" ] && MC="$MC TEST_DIR"
> > - [ -z "$TEST_DEV" ] && MC="$MC TEST_DEV"
> > + [ -z "$EMAIL" ] && MC="$MC EMAIL"
> > + [ -z "$TEST_DIR" ] && [ "$iam" != "new" ] && MC="$MC TEST_DIR"
> > + [ -z "$TEST_DEV" ] && [ "$iam" != "new" ] && MC="$MC TEST_DEV"
>
> Given that I'm currently in the process of killing $iam as I
> rework the structure of xfstests, I really don't like the idea of
> introducing new dependencies on it.
OK, I didn't know that. ;-)
> Also, I prefer to know that someone writing a new test is developing
> it in a configured, working test environment. After all, you have to
> test your new test as you write it... :p
I thought that is not necessary to depend on those if new script doesn't require them but I can see your point.
Thanks for comments!
Tomas
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2012-07-31 10:41 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-07-30 12:03 [PATCH] xfstests: Don't require to set $TEST_DEV and $TEST_DIR when creating new script Tomas Racek
2012-07-30 21:56 ` Dave Chinner
2012-07-31 10:41 ` Tomas Racek
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox