Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mock generated code runs failed on ARM #67

Open
bzhaoopenstack opened this issue Jan 14, 2020 · 3 comments
Open

Mock generated code runs failed on ARM #67

bzhaoopenstack opened this issue Jan 14, 2020 · 3 comments

Comments

@bzhaoopenstack
Copy link

When I test a software whose code is based on cmockery. The software is greenplum database.
The genarated file is
~/src/gpdb$ vi src/test/unit/mock/backend/libpq/pqexpbuffer_mock.c

bool
appendPQExpBufferVA(PQExpBuffer str, const char * fmt, va_list args)
{
check_expected(str);
check_expected(fmt);
check_expected(args);
optional_assignment(fmt);
return (bool) mock();
}

I exec 'make -s unittest-check' amd get error.
../../../../../src/test/unit/mock/backend/libpq/pqexpbuffer_mock.c: In function 'appendPQExpBufferVA':
../../../../../src/test/unit/mock/backend/libpq/pqexpbuffer_mock.c:110:2: error: aggregate value used where an integer was expected
check_expected(args);
^~~~~~~~~~~~~~
: recipe for target '../../../../../src/test/unit/mock/backend/libpq/pqexpbuffer_mock.o' failed
make[4]: *** [../../../../../src/test/unit/mock/backend/libpq/pqexpbuffer_mock.o] Error 1
../../../../src/backend/common.mk:52: recipe for target 'unittest-check-local' failed
make[3]: *** [unittest-check-local] Error 2
../../../src/backend/common.mk:49: recipe for target 'unittest-check-dispatcher-recurse' failed
make[2]: *** [unittest-check-dispatcher-recurse] Error 2
common.mk:49: recipe for target 'unittest-check-cdb-recurse' failed
make[1]: *** [unittest-check-cdb-recurse] Error 2
GNUmakefile:173: recipe for target 'unittest-check' failed
make: *** [unittest-check] Error 2

I run this test on both X86 and ARM machines. So I guess it might be different on these different ARCH.

Any idea to fix it? Thanks

@bzhaoopenstack
Copy link
Author

Any people maintain this repo?

@stewartmiles
Copy link
Contributor

@mbrukman and I have been part time maintaining, happy to review a pull request.

@bzhaoopenstack
Copy link
Author

Thanks sir, @stewartmiles . @mbrukman
To be honest, I'm not sure I can fix it. Could you please give some suggests? Thanks very much

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants