Bug 73495 - dbus test application names cleanup
Summary: dbus test application names cleanup
Status: RESOLVED FIXED
Alias: None
Product: dbus
Classification: Unclassified
Component: core (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: Havoc Pennington
QA Contact:
URL:
Whiteboard: deferred to 1.9
Keywords: patch
Depends on:
Blocks: 41252 73689
  Show dependency treegraph
 
Reported: 2014-01-11 09:21 UTC by Ralf Habacker
Modified: 2014-01-20 20:20 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments
Rename shell-test to test-shell to match common test application naming scheme. (10.08 KB, patch)
2014-01-11 09:21 UTC, Ralf Habacker
Details | Splinter Review
Rename spawn-test to test-spawn to match common test application naming scheme. (4.88 KB, patch)
2014-01-11 09:22 UTC, Ralf Habacker
Details | Splinter Review
Rename dbus-test to test-dbus to match mostly test application names (4.17 KB, patch)
2014-01-11 19:53 UTC, Ralf Habacker
Details | Splinter Review
Rename dbus-test to test-dbus to match mostly test application names (update 1) (4.17 KB, patch)
2014-01-13 19:49 UTC, Ralf Habacker
Details | Splinter Review
Rename bus-test to test-bus to match common test application naming scheme (1.85 KB, patch)
2014-01-13 19:50 UTC, Ralf Habacker
Details | Splinter Review
Rename dbus-test to test-dbus to match mostly test application names (update 1) (4.43 KB, patch)
2014-01-13 19:51 UTC, Ralf Habacker
Details | Splinter Review
Rename bus-test to test-bus to match common test application naming scheme (update 1) (2.59 KB, patch)
2014-01-13 20:01 UTC, Ralf Habacker
Details | Splinter Review
Rename shell-test to test-shell to match common test application naming scheme. (update 1) (10.05 KB, patch)
2014-01-13 20:04 UTC, Ralf Habacker
Details | Splinter Review
Rename spawn-test to test-spawn to match common test application naming scheme (update 1) (4.90 KB, patch)
2014-01-13 20:06 UTC, Ralf Habacker
Details | Splinter Review
Rename bus-test to test-bus to match common test application naming scheme (update 2) (3.86 KB, patch)
2014-01-13 20:09 UTC, Ralf Habacker
Details | Splinter Review
Rename dbus-test to test-dbus to match mostly test application names (update 2) (5.88 KB, patch)
2014-01-14 17:29 UTC, Ralf Habacker
Details | Splinter Review
Rename shell-test to test-shell to match common test application naming scheme. (update 2) (10.31 KB, patch)
2014-01-14 17:35 UTC, Ralf Habacker
Details | Splinter Review
Rename bus-test-system to test-bus-system to match common test application naming scheme (1.96 KB, patch)
2014-01-14 17:54 UTC, Ralf Habacker
Details | Splinter Review
Rename bus-test-launch-helper to test-bus-launch-helper to match common test application naming scheme (2.97 KB, patch)
2014-01-14 17:55 UTC, Ralf Habacker
Details | Splinter Review
Let cmake 'make check' run test applications as one test group (1.03 KB, patch)
2014-01-14 17:56 UTC, Ralf Habacker
Details | Splinter Review
Include test-dbus and test-bus in cmake 'make check' target (1.26 KB, patch)
2014-01-14 18:03 UTC, Ralf Habacker
Details | Splinter Review
Rename dbus-test to test-dbus to match common test application names (update 3) (6.88 KB, patch)
2014-01-16 08:17 UTC, Ralf Habacker
Details | Splinter Review
Rename shell-test to test-shell to match common test application naming scheme. (update 3) (3.09 KB, patch)
2014-01-16 16:37 UTC, Ralf Habacker
Details | Splinter Review
Rename spawn-test to test-spawn to match common test application naming scheme (update 2) (2.97 KB, patch)
2014-01-16 16:38 UTC, Ralf Habacker
Details | Splinter Review
Rename dbus-test to test-dbus to match common test application naming scheme. (5.99 KB, patch)
2014-01-17 17:16 UTC, Simon McVittie
Details | Splinter Review
Rename shell-test to test-shell to match common test application naming scheme. (3.06 KB, patch)
2014-01-17 17:17 UTC, Simon McVittie
Details | Splinter Review
Rename spawn-test to test-spawn to match common test application naming scheme. (2.84 KB, patch)
2014-01-17 17:17 UTC, Simon McVittie
Details | Splinter Review

Description Ralf Habacker 2014-01-11 09:21:29 UTC
Created attachment 91854 [details] [review]
Rename shell-test to test-shell to match common test application naming scheme.

Dbus test applications are mostly named test-<name>, only a few one are named in the opposite: 

spawn-test
shell-test
dbus-test
bus-test

test-printf
test-corrupt
test-dbus-daemon
test-dbus-daemon-eavesdrop
test-loopback
test-marshal
test-refs
test-relay
test-syntax
test-syslog

The appended patches cleans this differences.
Comment 1 Ralf Habacker 2014-01-11 09:22:48 UTC
Created attachment 91855 [details] [review]
Rename spawn-test to test-spawn to match common test application naming scheme.

tested with autotools and cmake
Comment 2 Ralf Habacker 2014-01-11 19:53:00 UTC
Created attachment 91878 [details] [review]
Rename dbus-test to test-dbus to match mostly test application names
Comment 3 Chengwei Yang 2014-01-13 06:11:06 UTC
I found there are two more.

bus-test-system
bus-test-launch-helper
Comment 4 Chengwei Yang 2014-01-13 06:15:26 UTC
Comment on attachment 91854 [details] [review]
Rename shell-test to test-shell to match common test application naming scheme.

Review of attachment 91854 [details] [review]:
-----------------------------------------------------------------

There several trailing whitespace in test-shell.c, I think it's time to fix them.
Comment 5 Chengwei Yang 2014-01-13 06:16:22 UTC
Comment on attachment 91855 [details] [review]
Rename spawn-test to test-spawn to match common test application naming scheme.

Review of attachment 91855 [details] [review]:
-----------------------------------------------------------------

ditto, several trailing whitespace in test-spawn.c
Comment 6 Ralf Habacker 2014-01-13 19:49:36 UTC
Created attachment 91988 [details] [review]
Rename dbus-test to test-dbus to match mostly test application names (update 1)

which fix in dbus/.gitignore
Comment 7 Ralf Habacker 2014-01-13 19:50:43 UTC
Created attachment 91989 [details] [review]
Rename bus-test to test-bus to match common test application naming scheme
Comment 8 Ralf Habacker 2014-01-13 19:51:43 UTC
Created attachment 91990 [details] [review]
Rename dbus-test to test-dbus to match mostly test application names (update 1)

previous patch was outdated
Comment 9 Ralf Habacker 2014-01-13 20:01:01 UTC
Created attachment 91991 [details] [review]
Rename bus-test to test-bus to match common test application naming scheme (update 1)

with cmake part
Comment 10 Ralf Habacker 2014-01-13 20:04:46 UTC
Created attachment 91992 [details] [review]
Rename shell-test to test-shell to match common test application naming scheme. (update 1)

with space fixes
Comment 11 Ralf Habacker 2014-01-13 20:06:08 UTC
Created attachment 91993 [details] [review]
Rename spawn-test to test-spawn to match common test application naming scheme (update 1)

with space fix
Comment 12 Ralf Habacker 2014-01-13 20:09:34 UTC
Created attachment 91994 [details] [review]
Rename bus-test to test-bus to match common test application naming scheme (update 2)

with doc fixes
Comment 13 Chengwei Yang 2014-01-14 02:41:02 UTC
Comment on attachment 91990 [details] [review]
Rename dbus-test to test-dbus to match mostly test application names (update 1)

Review of attachment 91990 [details] [review]:
-----------------------------------------------------------------

I see dbus/dbus-test.c still says something about dbus-test, for example.
44:   printf ("%s: checking for memleaks\n", "dbus-test");
Comment 14 Chengwei Yang 2014-01-14 03:10:06 UTC
Comment on attachment 91992 [details] [review]
Rename shell-test to test-shell to match common test application naming scheme. (update 1)

Review of attachment 91992 [details] [review]:
-----------------------------------------------------------------

Still has "shell-test" in cmake/test/CMakeLists.txt, like below

add_custom_target(check
    COMMAND ctest -R shell-test
    COMMAND ctest -R test-printf
Comment 15 Chengwei Yang 2014-01-14 03:16:10 UTC
Comment on attachment 91990 [details] [review]
Rename dbus-test to test-dbus to match mostly test application names (update 1)

Review of attachment 91990 [details] [review]:
-----------------------------------------------------------------

Also in doc/dbus-sepecification.xml
Comment 16 Chengwei Yang 2014-01-14 03:20:52 UTC
Comment on attachment 91994 [details] [review]
Rename bus-test to test-bus to match common test application naming scheme (update 2)

Review of attachment 91994 [details] [review]:
-----------------------------------------------------------------

git grep "bus-test" says:

HACKING:dbus/bus-test
cmake/CMakeLists.txt:  # bus-test expects a non empty string
cmake/CMakeLists.txt:  # bus-test expects a non empty string
cmake/bus-test.bat.cmake::: bus-test wrapper
cmake/bus-test.bat.cmake:bin\bus-test.exe test\data

Anyway, the rename work is quite trivial and dirty.
Comment 17 Simon McVittie 2014-01-14 10:22:21 UTC
I'm not sure whether this is worth the effort.

I'm certainly not going to apply these before we branch for 1.8 - please consider master to be semi-frozen for now.

(Your improvements to the cmake build system were OK, because it isn't the primary build system on the sort of OSs where stable-branches matter most, i.e. long-term-supported Linux and *BSD distributions.)
Comment 18 Ralf Habacker 2014-01-14 12:08:30 UTC
(In reply to comment #14)
> Comment on attachment 91992 [details] [review] [review]
> Rename shell-test to test-shell to match common test application naming
> scheme. (update 1)
> 
> Review of attachment 91992 [details] [review] [review]:
> -----------------------------------------------------------------
> 
> Still has "shell-test" in cmake/test/CMakeLists.txt, like below
> 
> add_custom_target(check
>     COMMAND ctest -R shell-test
>     COMMAND ctest -R test-printf

This will be changed to 

> add_custom_target(check
>     COMMAND ctest -R ^test-*

and is one of the reasons why I opened this bug

>     COMMAND ctest -R test-print
>     COMMAND ctest -R shell-test

will run tests not as a chain of tests. Instead it will run as inidivual tests

>     COMMAND ctest -R test-print
running 1 from 1 

>     COMMAND ctest -R shell-test
running test 1 from 1

in the opposite the following 
> add_custom_target(check
>     COMMAND ctest -R ^test-*

will run a chain of tests
running test 1 from 15
running test 2 from 15
running test 3 from 15
xxx failed of 15




runn
Comment 19 Ralf Habacker 2014-01-14 12:12:03 UTC
(In reply to comment #17)
> I'm not sure whether this is worth the effort.

I ever wondered why there is this mixed name scheme. 

> I'm certainly not going to apply these before we branch for 1.8 - please
> consider master to be semi-frozen for now.


> (Your improvements to the cmake build system were OK, because it isn't the
> primary build system on the sort of OSs where stable-branches matter most,
> i.e. long-term-supported Linux and *BSD distributions.)

So I could not finish test case related stuff before 1.8 ?
Comment 20 Simon McVittie 2014-01-14 12:48:05 UTC
(In reply to comment #18)
> This will be changed to 
> 
> > add_custom_target(check
> >     COMMAND ctest -R ^test-*
> 
> and is one of the reasons why I opened this bug

Ah, OK. That seems a reasonable justification for doing this.

I'd prefer not to land this before 1.8 though. It can be one of the first things in 1.9.
Comment 21 Ralf Habacker 2014-01-14 17:29:10 UTC
Created attachment 92055 [details] [review]
Rename dbus-test to test-dbus to match mostly test application names (update 2)

fixed issues raised in https://bugs.freedesktop.org/show_bug.cgi?id=73495#c16
Comment 22 Ralf Habacker 2014-01-14 17:32:29 UTC
(In reply to comment #15)
> Comment on attachment 91990 [details] [review] [review]
> Rename dbus-test to test-dbus to match mostly test application names (update
> 1)
> 
> Review of attachment 91990 [details] [review] [review]:
> -----------------------------------------------------------------
> 
> Also in doc/dbus-sepecification.xml

did not find any dbus-test application reference, only dbus addresses: 

programlisting>unix:path=/tmp/dbus-test</programlisting>
      Which is the address to a unix socket with the path /tmp/dbus-test.
      <programlisting>unix:path=/tmp/dbus-test;unix:path=/tmp/dbus-test2</programlisting>
Comment 23 Ralf Habacker 2014-01-14 17:35:30 UTC
Created attachment 92057 [details] [review]
Rename shell-test to test-shell to match common test application naming scheme. (update 2)

with 'make check' target fix
Comment 24 Ralf Habacker 2014-01-14 17:54:32 UTC
Created attachment 92070 [details] [review]
Rename bus-test-system to test-bus-system to match common test application naming scheme
Comment 25 Ralf Habacker 2014-01-14 17:55:19 UTC
Created attachment 92071 [details] [review]
Rename bus-test-launch-helper to test-bus-launch-helper to match common test application naming scheme
Comment 26 Ralf Habacker 2014-01-14 17:56:14 UTC
Created attachment 92073 [details] [review]
Let cmake 'make check' run test applications as one test group

This is the last patch
Comment 27 Ralf Habacker 2014-01-14 18:03:21 UTC
Created attachment 92076 [details] [review]
Include test-dbus and test-bus in cmake 'make check' target
Comment 28 Ralf Habacker 2014-01-14 19:57:02 UTC
(In reply to comment #20)
> (In reply to comment #18)
> > This will be changed to 
> > 
> > > add_custom_target(check
> > >     COMMAND ctest -R ^test-*
> > 
> > and is one of the reasons why I opened this bug
> 
> Ah, OK. That seems a reasonable justification for doing this.
> 
> I'd prefer not to land this before 1.8 though. It can be one of the first
> things in 1.9.

As far as i can see does 1.8 give some major and imported stuff like the thread fixes to the mass and this test cleanup (along with 41252) would be the cream topping, no ?

At least for windows users, it would be great news, if 1.8 would have complete  test case support out of the box.
Comment 29 Chengwei Yang 2014-01-15 00:56:06 UTC
(In reply to comment #22)
> (In reply to comment #15)
> > Comment on attachment 91990 [details] [review] [review] [review]
> > Rename dbus-test to test-dbus to match mostly test application names (update
> > 1)
> > 
> > Review of attachment 91990 [details] [review] [review] [review]:
> > -----------------------------------------------------------------
> > 
> > Also in doc/dbus-sepecification.xml
> 
> did not find any dbus-test application reference, only dbus addresses: 
> 
> programlisting>unix:path=/tmp/dbus-test</programlisting>
>       Which is the address to a unix socket with the path /tmp/dbus-test.
>      
> <programlisting>unix:path=/tmp/dbus-test;unix:path=/tmp/dbus-test2</
> programlisting>

Yes, definitely what I found. I think if you're rename dbus-test to test-dbus, so as these examples here.
Comment 30 Chengwei Yang 2014-01-16 07:31:42 UTC
Comment on attachment 92057 [details] [review]
Rename shell-test to test-shell to match common test application naming scheme. (update 2)

Review of attachment 92057 [details] [review]:
-----------------------------------------------------------------

Looks good to me.
Comment 31 Chengwei Yang 2014-01-16 07:33:57 UTC
Comment on attachment 91993 [details] [review]
Rename spawn-test to test-spawn to match common test application naming scheme (update 1)

Review of attachment 91993 [details] [review]:
-----------------------------------------------------------------

Looks good to me.
Comment 32 Chengwei Yang 2014-01-16 07:39:21 UTC
Comment on attachment 92055 [details] [review]
Rename dbus-test to test-dbus to match mostly test application names (update 2)

Review of attachment 92055 [details] [review]:
-----------------------------------------------------------------

I think it's better if we also change the example test file name in dbus-specification.xml

doc/dbus-specification.xml:      <programlisting>unix:path=/tmp/dbus-test</programlisting>
doc/dbus-specification.xml:      Which is the address to a unix socket with the path /tmp/dbus-test.
doc/dbus-specification.xml:      <programlisting>unix:path=/tmp/dbus-test;unix:path=/tmp/dbus-test2</programlisting>

Because before dbus-test is a hint for our test name, but now it's been renamed to test-dbus.
Comment 33 Chengwei Yang 2014-01-16 07:43:52 UTC
Comment on attachment 92070 [details] [review]
Rename bus-test-system to test-bus-system to match common test application naming scheme

Review of attachment 92070 [details] [review]:
-----------------------------------------------------------------

Looks good to me.
Comment 34 Chengwei Yang 2014-01-16 07:45:21 UTC
Comment on attachment 92071 [details] [review]
Rename bus-test-launch-helper to test-bus-launch-helper to match common test application naming scheme

Review of attachment 92071 [details] [review]:
-----------------------------------------------------------------

Looks good to me.
Comment 35 Chengwei Yang 2014-01-16 07:55:33 UTC
Comment on attachment 92073 [details] [review]
Let cmake 'make check' run test applications as one test group

Review of attachment 92073 [details] [review]:
-----------------------------------------------------------------

Looks good to me.
Comment 36 Chengwei Yang 2014-01-16 08:10:16 UTC
Comment on attachment 92076 [details] [review]
Include test-dbus and test-bus in cmake 'make check' target

Review of attachment 92076 [details] [review]:
-----------------------------------------------------------------

Looks good to me.
Comment 37 Ralf Habacker 2014-01-16 08:17:24 UTC
Created attachment 92208 [details] [review]
Rename dbus-test to test-dbus to match common test application names (update 3)

with requested changes in doc/dbus-specification.xml
Comment 38 Chengwei Yang 2014-01-16 08:21:32 UTC
Hi Ralf, did you notice the cmake "make check" will fail on test-bus and test-dbus? But autotools "make check" works fine.

$ make check
Test project ~/dbus.git
      Start  1: test-dbus
 1/14 Test  #1: test-dbus ........................***Exception: Other 18.58 sec
      Start  2: test-bus
 2/14 Test  #2: test-bus .........................***Exception: Other 26.48 sec
      Start  3: test-bus-launch-helper
 3/14 Test  #3: test-bus-launch-helper ...........   Passed    0.04 sec
      Start  4: test-shell
 4/14 Test  #4: test-shell .......................   Passed    0.00 sec
      Start  5: test-printf
 5/14 Test  #5: test-printf ......................   Passed    0.05 sec
      Start  6: test-corrupt
 6/14 Test  #6: test-corrupt .....................   Passed    0.09 sec
      Start  7: test-dbus-daemon
 7/14 Test  #7: test-dbus-daemon .................   Passed    1.53 sec
      Start  8: test-dbus-daemon-eavesdrop
 8/14 Test  #8: test-dbus-daemon-eavesdrop .......   Passed    0.05 sec
      Start  9: test-loopback
 9/14 Test  #9: test-loopback ....................   Passed    0.18 sec
      Start 10: test-marshal
10/14 Test #10: test-marshal .....................   Passed    0.00 sec
      Start 11: test-refs
11/14 Test #11: test-refs ........................   Passed   10.46 sec
      Start 12: test-relay
12/14 Test #12: test-relay .......................   Passed    0.73 sec
      Start 13: test-syntax
13/14 Test #13: test-syntax ......................   Passed    0.00 sec
      Start 14: test-syslog
14/14 Test #14: test-syslog ......................   Passed    0.00 sec

86% tests passed, 2 tests failed out of 14

Total Test time (real) =  58.21 sec

The following tests FAILED:
          1 - test-dbus (OTHER_FAULT)
          2 - test-bus (OTHER_FAULT)
Errors while running CTest
make[3]: *** [CMakeFiles/check] Error 8
make[2]: *** [CMakeFiles/check.dir/all] Error 2
make[1]: *** [CMakeFiles/check.dir/rule] Error 2
make: *** [check] Error 2
Comment 39 Chengwei Yang 2014-01-16 08:22:23 UTC
Comment on attachment 92208 [details] [review]
Rename dbus-test to test-dbus to match common test application names (update 3)

Review of attachment 92208 [details] [review]:
-----------------------------------------------------------------

Looks good to me.
Comment 40 Ralf Habacker 2014-01-16 08:24:16 UTC
(In reply to comment #38)
> Hi Ralf, did you notice the cmake "make check" will fail on test-bus and
> test-dbus? But autotools "make check" works fine.

Is this cross compiled or linux native ?
Comment 41 Chengwei Yang 2014-01-16 08:26:27 UTC
(In reply to comment #40)
> (In reply to comment #38)
> > Hi Ralf, did you notice the cmake "make check" will fail on test-bus and
> > test-dbus? But autotools "make check" works fine.
> 
> Is this cross compiled or linux native ?

I'm running it on Ubuntu 12.04.
Comment 42 Ralf Habacker 2014-01-16 08:43:21 UTC
(In reply to comment #41)
> (In reply to comment #40)
> > (In reply to comment #38)
> > > Hi Ralf, did you notice the cmake "make check" will fail on test-bus and
> > > test-dbus? But autotools "make check" works fine.
> > 
> > Is this cross compiled or linux native ?
> 
> I'm running it on Ubuntu 12.04.

I guess that there must be some environment and/or config differences to the autotools check, because the code is compiled identically.
Comment 43 Ralf Habacker 2014-01-16 08:53:19 UTC
(In reply to comment #42)
> (In reply to comment #41)
> > (In reply to comment #40)
> > > (In reply to comment #38)
> > > > Hi Ralf, did you notice the cmake "make check" will fail on test-bus and
> > > > test-dbus? But autotools "make check" works fine.
> > > 
> > > Is this cross compiled or linux native ?
> > 
> > I'm running it on Ubuntu 12.04.
> 
> I guess that there must be some environment and/or config differences to the
> autotools check, because the code is compiled identically.

I see, on autotools test-dbus and test-bus are only added when configuring with --enable-embedded-tests. On cmake they are currently included unconditional. 

You have the same message from running test-dbus ? 

xxx@yyyy:~/src/dbus-cmake-build> ctest -V -V  -R ^test-dbus$
UpdateCTestConfiguration  from :/home/xxx/src/dbus-cmake-build/DartConfiguration.tcl
UpdateCTestConfiguration  from :/home/xxx/src/dbus-cmake-build/DartConfiguration.tcl
Test project /home/xxx/src/dbus-cmake-build
Constructing a list of tests
Done constructing a list of tests
Checking test dependency graph...
Checking test dependency graph end
test 1
    Start 1: test-dbus

1: Test command: /home/xxx/src/dbus-cmake-build/bin/test-dbus
1: Test timeout computed to be: 9.99988e+06
1: >>> >>> Each value by itself 120 iterations
1:  0%  10%  20%  30%  40%  50%  60%  70%  80%  90%  100% 120 this test (120 cumulative)
1: >>> >>> Each value by itself with arrays as blocks 120 iterations
1:  0%  10%  20%  30%  40%  50%  60%  70%  80%  90%  100% 120 this test (240 cumulative)
1: >>> >>> All values in one big toplevel 1 iteration
1:  100% 1 this test (241 cumulative)
1: >>> >>> Each value,value pair combination as toplevel, in both orders 14400 iterations
1:  0%  10%  20%  30%  40%  50%  60%  70%  80%  90%  100% 14400 this test (14641 cumulative)
1: >>> >>> Each container containing each value 840 iterations
1:  0%  10%  20%  30%  40%  50%  60%  70%  80%  90%  100% 840 this test (15481 cumulative)
1: >>> >>> Each container containing each value with arrays as blocks 840 iterations
1:  0%  10%  20%  30%  40%  50%  60%  70%  80%  90%  100% 840 this test (16321 cumulative)
1: >>> >>> Each container of same container of each value 840 iterations
1:  0%  10%  20%  30%  40%  50%  60%  70%  80%  90%  100% 840 this test (17161 cumulative)
1: >>> >>> Each container of same container of same container of each value 840 iterations
1:  0%  10%  20%  30%  40%  50%  60%  70%  80%  90%  100% 840 this test (18001 cumulative)
1: >>> >>> Each value,value pair inside a struct 14400 iterations
1:  0%  10%  20%  30%  40%  50%  60%  70%  80%  90%  100% 14400 this test (32401 cumulative)
1: >>> >>> All values in one big struct 1 iteration
1:  100% 1 this test (32402 cumulative)
1: >>> >>> Each value in a large array 120 iterations
1:  0%  10%  20%  30%  40%  50%  60%  70%  80%  90%  100% 120 this test (32522 cumulative)
1: skipping remaining marshal-recursive tests, run with DBUS_TEST_SLOW=1 (or more) to enable
1: 32522 total iterations of recursive marshaling tests
1: each iteration ran at initial offsets 0 through 9 in both big and little endian
1: out of memory handling was not tested
1: Test data in /home/xxx/src/dbus-cmake-build/test/data
1: test-dbus: running string tests
1: test-dbus: checking for memleaks
1: test-dbus: running sysdeps tests
1: test-dbus: checking for memleaks
1: test-dbus: running data-slot tests
1: test-dbus: checking for memleaks
1: test-dbus: running misc tests
1: test-dbus: checking for memleaks
1: test-dbus: running address tests
1: test-dbus: checking for memleaks
1: test-dbus: running server tests
1: test-dbus: checking for memleaks
1: test-dbus: running object-tree tests
1: test-dbus: checking for memleaks
1: test-dbus: running signature tests
1: test-dbus: checking for memleaks
1: test-dbus: running marshalling tests
1: test-dbus: checking for memleaks
1: test-dbus: running marshal-recursive tests
1: test-dbus: checking for memleaks
1: test-dbus: running byteswap tests
1:   120 blocks swapped from order 'l' to 'B'
1:   120 blocks swapped from order 'B' to 'l'
1: test-dbus: checking for memleaks
1: test-dbus: running memory tests
1: test-dbus: checking for memleaks
1: test-dbus: running mem-pool tests
1: test-dbus: checking for memleaks
1: test-dbus: running list tests
1: test-dbus: checking for memleaks
1: test-dbus: running marshal-validate tests
1: test-dbus: checking for memleaks
1: test-dbus: running message tests
1:  testing message loading: trivial example of each message type 4 test loads cumulative
1:  testing message loading: assorted arguments 124 test loads cumulative
1:  testing message loading: assorted special cases 146 test loads cumulative
1:  testing message loading: each uint32 modified 35368 test loads cumulative
1:  testing message loading: wrong body lengths 38368 test loads cumulative
1:  testing message loading: each byte modified 51547 test loads cumulative
1: 51547 sample messages tested
1: validity   0 seen 381 times
1: validity   1 seen 3471 times
1: validity   2 seen 177 times
1: validity   4 seen 3 times
1: validity   5 seen 3 times
1: validity   6 seen 3 times
1: validity   7 seen 273 times
1: validity   8 seen 3 times
1: validity   9 seen 15780 times
1: validity  10 seen 171 times
1: validity  11 seen 2745 times
1: validity  12 seen 5718 times
1: validity  13 seen 3960 times
1: validity  14 seen 360 times
1: validity  15 seen 3 times
1: validity  16 seen 1080 times
1: validity  17 seen 1440 times
1: validity  18 seen 1107 times
1: validity  19 seen 3 times
1: validity  20 seen 1080 times
1: validity  21 seen 7200 times
1: validity  22 seen 3 times
1: validity  23 seen 3 times
1: validity  24 seen 720 times
1: validity  25 seen 360 times
1: validity  26 seen 1440 times
1: validity  27 seen 720 times
1: validity  28 seen 360 times
1: validity  29 seen 3 times
1: validity  30 seen 720 times
1: validity  31 seen 3 times
1: validity  32 seen 360 times
1: validity  33 seen 3 times
1: validity  34 seen 3 times
1: validity  35 seen 14625 times
1: validity  37 seen 6666 times
1: validity  38 seen 2013 times
1: validity  39 seen 15447 times
1: validity  40 seen 1788 times
1: validity  41 seen 8325 times
1: validity  42 seen 3408 times
1: validity  43 seen 4875 times
1: validity  45 seen 3327 times
1: validity  46 seen 7485 times
1: validity  47 seen 1125 times
1: validity  48 seen 3 times
1: validity  49 seen 3 times
1: validity  50 seen 144 times
1: validity  51 seen 3 times
1: validity  54 seen 12 times
1: validity  57 seen 3 times
1: validity  -4 seen 0 times
1: validity  -2 seen 0 times
1: validity   3 seen 0 times
1: validity  36 seen 0 times
1: validity  44 seen 0 times
1: validity  52 seen 0 times
1: validity  53 seen 0 times
1: validity  55 seen 0 times
1: validity  56 seen 0 times
1: Testing valid-messages:
1: SKIP: Could not load standard-acquire-service.message, message builder language no longer supported
1: SKIP: Could not load simplest.message, message builder language no longer supported
1: SKIP: Could not load emptiness.message, message builder language no longer supported
1: SKIP: Could not load standard-list-services.message, message builder language no longer supported
1: SKIP: Could not load unknown-header-field.message, message builder language no longer supported
1: SKIP: Could not load standard-service-exists.message, message builder language no longer supported
1: SKIP: Could not load array-of-array-of-uint32.message, message builder language no longer supported
1: SKIP: Could not load dict.message, message builder language no longer supported
1: SKIP: Could not load recursive-types.message, message builder language no longer supported
1: SKIP: Could not load lots-of-arguments.message, message builder language no longer supported
1: SKIP: Could not load dict-simple.message, message builder language no longer supported
1: SKIP: Could not load opposite-endian.message, message builder language no longer supported
1: SKIP: Could not load no-padding.message, message builder language no longer supported
1: SKIP: Could not load standard-hello.message, message builder language no longer supported
1: SKIP: Could not load simplest-manual.message, message builder language no longer supported
1: Testing invalid-messages:
1: SKIP: Could not load local-namespace.message, message builder language no longer supported
1: SKIP: Could not load bad-boolean.message, message builder language no longer supported
1: SKIP: Could not load bad-header-field-alignment.message, message builder language no longer supported
1: SKIP: Could not load not-nul-header-padding.message, message builder language no longer supported
1: SKIP: Could not load too-little-header-padding.message, message builder language no longer supported
1: SKIP: Could not load too-much-header-padding.message, message builder language no longer supported
1: SKIP: Could not load bad-boolean-array.message, message builder language no longer supported
1:     boolean-has-no-value.message-raw
1: SKIP: Could not load too-short-dict.message, message builder language no longer supported
1: SKIP: Could not load overlong-name.message, message builder language no longer supported
1: Fd 3 did not have the close-on-exec flag set!
1:   /home/xxx/src/dbus-cmake-build/bin/test-dbus(_dbus_print_backtrace+0x1f) [0x44fb35]
1:   /home/xxx/src/dbus-cmake-build/bin/test-dbus(_dbus_abort+0xd) [0x44abe1]
1:   /home/xxx/src/dbus-cmake-build/bin/test-dbus(_dbus_warn+0xd3) [0x437f85]
1:   /home/xxx/src/dbus-cmake-build/bin/test-dbus() [0x414c46]
1:   /home/xxx/src/dbus-cmake-build/bin/test-dbus(_dbus_spawn_async_with_babysitter+0x46c) [0x415407]
1:   /home/xxx/src/dbus-cmake-build/bin/test-dbus() [0x415730]
1: SKIP: Could not load array-with-mixed-types.message, message builder language no longer supported
1: SKIP: Could not load too-much-header-padding-by-far.message, message builder language no longer supported
1: SKIP: Could not load no-dot-in-name.message, message builder language no longer supported
1: SKIP: Could not load bad-endian.message, message builder language no longer supported
1: SKIP: Could not load array-of-nil.message, message builder language no longer supported
1: Testing incomplete-messages:
1: SKIP: Could not load missing-body.message, message builder language no longer supported
1: test-dbus: checking for memleaks
1: test-dbus: running hash tests
1: Computing test hash keys...
1: ... done.
1: test-dbus: checking for memleaks
1: test-dbus: running spawn tests
1:   /home/xxx/src/dbus-cmake-build/bin/test-dbus(_dbus_test_oom_handling+0x49) [0x439031]
1:   /home/xxx/src/dbus-cmake-build/bin/test-dbus(_dbus_spawn_test+0x20) [0x415cc5]
1:   /home/xxx/src/dbus-cmake-build/bin/test-dbus() [0x41339f]
1:   /home/xxx/src/dbus-cmake-build/bin/test-dbus(dbus_internal_do_not_use_run_tests+0x1fb) [0x4135b1]
1:   /home/xxx/src/dbus-cmake-build/bin/test-dbus(main+0x69) [0x413255]
1:   /lib64/libc.so.6(__libc_start_main+0xf5) [0x7fcecdd83455]
1:   /home/xxx/src/dbus-cmake-build/bin/test-dbus() [0x413109]
1:  no longer supported
1: SKIP: Could not load too-much-header-padding-by-far.message, message builder language no longer supported
1: SKIP: Could not load no-dot-in-name.message, message builder language no longer supported
1: SKIP: Could not load bad-endian.message, message builder language no longer supported
1: SKIP: Could not load array-of-nil.message, message builder language no longer supported
1: Testing incomplete-messages:
1: SKIP: Could not load missing-body.message, message builder language no longer supported
1: test-dbus: checking for memleaks
1: test-dbus: running hash tests
1: Computing test hash keys...
1: ... done.
1: test-dbus: checking for memleaks
1: test-dbus: running spawn tests
1:  no longer supported
1: SKIP: Could not load too-much-header-padding-by-far.message, message builder language no longer supported
1: SKIP: Could not load no-dot-in-name.message, message builder language no longer supported
1: SKIP: Could not load bad-endian.message, message builder language no longer supported
1: Not expecting error when launching nonexistent executable: org.freedesktop.DBus.Error.Spawn.ChildSignaled: Process spawn_nonexistent received signal 6
1:   /home/xxx/src/dbus-cmake-build/bin/test-dbus(_dbus_print_backtrace+0x1f) [0x44fb35]
1:   /home/xxx/src/dbus-cmake-build/bin/test-dbus(_dbus_abort+0xd) [0x44abe1]
1:   /home/xxx/src/dbus-cmake-build/bin/test-dbus(_dbus_warn+0xd3) [0x437f85]
1:   /home/xxx/src/dbus-cmake-build/bin/test-dbus() [0x4157d2]
1:   /home/xxx/src/dbus-cmake-build/bin/test-dbus(_dbus_test_oom_handling+0x49) [0x439031]
1:   /home/xxx/src/dbus-cmake-build/bin/test-dbus(_dbus_spawn_test+0x20) [0x415cc5]
1:   /home/xxx/src/dbus-cmake-build/bin/test-dbus() [0x41339f]
1:   /home/xxx/src/dbus-cmake-build/bin/test-dbus(dbus_internal_do_not_use_run_tests+0x1fb) [0x4135b1]
1:   /home/xxx/src/dbus-cmake-build/bin/test-dbus(main+0x69) [0x413255]
1:   /lib64/libc.so.6(__libc_start_main+0xf5) [0x7fcecdd83455]
1: SKIP: Could not load array-of-nil.message, message builder language no longer supported
1: Testing incomplete-messages:
1: SKIP: Could not load missing-body.message, message builder language no longer supported
1: test-dbus: checking for memleaks
1: test-dbus: running hash tests
1: Computing test hash keys...
1: ... done.
1: test-dbus: checking for memleaks
1: test-dbus: running spawn tests
1:   /home/xxx/src/dbus-cmake-build/bin/test-dbus() [0x413109]
1/1 Test #1: test-dbus ........................***Exception: Other 28.66 sec

0% tests passed, 1 tests failed out of 1

Total Test time (real) =  28.66 sec

The following tests FAILED:
          1 - test-dbus (OTHER_FAULT)
Errors while running CTest
Comment 44 Chengwei Yang 2014-01-16 09:01:31 UTC
(In reply to comment #43)
> (In reply to comment #42)
> > (In reply to comment #41)
> > > (In reply to comment #40)
> > > > (In reply to comment #38)
> > > > > Hi Ralf, did you notice the cmake "make check" will fail on test-bus and
> > > > > test-dbus? But autotools "make check" works fine.
> > > > 
> > > > Is this cross compiled or linux native ?
> > > 
> > > I'm running it on Ubuntu 12.04.
> > 
> > I guess that there must be some environment and/or config differences to the
> > autotools check, because the code is compiled identically.
> 
> I see, on autotools test-dbus and test-bus are only added when configuring
> with --enable-embedded-tests. On cmake they are currently included
> unconditional. 

test-bus-system also included in autotools test only when embeded-tests enabled.

> 
> You have the same message from running test-dbus ? 
> 

Yes, almost the same.
Comment 45 Chengwei Yang 2014-01-16 09:03:51 UTC
OK, I found another file needed rename.

dbus-daemon-launch-helper-test
Comment 46 Ralf Habacker 2014-01-16 09:08:31 UTC
(In reply to comment #44)
> (In reply to comment #43)
> > (In reply to comment #42)
> > > (In reply to comment #41)
> > > > (In reply to comment #40)
> > > > > (In reply to comment #38)
> > > > > > Hi Ralf, did you notice the cmake "make check" will fail on test-bus and
> > > > > > test-dbus? But autotools "make check" works fine.
> > > > > 
> > > > > Is this cross compiled or linux native ?
> > > > 
> > > > I'm running it on Ubuntu 12.04.
> > > 
> > > I guess that there must be some environment and/or config differences to the
> > > autotools check, because the code is compiled identically.
> > 
> > I see, on autotools test-dbus and test-bus are only added when configuring
> > with --enable-embedded-tests. On cmake they are currently included
> > unconditional. 
> 
> test-bus-system also included in autotools test only when embeded-tests
> enabled.
> 
> > 
> > You have the same message from running test-dbus ? 
> > 
> 
> Yes, almost the same.

looks like a common problem. Running test-dbus created with autotools also fails:

make check 
... 
test-dbus: checking for memleaks
test-dbus: running memory tests
test-dbus: checking for memleaks
test-dbus: running mem-pool tests
test-dbus: checking for memleaks
test-dbus: running list tests
test-dbus: checking for memleaks
test-dbus: running marshal-validate tests
test-dbus: checking for memleaks
test-dbus: running message tests
/bin/sh: line 5:  2106 Speicherzugriffsfehler  XDG_RUNTIME_DIR=/home/xxx/src/dbus-autotools-build/test/XDG_RUNTIME_DIR DBUS_FATAL_WARNINGS=1 DBUS_TEST_DAEMON=/home/xxx/src/dbus-autotools-build/bus/dbus-daemon DBUS_TEST_DATA=/home/xxx/src/dbus-autotools-build/test/data DBUS_TEST_HOMEDIR=/home/xxx/src/dbus-autotools-build/dbus ${dir}$tst
FAIL: ../dbus/test-dbus

Will open a related bug.
Comment 47 Simon McVittie 2014-01-16 12:37:37 UTC
Comment on attachment 91993 [details] [review]
Rename spawn-test to test-spawn to match common test application naming scheme (update 1)

Review of attachment 91993 [details] [review]:
-----------------------------------------------------------------

::: test/test-spawn.c
@@ +1,2 @@
> +#include <config.h>
> +#include <dbus/dbus.h>

Sorry, I'm not going to accept this sort of diffstat (moving whole files around) from 1.8rc1 to 1.8.0 - I don't want anything that will make stable distributions uneasy about taking the update. It can go in 1.9 if you like.
Comment 48 Simon McVittie 2014-01-16 12:39:30 UTC
Comment on attachment 92073 [details] [review]
Let cmake 'make check' run test applications as one test group

Review of attachment 92073 [details] [review]:
-----------------------------------------------------------------

I can see that being able to group the tests like this is "nice to have" for 1.9, but it isn't a compelling reason to break a freeze.

I'm not going to review the renames in detail until after I've released 1.8; please hold off on merging.
Comment 49 Simon McVittie 2014-01-16 12:42:12 UTC
Comment on attachment 92076 [details] [review]
Include test-dbus and test-bus in cmake 'make check' target

Review of attachment 92076 [details] [review]:
-----------------------------------------------------------------

> Include test-dbus and test-bus in cmake 'make check' target

If I remember correctly, these "embedded tests" are designed to be run with a rather different environment (environment variables, supporting files etc.) - I wouldn't be surprised if there's enough infrastructure in the CMake stuff to support my more recent "modular tests", but not enough to support these.

I deliberately only asked for the "modular tests" in Bug #41252, for that reason. It would be great if we could *also* run the "embedded tests", but it's lower-priority, IMO.
Comment 50 Simon McVittie 2014-01-16 12:46:00 UTC
Comment on attachment 92208 [details] [review]
Rename dbus-test to test-dbus to match common test application names (update 3)

Review of attachment 92208 [details] [review]:
-----------------------------------------------------------------

::: doc/dbus-specification.xml
@@ +2893,5 @@
>      </para>
>      <para>
>        For example: 
> +      <programlisting>unix:path=/tmp/test-dbus</programlisting>
> +      Which is the address to a unix socket with the path /tmp/test-dbus.

This is nothing to do with dbus-test.exe - it's just an example string.

We just need any random filename here - if anything, I would be inclined to replace this with the well-known system bus' usual name, "unix:path=/var/run/dbus/system_bus_socket"...

@@ +2958,4 @@
>        separated by a semi-colon. The library will then try to connect
>        to the first address and if that fails, it'll try to connect to
>        the next one specified, and so forth. For example
> +      <programlisting>unix:path=/tmp/test-dbus;unix:path=/tmp/test-dbus2</programlisting>

... and this with, I don't know, "unix:path=/var/run/dbus/system_bus_socket;unix:path=/usr/local/var/run/dbus/system_bus_socket" or something?
Comment 51 Ralf Habacker 2014-01-16 16:37:34 UTC
Created attachment 92235 [details] [review]
Rename shell-test to test-shell to match common test application naming scheme. (update 3)

without source file patch
Comment 52 Ralf Habacker 2014-01-16 16:38:20 UTC
Created attachment 92236 [details] [review]
Rename spawn-test to test-spawn to match common test application naming scheme (update 2)

without source file patch
Comment 53 Simon McVittie 2014-01-17 16:14:15 UTC
(In reply to comment #51)
> Rename shell-test to test-shell to match common test application naming
> scheme. (update 3)
> 
> without source file patch

Ah, this seems like a reasonable compromise - the binary names you want, with less diffstat. I'll apply this stuff to a branch and see what it looks like.
Comment 54 Simon McVittie 2014-01-17 16:36:39 UTC
I had to amend a couple of patches to make a clean Autotools build work, but I think these might be small enough for 1.8 after all. If I run into any problems I'll just revert, though - I consider a stable-branch for Linux distros to be more important than the non-default build system.

Also in the "cmake" branch on <ssh://people.freedesktop.org/~smcv/dbus.git>.

A commit order that works:

0001-Rename-dbus-test-to-test-dbus-to-match-common-test-a.patch
0002-Rename-shell-test-to-test-shell-to-match-common-test.patch
0003-Rename-spawn-test-to-test-spawn-to-match-common-test.patch
0004-Rename-bus-test-to-test-bus-to-match-common-test-app.patch
0005-Rename-bus-test-system-to-test-bus-system-to-match-c.patch
0006-Rename-bus-test-launch-helper-to-test-bus-launch_hel.patch
0007-Let-cmake-make-check-run-test-applications-as-test-g.patch

I didn't apply Attachment #92076 [details] because the additional tests fail (see another bug). I'd rather have "make check" do *something* useful, and leave the failing tests out until someone has had a chance to debug that.
Comment 55 Simon McVittie 2014-01-17 17:16:34 UTC
Created attachment 92296 [details] [review]
Rename dbus-test to test-dbus to match common test  application naming scheme.

From: Ralf Habacker <ralf.habacker@freenet.de>

[reverted the dbus-specification part -smcv]

---

As per my review of Attachment #92208 [details].
Comment 56 Simon McVittie 2014-01-17 17:17:09 UTC
Created attachment 92297 [details] [review]
Rename shell-test to test-shell to match common test  application naming scheme.

From: Ralf Habacker <ralf.habacker@freenet.de>

[Add its source file to SOURCES: this test was previously relying on the
Automake feature that the default value of foo_bar_SOURCES is foo-bar.c. -smcv]
Comment 57 Simon McVittie 2014-01-17 17:17:31 UTC
Created attachment 92298 [details] [review]
Rename spawn-test to test-spawn to match common test  application naming scheme.

From: Ralf Habacker <ralf.habacker@freenet.de>

[Same change as for shell-test in the previous commit. -smcv]
Comment 58 Simon McVittie 2014-01-20 14:55:11 UTC
I merged a lot of this for 1.8.0, but not Attachment #92076 [details] (which I'm considering to be part of Bug #73689), and not renaming the source code files.
Comment 59 Ralf Habacker 2014-01-20 20:03:58 UTC
(In reply to comment #58)
> I merged a lot of this for 1.8.0, 
you will merge 1.8.0 in master some day or should i add those patches to master ? 

> but not Attachment #92076 [details] (which I'm considering to be part of Bug #73689), 
agreed. 
According to the information from your feedback I need to separate the tests on cmake build system from the embedded test which are currently tight together. 

> and not renaming the source code files.
it's okay for me.
Comment 60 Simon McVittie 2014-01-20 20:15:30 UTC
(In reply to comment #59)
> (In reply to comment #58)
> > I merged a lot of this for 1.8.0, 
> you will merge 1.8.0 in master some day or should i add those patches to
> master ? 

master is already a descendant of 1.8.0; dbus-1.8 and master only diverge after that point.
Comment 61 Ralf Habacker 2014-01-20 20:20:51 UTC
(In reply to comment #60)
> (In reply to comment #59)
> > (In reply to comment #58)
> > > I merged a lot of this for 1.8.0, 
> > you will merge 1.8.0 in master some day or should i add those patches to
> > master ? 
> 
> master is already a descendant of 1.8.0; dbus-1.8 and master only diverge
> after that point.

I see thanks


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.