All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: [LTP] [ltp-full-20130503] runltp cleanup() can't remove ${TMP}
       [not found] <mailman.80890.1372765469.12996.ltp-list@lists.sourceforge.net>
@ 2013-07-03  2:15 ` Eko
  2013-07-03  7:36   ` Sedat Dilek
  2013-07-09 15:11   ` chrubis
  0 siblings, 2 replies; 7+ messages in thread
From: Eko @ 2013-07-03  2:15 UTC (permalink / raw)
  To: ltp-list


[-- Attachment #1.1: Type: text/plain, Size: 884 bytes --]

hi,

  I executed runltp command in my box, everything is OK, but when 
cleaning the environment, got following errors:

        ###############################################################
             Done executing testcases.
             LTP Version:  20130503
        ###############################################################
rm: cannot remove `/tmp/ltp-9NAwvmAbI5/moulTfFCf/mnt_4458': Device or resource busy
rm: cannot remove `/tmp/ltp-9NAwvmAbI5/sandbox': Device or resource busy


Because /tmp/ltp-9NAwvmAbI5/moulTfFCf/mnt_4458 and 
/tmp/ltp-9NAwvmAbI5/sandbox are still mounted, so can't delete them, the 
best way is:
# umount /tmp/ltp-9NAwvmAbI5/moulTfFCf/mnt_4458
# umount /tmp/ltp-9NAwvmAbI5/sandbox

and then:

     [ "$LOOP_DEV" ] && losetup -d $LOOP_DEV
     [ -e "${TEMP}/test.img" ] && rm -f ${TEMP}/test.img
     rm -rf ${TMP}


-- 
Best Regards,
Eko
--


[-- Attachment #1.2: Type: text/html, Size: 1586 bytes --]

[-- Attachment #2: Type: text/plain, Size: 184 bytes --]

------------------------------------------------------------------------------
This SF.net email is sponsored by Windows:

Build for Windows Store.

http://p.sf.net/sfu/windows-dev2dev

[-- Attachment #3: Type: text/plain, Size: 155 bytes --]

_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [LTP] [ltp-full-20130503] runltp cleanup() can't remove ${TMP}
  2013-07-03  2:15 ` [LTP] [ltp-full-20130503] runltp cleanup() can't remove ${TMP} Eko
@ 2013-07-03  7:36   ` Sedat Dilek
  2013-07-10 14:04     ` chrubis
  2013-07-10 14:17     ` chrubis
  2013-07-09 15:11   ` chrubis
  1 sibling, 2 replies; 7+ messages in thread
From: Sedat Dilek @ 2013-07-03  7:36 UTC (permalink / raw)
  To: Eko; +Cc: ltp-list

On Wed, Jul 3, 2013 at 4:15 AM, Eko <hong.sun@oracle.com> wrote:
> hi,
>
>  I executed runltp command in my box, everything is OK, but when cleaning
> the environment, got following errors:
>
>        ###############################################################
>             Done executing testcases.
>             LTP Version:  20130503
>        ###############################################################
> rm: cannot remove `/tmp/ltp-9NAwvmAbI5/moulTfFCf/mnt_4458': Device or
> resource busy
> rm: cannot remove `/tmp/ltp-9NAwvmAbI5/sandbox': Device or resource busy
>
>
> Because  /tmp/ltp-9NAwvmAbI5/moulTfFCf/mnt_4458 and
> /tmp/ltp-9NAwvmAbI5/sandbox are still mounted, so can't delete them, the
> best way is:
> # umount /tmp/ltp-9NAwvmAbI5/moulTfFCf/mnt_4458
> # umount /tmp/ltp-9NAwvmAbI5/sandbox
>
> and then:
>
>     [ "$LOOP_DEV" ] && losetup -d $LOOP_DEV
>     [ -e "${TEMP}/test.img" ] && rm -f ${TEMP}/test.img
>     rm -rf ${TMP}
>
>

I have seen the same when dealing with a mount/ext4-fs issue (turned
out to be a BASHISM) and reading the code.
$TEMP is never used, it should be $TMP.

BTW, this line - which needs to be corrected...

[ -e "${TEMP}/test.img" ] && rm -f ${TEMP}/test.img

...makes no real sense, when doing...

rm -rf ${TMP}

...afterwards :-).

If you look at the code, for me it was not clear what $TMP
reflects/is, please look closer.
I remember darkly, it was swapped somewhere...

BTW, I have seen a lot of discrepancy in coding-style, beginning with
comments, etc.
The code was touched by different coders, so everyone seems to leave a
bit from his/her style.

    # DO NOT INDENT/DEDENT!
    # ^^DO NOT INDENT/DEDENT!^^

That should be changed to sth like "DO NOT INDENT/DEDENT - OR I KILL
YOU!" <--- /me just kidding

Unfortunately, I had a wait.h-issue in Linux-next to go through.

