git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* Request for Assist on Limits for Tests
@ 2018-01-07 20:57 Randall S. Becker
  2018-01-07 21:18 ` brian m. carlson
  0 siblings, 1 reply; 3+ messages in thread
From: Randall S. Becker @ 2018-01-07 20:57 UTC (permalink / raw)
  To: 'git mailing list'

Hi All,

I'm looking for a proper (i.e. not sneaky) way to detect the platform I am
on during testing so that some tests can be modified/skipped other than
using the standard set of dependencies. In particular, the maximum path on
current NonStop platforms is 8-bit 2048 bytes. It appears that there are
some tests - at least from my preliminary "guessing" - that are beyond that
limit once all of the path segments are put together. I would rather have
something in git that specifies a path size limit so nothing exceeds it, but
that may be wishing.

Thanks in advance,
Randall

-- Brief whoami: NonStop&UNIX developer since approximately
UNIX(421664400)/NonStop(211288444200000000)
-- In my real life, I talk too much.




^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Request for Assist on Limits for Tests
  2018-01-07 20:57 Request for Assist on Limits for Tests Randall S. Becker
@ 2018-01-07 21:18 ` brian m. carlson
  2018-01-08 17:44   ` Randall S. Becker
  0 siblings, 1 reply; 3+ messages in thread
From: brian m. carlson @ 2018-01-07 21:18 UTC (permalink / raw)
  To: Randall S. Becker; +Cc: 'git mailing list'

[-- Attachment #1: Type: text/plain, Size: 1337 bytes --]

On Sun, Jan 07, 2018 at 03:57:59PM -0500, Randall S. Becker wrote:
> I'm looking for a proper (i.e. not sneaky) way to detect the platform I am
> on during testing so that some tests can be modified/skipped other than
> using the standard set of dependencies. In particular, the maximum path on
> current NonStop platforms is 8-bit 2048 bytes. It appears that there are
> some tests - at least from my preliminary "guessing" - that are beyond that
> limit once all of the path segments are put together. I would rather have
> something in git that specifies a path size limit so nothing exceeds it, but
> that may be wishing.

The way we usually skip tests automatically is with a test prerequisite.
You might look at t/test-lib.sh for the test_set_prereq and
test_lazy_prereq calls and synthesize one (maybe LONG_PATHS) that meets
your needs.  You can then annotate those tests with the appropriate
prerequisite.

I expect that for long paths, you will hit a lot of the same issues as
occur on Windows, where PATH_MAX may be very small.  It might be
valuable to expose this information as a build option and then set an
appropriate variable in t/test-lib.sh.
-- 
brian m. carlson / brian with sandals: Houston, Texas, US
https://www.crustytoothpaste.net/~bmc | My opinion only
OpenPGP: https://keybase.io/bk2204

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 867 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* RE: Request for Assist on Limits for Tests
  2018-01-07 21:18 ` brian m. carlson
@ 2018-01-08 17:44   ` Randall S. Becker
  0 siblings, 0 replies; 3+ messages in thread
From: Randall S. Becker @ 2018-01-08 17:44 UTC (permalink / raw)
  To: 'brian m. carlson'; +Cc: 'git mailing list'

On January 7, 2018 4:18 PM, brian m. Carlson wrote:
> On Sun, Jan 07, 2018 at 03:57:59PM -0500, Randall S. Becker wrote:
> > I'm looking for a proper (i.e. not sneaky) way to detect the platform
> > I am on during testing so that some tests can be modified/skipped
> > other than using the standard set of dependencies. In particular, the
> > maximum path on current NonStop platforms is 8-bit 2048 bytes. It
> > appears that there are some tests - at least from my preliminary
> > "guessing" - that are beyond that limit once all of the path segments
> > are put together. I would rather have something in git that specifies
> > a path size limit so nothing exceeds it, but that may be wishing.
> 
> The way we usually skip tests automatically is with a test prerequisite.
> You might look at t/test-lib.sh for the test_set_prereq and
test_lazy_prereq
> calls and synthesize one (maybe LONG_PATHS) that meets your needs.  You
> can then annotate those tests with the appropriate prerequisite.
> 
> I expect that for long paths, you will hit a lot of the same issues as
occur on
> Windows, where PATH_MAX may be very small.  It might be valuable to
> expose this information as a build option and then set an appropriate
> variable in t/test-lib.sh.

Where I am, at this point: I have PATH_MAX defined in Makefile as optional
and which can be specified as a number in config.mak.uname. If provided, it
adds -DPATH_MAX to BASIC_CFLAGS, which will ensure consistency with limits.h
(if the values are different, at least c99 warns about it). I've also got it
into GIT-BUILD-OPTIONS, if defined. From there it seems straight-forward to
use it in test scripts using standard shell scripting, however, I can't find
a good model/function for what would be a prerequisite check consistent with
existing git test methods - you know, clarity. One approach I have been
pursuing is to use test_set_prereq if PATH_MAX is defined, and add a new
method like test_missing_prereq_eval that would take PATH_MAX and an
expression, like -le 2048, to cause a test to be skipped if the variable is
defined but the evaluation fails. I'm still having noodling through trying
to make that work, and if anyone has a better idea (please have a better
idea!!), please please suggest it.

Cheers,
Randall

-- Brief whoami: NonStop&UNIX developer since approximately
UNIX(421664400)/NonStop(211288444200000000)
-- In my real life, I talk too much.




^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-01-08 17:45 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-01-07 20:57 Request for Assist on Limits for Tests Randall S. Becker
2018-01-07 21:18 ` brian m. carlson
2018-01-08 17:44   ` Randall S. Becker

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).