-
Notifications
You must be signed in to change notification settings - Fork 28
/
ChangeLog
7370 lines (6092 loc) · 322 KB
/
ChangeLog
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
2012-12-13 Stéphane Graber <[email protected]>
* nih-dbus-tool/type.c, nih-dbus-tool/marshal.c: Update dbus code
generator to allow for empty lists for type 'as'. This drops the
!= NULL check for NULL terminated arrays and moves the iteration
loop inside an 'if' statement.
2012-12-11 Dmitrijs Ledkovs <[email protected]>
* nih/file.c (nih_dir_walk_scan): Fallback to lstat, if the
non-portable dirent.d_type is not available (LP: #672643) (Closes:
#695604).
2012-12-10 Petr Lautrbach <[email protected]>
* nih/tests/test_file.c: don't use dirent.d_type (not portable)
2011-08-31 James Hunt <[email protected]>
* nih-dbus-tool/tests/test_com.netsplit.Nih.Test_object.c
(test_unix_fd_to_str): Sanity check value before invoking strchr in
case it returns address of null (which would give a misleading test
pass).
* nih-dbus-tool/tests/test_com.netsplit.Nih.Test_proxy.c
(test_unix_fd_to_str, test_unix_fd_to_str_sync): Sanity check value
before invoking strchr in case it returns address of null (which would
give a misleading test pass).
* nih/config.c (): nih_config_block_end: Add check to ensure strchr()
doesn't return address of null since this would result in a misleading
return value of TRUE.
* nih/string.c (nih_str_split): Fixes to avoid over-running
input string and also returning an empty string array entry
when repeat is true (LP: #834813).
* nih/tests/test_string.c (test_str_split): Added a lot of new
tests for nih_str_split().
2011-08-26 James Hunt <[email protected]>
* nih/io.c (nih_io_select_fds): Ensure number of fds being managed
is within limits.
* nih/config.c, nih/error.h, nih/io.c, nih/test_files.h: Correct
typos in comments.
2011-06-20 James Hunt <[email protected]>
* nih/watch.c (nih_watch_handle): Handle non-directory watches;
previously a file watch resulted in an invalid file path ending in
a single slash (LP:#777097).
* nih/tests/test_watch.c: Added explicit test for watch on a file.
2010-12-23 Scott James Remnant <[email protected]>
* configure.ac: Bump version to 1.0.4
* NEWS: Begin new release
* NEWS: Release 1.0.3
* nih-dbus-tool/type.c (type_const, type_of): Add support for the
DBUS_TYPE_UNIX_FD type, with a C type of "int".
* nih-dbus-tool/tests/test_type.c (test_const, test_of): Check the types
are correct.
* nih-dbus-tool/tests/marshal_factory.c: Generate function for
unix_fd testing
* nih-dbus-tool/tests/marshal_code.h: Add header for generated function
* nih-dbus-tool/tests/test_marshal.c (test_marshal): Test the generator
and the generated function
* nih-dbus-tool/tests/demarshal_factory.c: Generate function for
unix_fd testing
* nih-dbus-tool/tests/demarshal_code.h: Add header for generated function
* nih-dbus-tool/tests/test_demarshal.c (test_demarshal): Test the
generator and the generated code
* nih-dbus-tool/tests/com.netsplit.Nih.Test.xml: Add methods, signal and
properties for testing.
* nih-dbus-tool/tests/com.netsplit.Nih.Test_impl.h: Add property
definition
* nih-dbus-tool/tests/com.netsplit.Nih.Test_impl.c (my_test_unix_fd_to_str)
(my_test_str_to_unix_fd, my_test_get_unix_fd)
(my_test_set_unix_fd): Test implementation.
* nih-dbus-tool/tests/test_com.netsplit.Nih.Test_object.c (test_unix_fd_to_str)
(test_str_to_unix_fd, test_new_unix_fd, test_get_unix_fd)
(test_set_unix_fd): Add methods to test the object implementation.
* nih-dbus-tool/tests/test_com.netsplit.Nih.Test_proxy.c (test_unix_fd_to_str)
(test_unix_fd_to_str_sync, test_str_to_unix_fd)
(test_str_to_unix_fd_sync, test_new_unix_fd, test_get_unix_fd)
(test_get_unix_fd_sync, test_set_unix_fd, test_set_unix_fd_sync): Add tests
for unix fds.
(test_get_all, test_get_all_sync): Add unix fd to tests.
* NEWS: Update
2010-04-27 Scott James Remnant <[email protected]>
* configure.ac: Bump version to 1.0.3
* NEWS: Begin new release
* NEWS: Release 1.0.2
2010-04-24 Scott James Remnant <[email protected]>
* m4/libnih.m4 (NIH_WITH_LOCAL_LIBNIH): Add macro cribbed from the
Upstart configure.ac
2010-03-04 Scott James Remnant <[email protected]>
* nih-dbus-tool/Makefile.am (tests/marshal_code.c)
(tests/demarshal_code.c, tests/interface_code.c)
(tests/method_code.c, tests/signal_code.c)
(tests/property_code.c): Support silent rules by using $(AM_V_GEN)
2010-02-26 Scott James Remnant <[email protected]>
* configure.ac: Use NIH_COPYRIGHT instead of AC_COPYRIGHT
* m4/libnih.m4: Add a serial header and a comment reminding us to
increment it each time, otherwise aclocal can overwrite the copy
in the source tree with an older installed copy.
2010-02-09 Scott James Remnant <[email protected]>
* m4/libnih.m4 (AC_COPYRIGHT): Rename to NIH_COPYRIGHT, since this
macro file is installed globally we don't want to muck around like
we were when it was copied in.
2010-02-04 Scott James Remnant <[email protected]>
* configure.ac: Bump version to 1.0.2
* NEWS: Begin new release
* NEWS: Release 1.0.1
* nih/logging.c (__abort_msg): Make a weak symbol reference.
(nih_log_abort_message): Check whether __abort_msg has an address
before saving.
* nih/tests/test_logging.c (__abort_msg): Make a weak symbol reference.
(test_log_message): Skip __abort_msg tests if there is no address
for it.
2010-02-03 Scott James Remnant <[email protected]>
* nih/libnih.ver: Add missing export for __nih_* so you can build
test cases; not bumping the library age here since this isn't an API
change but a bug.
* nih-dbus-tool/Makefile.am ($(com_netsplit_Nih_Test_object_OUTPUTS)):
($(com_netsplit_Nih_Test_proxy_OUTPUTS)): Make compatible with
am-silent-rules by using $(AM_V_GEN) and combining the mkdir and
nih-dbus-tool lines.
* configure.ac: Bump copyright year to 2010.
* NEWS: Begin new release.
2009-11-29 Scott James Remnant <[email protected]>
* configure.ac (AM_INIT_AUTOMAKE): Drop dist-bzip2, since we don't
use them.
* configure.ac: Bump version to 1.0.1
2009-11-28 Scott James Remnant <[email protected]>
* NEWS: Release 1.0.0
* nih-dbus-tool/main.c (source_file_path, header_file_path): Use a
not reached assertion rather than an initial one, to avoid gcc
warnings.
* nih/tests/test_string.c (test_array_addp),
* nih/tests/test_logging.c (test_log_message): Add a couple more
initialisations for gcc, found with -O2
* TODO: Update.
* nih/tests/test_error.c (test_raise_error, test_pop_context): Also
unlink core.PID form of core file, and unlink a valgrind core of the
same name as well while we're in there.
* nih/tests/test_child.c (test_poll): Do the same here, except it
turns out that under valgrind we might still have NIH_CHILD_KILLED
but a core file - always clean up core files anyway.
* nih/libnih.supp, nih-dbus/libnih-dbus.supp: Valgrind got a whole
bunch more strict in the 3.5 release. That's a good thing because
we catch more errors, but it means it's somewhat picker about things
like our reference allocations. Redo the suppressions against 3.5,
taking an opportunity to clean up the files and insert documentation
as to why they are there.
* nih/tests/test_signal.c (test_poll): The two signal structures
allocated in this function were not being freed at the end.
* nih/tests/test_watch.c (test_reader): On termination of this test
we were not freeing the last path copied.
* nih-dbus/tests/test_dbus_connection.c (test_connect, test_bus)
(test_setup): Free signal handlers before exiting the child,
unlike other test cases we can't make these children of any other
object since we don't actually have one!
* nih-dbus-tool/tests/test_annotation.c (test_start_tag)
(test_end_tag): Missing call to discard the NULL reference from the
various objects after pushing onto the stack.
* nih-dbus-tool/tests/test_parse.c (test_stack_push): Thanks to
the updated valgrind, I can now see that this test case wasn't updated
for the new nih_alloc() behaviour. We now need to free the object
even after it's been referenced, because it still has our NULL
reference.
(test_start_tag, test_end_tag): Also need to discard the NULL
reference in each of these cases.
2009-11-24 Scott James Remnant <[email protected]>
* nih/logging.c (nih_log_message): Split the abort message saving
out into its own function.
(nih_log_abort_message): This makes it easier to suppress.
* nih/libnih.supp: Add suppressions.
* NEWS: Update.
* nih/libnih.supp: Add new tmpfile suppression
* nih-dbus-tool/interface.c (interface_proxy_get_all_function),
* nih-dbus-tool/method.c (method_proxy_function),
* nih-dbus-tool/property.c (property_proxy_get_function)
(property_proxy_set_function): The dbus_connection_send_with_reply()
function can return TRUE without setting a pending_call in the case
of a non-connected connection. Convert this into the
DBUS_ERROR_DISCONNECTED error to match send_with_reply_and_block
* nih-dbus-tool/tests/test_interface.c (test_proxy_get_all_function),
* nih-dbus-tool/tests/test_method.c (test_proxy_function),
* nih-dbus-tool/tests/test_property.c (test_proxy_get_function)
(test_proxy_set_function),
* nih-dbus-tool/tests/test_com.netsplit.Nih.Test_proxy.c (test_ordinary_method)
(test_nameless_method, test_async_method, test_byte_to_str)
(test_str_to_byte, test_boolean_to_str, test_str_to_boolean)
(test_int16_to_str, test_str_to_int16, test_uint16_to_str)
(test_str_to_uint16, test_int32_to_str, test_str_to_int32)
(test_uint32_to_str, test_str_to_uint32, test_int64_to_str)
(test_str_to_int64, test_uint64_to_str, test_str_to_uint64)
(test_double_to_str, test_str_to_double)
(test_object_path_to_str, test_str_to_object_path)
(test_signature_to_str, test_str_to_signature)
(test_struct_to_str, test_str_to_struct)
(test_int32_array_to_str, test_str_to_int32_array)
(test_str_array_to_str, test_str_to_str_array)
(test_int32_array_array_to_str, test_str_to_int32_array_array)
(test_struct_array_to_str, test_str_to_struct_array)
(test_dict_entry_array_to_str, test_str_to_dict_entry_array)
(test_get_byte, test_set_byte, test_get_boolean)
(test_set_boolean, test_get_int16, test_set_int16)
(test_get_uint16, test_set_uint16, test_get_int32)
(test_set_int32, test_get_uint32, test_set_uint32)
(test_get_int64, test_set_int64, test_get_uint64)
(test_set_uint64, test_get_double, test_set_double)
(test_get_string, test_set_string, test_get_object_path)
(test_set_object_path, test_get_signature, test_set_signature)
(test_get_structure, test_set_structure, test_get_int32_array)
(test_set_int32_array, test_get_str_array, test_set_str_array)
(test_get_int32_array_array, test_set_int32_array_array)
(test_get_struct_array, test_set_struct_array)
(test_get_dict_entry_array, test_set_dict_entry_array)
(test_get_all): Add test cases for sending to a disconnected
connection and getting the error reply back straight away.
* nih-dbus-tool/tests/expected/test_interface_proxy_get_all_function_standard.c,
* nih-dbus-tool/tests/expected/test_method_proxy_function_standard.c,
* nih-dbus-tool/tests/expected/test_method_proxy_function_structure.c,
* nih-dbus-tool/tests/expected/test_method_proxy_function_array.c,
* nih-dbus-tool/tests/expected/test_method_proxy_function_no_args.c,
* nih-dbus-tool/tests/expected/test_method_proxy_function_deprecated.c,
* nih-dbus-tool/tests/expected/test_property_proxy_get_function_standard.c,
* nih-dbus-tool/tests/expected/test_property_proxy_get_function_deprecated.c,
* nih-dbus-tool/tests/expected/test_property_proxy_set_function_standard.c,
* nih-dbus-tool/tests/expected/test_property_proxy_set_function_structure.c,
* nih-dbus-tool/tests/expected/test_property_proxy_set_function_array.c,
* nih-dbus-tool/tests/expected/test_property_proxy_set_function_deprecated.c,
* nih-dbus-tool/tests/expected/test_node_proxy_functions_standard.c,
* nih-dbus-tool/tests/expected/test_node_proxy_functions_structure.c,
* nih-dbus-tool/tests/expected/test_node_proxy_functions_no_methods.c,
* nih-dbus-tool/tests/expected/test_node_proxy_functions_no_signals.c,
* nih-dbus-tool/tests/expected/test_node_proxy_functions_no_properties.c,
* nih-dbus-tool/tests/expected/test_node_proxy_functions_only_properties.c:
Update expected function output to match.
* nih-dbus-tool/tests/test_interface.c (test_proxy_get_all_sync_function),
* nih-dbus-tool/tests/test_method.c (test_proxy_sync_function),
* nih-dbus-tool/tests/test_property.c (test_proxy_get_sync_function)
(test_proxy_set_sync_function),
* nih-dbus-tool/tests/test_com.netsplit.Nih.Test_proxy.c (test_ordinary_method_sync)
(test_nameless_method_sync, test_async_method_sync)
(test_byte_to_str_sync, test_str_to_byte_sync)
(test_boolean_to_str_sync, test_str_to_boolean_sync)
(test_int16_to_str_sync, test_str_to_int16_sync)
(test_uint16_to_str_sync, test_str_to_uint16_sync)
(test_int32_to_str_sync, test_str_to_int32_sync)
(test_uint32_to_str_sync, test_str_to_uint32_sync)
(test_int64_to_str_sync, test_str_to_int64_sync)
(test_uint64_to_str_sync, test_str_to_uint64_sync)
(test_double_to_str_sync, test_str_to_double_sync)
(test_object_path_to_str_sync, test_str_to_object_path_sync)
(test_signature_to_str_sync, test_str_to_signature_sync)
(test_struct_to_str_sync, test_str_to_struct_sync)
(test_int32_array_to_str_sync, test_str_to_int32_array_sync)
(test_str_array_to_str_sync, test_str_to_str_array_sync)
(test_int32_array_array_to_str_sync)
(test_str_to_int32_array_array_sync)
(test_struct_array_to_str_sync, test_str_to_struct_array_sync)
(test_dict_entry_array_to_str_sync)
(test_str_to_dict_entry_array_sync, test_get_byte_sync)
(test_set_byte_sync, test_get_boolean_sync)
(test_set_boolean_sync, test_get_int16_sync)
(test_set_int16_sync, test_get_uint16_sync)
(test_set_uint16_sync, test_get_int32_sync, test_set_int32_sync)
(test_get_uint32_sync, test_set_uint32_sync)
(test_get_int64_sync, test_set_int64_sync, test_get_uint64_sync)
(test_set_uint64_sync, test_get_double_sync)
(test_set_double_sync, test_get_string_sync)
(test_set_string_sync, test_get_object_path_sync)
(test_set_object_path_sync, test_get_signature_sync)
(test_set_signature_sync, test_get_structure_sync)
(test_set_structure_sync, test_get_int32_array_sync)
(test_set_int32_array_sync, test_get_str_array_sync)
(test_set_str_array_sync, test_get_int32_array_array_sync)
(test_set_int32_array_array_sync, test_get_struct_array_sync)
(test_set_struct_array_sync, test_get_dict_entry_array_sync)
(test_set_dict_entry_array_sync, test_get_all_sync):
Add test cases for a sync() function on a disconnected connection,
which should return the same error internally inside D-Bus.
* nih-dbus-tool/tests/test_com.netsplit.Nih.Test_proxy.c: These
tests weren't passing under valgrind, because I got lazy and gave
up. Most of the reason was that the main signal handler wasn't
freed; fix that by attaching the signal to the D-Bus object.
* nih/test_process.h (TEST_CHILD, TEST_CHILD_WAIT): Flush standard
output and error before forking, to avoid the typical strange
buffering issues when piping to less.
* nih/alloc.c (NihAllocCtx): The recent alignment changes mean
there's always 4 bytes of spare space in this structure, use those
to remember the allocation size rather than relying on malloc()
to do it. This makes us more portable to alternative (and debugging)
malloc implementations.
(nih_alloc, nih_realloc): Update the size field
(nih_alloc_size): Just return the size field.
* TODO: Update.
2009-11-21 Scott James Remnant <[email protected]>
* nih/option.c: Add a note that --debug is deliberately hidden.
* nih/macros.h (NIH_ALIGN_SIZE): Fix rounding to be twice size
of size_t, or alignment of long long - which is what we decided
in the bug.
* nih/alloc.c (NIH_ALLOC_SIZE): Formatting.
* nih/Makefile.am (libnih_la_LDFLAGS): Bump version
* nih-dbus/Makefile.am (libnih_dbus_la_LDFLAGS): Bump version
* configure.ac (AC_PRERQ): Update to 2.62
(AM_INIT_AUTOMAKE): Update to 1.11, add color-tests and silent-rules
to the options
(AM_SILENT_RULES): Explicitly make silent rules the default
(AM_MAINTAINER_MODE): Add, but with "enable" as the default, so
distributions may turn it off with --disable-maintainer-mode
(AM_GNU_GETTEXT_VERSION): Update to 0.17
* HACKING: Update requirements; document that we support the
standard options.
2009-11-21 John Cater <[email protected]>
* nih/macros.h (NIH_ALIGN_SIZE): Add macro to guess at the maximum
alignment of a type
* nih/alloc.c (NIH_ALLOC_SIZE): Define the size of the context
based off its size and the maximum alignment macro, thus hopefully
ensuring the following pointer is generically aligned
(NIH_ALLOC_CTX, NIH_ALLOC_PTR): Redefine based on NIH_ALLOC_SIZE
(nih_alloc, nih_realloc, nih_alloc_size): Use NIH_ALLOC_SIZE
instead of sizeof (NihAllocCtx)
2009-11-21 Scott James Remnant <[email protected]>
* NEWS: Update
* nih-dbus-tool/main.c: Add option to supply the package name
and store in a global variable for the output code to access.
* nih-dbus-tool/output.c (output_preamble): Use the supplied package
name in preference to "libnih" when generating preamble comments.
(output_sentinel): Use the supplied package name in preference to
"libnih" when generating header sentinels.
* nih-dbus-tool/output.h: Add variable declaration
* m4/Makefile.am (nih_dbus_tool_LDADD): Turns out that this doesn't
link with libnih-dbus at all
* nihify: Remove the script to copy into other source directories
* nih/libnih.ver, nih-dbus/libnih-dbus.ver: Update versions
* nih-dbus-tool/Makefile.am (bin_PROGRAMS): Always install the tool
(dist_man_MANS): Always install the manual page
(EXTRA_DIST): We don't need to distribute the manual page with this
now
* nih/libnih.pc.in, nih-dbus/libnih-dbus.pc.in: Source to pkg-config
data files
* configure.ac: Generate the actual pkg-config files from the sources
* nih/Makefile.am (lib_LTLIBRARIES): Always install libnih.la
(include_HEADERS): Always install the header files
(pkgconfig_DATA): Install the pkg-config file
(EXTRA_DIST): Distribute the source to it
* nih-dbus/Makefile.am (lib_LTLIBRARIES): Always install libnih-dbus.la
(include_HEADERS): Always install the header files
(pkgconfig_DATA): Install the pkg-config file
(EXTRA_DIST): Distribute the source to it
* Makefile.am: Always build libnih-dbus and nih-dbus-tool
* m4/misc.m4, m4/compiler.m4, m4/linker.m4: Merge together into
a single libnih.m4 file for easier aclocal inclusion.
* m4/libnih.m4 (NIH_INIT): Drop this macro, libnih shouldn't need
software to call any special macros other than the ones they
probably need anyway.
* m4/libs.m4: Drop this source and the NIH_LIB_DBUS macro, since
we'll always build this
* m4/Makefile.am: Unconditionally install the new macro file
* configure.ac: Replace NIH_INIT with the bits we actually want to
check for here.
* README: Remove the usage instructions, since this is going to
be an ordinary shared library; rewrite the Dependencies section
language to be better; add a Cross-compiling section.
* configure.ac: Since this library is now being used in several
places, it's time to start caring about API and stop compiling it
statically into things. Bump version to 1.0.0. Bug fixes without
any API changes will be named 1.0.x; backwards compatible API
changes 1.x.0, etc.
* NEWS: Bump version to 1.0.0
* TODO: Update with missing bits for 1.0 and plans for 1.1/2.0
2009-10-03 Scott James Remnant <[email protected]>
* m4/libs.m4 (NIH_LIB_DBUS): Allow an external nih-dbus-tool to
be used by setting NIH_DBUS_TOOL when calling configure; when
cross-compiling, if this is not set, look for it in the PATH and
warn if we fall back to using our built copy.
* nih-dbus-tool/Makefile.am ($(com_netsplit_Nih_Test_object_OUTPUTS)):
($(com_netsplit_Nih_Test_proxy_OUTPUTS)): Use an externally built
nih-dbus-tool for the tests if given, not strictly right but the
best we can do when cross-compiling (when we probably won't run
"make check" anyway)
* nih/file.c (nih_dir_walk_sort): Add static function to replace
alphasort() which we can't call anymore. It would be deeply ironic
to bitch about glibc breaking API in the libnih changelog.
(nih_dir_walk_scan): Replace alphasort() with nih_dir_walk_sort()
2009-08-11 Johan Kiviniemi <[email protected]>
* nih/logging.c: Expose the glibc-internal __abort_msg symbol
so that we can set it.
(nih_log_message): Save a copy of any fatal or higher log message
into this variable; assuming that abort() is the next function call
as is the case for nih_assert()
2009-08-11 Scott James Remnant <[email protected]>
* nih/test_alloc.h (TEST_ALLOC_NOT_PARENT): Add the opposite test
for a known parent, making sure that something is not a parent.
2009-08-04 Scott James Remnant <[email protected]>
* nih/tests/test_alloc.c (test_ref, test_unref): Add tests for
multiple identical parents.
* nih/alloc.h: Document that we specifically permit multiple
references between two objects.
* configure.ac: 0.4.0 is a bit far, and the nih_alloc() changes are
largely minor in effect outside the library; let's call this 0.3.5
* NEWS: Change version
* nih-dbus-tool/node.c (node_start_tag): Make node object local.
(node_end_tag): Replace use of nih_unref_only with a simple
nih_ref()/nih_unref() pair
* nih-dbus-tool/interface.c (interface_start_tag): Make interface
object local
* nih-dbus-tool/method.c (method_start_tag): Make method object
local.
* nih-dbus-tool/signal.c (signal_start_tag): Make signal object
local.
* nih-dbus-tool/argument.c (argument_start_tag): Make argument
object local.
* nih-dbus-tool/property.c (property_start_tag): Make property
object local.
* nih-dbus-tool/tests/test_type.c (test_of): Replace
TEST_ALLOC_ORPHAN(ptr) with TEST_ALLOC_PARENT(ptr, NULL)
* nih-dbus-tool/tests/test_demarshal.c (test_demarshal): Replace
TEST_ALLOC_ORPHAN(ptr) with TEST_ALLOC_PARENT(ptr, NULL)
* nih-dbus-tool/tests/test_node.c (test_end_tag):
Replace TEST_ALLOC_ORPHAN(ptr) with TEST_ALLOC_PARENT(ptr, NULL)
(test_start_tag, test_end_tag): Discard stack objects after pushing
* nih-dbus-tool/tests/test_interface.c (test_start_tag)
(test_end_tag): Discard stack objects after pushing
* nih-dbus-tool/tests/test_method.c (test_start_tag)
(test_end_tag): Discard stack objects after pushing
* nih-dbus-tool/tests/test_signal.c (test_start_tag)
(test_end_tag): Discard stack objects after pushing
* nih-dbus-tool/tests/test_property.c (test_start_tag)
(test_end_tag): Discard stack objects after pushing
* nih-dbus-tool/tests/test_argument.c (test_start_tag)
(test_end_tag): Discard stack objects after pushing
* nih/io.c (nih_io_read_message): Replace use of nih_unref_only
with a simple nih_ref()/nih_unref() pair
(nih_io_write): Use nih_local for the message, we either reference
it when we send or we throw it away on returning.
* nih/tests/test_io.c (test_watcher): After sending the message
we need to discard it, it's only referenced not stolen now.
(test_read_message): Replace TEST_ALLOC_ORPHAN(msg) with
TEST_ALLOC_PARENT(msg, NULL)
* nih/tests/test_string.c (test_sprintf, test_vsprintf)
(test_strdup, test_strndup): Replace TEST_ALLOC_ORPHAN(ptr)
checks with TEST_ALLOC_PARENT(ptr, NULL)
(test_array_addp): Fix bad uses of TEST_ALLOC_FAIL on data
allocated outside of the loop, necessary now that the pointer
won't be "stolen" by the function merely referenced
* nih/alloc.c (nih_alloc_ref_new): Allow parent to be NULL, when
it is we store NULL in ref->parent and leave the children_entry
as an empty list node.
(NIH_ALLOC_CTX): Context for a NULL pointer is NULL
(nih_alloc): Always allocate a reference, even when the parent is
NULL creating a NULL ref
(nih_discard): Lookup a NULL reference and free that before checking
for existing references.
(nih_ref, nih_unref, nih_alloc_ref_lookup): Allow parent to be NULL
(nih_unref_only): We don't need this function anymore so drop
(nih_alloc_parent): Since NULL can be a parent, this now looks
that up - there's no function for "has a parent"
* nih/alloc.h: Remove nih_unref_only prototype, update documentation
* nih/test_alloc.h (TEST_ALLOC_PARENT): Update documentation to
reflect that NULL is valid again
(TEST_ALLOC_ORPHAN): Drop this macro.
* nih/tests/test_alloc.c (test_new, test_alloc, test_realloc):
Replace TEST_ALLOC_ORPHAN checks with TEST_ALLOC_PARENT (ptr, NULL)
(test_ref): Make sure that the NULL reference is not removed by
adding another; add new test for adding a new NULL reference.
(test_unref): Add tests for removing the NULL reference and
freeing or leaving the object.
(test_parent): Add test for looking up NULL Parent
* nih/libnih.supp: Add suppressions for nih_alloc_ref_new in the
appropriate places.
* NEWS: Update
2009-08-03 Scott James Remnant <[email protected]>
* nih-dbus-tool/tests/test_com.netsplit.Nih.Test_proxy.c (test_set_string_sync)
(test_set_object_path_sync, test_set_signature_sync): Fix the incorrect
parent tests to actually check for the specific parent rather than
just a parent.
2009-08-02 Scott James Remnant <[email protected]>
* configure.ac: Bump version to 0.4.0
* NEWS: Begin new release
* NEWS: Release 0.3.2
2009-07-29 Michael Biebl <[email protected]>
* nih/child.h: Remove unnecessary sys/ptrace.h and linux/ptrace.h
headers, that prevent compilation on ia64.
2009-07-22 Michael Biebl <[email protected]>
* nih-dbus-tool/Makefile.am (dist_man_MANS): Don't install the
manpages unless INSTALL_NIH, take care to make sure they're still
distributed.
2009-07-15 Scott James Remnant <[email protected]>
* m4/libs.m4 (NIH_LIB_DBUS): Now that D-Bus 1.2.16 proper has been
released, update our version requirements to that.
* README: Update documentation.
2009-07-14 Scott James Remnant <[email protected]>
* nih/tests/test_main.c (test_init): Add a test for being called
as a login shell.
* nih/main.c (nih_main_init_full): Check for and skip initial dash.
2009-07-11 Scott James Remnant <[email protected]>
* configure.ac: Bump version to 0.3.2
* NEWS: Begin new release
2009-07-09 Scott James Remnant <[email protected]>
* NEWS: Release 0.3.1
* m4/libs.m4 (NIH_LIB_DBUS): Increase D-Bus dependency to current
GIT HEAD (1.2.15)
* README: Update documentation.
* NEWS: Note the change.
* nih-dbus-tool/demarshal.c (demarshal_array): Always initialise
all arrays to NULL first, and then only allocate the arrays after
to avoid gcc's uninitialised warnings.
* nih-dbus-tool/tests/test_demarshal.c (test_demarshal): Update
expected output to match
* nih-dbus-tool/tests/expected/test_method_proxy_notify_function_standard.c,
* nih-dbus-tool/tests/expected/test_method_proxy_notify_function_array.c,
* nih-dbus-tool/tests/expected/test_method_proxy_sync_function_standard.c,
* nih-dbus-tool/tests/expected/test_method_proxy_sync_function_no_input.c:
Update the method tests expected output too
* nih-dbus-tool/tests/test_com.netsplit.Nih.Test_object.c (test_new_struct_array)
(test_new_dict_entry_array): Initialise alloc-safe variables to
NULL to avoid gcc warning
* nih-dbus/dbus_connection.c (nih_dbus_timeout_toggled): Use the
monotonic clock to recalculate the timer
* nih-dbus/Makefile.am (libnih_dbus_la_LIBS): Rename to _LIBADD
(libnih_dbus_la_LIBADD): Link with librt
* nih/timer.c (nih_timer_add_timeout, nih_timer_add_periodic)
(nih_timer_poll): Use a monotonic clock for timers, not the realtime
clock.
* nih/main.c (nih_main_loop): Calculate select time based on the
monotonic clock.
* nih/Makefile.am (libnih_la_LIBADD): Link with librt
* README: Bump the recommended D-Bus
2009-07-08 Scott James Remnant <[email protected]>
* nih/file.c (nih_dir_walk_scan): Should compare against DT_DIR
not use S_ISDIR
* NEWS: Update.
* nih/file.h (NihFileFilter): Add an is_dir argument
* nih/file.c (nih_dir_walk_scan): Pass the new argument
* nih/watch.c (nih_watch_handle): Pass the extra argument
* nih/tests/test_file.c (my_filter): Add the extra argument but
ignore
* nih/tests/test_watch.c (my_filter): Add here too
2009-07-03 Scott James Remnant <[email protected]>
* nih/error.h (NihError): Declare this a slightly odd way to
permit the members to be directly embedded in sub-classes rather
than referring back through an accessor variable.
* nih-dbus/dbus_error.h (nih_dbus_error): Embed the NihError
members directly using the new macro.
* nih-dbus/dbus_error.c (nih_dbus_error_raise)
(nih_dbus_error_raise_printf): Just set number and message directly;
cast before raising.
* nih-dbus/dbus_object.c (nih_dbus_object_property_get)
(nih_dbus_object_property_get_all, nih_dbus_object_property_set):
Access message through the dbus_err cast.
* nih-dbus/tests/test_dbus_error.c (test_error_raise)
(test_error_raise_printf): Test directly accessing the number
and message.
2009-07-02 Scott James Remnant <[email protected]>
* nih-dbus/tests/test_dbus_proxy.c (test_connect): We can end up
with a lot of stray signals with these tests, so open and close
the connections for each one.
* NEWS: Update.
* TODO: Update.
* nih-dbus-tool/interface.c (interface_proxy_get_all_function)
(interface_proxy_get_all_sync_function),
* nih-dbus-tool/method.c (method_proxy_function)
(method_proxy_sync_function),
* nih-dbus-tool/property.c (property_proxy_get_function)
(property_proxy_set_function, property_proxy_get_sync_function)
(property_proxy_set_sync_function): Set the auto_start flag in
new method calls that we create.
* tests/expected/test_interface_proxy_get_all_function_standard.c,
* tests/expected/test_interface_proxy_get_all_sync_function_standard.c,
* tests/expected/test_interface_proxy_get_all_sync_function_structure.c,
* tests/expected/test_method_proxy_function_array.c,
* tests/expected/test_method_proxy_function_deprecated.c,
* tests/expected/test_method_proxy_function_no_args.c,
* tests/expected/test_method_proxy_function_standard.c,
* tests/expected/test_method_proxy_function_structure.c,
* tests/expected/test_method_proxy_sync_function_array_input.c,
* tests/expected/test_method_proxy_sync_function_deprecated.c,
* tests/expected/test_method_proxy_sync_function_no_args.c,
* tests/expected/test_method_proxy_sync_function_no_input.c,
* tests/expected/test_method_proxy_sync_function_no_output.c,
* tests/expected/test_method_proxy_sync_function_standard.c,
* tests/expected/test_method_proxy_sync_function_structure_input.c,
* tests/expected/test_method_proxy_sync_function_structure_output.c,
* tests/expected/test_property_proxy_get_function_standard.c,
* tests/expected/test_property_proxy_get_function_deprecated.c,
* tests/expected/test_property_proxy_get_sync_function_standard.c,
* tests/expected/test_property_proxy_get_sync_function_structure.c,
* tests/expected/test_property_proxy_get_sync_function_deprecated.c,
* tests/expected/test_property_proxy_set_function_standard.c,
* tests/expected/test_property_proxy_set_function_structure.c,
* tests/expected/test_property_proxy_set_function_array.c,
* tests/expected/test_property_proxy_set_function_deprecated.c,
* tests/expected/test_property_proxy_set_sync_function_standard.c,
* tests/expected/test_property_proxy_set_sync_function_structure.c,
* tests/expected/test_property_proxy_set_sync_function_array.c,
* tests/expected/test_property_proxy_set_sync_function_deprecated.c,
* tests/expected/test_node_proxy_functions_standard.c,
* tests/expected/test_node_proxy_functions_no_methods.c,
* tests/expected/test_node_proxy_functions_no_signals.c,
* tests/expected/test_node_proxy_functions_no_properties.c,
* tests/expected/test_node_proxy_functions_only_properties.c,
* tests/expected/test_node_proxy_functions_structure.c,
* tests/expected/test_output_proxy_standard.c:
Update expected output.
* nih-dbus/dbus_proxy.h (NihDBusProxy): Add an auto_start member
* nih-dbus/dbus_proxy.c (nih_dbus_proxy_new): Initialise auto_start
member to TRUE (the D-Bus default).
* nih-dbus/tests/test_dbus_proxy.c (test_new): Add checks for
auto-start being TRUE.
* nih-dbus-tool/signal.c (signal_proxy_function): Look up connection
and path through the proxy object; if the proxy object has a name,
compare the signal sender against the OWNER of that name, not the
name.
* nih-dbus-tool/tests/test_signal.c (test_proxy_function): Drop
parent argument from calls to nih_dbus_proxy_connect. Add test
cases for signal catching on peer-to-peer and well-known name (we
were previously just using unique).
* nih-dbus-tool/tests/test_com.netsplit.Nih.Test_proxy.c (test_new_byte)
(test_new_boolean, test_new_int16, test_new_uint16)
(test_new_int32, test_new_uint32, test_new_int64)
(test_new_uint64, test_new_double, test_new_string)
(test_new_object_path, test_new_signature, test_new_struct)
(test_new_int32_array, test_new_str_array)
(test_new_int32_array_array, test_new_struct_array)
(test_new_dict_entry_array): Drop the parent argument from calls
to nih_dbus_proxy_connect
* nih-dbus-tool/tests/expected/test_signal_proxy_function_standard.c,
* nih-dbus-tool/tests/expected/test_signal_proxy_function_no_args.c,
* nih-dbus-tool/tests/expected/test_signal_proxy_function_structure.c,
* nih-dbus-tool/tests/expected/test_signal_proxy_function_deprecated.c,
* nih-dbus-tool/tests/expected/test_node_proxy_functions_standard.c,
* nih-dbus-tool/tests/expected/test_node_proxy_functions_no_methods.c,
* nih-dbus-tool/tests/expected/test_node_proxy_functions_no_properties.c,
* nih-dbus-tool/tests/expected/test_node_proxy_functions_structure.c,
* nih-dbus-tool/tests/expected/test_output_proxy_standard.c:
Update expected output
* nih-dbus/dbus_proxy.c (nih_dbus_proxy_new): Track the name whenever
one is given, not just when we have a lost handler.
(nih_dbus_proxy_name_track): lost_handler is not compulsory
(nih_dbus_proxy_name_owner_changed): Make the lost handler optional
(nih_dbus_proxy_destroy): name tracking must be cleaned up when
there's a name, not a lost handler
* nih-dbus/tests/test_dbus_proxy.c (test_name_owner_changed): Add
tests for both well-known and unique names with both being tracked.
(test_name_owner_changed): Add a test case for tracking a unique
name.
* nih-dbus/dbus_proxy.h (NihDBusProxySignal): Go back to just
holding a reference to the proxy in the connected signal, we need
its name owner tracking.
* nih-dbus/dbus_proxy.c (nih_dbus_proxy_connect): Keep a reference
to the proxy, don't copy the members in; be allocated as a child
of the proxy.
* nih-dbus/tests/test_dbus_proxy.c (test_connect): Add a test
case for connecting to a signal by well-known name, rather than
just unique name
* nih-dbus-tool/output.c (output): Don't know where the word
"Forward" came from in this comment, delete it.
* nih-dbus-tool/tests/expected/test_output_proxy_standard.c,
* nih-dbus-tool/tests/expected/test_output_object_standard.c:
Delete from the expected output as well.
* nih-dbus-tool/main.c: Add a --default-interface argument that
takes the place of setting the Symbol annotation to "". This is
much cleaner, and allows the user of the code to decide, not the
author of the interface.
* nih-dbus-tool/interface.c (interface_annotation): Don't allow
the symbol annotation to be empty again.
(interface_end_tag): Which means that the symbol can never be
empty when we get to here.
* nih-dbus-tool/tests/test_interface.c (test_annotation): Drop the
test case for the empty annotation.
(test_end_tag): And drop the empty string test case.
* nih-dbus/tests/test_dbus_object.c (test_object_property_get)
(test_object_property_set): We actually want "Access Denied" returned
instead of "No Such Method".
* nih-dbus/dbus_object.c (nih_dbus_object_property_get)
(nih_dbus_object_property_set): Rework so that we can return
"access denied".
* nih-dbus/tests/test_dbus_object.c (test_object_property_get)
(test_object_property_set, test_object_property_get): Add some test
cases for property access.
* TODO: Update.
* nih-dbus-tool/tests/test_com.netsplit.Nih.Test_proxy.c (test_get_all)
(test_get_all_sync): End-to-end test of the proxy get_all functions.
* nih-dbus-tool/interface.c (interface_proxy_get_all_notify_function)
(interface_proxy_get_all_sync_function): We can't use continue to
repeat the loop, because there might be inner loops. Use the
local label trick.
* nih-dbus-tool/tests/expected/test_interface_proxy_get_all_notify_function_standard.c,
* nih-dbus-tool/tests/expected/test_interface_proxy_get_all_notify_function_structure.c,
* nih-dbus-tool/tests/expected/test_interface_proxy_get_all_sync_function_standard.c,
* nih-dbus-tool/tests/expected/test_interface_proxy_get_all_sync_function_structure.c,
* nih-dbus-tool/tests/expected/test_node_proxy_functions_standard.c,
* nih-dbus-tool/tests/expected/test_node_proxy_functions_no_methods.c,
* nih-dbus-tool/tests/expected/test_node_proxy_functions_no_signals.c,
* nih-dbus-tool/tests/expected/test_node_proxy_functions_only_properties.c,
* nih-dbus-tool/tests/expected/test_output_proxy_standard.c: Update
expected output for test cases
2009-07-01 Scott James Remnant <[email protected]>
* nih-dbus-tool/tests/test_com.netsplit.Nih.Test_proxy.c (test_struct_to_str)
(test_struct_to_str_sync, test_str_to_struct)
(test_str_to_struct_sync, test_struct_array_to_str)
(test_struct_array_to_str_sync, test_str_to_struct_array)
(test_str_to_struct_array_sync, test_dict_entry_array_to_str)
(test_dict_entry_array_to_str_sync)
(test_str_to_dict_entry_array)
(test_str_to_dict_entry_array_sync, test_new_struct)
(test_new_struct_array, test_new_dict_entry_array)
(test_get_structure, test_get_structure_sync)
(test_set_structure, test_set_structure_sync)
(test_get_struct_array, test_get_struct_array_sync)
(test_set_struct_array, test_set_struct_array_sync)
(test_get_dict_entry_array, test_get_dict_entry_array_sync)
(test_set_dict_entry_array, test_set_dict_entry_array_sync): Proxy
test functions for structures, arrays of structures, and arrays
of dictionary entries in converstion, signal and property get/set
form.
* nih-dbus-tool/tests/com.netsplit.Nih.Test_impl.c (my_test_get_struct_array)
(my_test_get_dict_entry_array): Be consistent about what generates
a D-Bus error and what generates a generic error.
* nih-dbus-tool/tests/test_com.netsplit.Nih.Test_object.c (test_get_struct_array)
(test_get_dict_entry_array): Update to match.
* nih-dbus-tool/tests/com.netsplit.Nih.Test.xml: Add methods, signals
and properties that take a structure, an array of structures and an
array of dictionary entries to the tests.
* nih-dbus-tool/tests/com.netsplit.Nih.Test_impl.h: Add structure
definition for the property we store behind the scenes, add extern
variables for the structure and structure/dictionary array properties
* nih-dbus-tool/tests/com.netsplit.Nih.Test_impl.c (my_test_struct_to_str)
(my_test_str_to_struct, my_test_struct_array_to_str)
(my_test_str_to_struct_array, my_test_dict_entry_array_to_str)
(my_test_str_to_dict_entry_array, my_test_get_structure)
(my_test_set_structure, my_test_get_struct_array)
(my_test_set_struct_array, my_test_get_dict_entry_array)
(my_test_set_dict_entry_array): Add implementation for the structure
and structure/dictionary array conversion functions and property
get/set functions. Signal emission is implemented entirely by the
binding tool.
* nih-dbus-tool/tests/test_com.netsplit.Nih.Test_object.c (test_struct_to_str)
(test_str_to_struct, test_struct_array_to_str)
(test_str_to_struct_array, test_dict_entry_array_to_str)
(test_str_to_dict_entry_array, test_new_struct)
(test_new_struct_array, test_new_dict_entry_array)
(test_get_structure, test_set_structure, test_get_struct_array)
(test_set_struct_array, test_get_dict_entry_array)
(test_set_dict_entry_array): Add new test cases for structures,
structure arrays and dictionaries.
2009-06-30 Scott James Remnant <[email protected]>
* nih-dbus-tool/tests/test_node.c (test_proxy_functions): Structures
of readable properties come after all writable ones
* nih-dbus-tool/tests/com.netsplit.Nih.Test.xml: Can't just call the
property "double" now it ends up in a structure, apply an annotation
to change the symbol.
* nih-dbus-tool/tests/com.netsplit.Nih.Test_impl.c (my_test_get_double)
(my_test_set_double): Rename
* nih-dbus-tool/tests/test_com.netsplit.Nih.Test_proxy.c (test_get_double)
(test_get_double_sync, test_set_double, test_set_double_sync): Call
the renamed functions.
* nih-dbus-tool/tests/test_marshal.c (test_marshal): Add missing test
cases for arrays of dictionary entries.
* nih-dbus-tool/tests/marshal_factory.c: Generate a dict entry test
* nih-dbus-tool/tests/marshal_code.h: Add the expected structure type
and prototypes.
* nih-dbus-tool/tests/test_demarshal.c (test_demarshal): Add missing
test cases for arrays of dictionary entries.
* nih-dbus-tool/tests/demarshal_code.h: Add the expected structure
type and prototypes.
* nih-dbus-tool/tests/demarshal_factory.c: Generate a dict entry test
* nih-dbus-tool/marshal.c, nih-dbus-tool/demarshal.c,
* nih-dbus-tool/node.c, nih-dbus-tool/method.c, nih-dbus-tool/signal.c,
* nih-dbus-tool/property.c: Add missing mention of @structs in
function documentation.
* nih-dbus-tool/tests/test_interface.c (test_proxy_get_all_function)
(test_proxy_get_all_notify_function)
(test_proxy_get_all_sync_function): Include a mix of readwrite, read
and writable properties in the test - only the first two should
appear in the output.
* nih-dbus-tool/output.c (output): Source should include string.h and
stdint.h for the following code, header should include stdint.h
* nih-dbus-tool/tests/expected/test_output_proxy_standard.c:
Add the headers and the get_all functions to the expected output
* nih-dbus-tool/tests/expected/test_output_proxy_standard.h:
Add the headers, properties structure and get_all function prototypes
to the expected output
* nih-dbus-tool/tests/expected/test_output_object_standard.c,
* nih-dbus-tool/tests/expected/test_output_object_standard.h,
* nih-dbus-tool/tests/expected/test_output_object_no_interfaces.c,
* nih-dbus-tool/tests/expected/test_output_object_no_interfaces.h,
* nih-dbus-tool/tests/expected/test_output_proxy_no_interfaces.c:
* nih-dbus-tool/tests/expected/test_output_proxy_no_interfaces.h:
Add the headers to the expected output
* nih/test_files.h (TEST_EXPECTED_STR): Don't just compare the start
of the string, make sure we compare the whole string - easiest way
is to check the length first
(TEST_EXPECTED_FILE): Make sure the files are the same length
* nih-dbus-tool/node.c (node_proxy_functions): If there are
properties, include the async and sync versions of the get_all
function. These define all the property structs, so the only ones
we need are the write-only ones.
* nih-dbus-tool/tests/test_node.c (test_proxy_functions): Add
the expected externs, prototypes, typedefs and structs for the
get_all function.
* nih-dbus-tool/tests/expected/test_node_proxy_functions_standard.c,
* nih-dbus-tool/tests/expected/test_node_proxy_functions_no_methods.c,
* nih-dbus-tool/tests/expected/test_node_proxy_functions_no_signals.c,
* nih-dbus-tool/tests/expected/test_node_proxy_functions_only_properties.c,
* nih-dbus-tool/tests/expected/test_node_proxy_functions_structure.c:
Add the "get_all" function expected output.
2009-06-29 Scott James Remnant <[email protected]>
* nih/test_files.h (TEST_EXPECTED_STR): Display the full original
string, not just the first part.
* nih-dbus-tool/interface.c (interface_proxy_get_all_function)
(interface_proxy_get_all_notify_function)
(interface_proxy_get_all_sync_function): Add functions to generate
proxy methods that get all of the properties of the given interface,
returned as members of a structure.
* nih-dbus-tool/interface.h: Add prototypes.
* nih-dbus-tool/tests/interface_factory.c: Call the new functions
to generate other functions that we can test
* nih-dbus-tool/tests/interface_code.h: Expected structure definitions,
typedefs and prototypes for generated code.
* nih-dbus-tool/tests/test_interface.c (test_proxy_get_all_function)
(test_proxy_get_all_notify_function)
(test_proxy_get_all_sync_function): Test both the generator functions
themselves and the code that they generate.
* nih-dbus-tool/tests/expected/test_interface_proxy_get_all_function_standard.c,
* nih-dbus-tool/tests/expected/test_interface_proxy_get_all_notify_function_standard.c,
* nih-dbus-tool/tests/expected/test_interface_proxy_get_all_notify_function_structure.c,
* nih-dbus-tool/tests/expected/test_interface_proxy_get_all_sync_function_standard.c,
* nih-dbus-tool/tests/expected/test_interface_proxy_get_all_sync_function_structure.c:
Expected output from generators
* nih-dbus-tool/Makefile.am (check_PROGRAMS): Build the interface
factory binary
(test_interface_SOURCES): Depend on the header file
(nodist_test_interface_SOURCES): Build and link the generated source
(test_interface_LDADD): Need to link to libnih-dbus.la
(interface_factory_SOURCES, interface_factory_LDFLAGS)
(interface_factory_LDADD, tests/interface_code.c): Details to build
interface factory binary
(CLEANFILES): Make sure we clean up
(EXTRA_DIST): Distribute expected files
2009-06-28 Scott James Remnant <[email protected]>
* nih/test_files.h (TEST_EXPECTED_STR, TEST_EXPECTED_FILE): It's
getting increasingly annoying to have very large strings containing
C source which we compare, add a couple of macros to let us compare
a string or file against the contents of a file under tests/expected
* nih-dbus-tool/tests/test_method.c,
* nih-dbus-tool/tests/test_signal.c,
* nih-dbus-tool/tests/test_property.c,
* nih-dbus-tool/tests/test_node.c,
* nih-dbus-tool/tests/test_output.c: Cut out the embedded C source
into separate files
* nih-dbus-tool/tests/expected/test_method_object_function_standard.c,
* nih-dbus-tool/tests/expected/test_method_object_function_no_input.c,
* nih-dbus-tool/tests/expected/test_method_object_function_no_output.c,
* nih-dbus-tool/tests/expected/test_method_object_function_structure_input.c,
* nih-dbus-tool/tests/expected/test_method_object_function_structure_output.c,
* nih-dbus-tool/tests/expected/test_method_object_function_no_args.c,
* nih-dbus-tool/tests/expected/test_method_object_function_async.c,
* nih-dbus-tool/tests/expected/test_method_object_function_deprecated.c,
* nih-dbus-tool/tests/expected/test_method_reply_function_standard.c,
* nih-dbus-tool/tests/expected/test_method_reply_function_no_args.c,