OSDN Git Service

tests: add socket tagging test for qtaguid kernel netfilter module
authorJP Abgrall <jpa@google.com>
Fri, 9 Sep 2011 21:35:17 +0000 (14:35 -0700)
committerJP Abgrall <jpa@google.com>
Thu, 15 Sep 2011 22:42:51 +0000 (15:42 -0700)
commit73b89ae952174d04c34623ec40267829236dbcf9
treea2befa38b65a8ebae3500c76065e3c5fe2ebc413
parent01cef7d875c77ad5efed9e73d0e3d60a258f79de
tests: add socket tagging test for qtaguid kernel netfilter module

Add a small test to verify that socket tagging is not hopelessly
broken.

Test for
 - invalid: arg count, command, tags.
 - double tagging
 - acct_tag changing
 - optional uid
 - 64bit unsigned vs signed
 - invalid sock_fd
 - multiple entries
 - untagging
 - uid/gid checking + max tags.

It tries its best to allow concurrent invocations, but it just
can not be sure that it always detects the in-kernel addresses of
the sockets it has tagged.

Change-Id: I4e372fcddbd0b1cd6ba5d8be4692e0f31ec71a99
tests/iptables/Android.mk [new file with mode: 0644]
tests/iptables/qtaguid/Android.mk [new file with mode: 0644]
tests/iptables/qtaguid/socketTag.cpp [new file with mode: 0644]