@needs_dlfcn
def test_dylink_global_var(self):
    self.dylink_test(main='\n      #include <stdio.h>\n      extern int x;\n      int main() {\n        printf("extern is %d.\\n", x);\n        return 0;\n      }\n    ', side='\n      int x = 123;\n    ', expected=['extern is 123.\n'])
@needs_dlfcn
def test_dylink_global_var(self):
    self.dylink_test(main='\n      #include <stdio.h>\n      extern int x;\n      int main() {\n        printf("extern is %d.\\n", x);\n        return 0;\n      }\n    ', side='\n      int x = 123;\n    ', expected=['extern is 123.\n'])