From: Yi Zhang <yizhan@redhat.com>
To: neil@brown.name
Cc: linux-raid@vger.kernel.org
Subject: Change "mv $targetdir/log $logdir/$log" to "cp $targetdir/log $logdir/$log"
Date: Sun, 6 Sep 2015 23:28:27 -0400 (EDT) [thread overview]
Message-ID: <1023141143.22094768.1441596507637.JavaMail.zimbra@redhat.com> (raw)
In-Reply-To: <2004794274.22089532.1441594962520.JavaMail.zimbra@redhat.com>
Hi Neil
When I execute mdadm test with --save-logs set, found below error, could you help check it?
Error log:
tests/10ddf-fail-readd... FAILED - see /var/tmp/log-10ddf-fail-readd for details
cp: cannot stat ‘/var/tmp/log’: No such file or directory
Code:
if ( set -ex ; . $_script ) &> $targetdir/log
then
echo "succeeded"
_fail=0
else
log=log
cat $targetdir/stderr >> $targetdir/log
echo "=======================dmesg=================" >> $targetdir/log
dmesg | tail -n 200 >> $targetdir/log
if [ $exitonerror == 0 ]; then
log=log-`basename $_script`
mv $targetdir/log $logdir/$log // This step will move $targetdir/log to $logdir/$log,
fi
echo "FAILED - see $logdir/$log for details"
_fail=1
fi
if [ "$savelogs" == "1" ]; then
cp $targetdir/log $logdir/$_basename.log // If I set $savelogs here, the $targetdir/log doesn't exist now
fi
So could we change the mv to cp?
diff --git a/test b/test
index d0a6cb8..118fa96 100755
--- a/test
+++ b/test
@@ -318,7 +318,7 @@ do_test() {
dmesg | tail -n 200 >> $targetdir/log
if [ $exitonerror == 0 ]; then
log=log-`basename $_script`
- mv $targetdir/log $logdir/$log
+ cp $targetdir/log $logdir/$log
fi
echo "FAILED - see $logdir/$log for details"
_fail=1
Best Regards,
Yi Zhang
--
To unsubscribe from this list: send the line "unsubscribe linux-raid" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next parent reply other threads:[~2015-09-07 3:28 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <2004794274.22089532.1441594962520.JavaMail.zimbra@redhat.com>
2015-09-07 3:28 ` Yi Zhang [this message]
2015-10-09 5:02 ` Change "mv $targetdir/log $logdir/$log" to "cp $targetdir/log $logdir/$log" Neil Brown
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=1023141143.22094768.1441596507637.JavaMail.zimbra@redhat.com \
--to=yizhan@redhat.com \
--cc=linux-raid@vger.kernel.org \
--cc=neil@brown.name \
/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;
as well as URLs for NNTP newsgroup(s).