Anyway, runltp needs some more love.

- Sedat -

> --
> Best Regards,
> Eko
> --
>
>
> ------------------------------------------------------------------------------
> This SF.net email is sponsored by Windows:
>
> Build for Windows Store.
>
> http://p.sf.net/sfu/windows-dev2dev
> _______________________________________________
> Ltp-list mailing list
> Ltp-list@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/ltp-list
>

------------------------------------------------------------------------------
This SF.net email is sponsored by Windows:

Build for Windows Store.

http://p.sf.net/sfu/windows-dev2dev
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [LTP] [ltp-full-20130503] runltp cleanup() can't remove ${TMP}
  2013-07-03  2:15 ` [LTP] [ltp-full-20130503] runltp cleanup() can't remove ${TMP} Eko
  2013-07-03  7:36   ` Sedat Dilek
@ 2013-07-09 15:11   ` chrubis
       [not found]     ` <CA+icZUUtv3MpiYScqqHmLbOFaEqKRC8eSAtUziMrVcRP80kbGw@mail.gmail.com>
  1 sibling, 1 reply; 7+ messages in thread
From: chrubis @ 2013-07-09 15:11 UTC (permalink / raw)
  To: Eko; +Cc: ltp-list

Hi!
>   I executed runltp command in my box, everything is OK, but when 
> cleaning the environment, got following errors:
> 
>         ###############################################################
>              Done executing testcases.
>              LTP Version:  20130503
>         ###############################################################
> rm: cannot remove `/tmp/ltp-9NAwvmAbI5/moulTfFCf/mnt_4458': Device or resource busy
> rm: cannot remove `/tmp/ltp-9NAwvmAbI5/sandbox': Device or resource busy
> 
> 
> Because /tmp/ltp-9NAwvmAbI5/moulTfFCf/mnt_4458 and 
> /tmp/ltp-9NAwvmAbI5/sandbox are still mounted, so can't delete them, the 
> best way is:
> # umount /tmp/ltp-9NAwvmAbI5/moulTfFCf/mnt_4458
> # umount /tmp/ltp-9NAwvmAbI5/sandbox
> 

This looks like leftover mount from some testcases. We need to find
which testcases are these and fix them to do their cleanup correctly.

Quick greping suggested that candidates are:

testscripts/test_fs_bind.sh

testcases/kernel/syscalls/mount/mount*.c

-- 
Cyril Hrubis
chrubis@suse.cz

------------------------------------------------------------------------------
See everything from the browser to the database with AppDynamics
Get end-to-end visibility with application monitoring from AppDynamics
Isolate bottlenecks and diagnose root cause in seconds.
Start your free trial of AppDynamics Pro today!
http://pubads.g.doubleclick.net/gampad/clk?id=48808831&iu=/4140/ostg.clktrk
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [LTP] [ltp-full-20130503] runltp cleanup() can't remove ${TMP}
       [not found]     ` <CA+icZUUtv3MpiYScqqHmLbOFaEqKRC8eSAtUziMrVcRP80kbGw@mail.gmail.com>
@ 2013-07-09 16:18       ` chrubis
  0 siblings, 0 replies; 7+ messages in thread
From: chrubis @ 2013-07-09 16:18 UTC (permalink / raw)
  To: Sedat Dilek; +Cc: ltp-list, Eko

Hi!
> >>   I executed runltp command in my box, everything is OK, but when
> >> cleaning the environment, got following errors:
> >>
> >>         ###############################################################
> >>              Done executing testcases.
> >>              LTP Version:  20130503
> >>         ###############################################################
> >> rm: cannot remove `/tmp/ltp-9NAwvmAbI5/moulTfFCf/mnt_4458': Device or resource busy
> >> rm: cannot remove `/tmp/ltp-9NAwvmAbI5/sandbox': Device or resource busy
> >>
> >>
> >> Because /tmp/ltp-9NAwvmAbI5/moulTfFCf/mnt_4458 and
> >> /tmp/ltp-9NAwvmAbI5/sandbox are still mounted, so can't delete them, the
> >> best way is:
> >> # umount /tmp/ltp-9NAwvmAbI5/moulTfFCf/mnt_4458
> >> # umount /tmp/ltp-9NAwvmAbI5/sandbox
> >>
> >
> > This looks like leftover mount from some testcases. We need to find
> > which testcases are these and fix them to do their cleanup correctly.
> >
> > Quick greping suggested that candidates are:
> >
> > testscripts/test_fs_bind.sh
> >
> > testcases/kernel/syscalls/mount/mount*.c
> >
> 
> So ${TEMP} is really used?

I don't think so, it looks like a typo to me.

The error messages here are from the 'rm -rf ${TMP}' that is done after
the line with ${TEMP}.

Anyway the line that removes the image is both wrong and useless as the
whole ${TMP} is removed right after it. I suggest removing it.

-- 
Cyril Hrubis
chrubis@suse.cz

