xref: /linux/tools/net/sunrpc/xdrgen/tests/bad-program-number-too-large.x (revision d141ec2825b4d3ec52f27c43bdd864090159273a)
1 /*
2  * NEGATIVE TEST CASE -- xdrgen must REJECT this specification.
3  *
4  * RFC 5531 encodes program, version, and procedure numbers as unsigned
5  * 32-bit integers (Section 9). This spec gives the program a number one
6  * past the 32-bit maximum, which the front end must reject.
7  *
8  * Expected diagnostic:
9  *   program number 4294967296 in program 'BADPROG' exceeds 4294967295
10  *
11  * The tests directory has no automated runner; exercise by hand:
12  *   ./xdrgen definitions tests/bad-program-number-too-large.x   (must fail)
13  */
14 
15 program BADPROG {
16 	version BADVERS {
17 		void BADPROC_NULL(void) = 0;
18 	} = 1;
19 } = 4294967296;
20