{"thread":{"id":"47561","subject":"Request for Assist on Limits for Tests","startedAt":"2018-01-07T20:58:10Z","lastAt":"2018-01-08T17:45:04Z","messageCount":3,"participants":["Randall S. Becker","brian m. carlson"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"336107","messageId":"000d01d387fa$36a65300$a3f2f900$@nexbridge.com","threadId":"47561","inReplyTo":null,"subject":"Request for Assist on Limits for Tests","fromName":"Randall S. Becker","fromEmail":"rsbecker@nexbridge.com","sentAt":"2018-01-07T20:57:59Z","receivedAt":"2018-01-07T20:58:10Z","isPatch":false,"sender":{"key":"randall.becker@nexbridge.ca","avatar":"https://avatars.githubusercontent.com/u/28956764?v=4"},"body":"Hi All,\n\nI'm looking for a proper (i.e. not sneaky) way to detect the platform I am\non during testing so that some tests can be modified/skipped other than\nusing the standard set of dependencies. In particular, the maximum path on\ncurrent NonStop platforms is 8-bit 2048 bytes. It appears that there are\nsome tests - at least from my preliminary \"guessing\" - that are beyond that\nlimit once all of the path segments are put together. I would rather have\nsomething in git that specifies a path size limit so nothing exceeds it, but\nthat may be wishing.\n\nThanks in advance,\nRandall\n\n-- Brief whoami: NonStop&UNIX developer since approximately\nUNIX(421664400)/NonStop(211288444200000000)\n-- In my real life, I talk too much.\n\n\n\n"},{"id":"336108","messageId":"20180107211829.GA5946@genre.crustytoothpaste.net","threadId":"47561","inReplyTo":"000d01d387fa$36a65300$a3f2f900$@nexbridge.com","subject":"Re: Request for Assist on Limits for Tests","fromName":"brian m. carlson","fromEmail":"sandals@crustytoothpaste.net","sentAt":"2018-01-07T21:18:29Z","receivedAt":"2018-01-07T21:18:42Z","isPatch":false,"sender":{"key":"sandals@crustytoothpaste.net","avatar":"https://avatars.githubusercontent.com/u/497054?v=4"},"body":"On Sun, Jan 07, 2018 at 03:57:59PM -0500, Randall S. Becker wrote:\n> I'm looking for a proper (i.e. not sneaky) way to detect the platform I am\n> on during testing so that some tests can be modified/skipped other than\n> using the standard set of dependencies. In particular, the maximum path on\n> current NonStop platforms is 8-bit 2048 bytes. It appears that there are\n> some tests - at least from my preliminary \"guessing\" - that are beyond that\n> limit once all of the path segments are put together. I would rather have\n> something in git that specifies a path size limit so nothing exceeds it, but\n> that may be wishing.\n\nThe way we usually skip tests automatically is with a test prerequisite.\nYou might look at t/test-lib.sh for the test_set_prereq and\ntest_lazy_prereq calls and synthesize one (maybe LONG_PATHS) that meets\nyour needs.  You can then annotate those tests with the appropriate\nprerequisite.\n\nI expect that for long paths, you will hit a lot of the same issues as\noccur on Windows, where PATH_MAX may be very small.  It might be\nvaluable to expose this information as a build option and then set an\nappropriate variable in t/test-lib.sh.\n-- \nbrian m. carlson / brian with sandals: Houston, Texas, US\nhttps://www.crustytoothpaste.net/~bmc | My opinion only\nOpenPGP: https://keybase.io/bk2204\n"},{"id":"336159","messageId":"005401d388a8$60f81270$22e83750$@nexbridge.com","threadId":"47561","inReplyTo":"20180107211829.GA5946@genre.crustytoothpaste.net","subject":"RE: Request for Assist on Limits for Tests","fromName":"Randall S. Becker","fromEmail":"rsbecker@nexbridge.com","sentAt":"2018-01-08T17:44:43Z","receivedAt":"2018-01-08T17:45:04Z","isPatch":false,"sender":{"key":"randall.becker@nexbridge.ca","avatar":"https://avatars.githubusercontent.com/u/28956764?v=4"},"body":"On January 7, 2018 4:18 PM, brian m. Carlson wrote:\n> On Sun, Jan 07, 2018 at 03:57:59PM -0500, Randall S. Becker wrote:\n> > I'm looking for a proper (i.e. not sneaky) way to detect the platform\n> > I am on during testing so that some tests can be modified/skipped\n> > other than using the standard set of dependencies. In particular, the\n> > maximum path on current NonStop platforms is 8-bit 2048 bytes. It\n> > appears that there are some tests - at least from my preliminary\n> > \"guessing\" - that are beyond that limit once all of the path segments\n> > are put together. I would rather have something in git that specifies\n> > a path size limit so nothing exceeds it, but that may be wishing.\n> \n> The way we usually skip tests automatically is with a test prerequisite.\n> You might look at t/test-lib.sh for the test_set_prereq and\ntest_lazy_prereq\n> calls and synthesize one (maybe LONG_PATHS) that meets your needs.  You\n> can then annotate those tests with the appropriate prerequisite.\n> \n> I expect that for long paths, you will hit a lot of the same issues as\noccur on\n> Windows, where PATH_MAX may be very small.  It might be valuable to\n> expose this information as a build option and then set an appropriate\n> variable in t/test-lib.sh.\n\nWhere I am, at this point: I have PATH_MAX defined in Makefile as optional\nand which can be specified as a number in config.mak.uname. If provided, it\nadds -DPATH_MAX to BASIC_CFLAGS, which will ensure consistency with limits.h\n(if the values are different, at least c99 warns about it). I've also got it\ninto GIT-BUILD-OPTIONS, if defined. From there it seems straight-forward to\nuse it in test scripts using standard shell scripting, however, I can't find\na good model/function for what would be a prerequisite check consistent with\nexisting git test methods - you know, clarity. One approach I have been\npursuing is to use test_set_prereq if PATH_MAX is defined, and add a new\nmethod like test_missing_prereq_eval that would take PATH_MAX and an\nexpression, like -le 2048, to cause a test to be skipped if the variable is\ndefined but the evaluation fails. I'm still having noodling through trying\nto make that work, and if anyone has a better idea (please have a better\nidea!!), please please suggest it.\n\nCheers,\nRandall\n\n-- Brief whoami: NonStop&UNIX developer since approximately\nUNIX(421664400)/NonStop(211288444200000000)\n-- In my real life, I talk too much.\n\n\n\n"}]}