~statik/ubuntu/maverick/erlang/erlang-merge-testing

« back to all changes in this revision

Viewing changes to lib/stdlib/test/gen_server_SUITE.erl

  • Committer: Elliot Murphy
  • Date: 2010-06-08 03:55:44 UTC
  • mfrom: (3.5.6 squeeze)
  • Revision ID: elliot@elliotmurphy.com-20100608035544-dd8zh2swk7jr5rz2
* Merge with Debian unstable; remaining Ubuntu changes:
  - Drop libwxgtk2.8-dev build dependency. Wx isn't in main, and not
    supposed to. (LP #438365)
  - Drop erlang-wx binary.
  - Drop erlang-wx dependency from -megaco, -common-test, and -reltool, they
    do not really need wx. Also drop it from -debugger; the GUI needs wx,
    but it apparently has CLI bits as well, and is also needed by -megaco,
    so let's keep the package for now.
* Added missing symlinks to /usr/include for a few new header files.
* Fixed generation of ${erlang-base:Depends} and ${erlang-x11:Depends}
  substitution variables.
* Added a fix for a re:compile/2 crash on a long regular expression.
* Changed urgency to medium as the change fixes a security bug.
* Manpages in section 1 are needed even if only arch-dependent packages are
  built. So, re-enabled them.
* Fixed HiPE architecture recognition for powerpc Debian architecture.
* Moved xsltproc and fop to build-depends-indep and do not build
  documentation if only architecture-specific packages are built.
* Refreshed all patches.
* Made Emacs look in man5 and man7 for Erlang manpages and added code
  skeleton files to erlang-mode package.
* New upstream release.
* Moved manpages from incorrect sections 4 and 6 to correct 5 and 7
  (closes: #498492).
* Made manpages regexp in Emacs mode match only 3erl pages in section 3.
* Removed docb_gen script which is no longer needed to build manpages.
* Added erlang-doc package which contains documentation in HTML and PDF
  formats. This package replaces erlang-doc-html package and it's easier
  to synchronize it with the main Erlang packages as it's built from
  a single source package (closes: #558451).
* Removed RPATH from ssl and crypto application binaries as required by
  Debian policy.
* Added libwxgtk2.4-dev and libwxgtk2.6-dev to build conflicts.
* Added a few dpendencies for erlang-dialyzer, erlang-et, erlang-observer
  and erlang-examples packages which now call functions from more modules
  than in 1:13.b.3.
* Added a workaround which disables vfork() for hppa architecture
  (closes: #562218).
* Strictened check for JDK 1.5 adding a call to String(int[], int, int)
  because GCJ 4.4 doesn't implement it and OpenJDK isn't available for all
  architectures.
* Fixed erlang-manpages package section.
* Made erlang-depends add only substvars which are requested in
  debian/control file. This minimizes number of warnings from dh_gencontrol.
  Also, improved descriptions of the functions in erlang-depends escript.
* Added erlang-erl-docgen package to erlang-nox dependencies.
* Made dummy packages erlang-nox and erlang-x11 architecture all.
* Cleaned up working with custom substitution variables in debian/rules.
* Reorganized debian/rules to ensure that manpages arent built twice, and
  aren't built at all if only architecture-dependent packages are requested.
* Fixed project links in README.Debian.
* Added a new package erlang-jinterface which provides tools for
  communication of Java programs with Erlang processes. This adds build
  depandency on default-jdk and as a result enables Java module for IDL
  compiler.
* Bumped standards version to 3.8.4.

Show diffs side-by-side

added added

removed removed

Lines of Context:
30
30
         call_remote_n1/1, call_remote_n2/1, call_remote_n3/1, spec_init/1,
31
31
         spec_init_local_registered_parent/1, 
32
32
         spec_init_global_registered_parent/1,
33
 
         otp_5854/1, hibernate/1, otp_7669/1
 
33
         otp_5854/1, hibernate/1, otp_7669/1, call_format_status/1
34
34
        ]).
35
35
 
36
36
% spawn export
42
42
 
43
43
% The gen_server behaviour
44
44
-export([init/1, handle_call/3, handle_cast/2,
45
 
         handle_info/2, terminate/2]).
 
45
         handle_info/2, terminate/2, format_status/2]).
46
46
 
47
47
all(suite) ->
48
48
    [start, crash, call, cast, cast_fast, info,
51
51
     call_remote_n2, call_remote_n3, spec_init,
52
52
     spec_init_local_registered_parent,
53
53
     spec_init_global_registered_parent,
54
 
     otp_5854,hibernate,otp_7669].
 
54
     otp_5854, hibernate, otp_7669, call_format_status].
55
55
 
56
56
-define(default_timeout, ?t:minutes(1)).
57
57
 
851
851
    ok.
852
852
 
853
853
%% If initialization fails (with ignore or {stop,Reason}),
854
 
%% make sure that the process is not registered when gen_sever:start()
 
854
%% make sure that the process is not registered when gen_server:start()
855
855
%% returns.
856
856
 
857
857
otp_7669(Config) when is_list(Config) ->
887
887
                                             ?MODULE, stop, []),
888
888
    ?line undefined = global:whereis_name(?MODULE).
889
889
 
 
890
%% Verify that sys:get_status correctly calls our format_status/2 fun
 
891
%%
 
892
call_format_status(suite) ->
 
893
    [];
 
894
call_format_status(doc) ->
 
895
    ["Test that sys:get_status/1,2 calls format_status/2"];
 
896
call_format_status(Config) when is_list(Config) ->
 
897
    ?line {ok, Pid} = gen_server:start_link({local, call_format_status},
 
898
                                            gen_server_SUITE, [], []),
 
899
    ?line Status1 = sys:get_status(call_format_status),
 
900
    ?line {status, Pid, _Mod, [_PDict, running, _Parent, _, Data1]} = Status1,
 
901
    ?line [format_status_called | _] = lists:reverse(Data1),
 
902
    ?line Status2 = sys:get_status(call_format_status, 5000),
 
903
    ?line {status, Pid, _Mod, [_PDict, running, _Parent, _, Data2]} = Status2,
 
904
    ?line [format_status_called | _] = lists:reverse(Data2),
 
905
    ok.
 
906
 
 
907
 
890
908
%%--------------------------------------------------------------
891
909
%% Help functions to spec_init_*
892
910
start_link(Init, Options) ->
1046
1064
terminate(_Reason, _State) ->
1047
1065
    ok.
1048
1066
 
1049
 
 
 
1067
format_status(_Opt, [_PDict, _State]) ->
 
1068
    [format_status_called].