[PATCH 1/1] Fix current log dir symbolic link

Eduardo Abinader eduardo.abinader
Thu Feb 27 07:08:41 PST 2014


On Mon, Feb 24, 2014 at 5:20 PM, Jouni Malinen <j at w1.fi> wrote:

> On Mon, Feb 24, 2014 at 11:46:53AM -0400, Eduardo Abinader wrote:
> > This patch aims to fix the update of current symbolic link,
> > when LOGDIR is already set. The current symbolic link was only
> > set, if LOGDIR has not been previously defined. If the user
> > had chosen to cancel the running test and run it again, the current
> > symbolic link was not being updated.
>
> What do you mean with canceling a running test? For me, that means
> stopping and restarting run-tests.py, so I'm not completely sure I
> understood what the problem would be since start.sh would not be even
> run again in that case..
>
> I meant: ./run-all.sh --> ctrl+c ---> ./run-all.sh

start.sh is invoked and current is not updated.

You may also try ./run-all.sh --> ctrl+c and then:
 ./start.sh
./run-test.py -f <test>

Current symbolic is not updated also. Thus, this patch fixes this issue.


> > diff --git a/tests/hwsim/start.sh b/tests/hwsim/start.sh
> > @@ -7,13 +7,11 @@ HAPD=$DIR/../../hostapd/hostapd
> > +DATE="$(date +%s)"
> >
> >  if [ -z "$LOGDIR" ] ; then
> > -    DATE="$(date +%s)"
> >      LOGDIR="$DIR/logs/$DATE"
> >      mkdir -p $LOGDIR
> > -    rm -rf $DIR/logs/current
> > -    ln -sf $DATE $DIR/logs/current
> >  else
> >      if [ -e $LOGDIR/alt-wpa_supplicant/wpa_supplicant/wpa_supplicant ];
> then
> >       WPAS=$LOGDIR/alt-wpa_supplicant/wpa_supplicant/wpa_supplicant
> > @@ -29,6 +27,9 @@ else
> > +rm -rf $DIR/logs/current
> > +ln -sf $DATE $DIR/logs/current
>
> This adds an undesired error message for vm-run.sh cases since $DIR/logs
> directory is on a read-only file system within the VM. That's one of the
> main reasons why the existing code is within that if branch.
>
>
Ok, I managed to fix this misbehavior. I'm now sending the the proper patch.



> --
> Jouni Malinen                                            PGP id EFC895FA
> _______________________________________________
> HostAP mailing list
> HostAP at lists.shmoo.com
> http://lists.shmoo.com/mailman/listinfo/hostap
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.shmoo.com/pipermail/hostap/attachments/20140227/994579ed/attachment.htm>



More information about the Hostap mailing list