Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -446,6 +446,7 @@ cscope.out
*.orig
*.rej
*.patch
coverage_results.file
tmpdiff
tmpfile
tmporig
4 changes: 2 additions & 2 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ EXTRA_DIST = acinclude.m4 \
INSTALL \
INSTALL.GNU \
Makefile.am \
parse_cov_results.pl \
parse_cov_results.py \
PBS_License.txt \
README.array_changes \
README.coding_notes \
Expand All @@ -24,7 +24,7 @@ EXTRA_DIST = acinclude.m4 \
README.trqauthd \
README.building_40 \
Release_Notes \
run_report.pl \
run_report.py \
torque.setup \
torque.spec \
buildutils/config.mk \
Expand Down
17 changes: 12 additions & 5 deletions buildutils/torque.spec.in
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
### Features disabled by default
%bcond_with blcr
%bcond_with cpuset
%bcond_with debug
%bcond_with drmaa
%bcond_with gui
%bcond_with libcpuset
Expand All @@ -33,6 +34,7 @@
### Autoconf macro expansions
%define ac_with_blcr --%{?with_blcr:en}%{!?with_blcr:dis}able-blcr
%define ac_with_cpuset --%{?with_cpuset:en}%{!?with_cpuset:dis}able-cpuset
%define ac_with_debug --with%{!?with_debug:out}-debug CFLAGS="-O0 -g3"
%define ac_with_drmaa --%{?with_drmaa:en}%{!?with_drmaa:dis}able-drmaa
%define ac_with_gui --%{?with_gui:en}%{!?with_gui:dis}able-gui --with%{!?with_gui:out}-tcl
%define ac_with_munge --%{?with_munge:en}%{!?with_munge:dis}able-munge-auth
Expand All @@ -57,18 +59,22 @@
%{!?torque_server:%global torque_server localhost}
%{!?sendmail_path:%global sendmail_path %{_sbindir}/sendmail}

### Do not strip executables
#define __os_install_post /usr/lib/rpm/brp-compress
### Do not strip executables when debugging.
%if %{with debug}
%global __os_install_post /usr/lib/rpm/brp-compress
%global __debug_install_post %{nil}
%global debug_package %{nil}
%endif

### Handle logic for snapshots
%define tarversion @SPEC_VERSION@
#define snap 0
%if %{?snap}0
%{expand:%%define version %(echo %{tarversion} | sed 's/-snap\..*$//')}
%{expand:%%define release 0.cri.snap.%(echo %{tarversion} | sed 's/^.*-snap\.//')}
%{expand:%%define release 0.adaptive.snap.%(echo %{tarversion} | sed 's/^.*-snap\.//').0%{?dist}}
%else
%define version %{tarversion}
%define release 1.cri
%define release 1.adaptive%{?dist}
%endif

Name: @SPEC_NAME@
Expand Down Expand Up @@ -172,7 +178,8 @@ CXXFLAGS="%{?cxxflags:%{cxxflags}}%{!?cxxflags:$RPM_OPT_FLAGS}"
export CFLAGS CXXFLAGS

%configure --includedir=%{_includedir}/%{name} --with-default-server=%{torque_server} \
--with-server-home=%{torque_home} --with-sendmail=%{sendmail_path} \
--with-server-home=%{torque_home} %{ac_with_debug} %{ac_with_libcpuset} \
--with-sendmail=%{sendmail_path} %{ac_with_numa} %{ac_with_memacct} %{ac_with_top} \
--disable-dependency-tracking %{ac_with_gui} %{ac_with_scp} %{ac_with_syslog} \
--disable-gcc-warnings %{ac_with_munge} %{ac_with_pam} %{ac_with_drmaa} \
--disable-qsub-keep-override %{ac_with_blcr} %{ac_with_cpuset} %{ac_with_spool} %{?acflags}
Expand Down
4 changes: 2 additions & 2 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -718,10 +718,10 @@ AC_CHECK_LIB(crypto, BN_init,
dnl
dnl we need libxml2
dnl
xmlLib=`xml2-config --libs`
xmlLib=`xml2-config --libs | sed 's/-L@<:@^@<:@:space:@:>@@:>@* //g;s/-l//'`

dnl skip the first two chars because its -l<libname>
AC_CHECK_LIB(${xmlLib:2}, xmlGetProp,
AC_CHECK_LIB(${xmlLib}, xmlGetProp,
[],
[AC_MSG_ERROR([TORQUE needs libxml2-devel in order to build]) ])

Expand Down
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions run_report.pl → run_report.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@
print " Individual file code coverage and a Total";
print "----------------------------------------------------------------------------";
print coverage_file;
parse_res=Popen(["./parse_cov_results.pl", coverage_file]);
parse_res=Popen(["./parse_cov_results.py", coverage_file]);
res=parse_res.communicate();
file_res=Popen(["./cov_file_results.pl"]);
file_res=Popen(["./cov_file_results.py"]);
res=file_res.communicate();

if __name__ == "__main__":
Expand Down
6 changes: 4 additions & 2 deletions src/cmds/pbspoe.c
Original file line number Diff line number Diff line change
Expand Up @@ -551,7 +551,6 @@ void run_command(
char *argv[])

{
int junk = 0;
int i;
char *psyscmd;
int syssz;
Expand Down Expand Up @@ -599,7 +598,10 @@ void run_command(
strcat(psyscmd, argv[i++]);
}

junk = system(psyscmd);
if(system(psyscmd) == -1)
{
fprintf(stderr, "Error, system of %s failed\n",psyscmd);
}

clean_up(0);
}
Expand Down
4 changes: 2 additions & 2 deletions src/cmds/qsub_functions.c
Original file line number Diff line number Diff line change
Expand Up @@ -4055,8 +4055,8 @@ void main_func(

{

int errflg; /* option error */
char script[MAXPATHLEN + 1] = ""; /* name of script file */
int errflg; /* option error */
char script[MAXPATHLEN + 1] = ""; /* name of script file */
char script_tmp[MAXPATHLEN + 1] = ""; /* name of script file copy */
int script_index;
char *bnp;
Expand Down
7 changes: 5 additions & 2 deletions src/cmds/test/common_cmds/test_common_cmds.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ START_TEST(test_parse_env_line_nospace)
fail_unless(val != NULL, "val should have a value");
fail_unless(strcmp("ONE_VAR", name) == 0, "[ONE_VAR] != [%s]", name);
fail_unless(strcmp("THE_VAL", val) == 0, "[THE_VAL] != [%s]", val);
fail_unless(rc == 0);
}
END_TEST

Expand All @@ -36,6 +37,7 @@ START_TEST(test_parse_env_line_space)
fail_unless(val != NULL, "val should have a value");
fail_unless(strcmp("ONE_VAR", name) == 0, "[ONE_VAR] != [%s]", name);
fail_unless(strcmp("THE_VAL", val) == 0, "[THE_VAL] != [%s]", val);
fail_unless(rc == 0);
}
END_TEST

Expand All @@ -50,12 +52,13 @@ START_TEST(test_parse_env_line_allspace)
fail_unless(val != NULL, "val should have a value");
fail_unless(strcmp("ONE_VAR", name) == 0, "[ONE_VAR] != [%s]", name);
fail_unless(strcmp(" ", val) == 0, "[ ] != [%s]", val);
fail_unless(rc == 0);
}
END_TEST

START_TEST(test_set_env_opts)
{
char *env_var[4];
char *env_var[5];
job_data *env_hash = NULL;
memmgr *mm;
tc_num = 1;
Expand Down Expand Up @@ -157,7 +160,7 @@ void rundebug()
/* strcpy(env_var[2], "FOUR_VAR="); */
/* strcpy(env_var[3], "_=CMD"); */
/* set_env_opts(&env_hash, env_var); */
char *env_var[4];
char *env_var[5];
job_data *env_hash = NULL;
memmgr *mm;
tc_num = 1;
Expand Down
1 change: 1 addition & 0 deletions src/cmds/test/qsub_functions/test_x11_get_proto.c
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ START_TEST(test_x11_get_proto_1)
char *resp = NULL;
int debug = 1;
resp = x11_get_proto(param1, debug);
fail_unless(resp == NULL);
}
END_TEST

Expand Down
1 change: 1 addition & 0 deletions src/lib/Libsite/test/site_alt_rte/test_site_alt_rte.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ START_TEST(test_one)
fail_unless(pjob == scaf_pjob, "job ptr changed in the function!!!!");
fail_unless(qp == scaf_qp, "queue ptr changed in the function!!!!");
fail_unless(retry_time == scaf_retry_time, "retry value changed in the function!!!!");
fail_unless(rc != 0);
free(pjob);
free(qp);
}
Expand Down
7 changes: 7 additions & 0 deletions src/lib/Libutils/test/u_memmgr/test_u_memmgr.c
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@ START_TEST(test_memmgr_calloc_shuffle_shuffle_extend)
fail_unless(ptr == NULL, "zero memory request should generate NULL ptr response");

rc = memmgr_init(&mm, 48);
fail_unless(rc == 0);
data_ptr1 = (char *)memmgr_calloc(&mm, 1, 5);
strcpy(data_ptr1, "11111");
data_ptr2 = (char *)memmgr_calloc(&mm, 1, 6);
Expand Down Expand Up @@ -192,6 +193,7 @@ START_TEST(test_memmgr_free_remove)
memmgr *mm = NULL;
init_globals();
rc = memmgr_init(&mm, 48);
fail_unless(rc == 0);
data_ptr1 = (char *)memmgr_calloc(&mm, 1, 5);
strcpy(data_ptr1, "11111");
data_ptr2 = (char *)memmgr_calloc(&mm, 1, 6);
Expand All @@ -209,6 +211,7 @@ START_TEST(test_memmgr_free_remove)
mptr3 = mm->next_mgr->next_mgr;
mptr4 = mm->next_mgr->next_mgr->next_mgr;

fail_unless(mptr2 == mm->next_mgr);
memmgr_free(&mm, data_ptr1);
fail_unless(mptr3->ref_count == 2, "ref_count after free should be 2 but is:%d", mm->ref_count);
memcpy(&size, mptr3->the_mem, sizeof(int));
Expand Down Expand Up @@ -262,10 +265,12 @@ START_TEST(test_memmgr_realloc)
fail_unless(memmgr_realloc(NULL, NULL, 5) == NULL, "NULL memmgr should result in NULL ptr");
fail_unless(memmgr_realloc(&mm, NULL, 5) == NULL, "NULL memmgr should result in NULL ptr");
rc = memmgr_init(&mm, 48);
fail_unless(rc == 0);
fail_unless(memmgr_realloc(&mm, NULL, -1) == NULL, "negative size should result in NULL ptr");
fail_unless(memmgr_realloc(&mm, NULL, 5) != NULL, "NULL ptr with valid size should result in valid ptr");
memmgr_destroy(&mm);
rc = memmgr_init(&mm, 48);
fail_unless(rc == 0);
data_ptr1 = (char *)memmgr_calloc(&mm, 1, 11);
strcpy(data_ptr1, "11111111111");
ptr = (char *)mm->current_pos;
Expand Down Expand Up @@ -342,6 +347,7 @@ void rundebug()
memmgr *mm = NULL;
init_globals();
rc = memmgr_init(&mm, 48);
fail_unless(rc == 0);
data_ptr1 = (char *)memmgr_calloc(&mm, 1, 11);
strcpy(data_ptr1, "11111111111");
data_ptr2 = (char *)memmgr_realloc(&mm, data_ptr1, 4);
Expand All @@ -355,6 +361,7 @@ void rundebug()
data_ptr5 = (char *)memmgr_realloc(&mm, data_ptr4, 20);
memset(data_ptr5, '5', 6);
data_ptr6 = (char *)memmgr_realloc(&mm, data_ptr2, 50);
fail_unless(data_ptr6 != NULL);
memmgr_destroy(&mm);
}

Expand Down
2 changes: 2 additions & 0 deletions src/lib/Libutils/test/u_users/test_u_users.c
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,11 @@ Suite *u_users_suite(void)

void rundebug()
{
/*
char *user_name = strdup("root");
struct passwd *ret_user = NULL;
ret_user = getpwnam_ext(user_name);
*/
}

int main(void)
Expand Down
6 changes: 6 additions & 0 deletions src/resmom/test/catch_child/scaffolding.c
Original file line number Diff line number Diff line change
Expand Up @@ -1327,3 +1327,9 @@ int insert_thing(resizable_array *ra, void *thing)
{
return(0);
}

