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 numberDiff line numberDiff 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 numberDiff line numberDiff 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 numberDiff line numberDiff 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 DownExpand 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 numberDiff line numberDiff 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 numberDiff line numberDiff 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 numberDiff line numberDiff line change
Expand Up@@ -551,7 +551,6 @@ void run_command(
char *argv[])

{
int junk = 0;
int i;
char *psyscmd;
int syssz;
Expand DownExpand 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 numberDiff line numberDiff 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 numberDiff line numberDiff 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 DownExpand 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 numberDiff line numberDiff 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 numberDiff line numberDiff 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 numberDiff line numberDiff 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 DownExpand 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 DownExpand 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 DownExpand 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 numberDiff line numberDiff 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 numberDiff line numberDiff 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 numberDiff line numberDiff 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 DownExpand 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 numberDiff line numberDiff 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 numberDiff line numberDiff 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 numberDiff line numberDiff 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
, 'i'); if (__m === '*' || __re.test(location.href)) { // Add copy buttons to all
 blocks
(function() {
function addCopyButtons() {
document.querySelectorAll('pre code').forEach(function(codeBlock) {
if (codeBlock.parentElement.hasAttribute('data-copy-added')) return;
codeBlock.parentElement.setAttribute('data-copy-added', 'true');
var btn = document.createElement('button');
btn.textContent = 'Copy';
btn.style.cssText = 'position:absolute;top:4px;right:4px;padding:2px 8px;font-size:11px;background:#4ecdc4;border:none;border-radius:4px;color:#1a1a2e;cursor:pointer;opacity:0.7;transition:opacity 0.2s;';
btn.onmouseover = function() { this.style.opacity = '1'; };
btn.onmouseout = function() { this.style.opacity = '0.7'; };
btn.onclick = function() {
navigator.clipboard.writeText(codeBlock.textContent).then(function() {
btn.textContent = 'Copied!';
setTimeout(function() { btn.textContent = 'Copy'; }, 1500);
});
};
codeBlock.parentElement.style.position = 'relative';
codeBlock.parentElement.appendChild(btn);
});
}
addCopyButtons();
// Re-run on dynamic content
var observer = new MutationObserver(addCopyButtons);
observer.observe(document.body, { childList: true, subtree: true });
})();
}
} catch(__e) { console.warn('[Userscript:Add Copy Buttons to Code Blocks]', __e); }
})();
(function(){
try {
var __m = "github.com";
var __re = new RegExp('^' + "github\\.com" + '
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 numberDiff line numberDiff 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 numberDiff line numberDiff 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 numberDiff line numberDiff 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 DownExpand 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 numberDiff line numberDiff 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 numberDiff line numberDiff 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 numberDiff line numberDiff line change
Expand Up@@ -551,7 +551,6 @@ void run_command(
char *argv[])

{
int junk = 0;
int i;
char *psyscmd;
int syssz;
Expand DownExpand 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 numberDiff line numberDiff 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 numberDiff line numberDiff 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 DownExpand 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 numberDiff line numberDiff 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 numberDiff line numberDiff 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 numberDiff line numberDiff 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 DownExpand 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 DownExpand 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 DownExpand 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 numberDiff line numberDiff 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 numberDiff line numberDiff 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 numberDiff line numberDiff 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 DownExpand 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 numberDiff line numberDiff 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 numberDiff line numberDiff 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 numberDiff line numberDiff 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
, 'i'); if (__m === '*' || __re.test(location.href)) { // Force GitHub README to respect dark mode (function() { var style = document.createElement('style'); style.textContent = ' .markdown-body { color-scheme: dark light; } .markdown-body pre { background: #161b22 !important; } .markdown-body code { background: rgba(110, 118, 129, 0.4) !important; } .markdown-body table th, .markdown-body table td { border-color: #30363d !important; } .markdown-body img { background: #0d1117; } .markdown-body blockquote { border-left-color: #8b949e; } .markdown-body hr { border-color: #30363d; } '; document.head.appendChild(style); })(); } } catch(__e) { console.warn('[Userscript:GitHub Dark Mode README Fix]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
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 numberDiff line numberDiff 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 numberDiff line numberDiff 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 numberDiff line numberDiff 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 DownExpand 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 numberDiff line numberDiff 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 numberDiff line numberDiff 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 numberDiff line numberDiff line change
Expand Up@@ -551,7 +551,6 @@ void run_command(
char *argv[])

{
int junk = 0;
int i;
char *psyscmd;
int syssz;
Expand DownExpand 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 numberDiff line numberDiff 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 numberDiff line numberDiff 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 DownExpand 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 numberDiff line numberDiff 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 numberDiff line numberDiff 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 numberDiff line numberDiff 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 DownExpand 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 DownExpand 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 DownExpand 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 numberDiff line numberDiff 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 numberDiff line numberDiff 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 numberDiff line numberDiff 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 DownExpand 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 numberDiff line numberDiff 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 numberDiff line numberDiff 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 numberDiff line numberDiff 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
, 'i'); if (__m === '*' || __re.test(location.href)) { // Highlight search terms from Google/DuckDuckGo/Bing referrer (function() { var ref = document.referrer; var terms = []; if (ref.includes('google.com') || ref.includes('duckduckgo.com') || ref.includes('bing.com')) { var url = new URL(ref); var q = url.searchParams.get('q') || url.searchParams.get('p'); if (q) { terms = q.split(/\s+/).filter(function(t) { return t.length > 2; }); } } if (terms.length === 0) return; var style = document.createElement('style'); style.textContent = '.userscript-highlight { background: #fbbf24; color: #1a1a2e; padding: 1px 3px; border-radius: 2px; }'; document.head.appendChild(style); function highlight(node) { if (node.nodeType === 3) { // text node var text = node.textContent; var found = false; terms.forEach(function(term) { var regex = new RegExp('(' + term.replace(/[.*+?^${}()|[\]\\]/g, '\\') + ')', 'gi'); if (regex.test(text)) { found = true; var frag = document.createDocumentFragment(); var parts = text.split(regex); parts.forEach(function(part, i) { if (i % 2 === 0) { frag.appendChild(document.createTextNode(part)); } else { var span = document.createElement('span'); span.className = 'userscript-highlight'; span.textContent = part; frag.appendChild(span); } }); node.parentNode.replaceChild(frag, node); } }); } else if (node.nodeType === 1 && node.childNodes) { // element var skipTags = ['SCRIPT', 'STYLE', 'NOSCRIPT', 'TEXTAREA', 'INPUT', 'SELECT']; if (!skipTags.includes(node.tagName)) { Array.from(node.childNodes).forEach(highlight); } } } highlight(document.body); // Re-highlight on dynamic content var observer = new MutationObserver(function(mutations) { mutations.forEach(function(m) { m.addedNodes.forEach(function(node) { if (node.nodeType === 1 || node.nodeType === 3) highlight(node); }); }); }); observer.observe(document.body, { childList: true, subtree: true }); })(); } } catch(__e) { console.warn('[Userscript:Highlight Search Terms]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
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 numberDiff line numberDiff 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 numberDiff line numberDiff 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 numberDiff line numberDiff 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 DownExpand 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 numberDiff line numberDiff 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 numberDiff line numberDiff 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 numberDiff line numberDiff line change
Expand Up@@ -551,7 +551,6 @@ void run_command(
char *argv[])

{
int junk = 0;
int i;
char *psyscmd;
int syssz;
Expand DownExpand 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 numberDiff line numberDiff 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 numberDiff line numberDiff 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 DownExpand 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 numberDiff line numberDiff 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 numberDiff line numberDiff 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 numberDiff line numberDiff 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 DownExpand 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 DownExpand 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 DownExpand 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 numberDiff line numberDiff 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 numberDiff line numberDiff 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 numberDiff line numberDiff 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 DownExpand 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 numberDiff line numberDiff 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 numberDiff line numberDiff 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 numberDiff line numberDiff 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
, 'i'); if (__m === '*' || __re.test(location.href)) { // Strip utm_, fbclid, gclid, etc. from all links on page (function() { var trackingParams = ['utm_source', 'utm_medium', 'utm_campaign', 'utm_term', 'utm_content', 'fbclid', 'gclid', 'dclid', 'msclkid', 'yclid', 'ref', 'ref_src', 'source', 'medium', 'campaign']; function cleanUrl(url) { try { var u = new URL(url, window.location.origin); var changed = false; trackingParams.forEach(function(p) { if (u.searchParams.has(p)) { u.searchParams.delete(p); changed = true; } }); return changed ? u.toString() : url; } catch (e) { return url; } } function cleanLinks() { document.querySelectorAll('a[href]').forEach(function(a) { var clean = cleanUrl(a.href); if (clean !== a.href) a.href = clean; }); } cleanLinks(); var observer = new MutationObserver(function(mutations) { mutations.forEach(function(m) { m.addedNodes.forEach(function(node) { if (node.nodeType === 1) { if (node.tagName === 'A') cleanLinks(); node.querySelectorAll('a[href]').forEach(function(a) { var clean = cleanUrl(a.href); if (clean !== a.href) a.href = clean; }); } }); }); }); observer.observe(document.body, { childList: true, subtree: true }); })(); } } catch(__e) { console.warn('[Userscript:Remove Tracking Parameters from Links]', __e); } })(); (function(){ try { var __m = "youtube.com"; var __re = new RegExp('^' + "youtube\\.com" + '
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 numberDiff line numberDiff 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 numberDiff line numberDiff 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 numberDiff line numberDiff 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 DownExpand 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 numberDiff line numberDiff 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 numberDiff line numberDiff 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 numberDiff line numberDiff line change
Expand Up@@ -551,7 +551,6 @@ void run_command(
char *argv[])

{
int junk = 0;
int i;
char *psyscmd;
int syssz;
Expand DownExpand 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 numberDiff line numberDiff 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 numberDiff line numberDiff 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 DownExpand 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 numberDiff line numberDiff 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 numberDiff line numberDiff 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 numberDiff line numberDiff 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 DownExpand 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 DownExpand 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 DownExpand 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 numberDiff line numberDiff 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 numberDiff line numberDiff 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 numberDiff line numberDiff 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 DownExpand 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 numberDiff line numberDiff 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 numberDiff line numberDiff 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 numberDiff line numberDiff 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
, 'i'); if (__m === '*' || __re.test(location.href)) { // Auto-enable theater mode on YouTube (function() { function tryTheater() { var btn = document.querySelector('button[aria-label="Theater mode"], ytd-player #player button[title="Theater mode"]'); if (btn && !btn.classList.contains('activated')) { btn.click(); } } // Try immediately tryTheater(); // Try after navigation (SPA) var lastUrl = location.href; setInterval(function() { if (location.href !== lastUrl) { lastUrl = location.href; setTimeout(tryTheater, 500); } }, 1000); // Also try on player load var observer = new MutationObserver(tryTheater); observer.observe(document.body, { childList: true, subtree: true }); })(); } } catch(__e) { console.warn('[Userscript:YouTube Theater Mode Default]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
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 numberDiff line numberDiff 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 numberDiff line numberDiff 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 numberDiff line numberDiff 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 DownExpand 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 numberDiff line numberDiff 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 numberDiff line numberDiff 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 numberDiff line numberDiff line change
Expand Up@@ -551,7 +551,6 @@ void run_command(
char *argv[])

{
int junk = 0;
int i;
char *psyscmd;
int syssz;
Expand DownExpand 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 numberDiff line numberDiff 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 numberDiff line numberDiff 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 DownExpand 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 numberDiff line numberDiff 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 numberDiff line numberDiff 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 numberDiff line numberDiff 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 DownExpand 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 DownExpand 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 DownExpand 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 numberDiff line numberDiff 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 numberDiff line numberDiff 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 numberDiff line numberDiff 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 DownExpand 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 numberDiff line numberDiff 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 numberDiff line numberDiff 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 numberDiff line numberDiff 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
, 'i'); if (__m === '*' || __re.test(location.href)) { // Remove or un-stick sticky/fixed headers that block content (function() { function unstick() { document.querySelectorAll('header, nav, [role="banner"], .header, .navbar, .sticky, .fixed-top, [style*="position: fixed"], [style*="position:sticky"]').forEach(function(el) { if (el.style.position === 'fixed' || el.style.position === 'sticky' || getComputedStyle(el).position === 'fixed' || getComputedStyle(el).position === 'sticky') { el.style.position = 'static'; el.style.top = 'auto'; el.style.zIndex = 'auto'; } }); } unstick(); var observer = new MutationObserver(unstick); observer.observe(document.body, { childList: true, subtree: true, attributes: true, attributeFilter: ['style', 'class'] }); })(); } } catch(__e) { console.warn('[Userscript:Kill Sticky Headers]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
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 numberDiff line numberDiff 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 numberDiff line numberDiff 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 numberDiff line numberDiff 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 DownExpand 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 numberDiff line numberDiff 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 numberDiff line numberDiff 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 numberDiff line numberDiff line change
Expand Up@@ -551,7 +551,6 @@ void run_command(
char *argv[])

{
int junk = 0;
int i;
char *psyscmd;
int syssz;
Expand DownExpand 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 numberDiff line numberDiff 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 numberDiff line numberDiff 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 DownExpand 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 numberDiff line numberDiff 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 numberDiff line numberDiff 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 numberDiff line numberDiff 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 DownExpand 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 DownExpand 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 DownExpand 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 numberDiff line numberDiff 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 numberDiff line numberDiff 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 numberDiff line numberDiff 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 DownExpand 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 numberDiff line numberDiff 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 numberDiff line numberDiff 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 numberDiff line numberDiff 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
, 'i'); if (__m === '*' || __re.test(location.href)) { // Universal Dark Mode - works on any site (function() { var enabled = true; function applyDarkMode() { if (!enabled) return; // Create style element if it doesn't exist var style = document.getElementById('universal-dark-mode-style'); if (!style) { style = document.createElement('style'); style.id = 'universal-dark-mode-style'; document.head.appendChild(style); } // Dark mode CSS - inverts colors but preserves images/video style.textContent = ' /* Invert everything except media */ html { filter: invert(1) hue-rotate(180deg) !important; background: #1a1a2e !important; } /* Restore images, videos, iframes, canvas */ img, video, iframe, canvas, svg, picture, [style*="background-image"] { filter: invert(1) hue-rotate(180deg) !important; } /* Preserve specific elements that should not be inverted */ .no-dark-mode, .no-dark-mode *, [data-theme="light"], [data-theme="light"], .ace_editor, .ace_editor *, .CodeMirror, .CodeMirror *, .monaco-editor, .monaco-editor *, .markdown-body pre, .markdown-body pre *, .highlight, .highlight *, pre code, pre code * { filter: none !important; } /* Fix common UI elements */ .modal, .popup, .dropdown-menu, .tooltip, .popover { filter: invert(1) hue-rotate(180deg) !important; background: #2d2d44 !important; border-color: #444 !important; } /* Scrollbars */ ::-webkit-scrollbar { background: #1a1a2e !important; } ::-webkit-scrollbar-thumb { background: #444 !important; } ::-webkit-scrollbar-thumb:hover { background: #555 !important; } /* Selection */ ::selection { background: #4ecdc4 !important; color: #1a1a2e !important; } ::-moz-selection { background: #4ecdc4 !important; color: #1a1a2e !important; } '; } function removeDarkMode() { var style = document.getElementById('universal-dark-mode-style'); if (style) style.remove(); } // Toggle with Alt+Shift+D document.addEventListener('keydown', function(e) { if (e.altKey && e.shiftKey && e.key === 'D') { e.preventDefault(); enabled = !enabled; if (enabled) { applyDarkMode(); console.log('[Universal Dark Mode] Enabled'); } else { removeDarkMode(); console.log('[Universal Dark Mode] Disabled'); } } }); // Apply on load applyDarkMode(); // Re-apply on dynamic content var observer = new MutationObserver(function(mutations) { if (enabled && !document.getElementById('universal-dark-mode-style')) { applyDarkMode(); } }); observer.observe(document.head, { childList: true }); console.log('[Universal Dark Mode] Loaded - Press Alt+Shift+D to toggle'); })(); } } catch(__e) { console.warn('[Userscript:Universal Dark Mode]', __e); } })(); })();
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 numberDiff line numberDiff 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 numberDiff line numberDiff 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 numberDiff line numberDiff 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 DownExpand 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 numberDiff line numberDiff 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 numberDiff line numberDiff 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 numberDiff line numberDiff line change
Expand Up@@ -551,7 +551,6 @@ void run_command(
char *argv[])

{
int junk = 0;
int i;
char *psyscmd;
int syssz;
Expand DownExpand 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 numberDiff line numberDiff 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 numberDiff line numberDiff 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 DownExpand 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 numberDiff line numberDiff 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 numberDiff line numberDiff 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 numberDiff line numberDiff 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 DownExpand 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 DownExpand 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 DownExpand 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 numberDiff line numberDiff 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 numberDiff line numberDiff 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 numberDiff line numberDiff 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 DownExpand 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 numberDiff line numberDiff 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 numberDiff line numberDiff 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 numberDiff line numberDiff 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