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

[CN-Exec] enums not copied over #765

Open
podhrmic opened this issue Dec 13, 2024 · 1 comment
Open

[CN-Exec] enums not copied over #765

podhrmic opened this issue Dec 13, 2024 · 1 comment
Assignees
Labels
bug Something isn't working CN spec testing cn CN-exec Related to CN executable spec generation, called using `cn instrument`

Comments

@podhrmic
Copy link
Contributor

Test file simple_client.c:

#include <stdint.h>
#include <stdlib.h>
#include "client.h"

#define EPOLLIN 1


uint32_t client_state_epoll_events(enum client_state state) {
    switch (state) {
        case CS_RECV_KEY_ID:
            return EPOLLIN;
    }
}

client.h is this file

The observed error is:

[root@e70383592d10 mission_key_management]# cn test --output-dir=xxx simple_client.c 
In file included from ./simple_client_gen.h:6,
                 from ./simple_client_test.c:1:
./cn.h:39:21: error: field ‘state’ has incomplete type
   39 |   enum client_state state;
      |                     ^~~~~
In file included from ./simple_client_test.c:2:
./simple_client-exec.c:9:10: fatal error: client.h: No such file or directory
    9 | #include "client.h"
      |          ^~~~~~~~~~
compilation terminated.

The generated cn.h seems to be missing the definition of enum client_state

@podhrmic
Copy link
Contributor Author

@ZippeyKeys12 ^

@ZippeyKeys12 ZippeyKeys12 changed the title [cn testing] enums not copied over [CN-Exec] enums not copied over Dec 13, 2024
@ZippeyKeys12 ZippeyKeys12 added CN-exec Related to CN executable spec generation, called using `cn instrument` cn CN spec testing bug Something isn't working labels Dec 13, 2024
@ZippeyKeys12 ZippeyKeys12 self-assigned this Dec 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working CN spec testing cn CN-exec Related to CN executable spec generation, called using `cn instrument`
Projects
None yet
Development

No branches or pull requests

3 participants