int release_job_reservation(job *pjob)
{
return (0);
}

8 changes: 6 additions & 2 deletions src/resmom/test/catch_child/test_post_epilogue.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ START_TEST(test_pe_negsock)
errno = EINTR;
LOGLEVEL = 2;
res = post_epilogue(pjob, ev);
/*fail_unless(res == 1, "This didn't return correctly");*/
fail_unless(res == 1, "This didn't return correctly");
free(pjob);
}
END_TEST
Expand All @@ -34,7 +34,7 @@ START_TEST(test_pe_negpostsock)
tc = 2;
errno = ETIMEDOUT;
res = post_epilogue(pjob, ev);
/*fail_unless(res == 1, "This didn't return correctly");*/
fail_unless(res == 1, "This didn't return correctly");
free(pjob);
}
END_TEST
Expand All @@ -49,6 +49,7 @@ START_TEST(test_pe_prnull)
tc = 3;
errno = EINPROGRESS;
res = post_epilogue(pjob, ev);
fail_unless(res == 1, "This didn't return correctly");
free(pjob);
}
END_TEST
Expand Down Expand Up @@ -126,6 +127,7 @@ Suite *post_epilogue_suite(void)

void rundebug()
{
/*
job *pjob = (job *)calloc(1, sizeof(job));
int ev = 0;
int res = 0;
Expand All @@ -135,6 +137,8 @@ void rundebug()
errno = EINTR;
LOGLEVEL = 7;
res = post_epilogue(pjob, ev);
fail_unless(res == 1, "This didn't return correctly");
*/
}

int main(void)
Expand Down
5 changes: 5 additions & 0 deletions src/resmom/test/start_exec/scaffolding.c
Original file line number Diff line number Diff line change
Expand Up @@ -474,3 +474,8 @@ int create_alps_reservation(
{
return(0);
}

int destroy_alps_reservation(char *reservation_id, char *apbasil_path, char *apbasil_protocol)
{
return (0);
}
10 changes: 5 additions & 5 deletions src/resmom/test/start_exec/test_start_exec.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#define MAX_TEST_ENVP 150
#define MAX_TEST_BLOCK 8096

char **penv[MAX_TEST_ENVP]; /* max pointers a bld_env_variables will create */
char *penv[MAX_TEST_ENVP]; /* max pointers a bld_env_variables will create */
char *envBuffer = NULL; /* points to the max block that bld_env_variables would ever need in this test suite */

void setup_vtable(
Expand All @@ -28,7 +28,7 @@ void setup_vtable(
vtable->v_block = vtable->v_block_start;

for (i = 0; i < MAX_TEST_ENVP; ++i)
*(penv + i) = NULL;
penv[i] = NULL;

envBuffer = calloc(MAX_TEST_BLOCK, sizeof(char));
}
Expand All @@ -48,7 +48,7 @@ int add_env_variables(
char varname[64];
char *varNval;

ptest_block = envBuffer;
ptest_block = envBuffer;
for (i=0; i < n_env_vars; i++)
{
if (i != (n_env_vars - 1))
Expand All @@ -69,8 +69,8 @@ int add_env_variables(
len = strlen(varname) + strlen(buf) + 1;
varNval = (char *) calloc(len, sizeof(char));
sprintf(varNval, "%s%s", varname, buf);
*(penv + i) = ptest_block;
strcpy(*(penv + i), varNval);
penv[i] = ptest_block;
strcpy(penv[i], varNval);
ptest_block += strlen(varNval) + 1;
if (bld_env_variables(vtable, varNval, NULL) != PBSE_NONE)
{
Expand Down
2 changes: 1 addition & 1 deletion src/server/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -51,5 +51,5 @@ install-exec-hook:
$(DESTDIR)$(sbindir)/$(program_prefix)qserverd$(program_suffix)$(EXEEXT)

uninstall-hook:
rm -f $(DESTDIR)$(PBS_ENVIRON)
rm -f $(DESTDIR)$(PBS_ENVIRON) $(DESTDIR)$(PBS_SERVER_HOME)/server_priv/nodes
rm -f $(DESTDIR)$(sbindir)/$(program_prefix)qserverd$(program_suffix)$(EXEEXT)
Loading