Permalink
Browse files

common tests

  • Loading branch information...
1 parent f45ff46 commit 3eda7a2769df880515bb50898c25163b1b678cc0 Andreas Schultz committed with tpiadmin Jul 25, 2011
Showing with 273 additions and 0 deletions.
  1. +3 −0 cover.sh
  2. +1 −0 test/config/netlink.cover
  3. +269 −0 test/netlink_SUITE.erl
View
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+ct_run -dir test -pa ebin -logdir log -cover test/config/netlink.cover
@@ -0,0 +1 @@
+{incl_mods, [netlink]}.
View
@@ -0,0 +1,269 @@
+%%%-------------------------------------------------------------------
+%%% @author Andreas Schultz <aschultz@tpip.net>
+%%% @copyright (C) 2011, Andreas Schultz
+%%% @doc
+%%%
+%%% @end
+%%% Created : 29 Jun 2011 by Andreas Schultz <aschultz@tpip.net>
+%%%-------------------------------------------------------------------
+-module(netlink_SUITE).
+
+-compile(export_all).
+
+-include_lib("common_test/include/ct.hrl").
+
+conntrack_new() ->
+ <<196,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,52,0,1,128,20,0,
+ 1,128,8,0,1,0,192,168,2,24,8,0,2,0,192,168,2,9,28,0,2,128,5,0,1,0,6,0,0,
+ 0,6,0,2,0,215,100,0,0,6,0,3,0,0,25,0,0,52,0,2,128,20,0,1,128,8,0,1,0,192,
+ 168,2,9,8,0,2,0,192,168,2,24,28,0,2,128,5,0,1,0,6,0,0,0,6,0,2,0,0,25,0,0,
+ 6,0,3,0,215,100,0,0,8,0,12,0,53,230,153,0,8,0,3,0,0,0,1,142,8,0,7,0,0,0,
+ 0,60,48,0,4,128,44,0,1,128,5,0,1,0,5,0,0,0,5,0,2,0,7,0,0,0,5,0,3,0,7,0,0,
+ 0,6,0,4,0,55,0,0,0,6,0,5,0,35,0,0,0>>.
+
+rt_newneigh_1() ->
+ <<76,0,0,0,28,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,5,0,0,0,2,0,0,1,
+ 8,0,1,0,192,168,2,3,10,0,2,0,0,14,12,186,3,162,0,0,8,0,4,0,4,0,0,0,20,0,
+ 3,0,0,0,0,0,0,0,0,0,0,0,0,0,4,0,0,0>>.
+
+rt_newneigh_2() ->
+ <<88,0,0,0,28,0,0,0,0,0,0,0,0,0,0,0,10,0,0,0,5,0,0,0,2,0,0,
+ 1,20,0,1,0,32,1,6,248,18,217,0,0,0,0,0,0,0,0,0,9,10,0,2,0,0,80,86,174,41,
+ 172,0,0,8,0,4,0,1,0,0,0,20,0,3,0,33,1,0,0,33,1,0,0,0,0,0,0,3,0,0,0>>.
+
+rt_delroute() ->
+ <<156,0,0,0,25,0,0,0,0,0,0,0,0,0,0,0,10,128,0,0,255,0,0,1,0,
+ 2,0,0,8,0,15,0,255,0,0,0,20,0,1,0,255,2,0,0,0,0,0,0,0,0,0,0,0,0,0,251,28,
+ 0,8,0,8,0,2,0,220,5,0,0,8,0,8,0,160,5,0,0,8,0,10,0,255,255,255,255,20,0,
+ 5,0,255,2,0,0,0,0,0,0,0,0,0,0,0,0,0,251,8,0,4,0,5,0,0,0,8,0,6,0,0,0,0,0,
+ 36,0,12,0,0,0,0,0,0,18,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+ 0>>.
+
+rt_newprefix() ->
+ <<60,0,0,0,52,0,0,0,0,0,0,0,0,0,0,0,10,0,0,0,5,0,0,0,3,64,
+ 3,0,20,0,1,0,32,1,6,248,18,217,0,0,0,0,0,0,0,0,0,0,12,0,2,0,128,58,9,0,0,
+ 141,39,0>>.
+
+rt_newlink_1() ->
+ <<8,2,0,0,16,0,0,0,0,0,0,0,0,0,0,0,10,0,1,0,6,0,0,0,3,16,
+ 1,0,0,0,0,0,10,0,3,0,118,108,97,110,52,0,0,0,10,0,1,0,0,25,185,71,250,19,
+ 0,0,8,0,4,0,220,5,0,0,8,0,5,0,5,0,0,0,192,1,12,0,8,0,1,0,0,0,0,128,20,0,
+ 5,0,255,255,0,0,108,53,74,4,192,16,0,0,100,0,0,0,120,0,2,0,0,0,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117,101,117,101,0,36,0,14,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,10,0,1,0,0,25,185,71,250,19,0,0,10,0,2,0,255,
+ 255,255,255,255,255,0,0,96,0,7,0,4,15,0,0,137,18,0,0,218,23,6,0,162,97,7,
+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,15,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+ 0,0,0,0,0,188,0,23,0,4,15,0,0,0,0,0,0,137,18,0,0,0,0,0,0,218,23,6,0,0,0,
+ 0,0,162,97,7,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+ 0,0,0,0,0,0,0,4,15,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,40,0,18,0,9,0,1,0,118,108,97,110,0,
+ 0,0,0,24,0,2,0,6,0,1,0,4,0,0,0,12,0,2,0,1,0,0,0,255,255,255,255>>.
+
+rt_linkinfo_complex() ->
+ <<172,1,0,0,16,0,2,0,0,0,0,0,0,0,255,255,0,0,4,3,1,0,0,0,
+ 73,0,1,0,0,0,0,0,7,0,3,0,108,111,0,0,8,0,13,0,0,0,0,0,5,0,16,0,0,0,0,0,5,
+ 0,17,0,0,0,0,0,8,0,4,0,52,64,0,0,12,0,6,0,110,111,113,117,101,117,101,0,
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,255,255,255,0,0,96,0,7,0,102,121,
+ 128,3,212,26,211,2,107,193,223,78,153,82,28,229,0,0,0,0,0,0,0,0,0,0,0,0,
+ 0,0,0,0,224,110,15,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,188,0,23,0,
+ 102,121,128,3,0,0,0,0,212,26,211,2,0,0,0,0,107,193,223,78,12,0,0,0,153,
+ 82,28,229,6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+ 0,0,0,0,0,224,110,15,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8,0,21,0,0,0,0,0,188,1,0,0,16,0,2,
+ 0,0,0,0,0,0,0,255,255,0,0,1,0,3,0,0,0,3,16,0,0,0,0,0,0,9,0,3,0,101,116,
+ 104,49,0,0,0,0,8,0,13,0,232,3,0,0,5,0,16,0,2,0,0,0,5,0,17,0,0,0,0,0,8,0,
+ 4,0,220,5,0,0,15,0,6,0,112,102,105,102,111,95,102,97,115,116,0,0,36,0,14,
+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,10,0,1,
+ 0,0,14,12,195,185,27,0,0,10,0,2,0,255,255,255,255,255,255,0,0,96,0,7,0,0,
+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0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,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+ 0,0,0,188,0,23,0,180,7,0,0,0,0,0,0,203,163,20,0,0,0,0,0,177,50,5,0,0,0,0,
+ 0,124,220,111,11,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,12,0,18,0,8,0,1,0,116,117,110,0,
+ 172,1,0,0,16,0,2,0,0,0,0,0,0,0,255,255,0,0,1,0,5,0,0,0,67,16,1,0,0,0,0,0,
+ 8,0,3,0,98,114,48,0,8,0,13,0,0,0,0,0,5,0,16,0,0,0,0,0,5,0,17,0,0,0,0,0,8,
+ 0,4,0,220,5,0,0,12,0,6,0,110,111,113,117,101,117,101,0,36,0,14,0,0,0,0,0,
+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,10,0,1,0,0,25,
+ 185,71,250,19,0,0,10,0,2,0,255,255,255,255,255,255,0,0,96,0,7,0,130,41,
+ 86,2,238,191,6,2,188,192,107,206,93,73,7,165,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+ 0,0,15,195,19,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,188,0,23,0,130,
+ 41,86,2,0,0,0,0,238,191,6,2,0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,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+ 40,0,18,0,9,0,1,0,118,108,97,110,0,0,0,0,24,0,2,0,6,0,1,0,103,0,0,0,12,0,
+ 2,0,1,0,0,0,255,255,255,255>>.
+
+%%--------------------------------------------------------------------
+%% @spec suite() -> Info
+%% Info = [tuple()]
+%% @end
+%%--------------------------------------------------------------------
+suite() ->
+ [{timetrap,{seconds,30}}].
+
+test_conntrack_new(_Config) ->
+ Msg = conntrack_new(),
+ Msg = netlink:nl_ct_enc(netlink:nl_ct_dec(Msg)).
+
+test_rt_newneigh_1(_Config) ->
+ Msg = rt_newneigh_1(),
+ Msg = netlink:nl_rt_enc(netlink:nl_rt_dec(Msg)).
+
+test_rt_newneigh_2(_Config) ->
+ Msg = rt_newneigh_2(),
+ Msg = netlink:nl_rt_enc(netlink:nl_rt_dec(Msg)).
+
+test_rt_delroute(_Config) ->
+ Msg = rt_delroute(),
+ Msg = netlink:nl_rt_enc(netlink:nl_rt_dec(Msg)).
+
+test_rt_newprefix(_Config) ->
+ Msg = rt_newprefix(),
+ Msg = netlink:nl_rt_enc(netlink:nl_rt_dec(Msg)).
+
+test_rt_newlink_1(_Config) ->
+ Msg = rt_newlink_1(),
+ Msg = netlink:nl_rt_enc(netlink:nl_rt_dec(Msg)).
+
+test_rt_newlink_2(_Config) ->
+ Msg = rt_newlink_2(),
+ Msg = netlink:nl_rt_enc(netlink:nl_rt_dec(Msg)).
+
+test_rt_linkinfo_1(_Config) ->
+ Msg = rt_linkinfo_1(),
+ Msg = netlink:nl_rt_enc(netlink:nl_rt_dec(Msg)).
+
+test_rt_linkinfo_complex(_Config) ->
+ Msg = rt_linkinfo_complex(),
+ Msg = netlink:nl_rt_enc(netlink:nl_rt_dec(Msg)).
+
+all() ->
+ [test_conntrack_new,
+ test_rt_newneigh_1, test_rt_newneigh_2, test_rt_delroute,
+ test_rt_newprefix,
+ test_rt_newlink_1, test_rt_newlink_2,
+ test_rt_linkinfo_1, test_rt_linkinfo_complex].
+
+init_per_suite(Config) ->
+ R = netlink:start(),
+ Config.
+
+end_per_suite(_Config) ->
+ ok.
+

0 comments on commit 3eda7a2

Please sign in to comment.