public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
From: "Mitani" <mitani@ryobi.co.jp>
To: 'Garrett Cooper' <yanegomi@gmail.com>
Cc: ltp-list@lists.sourceforge.net
Subject: Re: [LTP] "unzip01" testcase failed.
Date: Thu, 14 Jan 2010 16:30:40 +0900	[thread overview]
Message-ID: <000901ca94eb$792f5150$6b8df3f0$@co.jp> (raw)
In-Reply-To: <364299f40912211838w7ab92a76u50223c29588b6f1a@mail.gmail.com>

Hi,

I tried to test "unzip01".
But I get still the same fail at 2010-01-14 cvs.

I think that this failure occurs because "DIR" can't be defined 
correctly in "${LTPROOT}/testcases/commands/unzip/Makefile" and 
all files of "/opt/ltp/testcases/bin" directory was compressed.

There is the definition "DIR := tst_unzip.dir" in "${LTPROOT}/testcases
/commands/unzip/Makefile". But there is the definition "DIR := /opt/ltp
/testcases/bin" in two include files ("${LTPROOT}/include/mk/env_pre.mk"
and "${LTPROOT}/include/mk/generic_leaf_target.mk") which are included 
in "${LTPROOT}/testcases/commands/unzip/Makefile".

Perhaps, "DIR := tst_unzip.dir" is replaced by "DIR := /opt/ltp
/testcases/bin" when the two files were included, I think.

This test requires "tst_unzip.dir" and if the variable name "DIR" is
changed to another name, this problem will not occur.


> .INTERMEDIATE may be the only piece of value here, but I was avoiding
> it because it's a 3.81-ism I thought...

So, I don't try use .INTERMEDIATE target.

However, the compress target directory ("tst_unzip.dir") is created
under "$LTPROOT/testcases/commands/unzip" directory.
But I think that it does not affect for the test because the compressed
file which is for the test ("tst_unzip_file.zip") is create under 
the run directory ("/opy/ltp"). "tst_unzip.dir" is the file which isn't
related directly to the practice of the test, I think.

How about this patch:
============
--- Makefile.org	2009-12-11 21:50:29.000000000 +0900
+++ Makefile	2010-01-14 11:44:30.000000000 +0900
@@ -27,7 +27,7 @@
 # Only build and install if we have the zip command.
 HAVE_ZIPTOOLS		:= $(shell if which zip >/dev/null; then echo yes;
else echo no; fi)
 
-DIR			:= tst_unzip.dir
+COMPRESS_DIR		:= tst_unzip.dir
 
 RM			+= -r
 
@@ -36,7 +36,7 @@
 ZIPFILE			:= $(TESTCASES_DATA_DIR)/tst_unzip_file.zip
 
 ifeq ($(HAVE_ZIPTOOLS),yes)
-CLEAN_TARGETS		:= $(DIR) $(ZIPFILE)
+CLEAN_TARGETS		:= $(COMPRESS_DIR) $(ZIPFILE)
 INSTALL_TARGETS		:= unzip_tests.sh
 endif
 
@@ -45,13 +45,13 @@
 $(TESTCASES_DATA_DIR):
 	mkdir -p "$@"
 
-$(ZIPFILE): | $(TESTCASES_DATA_DIR) $(DIR)
-	zip -r "$@" $(DIR)
+$(ZIPFILE): | $(TESTCASES_DATA_DIR) $(COMPRESS_DIR)
+	zip -r "$@" $(COMPRESS_DIR)
 	chmod 00666 "$@"
 
 # This target should be auto-removed by Make
-$(DIR): $(abs_srcdir)/unzip_genfile.sh
-	$(SHELL) "$^" $(DIR)
+$(COMPRESS_DIR): $(abs_srcdir)/unzip_genfile.sh
+	$(SHELL) "$^" $(COMPRESS_DIR)
 
 include $(top_srcdir)/include/mk/generic_leaf_target.mk
 
============


I'm glad if I can get opinion that my revision is right or not.


Regards--


-Tomonori Mitani


-----Original Message-----
From: Garrett Cooper [mailto:yanegomi@gmail.com] 
Sent: Tuesday, December 22, 2009 11:39 AM
To: Caspar Zhang
Cc: ltp-list@lists.sourceforge.net; Mitani
Subject: Re: [LTP] "unzip01" testcase failed.

On Mon, Dec 21, 2009 at 1:10 AM, Garrett Cooper <yanegomi@gmail.com> wrote:
> On Sun, Dec 20, 2009 at 9:45 PM, Caspar Zhang <czhang@redhat.com> wrote:
>>
>> ----- "Garrett Cooper" <yanegomi@gmail.com> wrote:
>>>
>>> I'm not convinced that this is the right solution because most of
>>> what's done here just replaced $(DIR)'s value with the bareword
>>> value.
>>> .INTERMEDIATE may be the only piece of value here, but I was avoiding
>>> it because it's a 3.81-ism I thought...
>>
>> How about this one (see the attachment)?
>
> AH... -[Rr] was missing.
>
> RM += -[Rr]
>
> will do that. The rest just seems spurious.

    Uh, this was already committed on HEAD:

http://ltp.cvs.sourceforge.net/viewvc/ltp/ltp/testcases/commands/unzip/Makef
ile?r1=1.9&r2=1.8

    What version are you working with?
Thanks,
-Garrett



------------------------------------------------------------------------------
Throughout its 18-year history, RSA Conference consistently attracts the
world's best and brightest in the field, creating opportunities for Conference
attendees to learn about information security's most important issues through
interactions with peers, luminaries and emerging and established companies.
http://p.sf.net/sfu/rsaconf-dev2dev
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

  reply	other threads:[~2010-01-14  7:30 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1713808934.618481261374276809.JavaMail.root@zmail04.collab.prod.int.phx2.redhat.com>
2009-12-21  5:45 ` [LTP] "unzip01" testcase failed Caspar Zhang
2009-12-21  9:10   ` Garrett Cooper
2009-12-22  2:38     ` Garrett Cooper
2010-01-14  7:30       ` Mitani [this message]
2010-01-14  8:29         ` Garrett Cooper
2010-01-14 12:41           ` Garrett Cooper
2009-12-21  4:23 Mitani
2009-12-21  5:16 ` Garrett Cooper

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='000901ca94eb$792f5150$6b8df3f0$@co.jp' \
    --to=mitani@ryobi.co.jp \
    --cc=ltp-list@lists.sourceforge.net \
    --cc=yanegomi@gmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox