Running tests as a different user

This is a discussion on Running tests as a different user within the OpenSSH Development forums, part of the Networking and Network Related category; I have a need to run the 5.0p1 'tests' target as another user; specifically one who has a writable $...


Go Back   Usenet Forums > Networking and Network Related > OpenSSH Development

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-12-2008
David A. Desrosiers
 
Posts: n/a
Default Running tests as a different user

I have a need to run the 5.0p1 'tests' target as another user; specifically
one who has a writable $HOME so the tests can complete by creating and
modifying ~/.ssh/.

I tried butchering the test suite in ./regress/ and taking out all of the
'whoami', 'id -un' and other relevant '$USER' references, replacing them
with the specific environment variables and/or usernames that I need, and
when I run the 'tests' target, all of those changes are instantly clobbered
back to non-workable defaults.

I can't seem to figure out exactly where this is happening, and the only
likely culprit seems to be hard-coded in the ssh-keygen binary. I'd rather
not go modifying the innards of the compiled binaries just to pass the test
suite.

The user who configures, builds and tests software in this context, has NO
writable home directory, so all of the tests immediately fail in ugly ways.

What am I missing here? Is there some way to pass a different $HOME (such as
/tmp/ or /var/empty) prior to running the tests? Or specify a different user
to run them as? ($SUDO_USER in our case).

I tried the obvious "HOME=/tmp/ make tests", but that fails, as does other
similar methods.

Short of tricking the tree with LD_PRELOAD or similar hacks, what is the
best way to solve this problem?

Thanks in advance.

David A. Desrosiers
e: desrod@gnu-designs.com
p: 860-367-8456
_______________________________________________
openssh-unix-dev mailing list
openssh-unix-dev@mindrot.org
https://lists.mindrot.org/mailman/li...enssh-unix-dev
Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 02:49 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0