[tests] Disable some tests on Android due to missing APIs
authorMarek Habersack <grendel@twistedcode.net>
Tue, 21 Jul 2015 09:09:35 +0000 (11:09 +0200)
committerMarek Habersack <grendel@twistedcode.net>
Tue, 21 Jul 2015 09:16:09 +0000 (11:16 +0200)
bionic doesn't have the following entries:

  setgrent
  getgrnam_r
  setpwent

API 21 in the NDK conditionally declares some of those but they are absent
from either libc.so or libc.a.

mcs/class/Mono.Posix/Test/Mono.Unix/UnixGroupTest.cs
mcs/class/Mono.Posix/Test/Mono.Unix/UnixUserTest.cs

index 0d2971ef8d035c1847e5341a4660bac2b8332a67..81e775e64b0d517b962928b2b4bd04301390aabf 100644 (file)
@@ -25,6 +25,7 @@ namespace MonoTests.Mono.Unix {
        public class UnixGroupTest
        {
                [Test]
+               [Category ("AndroidNotWorking")] // API 21 conditionally has setgrent in the NDK headers, but bionic doesn't export it
                public void ListAllGroups_ToString ()
                {
                        try {
@@ -41,6 +42,7 @@ namespace MonoTests.Mono.Unix {
                }
 
                [Test]
+               [Category ("AndroidNotWorking")] // API 21 conditionally has setgrent in the NDK headers, but bionic doesn't export it
                public void ReentrantConstructors ()
                {
                        var seen = new Dictionary<string, object> ();
@@ -65,6 +67,7 @@ namespace MonoTests.Mono.Unix {
                }
 
                [Test]
+               [Category ("AndroidNotWorking")] // API 21 conditionally has setgrent in the NDK headers, but bionic doesn't export it
                public void NonReentrantSyscalls ()
                {
                        var seen = new Dictionary<string, object> ();
@@ -95,6 +98,7 @@ namespace MonoTests.Mono.Unix {
                }
 
                [Test]
+               [Category ("AndroidNotWorking")] // API 21 conditionally has getgrnam_r in the NDK headers, but bionic doesn't export it
                public void InvalidGroups_Constructor_Name ()
                {
                        string[] badGroups = new string[]{"i'm bad", "so am i", "does-not-exist"};
index 366f5e6ad3b570dddbc03a24213be6ad98ce9706..0e5fa71c1ec5ce8d2b54ca87914c09bd71c466ca 100644 (file)
@@ -25,6 +25,7 @@ namespace MonoTests.Mono.Unix {
        public class UnixUserTest
        {
                [Test]
+               [Category ("AndroidNotWorking")] // setpwent is missing from bionic
                public void ListAllUsers_ToString ()
                {
                        try {
@@ -80,6 +81,7 @@ namespace MonoTests.Mono.Unix {
 
                [Test]
                [Category ("NotOnMac")]
+               [Category ("AndroidNotWorking")] // setpwent is missing from bionic
                public void NonReentrantSyscalls ()
                {
                        ArrayList user_ids = new ArrayList (4);