Re: [PATCH] tests: reduce length of nodeinfodata test names

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Jul 20, 2012 at 01:34:36PM -0600, Eric Blake wrote:
> Commit ddd6bef4 fixed an issue where 'make dist' failed to create
> a tarball because we have files with relative names longer than
> 100 bytes by the time you include a 'libvirt-0.9.13' prefix, by
> switching to the ustart format.  Unfortunately, even with ustar
> format, the use of 'tar -ch' with symbolic links that resolve to
> a file name too long also fails (omitting the -h works, but automake
> automatically passes -h); such symlinks were added in commit
> 6dcf98c, which resulted in 'make dist' breaking again.  The solution
> is to rename the offending symlinks to something shorter, by
> shortening the entire nodeinfodata naming scheme.
> 
> * tests/nodeinfotest.c (mymain): Shorten test names.
> (linuxTestNodeInfo): Accommodate new names.
> * tests/nodeinfodata/*: Rename files accordingly.
> ---
> 
> This LOOKS huge, but is really just a couple of 'git mv' commands
> and a change to nodeinfotest.c.  Scroll to the bottom for the
> real change; I've shortened boring parts of this mail to get past
> the 100k mail cap enforced by the list.
> 
>  ...fs-test-1-ppc.cpuinfo => linux-ppc-test1.cpuinfo} |    0
>  ...1-cpu-ppc-output.txt => linux-ppc-test1.expected} |    0
>  .../cpu/cpu0/online                                  |    0
> ...
>  ...5-cpu-x86-output.txt => linux-x86-test5.expected} |    0
>  ...fs-test-6-x86.cpuinfo => linux-x86-test6.cpuinfo} |    0
>  ...6-cpu-x86-output.txt => linux-x86-test6.expected} |    0
>  tests/nodeinfotest.c                                 |   18 +++++++++---------
>  447 files changed, 9 insertions(+), 9 deletions(-)
>  rename tests/nodeinfodata/{linux-nodeinfo-sysfs-test-1-ppc.cpuinfo => linux-ppc-test1.cpuinfo} (100%)
> ...
> rename from tests/nodeinfodata/linux-nodeinfo-sysfs-test-5-cpu-x86-output.txt
> rename to tests/nodeinfodata/linux-x86-test5.expected
> diff --git a/tests/nodeinfodata/linux-nodeinfo-sysfs-test-6-x86.cpuinfo b/tests/nodeinfodata/linux-x86-test6.cpuinfo
> similarity index 100%
> rename from tests/nodeinfodata/linux-nodeinfo-sysfs-test-6-x86.cpuinfo
> rename to tests/nodeinfodata/linux-x86-test6.cpuinfo
> diff --git a/tests/nodeinfodata/linux-nodeinfo-sysfs-test-6-cpu-x86-output.txt b/tests/nodeinfodata/linux-x86-test6.expected
> similarity index 100%
> rename from tests/nodeinfodata/linux-nodeinfo-sysfs-test-6-cpu-x86-output.txt
> rename to tests/nodeinfodata/linux-x86-test6.expected
> diff --git a/tests/nodeinfotest.c b/tests/nodeinfotest.c
> index 851acd0..c44cc8a 100644
> --- a/tests/nodeinfotest.c
> +++ b/tests/nodeinfotest.c
> @@ -100,9 +100,9 @@ linuxTestNodeInfo(const void *data)
>      if (virAsprintf(&sysfs_dir, "%s/nodeinfodata/linux-%s",
>                      abs_srcdir, test) < 0 ||
>          virAsprintf(&cpuinfo, "%s/nodeinfodata/linux-%s-%s.cpuinfo",
> -                    abs_srcdir, test, arch) < 0 ||
> -        virAsprintf(&output, "%s/nodeinfodata/linux-%s-cpu-%s-output.txt",
> -                    abs_srcdir, test, arch) < 0) {
> +                    abs_srcdir, arch, test) < 0 ||
> +        virAsprintf(&output, "%s/nodeinfodata/linux-%s-%s.expected",
> +                    abs_srcdir, arch, test) < 0) {
>          goto cleanup;
>      }
> 
> @@ -123,14 +123,14 @@ mymain(void)
>      int ret = 0;
>      int i;
>      const char *nodeData[] = {
> -        "nodeinfo-sysfs-test-1",
> +        "test1",
>  # if !(defined(__powerpc__) ||                  \
>         defined(__powerpc64__))
> -        "nodeinfo-sysfs-test-2",
> -        "nodeinfo-sysfs-test-3",
> -        "nodeinfo-sysfs-test-4",
> -        "nodeinfo-sysfs-test-5",
> -        "nodeinfo-sysfs-test-6",
> +        "test2",
> +        "test3",
> +        "test4",
> +        "test5",
> +        "test6",
>  # endif
>      };


ACK

Daniel
-- 
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org       -o-       http://live.gnome.org/gtk-vnc :|

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list


[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]