tests: only test arch-specific symbols
authorNaveen N. Rao <naveen.n.rao@linux.vnet.ibm.com>
Fri, 29 Apr 2016 11:14:41 +0000 (16:44 +0530)
committerNaveen N. Rao <naveen.n.rao@linux.vnet.ibm.com>
Mon, 2 May 2016 08:42:42 +0000 (14:12 +0530)
__per_cpu_start has a different address on each architecture. Instead,
use a arch-unique symbol for the test.

Signed-off-by: Naveen N. Rao <naveen.n.rao@linux.vnet.ibm.com>
tests/cc/test_c_api.cc

index 7f6d3be..5bbe72b 100644 (file)
@@ -43,8 +43,8 @@ TEST_CASE("binary resolution with `which`", "[c_api]") {
 static void _test_ksym(const char *sym, uint64_t addr, void *_) {
   if (!strcmp(sym, "startup_64")) {
     REQUIRE(addr == 0xffffffff81000000ull);
-  } else if (!strcmp(sym, "__per_cpu_start"))
-    REQUIRE(addr == 0x0);
+  } else if (!strcmp(sym, "system_reset_pSeries"))
+    REQUIRE(addr == 0xc000000000000100ull);
 }
 
 TEST_CASE("list all kernel symbols", "[c_api]") {