------------------------------------------------------------------------------
See everything from the browser to the database with AppDynamics
Get end-to-end visibility with application monitoring from AppDynamics
Isolate bottlenecks and diagnose root cause in seconds.
Start your free trial of AppDynamics Pro today!
http://pubads.g.doubleclick.net/gampad/clk?id=48808831&iu=/4140/ostg.clktrk
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [LTP] [ltp-full-20130503] runltp cleanup() can't remove ${TMP}
  2013-07-03  7:36   ` Sedat Dilek
@ 2013-07-10 14:04     ` chrubis
  2013-07-10 14:17     ` chrubis
  1 sibling, 0 replies; 7+ messages in thread
From: chrubis @ 2013-07-10 14:04 UTC (permalink / raw)
  To: Sedat Dilek; +Cc: ltp-list, Eko

Hi!
> Anyway, runltp needs some more love.

I keep saying that runltp needs rewrite because both ltp-pan and runltp
script are beyond the point of repair and I keep them only in
maintenance state.

Now I do plan to start working on replacement and I've posted RFC with
some notes on desing to this list about four months ago [1], I haven't
started to sketch the code yet but I hope to start working on this soon
enough.

[1] http://sourceforge.net/mailarchive/message.php?msg_id=30508383

Meanwhile some other posible functionality emerged. I would like to have
better anotated the runtest files adding not only timeouts but also
groups to ease runnings only tests for some kind of functionality.

-- 
Cyril Hrubis
chrubis@suse.cz

------------------------------------------------------------------------------
See everything from the browser to the database with AppDynamics
Get end-to-end visibility with application monitoring from AppDynamics
Isolate bottlenecks and diagnose root cause in seconds.
Start your free trial of AppDynamics Pro today!
http://pubads.g.doubleclick.net/gampad/clk?id=48808831&iu=/4140/ostg.clktrk
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [LTP] [ltp-full-20130503] runltp cleanup() can't remove ${TMP}
  2013-07-03  7:36   ` Sedat Dilek
  2013-07-10 14:04     ` chrubis
@ 2013-07-10 14:17     ` chrubis
  1 sibling, 0 replies; 7+ messages in thread
From: chrubis @ 2013-07-10 14:17 UTC (permalink / raw)
  To: Sedat Dilek; +Cc: ltp-list, Eko

Hi!
> BTW, this line - which needs to be corrected...
> 
> [ -e "${TEMP}/test.img" ] && rm -f ${TEMP}/test.img

I've just pushed a patch that removes this line.

-- 
Cyril Hrubis
chrubis@suse.cz

------------------------------------------------------------------------------
See everything from the browser to the database with AppDynamics
Get end-to-end visibility with application monitoring from AppDynamics
Isolate bottlenecks and diagnose root cause in seconds.
Start your free trial of AppDynamics Pro today!
http://pubads.g.doubleclick.net/gampad/clk?id=48808831&iu=/4140/ostg.clktrk
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [LTP] [ltp-full-20130503] runltp cleanup() can't remove ${TMP}
       [not found] <mailman.81986.1372818525.14365.ltp-list@lists.sourceforge.net>
@ 2013-07-03  3:30 ` Eko
  0 siblings, 0 replies; 7+ messages in thread
From: Eko @ 2013-07-03  3:30 UTC (permalink / raw)
  To: ltp-list

--- runltp.bak  2013-07-03 10:18:28.375259716 +0800
+++ runltp      2013-07-03 10:32:22.958314831 +0800
@@ -1014,6 +1014,11 @@

  cleanup()
  {
+    for file in ${TMP}/*
+    do
+        umount $file > /dev/null 2>&1
+    done
+
      [ "$LOOP_DEV" ] && losetup -d $LOOP_DEV
      [ -e "${TEMP}/test.img" ] && rm -f ${TEMP}/test.img
      rm -rf ${TMP}


-- 
Best Regards,
Eko
--


------------------------------------------------------------------------------
This SF.net email is sponsored by Windows:

Build for Windows Store.

http://p.sf.net/sfu/windows-dev2dev
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2013-07-10 14:16 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <mailman.80890.1372765469.12996.ltp-list@lists.sourceforge.net>
2013-07-03  2:15 ` [LTP] [ltp-full-20130503] runltp cleanup() can't remove ${TMP} Eko
2013-07-03  7:36   ` Sedat Dilek
2013-07-10 14:04     ` chrubis
2013-07-10 14:17     ` chrubis
2013-07-09 15:11   ` chrubis
     [not found]     ` <CA+icZUUtv3MpiYScqqHmLbOFaEqKRC8eSAtUziMrVcRP80kbGw@mail.gmail.com>
2013-07-09 16:18       ` chrubis
     [not found] <mailman.81986.1372818525.14365.ltp-list@lists.sourceforge.net>
2013-07-03  3:30 ` Eko

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.